Submitted By: Jim Gifford (jim at linuxfromscratch dot org) Date: 12-21-2007 Initial Package Version: 5.6 Origin: Upstream Upstream Status: Applied Description: This is a branch update for NCurses-5.6, and should be rechecked periodically. This patch covers up to 5.6-20071215. diff -Naur ncurses-5.6.orig/Ada95/gen/Makefile.in ncurses-5.6/Ada95/gen/Makefile.in --- ncurses-5.6.orig/Ada95/gen/Makefile.in 2006-12-17 11:53:33.000000000 -0500 +++ ncurses-5.6/Ada95/gen/Makefile.in 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. # +# Copyright (c) 1998-2006,2007 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,7 +28,7 @@ # # Author: Juergen Pfeifer, 1996 # -# $Id: Makefile.in,v 1.51 2006/12/17 16:53:33 tom Exp $ +# $Id: Makefile.in,v 1.60 2007/09/15 17:55:33 tom Exp $ # .SUFFIXES: @@ -42,10 +42,13 @@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ +bindir = @bindir@ + ADA_INCLUDE = $(DESTDIR)@ADA_INCLUDE@ ADA_OBJECTS = $(DESTDIR)@ADA_OBJECTS@ INSTALL = @INSTALL@ +INSTALL_PROG = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ AWK = @AWK@ @@ -78,6 +81,9 @@ M4 = m4 M4FLAGS = +ADACURSES_CONFIG = adacurses-config + +WRAPPER = sh $(top_srcdir)/misc/shlib GENERATE = ./gen$x '@DFT_ARG_SUFFIX@' DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d' @@ -92,17 +98,18 @@ GEN_FILES0 = Base_Defs -GEN_FILES1 = Key_Definitions \ - Old_Keys \ - Character_Attribute_Set_Rep \ +GEN_FILES1 = ACS_Map \ AC_Rep \ + Base_Defs \ + Character_Attribute_Set_Rep \ Color_Defs \ - ACS_Map \ + Key_Definitions \ Linker_Options \ - Base_Defs \ - Window_Offsets \ + Old_Keys \ + Public_Variables \ + Trace_Defs \ Version_Info \ - Trace_Defs + Window_Offsets GEN_FILES2 = Menu_Opt_Rep \ Menu_Base_Defs \ @@ -123,6 +130,7 @@ Eti_Defs GEN_TARGETS = $(ADA_SRCDIR)/$(ABASE).ads \ + $(ADA_SRCDIR)/$(ABASE).adb \ $(ADA_SRCDIR)/$(ABASE)-aux.ads \ $(ADA_SRCDIR)/$(ABASE)-trace.ads \ $(ADA_SRCDIR)/$(ABASE)-menus.ads \ @@ -137,6 +145,7 @@ $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads GEN_SRC = $(srcdir)/$(ABASE).ads.m4 \ + $(srcdir)/$(ABASE).adb.m4 \ $(srcdir)/$(ABASE)-aux.ads.m4 \ $(srcdir)/$(ABASE)-trace.ads.m4 \ $(srcdir)/$(ABASE)-menus.ads.m4 \ @@ -159,7 +168,7 @@ $(ADA_INCLUDE) \ $(ADA_OBJECTS) : - $(top_srcdir)/mkinstalldirs $@ + sh $(top_srcdir)/mkdirs.sh $@ install \ install.libs :: $(ADA_INCLUDE) @@ -177,6 +186,10 @@ @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS) @-chmod u+x $(ADA_SRCDIR)/*.ali +install \ +install.libs :: $(DESTDIR)$(bindir) adacurses-config + $(INSTALL_PROG) adacurses-config $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG) + uninstall \ uninstall.libs :: @echo removing package $(ALIB) from $(ADA_INCLUDE) @@ -187,93 +200,106 @@ @echo removing package $(ALIB) from $(ADA_OBJECTS) -@cd $(ADA_OBJECTS) && rm -f $(ALIB)[-.]* +uninstall \ +uninstall.libs :: + -rm -f $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG) + gen$x: gen.o @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ gen.o: $(srcdir)/gen.c $(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c - +################################################################################ Character_Attribute_Set_Rep: gen$x - $(GENERATE) B A >$@ + $(WRAPPER) "$(GENERATE) B A" >$@ Base_Defs: gen$x - $(GENERATE) B B >$@ + $(WRAPPER) "$(GENERATE) B B" >$@ Color_Defs: gen$x - $(GENERATE) B C >$@ + $(WRAPPER) "$(GENERATE) B C" >$@ + +Window_Offsets: gen$x + $(WRAPPER) "$(GENERATE) B D" >$@ Key_Definitions: gen$x - $(GENERATE) B K >$@ + $(WRAPPER) "$(GENERATE) B K" >$@ -Old_Keys: gen$x - $(GENERATE) B O >$@ +Linker_Options: gen$x + $(WRAPPER) "$(GENERATE) B L" >$@ ACS_Map: gen$x - $(GENERATE) B M >$@ + $(WRAPPER) "$(GENERATE) B M" >$@ -AC_Rep: gen$x - $(GENERATE) B R >$@ +Old_Keys: gen$x + $(WRAPPER) "$(GENERATE) B O" >$@ -Linker_Options: gen$x - $(GENERATE) B L >$@ +Public_Variables: gen$x + $(WRAPPER) "$(GENERATE) B P" >$@ -Version_Info: gen$x - $(GENERATE) B V >$@ +AC_Rep: gen$x + $(WRAPPER) "$(GENERATE) B R" >$@ -Window_Offsets: gen$x - $(GENERATE) B D >$@ +Version_Info: gen$x + $(WRAPPER) "$(GENERATE) B V" >$@ Trace_Defs: gen$x - $(GENERATE) B T >$@ - + $(WRAPPER) "$(GENERATE) B T" >$@ +################################################################################ Menu_Opt_Rep: gen$x - $(GENERATE) M R >$@ + $(WRAPPER) "$(GENERATE) M R" >$@ Menu_Base_Defs: gen$x - $(GENERATE) M B >$@ + $(WRAPPER) "$(GENERATE) M B" >$@ Menu_Linker_Options: gen$x - $(GENERATE) M L >$@ + $(WRAPPER) "$(GENERATE) M L" >$@ Item_Rep: gen$x - $(GENERATE) M I >$@ - + $(WRAPPER) "$(GENERATE) M I" >$@ +################################################################################ Form_Opt_Rep: gen$x - $(GENERATE) F R >$@ + $(WRAPPER) "$(GENERATE) F R" >$@ Form_Base_Defs: gen$x - $(GENERATE) F B >$@ + $(WRAPPER) "$(GENERATE) F B" >$@ Form_Linker_Options: gen$x - $(GENERATE) F L >$@ + $(WRAPPER) "$(GENERATE) F L" >$@ Field_Rep: gen$x - $(GENERATE) F I >$@ - + $(WRAPPER) "$(GENERATE) F I" >$@ +################################################################################ Mouse_Base_Defs: gen$x - $(GENERATE) P B >$@ + $(WRAPPER) "$(GENERATE) P B" >$@ Mouse_Event_Rep: gen$x - $(GENERATE) P M >$@ + $(WRAPPER) "$(GENERATE) P M" >$@ Mouse_Events: gen$x - $(GENERATE) B E >$@ + $(WRAPPER) "$(GENERATE) B E" >$@ Panel_Linker_Options: gen$x - $(GENERATE) P L >$@ + $(WRAPPER) "$(GENERATE) P L" >$@ Chtype_Def: gen$x - $(GENERATE) E C >$@ + $(WRAPPER) "$(GENERATE) E C" >$@ Eti_Defs: gen$x - $(GENERATE) E E >$@ - + $(WRAPPER) "$(GENERATE) E E" >$@ +################################################################################ $(ADA_SRCDIR)/$(ABASE).ads: $(srcdir)/$(ABASE).ads.m4 \ $(GEN_FILES1) $(srcdir)/normal.m4 $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \ $(srcdir)/$(ABASE).ads.m4 |\ $(DEL_ADAMODE) >$@ +$(ADA_SRCDIR)/$(ABASE).adb: $(srcdir)/$(ABASE).adb.m4 \ + $(GEN_FILES1) $(srcdir)/normal.m4 + $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \ + $(srcdir)/$(ABASE).adb.m4 |\ + $(DEL_ADAMODE) >$@ + $(ADA_SRCDIR)/$(ABASE)-aux.ads: $(srcdir)/$(ABASE)-aux.ads.m4 \ $(GEN_FILES5) $(srcdir)/normal.m4 $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \ @@ -357,8 +383,8 @@ tags: ctags *.[ch] -TAGS: - etags *.[ch] +@MAKE_UPPER_TAGS@TAGS: +@MAKE_UPPER_TAGS@ etags *.[ch] mostlyclean :: -rm -f a.out core gen$x *.o @@ -372,7 +398,8 @@ -rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp distclean :: clean - rm -f Makefile + -rm -f adacurses-config + -rm -f Makefile realclean :: distclean @@ -408,9 +435,14 @@ @mkdir -p $(HTML_DIR) cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb] ln -sf ../src/*.ali . - for f in $(GEN_SRC); do \ + @echo "Filtering generated files" + @for f in $(GEN_SRC); do \ + h=`basename $$f` ;\ g=`basename $$f .ads.m4` ;\ - $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\ + if test "$$g" != "$$h" ; then \ + $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\ + echo "... $$g.ads" ;\ + fi \ done @-rm -f $(HTML_DIR)/$(ALIB)*.htm* $(GNATHTML) -d -f $(ALIB)*.ads @@ -423,7 +455,7 @@ sed -e 's/3X/3x/g' |\ sed -e 's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\ sed -e 's%</A>%%g' > $$a.tmp ;\ - mv $$a.tmp $$f ;\ + mv $$a.tmp $$f ;\ done @rm -f *.ad[sb] *.ali *.tmp @for f in funcs.htm main.htm ; do \ diff -Naur ncurses-5.6.orig/Ada95/gen/adacurses-config.in ncurses-5.6/Ada95/gen/adacurses-config.in --- ncurses-5.6.orig/Ada95/gen/adacurses-config.in 1969-12-31 19:00:00.000000000 -0500 +++ ncurses-5.6/Ada95/gen/adacurses-config.in 2007-12-21 00:02:35.000000000 -0500 @@ -0,0 +1,35 @@ +#! /bin/sh +# $Id: adacurses-config.in,v 1.2 2007/04/07 21:06:50 tom Exp $ +# +# This script will return the option to add to `gnatmake' for using +# AdaCurses. +# + +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@" + +VERSION="@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@" + +CFLAGS="-I$libdir/adacurses -L$libdir/adacurses" +LIBS="-L$prefix/lib -lAdaCurses" + +case "x$1" in + x--version) + echo AdaCurses $VERSION + ;; + x--cflags) + echo $CFLAGS + ;; + x--libs) + echo $LIBS + ;; + x) + # if no parameter is given, give what gnatmake needs + echo $CFLAGS -largs $LIBS + ;; + *) + echo 'Usage: adacurses-config [--version | --cflags | --libs]' >&2 + exit 1 + ;; +esac diff -Naur ncurses-5.6.orig/Ada95/gen/gen.c ncurses-5.6/Ada95/gen/gen.c --- ncurses-5.6.orig/Ada95/gen/gen.c 2005-01-22 12:03:48.000000000 -0500 +++ ncurses-5.6/Ada95/gen/gen.c 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998,2005,2007 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 - $Id: gen.c,v 1.40 2005/01/22 17:03:48 tom Exp $ + $Id: gen.c,v 1.48 2007/05/05 17:24:36 tom Exp $ --------------------------------------------------------------------------*/ /* This program generates various record structures and constants from the @@ -41,6 +41,8 @@ to produce the real source. */ +#include + #include #include #include @@ -771,6 +773,23 @@ static void gen_acs(void) { + printf(" type C_ACS_Map is array (Character'Val (0) .. Character'Val (127))\n"); + printf(" of Attributed_Character;\n"); +#if USE_REENTRANT || BROKEN_LINKER + printf(" type C_ACS_Ptr is access C_ACS_Map;\n"); + printf(" function ACS_Map return C_ACS_Ptr;\n"); + printf(" pragma Import (C, ACS_Map, \"_nc_acs_map\");\n"); +#else + printf(" ACS_Map : C_ACS_Map;\n"); + printf(" pragma Import (C, ACS_Map, \"acs_map\");\n"); +#endif + printf(" --\n"); + printf(" --\n"); + printf(" -- Constants for several characters from the Alternate Character Set\n"); + printf(" -- You must use these constants as indices into the ACS_Map array\n"); + printf(" -- to get the corresponding attributed character at runtime.\n"); + printf(" --\n"); + #ifdef ACS_ULCORNER acs_def("ACS_Upper_Left_Corner", &ACS_ULCORNER); #endif @@ -877,8 +896,7 @@ printf(" %-25s : constant Event_Mask := 8#%011lo#;\n", \ #name, name) -static -void +static void gen_mouse_events(void) { mmask_t all1 = 0; @@ -1004,6 +1022,56 @@ GEN_EVENT(BUTTON4_EVENTS, all4); } +static void +wrap_one_var(const char *c_var, + const char *c_type, + const char *ada_func, + const char *ada_type) +{ +#if USE_REENTRANT + /* must wrap variables */ + printf("\n"); + printf(" function %s return %s\n", ada_func, ada_type); + printf(" is\n"); + printf(" function Result return %s;\n", c_type); + printf(" pragma Import (C, Result, \"_nc_%s\");\n", c_var); + printf(" begin\n"); + if (strcmp(c_type, ada_type)) + printf(" return %s (Result);\n", ada_type); + else + printf(" return Result;\n"); + printf(" end %s;\n", ada_func); +#else + /* global variables are really global */ + printf("\n"); + printf(" function %s return %s\n", ada_func, ada_type); + printf(" is\n"); + printf(" Result : %s;\n", c_type); + printf(" pragma Import (C, Result, \"%s\");\n", c_var); + printf(" begin\n"); + if (strcmp(c_type, ada_type)) + printf(" return %s (Result);\n", ada_type); + else + printf(" return Result;\n"); + printf(" end %s;\n", ada_func); +#endif +} + +#define GEN_PUBLIC_VAR(c_var, c_type, ada_func, ada_type) \ + wrap_one_var(#c_var, #c_type, #ada_func, #ada_type) + +static void +gen_public_vars(void) +{ + GEN_PUBLIC_VAR(stdscr, Window, Standard_Window, Window); + GEN_PUBLIC_VAR(curscr, Window, Current_Window, Window); + GEN_PUBLIC_VAR(LINES, C_Int, Lines, Line_Count); + GEN_PUBLIC_VAR(COLS, C_Int, Columns, Column_Count); + GEN_PUBLIC_VAR(TABSIZE, C_Int, Tab_Size, Natural); + GEN_PUBLIC_VAR(COLORS, C_Int, Number_Of_Colors, Natural); + GEN_PUBLIC_VAR(COLOR_PAIRS, C_Int, Number_Of_Color_Pairs, Natural); +} + /* * Output some comment lines indicating that the file is generated. * The name parameter is the name of the facility to be used in @@ -1178,70 +1246,21 @@ return strlen(buf); } -#define GEN_OFFSET(member,itype) \ - if (sizeof(((WINDOW*)0)->member)==sizeof(itype)) { \ - o = offsetof(WINDOW, member); \ - if ((o%sizeof(itype) == 0)) { \ - printf(" Offset%-*s : constant Natural := %2ld; -- %s\n", \ - 12, #member, (long)(o/sizeof(itype)),#itype); \ - } \ - } - static void gen_offsets(void) { - long o; 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"; } printf(" Sizeof%-*s : constant Natural := %2ld; -- %s\n", @@ -1291,9 +1310,6 @@ case 'A': /* chtype translation into Ada95 record type */ gen_attr_set("Character_Attribute_Set"); break; - case 'K': /* translation of keycodes */ - gen_keydefs(0); - break; case 'B': /* write some initial comment lines */ basedefs(); break; @@ -1306,24 +1322,30 @@ case 'E': /* generate Mouse Event codes */ gen_mouse_events(); break; - case 'M': /* generate constants for the ACS characters */ - gen_acs(); + case 'K': /* translation of keycodes */ + gen_keydefs(0); break; case 'L': /* generate the Linker_Options pragma */ gen_linkopts(); break; + case 'M': /* generate constants for the ACS characters */ + gen_acs(); + break; case 'O': /* generate definitions of the old key code names */ gen_keydefs(1); break; + case 'P': /* generate definitions of the public variables */ + gen_public_vars(); + break; case 'R': /* generate representation clause for Attributed character */ gen_chtype_rep("Attributed_Character"); break; - case 'V': /* generate version info */ - gen_version_info(); - break; case 'T': /* generate the Trace info */ gen_trace("Trace_Attribute_Set"); break; + case 'V': /* generate version info */ + gen_version_info(); + break; default: break; } diff -Naur ncurses-5.6.orig/Ada95/gen/html.m4 ncurses-5.6/Ada95/gen/html.m4 --- ncurses-5.6.orig/Ada95/gen/html.m4 2006-04-22 19:16:44.000000000 -0400 +++ ncurses-5.6/Ada95/gen/html.m4 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 2000,2006 Free Software Foundation, Inc. * +dnl Copyright (c) 2000-2006,2007 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,7 +26,7 @@ dnl authorization. * dnl*************************************************************************** dnl -dnl $Id: html.m4,v 1.2 2006/04/22 23:16:44 tom Exp $ +dnl $Id: html.m4,v 1.3 2007/09/01 23:59:59 tom Exp $ define(`ANCHORIDX',`0')dnl define(`MANPAGE',`define(`MANPG',$1)dnl |===================================================================== @@ -35,6 +35,6 @@ define(`ANCHOR',`define(`ANCHORIDX',incr(ANCHORIDX))dnl `#'1A NAME="AFU`_'ANCHORIDX"`#'2dnl define(`CFUNAME',`$1')define(`AFUNAME',`$2')dnl -|') +|')dnl define(`AKA',``AKA': CFUNAME')dnl define(`ALIAS',``AKA': $1')dnl diff -Naur ncurses-5.6.orig/Ada95/gen/terminal_interface-curses-aux.ads.m4 ncurses-5.6/Ada95/gen/terminal_interface-curses-aux.ads.m4 --- ncurses-5.6.orig/Ada95/gen/terminal_interface-curses-aux.ads.m4 2003-10-25 11:39:18.000000000 -0400 +++ ncurses-5.6/Ada95/gen/terminal_interface-curses-aux.ads.m4 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,7 @@ -- -*- ada -*- define(`HTMLNAME',`terminal_interface-curses-aux__ads.htm')dnl -include(M4MACRO)------------------------------------------------------------------------------ +include(M4MACRO)dnl +------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- @@ -37,7 +38,7 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.15 $ +-- $Revision: 1.16 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Base_Defs') diff -Naur ncurses-5.6.orig/Ada95/gen/terminal_interface-curses-menus.ads.m4 ncurses-5.6/Ada95/gen/terminal_interface-curses-menus.ads.m4 --- ncurses-5.6.orig/Ada95/gen/terminal_interface-curses-menus.ads.m4 2006-06-25 10:30:22.000000000 -0400 +++ ncurses-5.6/Ada95/gen/terminal_interface-curses-menus.ads.m4 2007-12-21 00:02:35.000000000 -0500 @@ -38,8 +38,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.26 $ --- $Date: 2006/06/25 14:30:22 $ +-- $Revision: 1.27 $ +-- $Date: 2007/05/05 20:20:52 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Menu_Base_Defs') @@ -360,7 +360,7 @@ -- Implemented as function pragma Inline (Mark); - -- MANPAGE(`menu_attribs.3x') + -- MANPAGE(`menu_attributes.3x') -- ANCHOR(`set_menu_fore()',`Set_Foreground') procedure Set_Foreground diff -Naur ncurses-5.6.orig/Ada95/gen/terminal_interface-curses.adb.m4 ncurses-5.6/Ada95/gen/terminal_interface-curses.adb.m4 --- ncurses-5.6.orig/Ada95/gen/terminal_interface-curses.adb.m4 1969-12-31 19:00:00.000000000 -0500 +++ ncurses-5.6/Ada95/gen/terminal_interface-curses.adb.m4 2007-12-21 00:02:35.000000000 -0500 @@ -0,0 +1,2501 @@ +-- -*- ada -*- +define(`HTMLNAME',`terminal_interface-curses__adb.htm')dnl +include(M4MACRO)------------------------------------------------------------------------------ +-- -- +-- GNAT ncurses Binding -- +-- -- +-- Terminal_Interface.Curses -- +-- -- +-- B O D Y -- +-- -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998-2006,2007 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"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: -- +-- -- +-- The above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. -- +-- -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -- +------------------------------------------------------------------------------ +-- Author: Juergen Pfeifer, 1996 +-- Version Control: +-- $Revision: 1.4 $ +-- $Date: 2007/05/05 20:09:10 $ +-- Binding Version 01.00 +------------------------------------------------------------------------------ +with System; + +with Terminal_Interface.Curses.Aux; +with Interfaces.C; use Interfaces.C; +with Interfaces.C.Strings; use Interfaces.C.Strings; +with Ada.Characters.Handling; use Ada.Characters.Handling; +with Ada.Strings.Fixed; + +package body Terminal_Interface.Curses is + + use Aux; + use type System.Bit_Order; + + package ASF renames Ada.Strings.Fixed; + + type chtype_array is array (size_t range <>) + of aliased Attributed_Character; + pragma Convention (C, chtype_array); + +------------------------------------------------------------------------------ + function Key_Name (Key : in Real_Key_Code) return String + is + function Keyname (K : C_Int) return chars_ptr; + pragma Import (C, Keyname, "keyname"); + + Ch : Character; + begin + if Key <= Character'Pos (Character'Last) then + Ch := Character'Val (Key); + if Is_Control (Ch) then + return Un_Control (Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + elsif Is_Graphic (Ch) then + declare + S : String (1 .. 1); + begin + S (1) := Ch; + return S; + end; + else + return ""; + end if; + else + return Fill_String (Keyname (C_Int (Key))); + end if; + end Key_Name; + + procedure Key_Name (Key : in Real_Key_Code; + Name : out String) + is + begin + ASF.Move (Key_Name (Key), Name); + end Key_Name; + +------------------------------------------------------------------------------ + procedure Init_Screen + is + function Initscr return Window; + pragma Import (C, Initscr, "initscr"); + + W : Window; + begin + W := Initscr; + if W = Null_Window then + raise Curses_Exception; + end if; + end Init_Screen; + + procedure End_Windows + is + function Endwin return C_Int; + pragma Import (C, Endwin, "endwin"); + begin + if Endwin = Curses_Err then + raise Curses_Exception; + end if; + end End_Windows; + + function Is_End_Window return Boolean + is + function Isendwin return Curses_Bool; + pragma Import (C, Isendwin, "isendwin"); + begin + if Isendwin = Curses_Bool_False then + return False; + else + return True; + end if; + end Is_End_Window; +------------------------------------------------------------------------------ + procedure Move_Cursor (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position) + is + function Wmove (Win : Window; + Line : C_Int; + Column : C_Int + ) return C_Int; + pragma Import (C, Wmove, "wmove"); + begin + if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Move_Cursor; +------------------------------------------------------------------------------ + procedure Add (Win : in Window := Standard_Window; + Ch : in Attributed_Character) + is + function Waddch (W : Window; + Ch : C_Chtype) return C_Int; + pragma Import (C, Waddch, "waddch"); + begin + if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Add; + + procedure Add (Win : in Window := Standard_Window; + Ch : in Character) + is + begin + Add (Win, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add; + + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Attributed_Character) + is + function mvwaddch (W : Window; + Y : C_Int; + X : C_Int; + Ch : C_Chtype) return C_Int; + pragma Import (C, mvwaddch, "mvwaddch"); + begin + if mvwaddch (Win, C_Int (Line), + C_Int (Column), + AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Add; + + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Character) + is + begin + Add (Win, + Line, + Column, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add; + + procedure Add_With_Immediate_Echo + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) + is + function Wechochar (W : Window; + Ch : C_Chtype) return C_Int; + pragma Import (C, Wechochar, "wechochar"); + begin + if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Add_With_Immediate_Echo; + + procedure Add_With_Immediate_Echo + (Win : in Window := Standard_Window; + Ch : in Character) + is + begin + Add_With_Immediate_Echo + (Win, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add_With_Immediate_Echo; +------------------------------------------------------------------------------ + function Create (Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Newwin (Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Newwin, "newwin"); + + W : Window; + begin + W := Newwin (C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Create; + + procedure Delete (Win : in out Window) + is + function Wdelwin (W : Window) return C_Int; + pragma Import (C, Wdelwin, "delwin"); + begin + if Wdelwin (Win) = Curses_Err then + raise Curses_Exception; + end if; + Win := Null_Window; + end Delete; + + function Sub_Window + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Subwin + (Win : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Subwin, "subwin"); + + W : Window; + begin + W := Subwin (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Sub_Window; + + function Derived_Window + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Derwin + (Win : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Derwin, "derwin"); + + W : Window; + begin + W := Derwin (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Derived_Window; + + function Duplicate (Win : Window) return Window + is + function Dupwin (Win : Window) return Window; + pragma Import (C, Dupwin, "dupwin"); + + W : constant Window := Dupwin (Win); + begin + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Duplicate; + + procedure Move_Window (Win : in Window; + Line : in Line_Position; + Column : in Column_Position) + is + function Mvwin (Win : Window; + Line : C_Int; + Column : C_Int) return C_Int; + pragma Import (C, Mvwin, "mvwin"); + begin + if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Move_Window; + + procedure Move_Derived_Window (Win : in Window; + Line : in Line_Position; + Column : in Column_Position) + is + function Mvderwin (Win : Window; + Line : C_Int; + Column : C_Int) return C_Int; + pragma Import (C, Mvderwin, "mvderwin"); + begin + if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Move_Derived_Window; + + procedure Set_Synch_Mode (Win : in Window := Standard_Window; + Mode : in Boolean := False) + is + function Syncok (Win : Window; + Mode : Curses_Bool) return C_Int; + pragma Import (C, Syncok, "syncok"); + begin + if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Synch_Mode; +------------------------------------------------------------------------------ + procedure Add (Win : in Window := Standard_Window; + Str : in String; + Len : in Integer := -1) + is + function Waddnstr (Win : Window; + Str : char_array; + Len : C_Int := -1) return C_Int; + pragma Import (C, Waddnstr, "waddnstr"); + + Txt : char_array (0 .. Str'Length); + Length : size_t; + begin + To_C (Str, Txt, Length); + if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then + raise Curses_Exception; + end if; + end Add; + + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Add (Win, Str, Len); + end Add; +------------------------------------------------------------------------------ + procedure Add + (Win : in Window := Standard_Window; + Str : in Attributed_String; + Len : in Integer := -1) + is + function Waddchnstr (Win : Window; + Str : chtype_array; + Len : C_Int := -1) return C_Int; + pragma Import (C, Waddchnstr, "waddchnstr"); + + Txt : chtype_array (0 .. Str'Length); + begin + for Length in 1 .. size_t (Str'Length) loop + Txt (Length - 1) := Str (Natural (Length)); + end loop; + Txt (Str'Length) := Default_Character; + if Waddchnstr (Win, + Txt, + C_Int (Len)) = Curses_Err then + raise Curses_Exception; + end if; + end Add; + + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in Attributed_String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Add (Win, Str, Len); + end Add; +------------------------------------------------------------------------------ + procedure Border + (Win : in Window := Standard_Window; + Left_Side_Symbol : in Attributed_Character := Default_Character; + Right_Side_Symbol : in Attributed_Character := Default_Character; + Top_Side_Symbol : in Attributed_Character := Default_Character; + Bottom_Side_Symbol : in Attributed_Character := Default_Character; + Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) + is + function Wborder (W : Window; + LS : C_Chtype; + RS : C_Chtype; + TS : C_Chtype; + BS : C_Chtype; + ULC : C_Chtype; + URC : C_Chtype; + LLC : C_Chtype; + LRC : C_Chtype) return C_Int; + pragma Import (C, Wborder, "wborder"); + begin + if Wborder (Win, + AttrChar_To_Chtype (Left_Side_Symbol), + AttrChar_To_Chtype (Right_Side_Symbol), + AttrChar_To_Chtype (Top_Side_Symbol), + AttrChar_To_Chtype (Bottom_Side_Symbol), + AttrChar_To_Chtype (Upper_Left_Corner_Symbol), + AttrChar_To_Chtype (Upper_Right_Corner_Symbol), + AttrChar_To_Chtype (Lower_Left_Corner_Symbol), + AttrChar_To_Chtype (Lower_Right_Corner_Symbol) + ) = Curses_Err + then + raise Curses_Exception; + end if; + end Border; + + procedure Box + (Win : in Window := Standard_Window; + Vertical_Symbol : in Attributed_Character := Default_Character; + Horizontal_Symbol : in Attributed_Character := Default_Character) + is + begin + Border (Win, + Vertical_Symbol, Vertical_Symbol, + Horizontal_Symbol, Horizontal_Symbol); + end Box; + + procedure Horizontal_Line + (Win : in Window := Standard_Window; + Line_Size : in Natural; + Line_Symbol : in Attributed_Character := Default_Character) + is + function Whline (W : Window; + Ch : C_Chtype; + Len : C_Int) return C_Int; + pragma Import (C, Whline, "whline"); + begin + if Whline (Win, + AttrChar_To_Chtype (Line_Symbol), + C_Int (Line_Size)) = Curses_Err then + raise Curses_Exception; + end if; + end Horizontal_Line; + + procedure Vertical_Line + (Win : in Window := Standard_Window; + Line_Size : in Natural; + Line_Symbol : in Attributed_Character := Default_Character) + is + function Wvline (W : Window; + Ch : C_Chtype; + Len : C_Int) return C_Int; + pragma Import (C, Wvline, "wvline"); + begin + if Wvline (Win, + AttrChar_To_Chtype (Line_Symbol), + C_Int (Line_Size)) = Curses_Err then + raise Curses_Exception; + end if; + end Vertical_Line; + +------------------------------------------------------------------------------ + function Get_Keystroke (Win : Window := Standard_Window) + return Real_Key_Code + is + function Wgetch (W : Window) return C_Int; + pragma Import (C, Wgetch, "wgetch"); + + C : constant C_Int := Wgetch (Win); + begin + if C = Curses_Err then + return Key_None; + else + return Real_Key_Code (C); + end if; + end Get_Keystroke; + + procedure Undo_Keystroke (Key : in Real_Key_Code) + is + function Ungetch (Ch : C_Int) return C_Int; + pragma Import (C, Ungetch, "ungetch"); + begin + if Ungetch (C_Int (Key)) = Curses_Err then + raise Curses_Exception; + end if; + end Undo_Keystroke; + + function Has_Key (Key : Special_Key_Code) return Boolean + is + function Haskey (Key : C_Int) return C_Int; + pragma Import (C, Haskey, "has_key"); + begin + if Haskey (C_Int (Key)) = Curses_False then + return False; + else + return True; + end if; + end Has_Key; + + function Is_Function_Key (Key : Special_Key_Code) return Boolean + is + L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + + Natural (Function_Key_Number'Last)); + begin + if (Key >= Key_F0) and then (Key <= L) then + return True; + else + return False; + end if; + end Is_Function_Key; + + function Function_Key (Key : Real_Key_Code) + return Function_Key_Number + is + begin + if Is_Function_Key (Key) then + return Function_Key_Number (Key - Key_F0); + else + raise Constraint_Error; + end if; + end Function_Key; + + function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code + is + begin + return Real_Key_Code (Natural (Key_F0) + Natural (Key)); + end Function_Key_Code; +------------------------------------------------------------------------------ + procedure Standout (Win : Window := Standard_Window; + On : Boolean := True) + is + function wstandout (Win : Window) return C_Int; + pragma Import (C, wstandout, "wstandout"); + function wstandend (Win : Window) return C_Int; + pragma Import (C, wstandend, "wstandend"); + + Err : C_Int; + begin + if On then + Err := wstandout (Win); + else + Err := wstandend (Win); + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Standout; + + procedure Switch_Character_Attribute + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; + On : in Boolean := True) + is + function Wattron (Win : Window; + C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattron, "wattr_on"); + function Wattroff (Win : Window; + C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattroff, "wattr_off"); + -- In Ada we use the On Boolean to control whether or not we want to + -- switch on or off the attributes in the set. + Err : C_Int; + AC : constant Attributed_Character := (Ch => Character'First, + Color => Color_Pair'First, + Attr => Attr); + begin + if On then + Err := Wattron (Win, AttrChar_To_AttrType (AC)); + else + Err := Wattroff (Win, AttrChar_To_AttrType (AC)); + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Switch_Character_Attribute; + + procedure Set_Character_Attributes + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) + is + function Wattrset (Win : Window; + C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set + begin + if Wattrset (Win, + AttrChar_To_AttrType (Attributed_Character' + (Ch => Character'First, + Color => Color, + Attr => Attr))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Character_Attributes; + + function Get_Character_Attribute (Win : Window := Standard_Window) + return Character_Attribute_Set + is + function Wattrget (Win : Window; + Atr : access C_AttrType; + Col : access C_Short; + Opt : System.Address) return C_Int; + pragma Import (C, Wattrget, "wattr_get"); + + Attr : aliased C_AttrType; + Col : aliased C_Short; + Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + System.Null_Address); + Ch : Attributed_Character; + begin + if Res = Curses_Ok then + Ch := AttrType_To_AttrChar (Attr); + return Ch.Attr; + else + raise Curses_Exception; + end if; + end Get_Character_Attribute; + + function Get_Character_Attribute (Win : Window := Standard_Window) + return Color_Pair + is + function Wattrget (Win : Window; + Atr : access C_AttrType; + Col : access C_Short; + Opt : System.Address) return C_Int; + pragma Import (C, Wattrget, "wattr_get"); + + Attr : aliased C_AttrType; + Col : aliased C_Short; + Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + System.Null_Address); + Ch : Attributed_Character; + begin + if Res = Curses_Ok then + Ch := AttrType_To_AttrChar (Attr); + return Ch.Color; + else + raise Curses_Exception; + end if; + end Get_Character_Attribute; + + procedure Set_Color (Win : in Window := Standard_Window; + Pair : in Color_Pair) + is + function Wset_Color (Win : Window; + Color : C_Short; + Opts : C_Void_Ptr) return C_Int; + pragma Import (C, Wset_Color, "wcolor_set"); + begin + if Wset_Color (Win, + C_Short (Pair), + C_Void_Ptr (System.Null_Address)) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Color; + + procedure Change_Attributes + (Win : in Window := Standard_Window; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) + is + function Wchgat (Win : Window; + Cnt : C_Int; + Attr : C_AttrType; + Color : C_Short; + Opts : System.Address := System.Null_Address) + return C_Int; + pragma Import (C, Wchgat, "wchgat"); + + Ch : constant Attributed_Character := + (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); + begin + if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), + C_Short (Color)) = Curses_Err then + raise Curses_Exception; + end if; + end Change_Attributes; + + procedure Change_Attributes + (Win : in Window := Standard_Window; + Line : in Line_Position := Line_Position'First; + Column : in Column_Position := Column_Position'First; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) + is + begin + Move_Cursor (Win, Line, Column); + Change_Attributes (Win, Count, Attr, Color); + end Change_Attributes; +------------------------------------------------------------------------------ + procedure Beep + is + function Beeper return C_Int; + pragma Import (C, Beeper, "beep"); + begin + if Beeper = Curses_Err then + raise Curses_Exception; + end if; + end Beep; + + procedure Flash_Screen + is + function Flash return C_Int; + pragma Import (C, Flash, "flash"); + begin + if Flash = Curses_Err then + raise Curses_Exception; + end if; + end Flash_Screen; +------------------------------------------------------------------------------ + procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) + is + function Cbreak return C_Int; + pragma Import (C, Cbreak, "cbreak"); + function NoCbreak return C_Int; + pragma Import (C, NoCbreak, "nocbreak"); + + Err : C_Int; + begin + if SwitchOn then + Err := Cbreak; + else + Err := NoCbreak; + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Set_Cbreak_Mode; + + procedure Set_Raw_Mode (SwitchOn : in Boolean := True) + is + function Raw return C_Int; + pragma Import (C, Raw, "raw"); + function NoRaw return C_Int; + pragma Import (C, NoRaw, "noraw"); + + Err : C_Int; + begin + if SwitchOn then + Err := Raw; + else + Err := NoRaw; + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Set_Raw_Mode; + + procedure Set_Echo_Mode (SwitchOn : in Boolean := True) + is + function Echo return C_Int; + pragma Import (C, Echo, "echo"); + function NoEcho return C_Int; + pragma Import (C, NoEcho, "noecho"); + + Err : C_Int; + begin + if SwitchOn then + Err := Echo; + else + Err := NoEcho; + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Set_Echo_Mode; + + procedure Set_Meta_Mode (Win : in Window := Standard_Window; + SwitchOn : in Boolean := True) + is + function Meta (W : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Meta, "meta"); + begin + if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Meta_Mode; + + procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; + SwitchOn : in Boolean := True) + is + function Keypad (W : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Keypad, "keypad"); + begin + if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_KeyPad_Mode; + + function Get_KeyPad_Mode (Win : in Window := Standard_Window) + return Boolean + is + function Is_Keypad (W : Window) return Curses_Bool; + pragma Import (C, Is_Keypad, "is_keypad"); + begin + return (Is_Keypad (Win) /= Curses_Bool_False); + end Get_KeyPad_Mode; + + procedure Half_Delay (Amount : in Half_Delay_Amount) + is + function Halfdelay (Amount : C_Int) return C_Int; + pragma Import (C, Halfdelay, "halfdelay"); + begin + if Halfdelay (C_Int (Amount)) = Curses_Err then + raise Curses_Exception; + end if; + end Half_Delay; + + procedure Set_Flush_On_Interrupt_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := True) + is + function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Intrflush, "intrflush"); + begin + if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Flush_On_Interrupt_Mode; + + procedure Set_Queue_Interrupt_Mode + (Win : in Window := Standard_Window; + Flush : in Boolean := True) + is + procedure Qiflush; + pragma Import (C, Qiflush, "qiflush"); + 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 + No_Qiflush; + end if; + end Set_Queue_Interrupt_Mode; + + procedure Set_NoDelay_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := False) + is + function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Nodelay, "nodelay"); + begin + if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_NoDelay_Mode; + + procedure Set_Timeout_Mode (Win : in Window := Standard_Window; + Mode : in Timeout_Mode; + Amount : in Natural) + is + procedure Wtimeout (Win : Window; Amount : C_Int); + pragma Import (C, Wtimeout, "wtimeout"); + + Time : C_Int; + begin + case Mode is + when Blocking => Time := -1; + when Non_Blocking => Time := 0; + when Delayed => + if Amount = 0 then + raise Constraint_Error; + end if; + Time := C_Int (Amount); + end case; + Wtimeout (Win, Time); + end Set_Timeout_Mode; + + procedure Set_Escape_Timer_Mode + (Win : in Window := Standard_Window; + Timer_Off : in Boolean := False) + is + function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Notimeout, "notimeout"); + begin + if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) + = Curses_Err then + raise Curses_Exception; + end if; + end Set_Escape_Timer_Mode; + +------------------------------------------------------------------------------ + procedure Set_NL_Mode (SwitchOn : in Boolean := True) + is + function NL return C_Int; + pragma Import (C, NL, "nl"); + function NoNL return C_Int; + pragma Import (C, NoNL, "nonl"); + + Err : C_Int; + begin + if SwitchOn then + Err := NL; + else + Err := NoNL; + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Set_NL_Mode; + + procedure Clear_On_Next_Update + (Win : in Window := Standard_Window; + Do_Clear : in Boolean := True) + is + function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, Clear_Ok, "clearok"); + begin + if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then + raise Curses_Exception; + end if; + end Clear_On_Next_Update; + + procedure Use_Insert_Delete_Line + (Win : in Window := Standard_Window; + Do_Idl : in Boolean := True) + is + function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, IDL_Ok, "idlok"); + begin + if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then + raise Curses_Exception; + end if; + end Use_Insert_Delete_Line; + + procedure Use_Insert_Delete_Character + (Win : in Window := Standard_Window; + Do_Idc : in Boolean := True) + is + procedure IDC_Ok (W : Window; Flag : Curses_Bool); + pragma Import (C, IDC_Ok, "idcok"); + begin + IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))); + end Use_Insert_Delete_Character; + + procedure Leave_Cursor_After_Update + (Win : in Window := Standard_Window; + Do_Leave : in Boolean := True) + is + function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, Leave_Ok, "leaveok"); + begin + if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then + raise Curses_Exception; + end if; + end Leave_Cursor_After_Update; + + procedure Immediate_Update_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := False) + is + procedure Immedok (Win : Window; Mode : Curses_Bool); + pragma Import (C, Immedok, "immedok"); + begin + Immedok (Win, Curses_Bool (Boolean'Pos (Mode))); + end Immediate_Update_Mode; + + procedure Allow_Scrolling + (Win : in Window := Standard_Window; + Mode : in Boolean := False) + is + function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Scrollok, "scrollok"); + begin + if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; + end Allow_Scrolling; + + function Scrolling_Allowed (Win : Window := Standard_Window) + return Boolean + is + function Is_Scroll_Ok (W : Window) return Curses_Bool; + pragma Import (C, Is_Scroll_Ok, "is_scrollok"); + begin + return (Is_Scroll_Ok (Win) /= Curses_Bool_False); + end Scrolling_Allowed; + + procedure Set_Scroll_Region + (Win : in Window := Standard_Window; + Top_Line : in Line_Position; + Bottom_Line : in Line_Position) + is + function Wsetscrreg (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Int; + pragma Import (C, Wsetscrreg, "wsetscrreg"); + begin + if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) + = Curses_Err then + raise Curses_Exception; + end if; + end Set_Scroll_Region; +------------------------------------------------------------------------------ + procedure Update_Screen + is + function Do_Update return C_Int; + pragma Import (C, Do_Update, "doupdate"); + begin + if Do_Update = Curses_Err then + raise Curses_Exception; + end if; + end Update_Screen; + + procedure Refresh (Win : in Window := Standard_Window) + is + function Wrefresh (W : Window) return C_Int; + pragma Import (C, Wrefresh, "wrefresh"); + begin + if Wrefresh (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh; + + procedure Refresh_Without_Update + (Win : in Window := Standard_Window) + is + function Wnoutrefresh (W : Window) return C_Int; + pragma Import (C, Wnoutrefresh, "wnoutrefresh"); + begin + if Wnoutrefresh (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh_Without_Update; + + procedure Redraw (Win : in Window := Standard_Window) + is + function Redrawwin (Win : Window) return C_Int; + pragma Import (C, Redrawwin, "redrawwin"); + begin + if Redrawwin (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Redraw; + + procedure Redraw + (Win : in Window := Standard_Window; + Begin_Line : in Line_Position; + Line_Count : in Positive) + is + function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) + return C_Int; + pragma Import (C, Wredrawln, "wredrawln"); + begin + if Wredrawln (Win, + C_Int (Begin_Line), + C_Int (Line_Count)) = Curses_Err then + raise Curses_Exception; + end if; + end Redraw; + +------------------------------------------------------------------------------ + procedure Erase (Win : in Window := Standard_Window) + is + function Werase (W : Window) return C_Int; + pragma Import (C, Werase, "werase"); + begin + if Werase (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Erase; + + procedure Clear (Win : in Window := Standard_Window) + is + function Wclear (W : Window) return C_Int; + pragma Import (C, Wclear, "wclear"); + begin + if Wclear (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Clear; + + procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) + is + function Wclearbot (W : Window) return C_Int; + pragma Import (C, Wclearbot, "wclrtobot"); + begin + if Wclearbot (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Clear_To_End_Of_Screen; + + procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) + is + function Wcleareol (W : Window) return C_Int; + pragma Import (C, Wcleareol, "wclrtoeol"); + begin + if Wcleareol (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Clear_To_End_Of_Line; +------------------------------------------------------------------------------ + procedure Set_Background + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) + is + procedure WBackground (W : in Window; Ch : in C_Chtype); + pragma Import (C, WBackground, "wbkgdset"); + begin + WBackground (Win, AttrChar_To_Chtype (Ch)); + end Set_Background; + + procedure Change_Background + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) + is + function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; + pragma Import (C, WChangeBkgd, "wbkgd"); + begin + if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Change_Background; + + function Get_Background (Win : Window := Standard_Window) + return Attributed_Character + is + function Wgetbkgd (Win : Window) return C_Chtype; + pragma Import (C, Wgetbkgd, "getbkgd"); + begin + return Chtype_To_AttrChar (Wgetbkgd (Win)); + end Get_Background; +------------------------------------------------------------------------------ + procedure Change_Lines_Status (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive; + State : in Boolean) + is + function Wtouchln (Win : Window; + Sta : C_Int; + Cnt : C_Int; + Chg : C_Int) return C_Int; + pragma Import (C, Wtouchln, "wtouchln"); + begin + if Wtouchln (Win, C_Int (Start), C_Int (Count), + C_Int (Boolean'Pos (State))) = Curses_Err then + raise Curses_Exception; + end if; + end Change_Lines_Status; + + procedure Touch (Win : in Window := Standard_Window) + is + Y : Line_Position; + X : Column_Position; + begin + Get_Size (Win, Y, X); + Change_Lines_Status (Win, 0, Positive (Y), True); + end Touch; + + procedure Untouch (Win : in Window := Standard_Window) + is + Y : Line_Position; + X : Column_Position; + begin + Get_Size (Win, Y, X); + Change_Lines_Status (Win, 0, Positive (Y), False); + end Untouch; + + procedure Touch (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive) + is + begin + Change_Lines_Status (Win, Start, Count, True); + end Touch; + + function Is_Touched + (Win : Window := Standard_Window; + Line : Line_Position) return Boolean + is + function WLineTouched (W : Window; L : C_Int) return Curses_Bool; + pragma Import (C, WLineTouched, "is_linetouched"); + begin + if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then + return False; + else + return True; + end if; + end Is_Touched; + + function Is_Touched + (Win : Window := Standard_Window) return Boolean + is + function WWinTouched (W : Window) return Curses_Bool; + pragma Import (C, WWinTouched, "is_wintouched"); + begin + if WWinTouched (Win) = Curses_Bool_False then + return False; + else + return True; + end if; + end Is_Touched; +------------------------------------------------------------------------------ + procedure Copy + (Source_Window : in Window; + Destination_Window : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position; + Non_Destructive_Mode : in Boolean := True) + is + function Copywin (Src : Window; + Dst : Window; + Str : C_Int; + Slc : C_Int; + Dtr : C_Int; + Dlc : C_Int; + Dbr : C_Int; + Drc : C_Int; + Ndm : C_Int) return C_Int; + pragma Import (C, Copywin, "copywin"); + begin + if Copywin (Source_Window, + Destination_Window, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column), + Boolean'Pos (Non_Destructive_Mode) + ) = Curses_Err then + raise Curses_Exception; + end if; + end Copy; + + procedure Overwrite + (Source_Window : in Window; + Destination_Window : in Window) + is + function Overwrite (Src : Window; Dst : Window) return C_Int; + pragma Import (C, Overwrite, "overwrite"); + begin + if Overwrite (Source_Window, Destination_Window) = Curses_Err then + raise Curses_Exception; + end if; + end Overwrite; + + procedure Overlay + (Source_Window : in Window; + Destination_Window : in Window) + is + function Overlay (Src : Window; Dst : Window) return C_Int; + pragma Import (C, Overlay, "overlay"); + begin + if Overlay (Source_Window, Destination_Window) = Curses_Err then + raise Curses_Exception; + end if; + end Overlay; + +------------------------------------------------------------------------------ + procedure Insert_Delete_Lines + (Win : in Window := Standard_Window; + Lines : in Integer := 1) -- default is to insert one line above + is + function Winsdelln (W : Window; N : C_Int) return C_Int; + pragma Import (C, Winsdelln, "winsdelln"); + begin + if Winsdelln (Win, C_Int (Lines)) = Curses_Err then + raise Curses_Exception; + end if; + end Insert_Delete_Lines; + + procedure Delete_Line (Win : in Window := Standard_Window) + is + begin + Insert_Delete_Lines (Win, -1); + end Delete_Line; + + procedure Insert_Line (Win : in Window := Standard_Window) + is + begin + Insert_Delete_Lines (Win, 1); + end Insert_Line; +------------------------------------------------------------------------------ + + procedure Get_Size + (Win : in Window := Standard_Window; + Number_Of_Lines : out Line_Count; + Number_Of_Columns : out Column_Count) + is + function GetMaxY (W : Window) return C_Int; + pragma Import (C, GetMaxY, "getmaxy"); + + function GetMaxX (W : Window) return C_Int; + pragma Import (C, GetMaxX, "getmaxx"); + + Y : constant C_Int := GetMaxY (Win) + + C_Int (Offset_XY); + X : constant C_Int := GetMaxX (Win) + + C_Int (Offset_XY); + begin + Number_Of_Lines := Line_Count (Y); + Number_Of_Columns := Column_Count (X); + end Get_Size; + + procedure Get_Window_Position + (Win : in Window := Standard_Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position) + is + function GetBegY (W : Window) return C_Int; + pragma Import (C, GetBegY, "getbegy"); + + function GetBegX (W : Window) return C_Int; + pragma Import (C, GetBegX, "getbegx"); + + Y : constant C_Short := C_Short (GetBegY (Win)); + X : constant C_Short := C_Short (GetBegX (Win)); + begin + Top_Left_Line := Line_Position (Y); + Top_Left_Column := Column_Position (X); + end Get_Window_Position; + + procedure Get_Cursor_Position + (Win : in Window := Standard_Window; + Line : out Line_Position; + Column : out Column_Position) + is + function GetCurY (W : Window) return C_Int; + pragma Import (C, GetCurY, "getcury"); + + function GetCurX (W : Window) return C_Int; + pragma Import (C, GetCurX, "getcurx"); + + Y : constant C_Short := C_Short (GetCurY (Win)); + X : constant C_Short := C_Short (GetCurX (Win)); + begin + Line := Line_Position (Y); + Column := Column_Position (X); + end Get_Cursor_Position; + + procedure Get_Origin_Relative_To_Parent + (Win : in Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position; + Is_Not_A_Subwindow : out Boolean) + is + function GetParY (W : Window) return C_Int; + pragma Import (C, GetParY, "getpary"); + + function GetParX (W : Window) return C_Int; + pragma Import (C, GetParX, "getparx"); + + Y : constant C_Int := GetParY (Win); + X : constant C_Int := GetParX (Win); + begin + if Y = -1 then + Top_Left_Line := Line_Position'Last; + Top_Left_Column := Column_Position'Last; + Is_Not_A_Subwindow := True; + else + Top_Left_Line := Line_Position (Y); + Top_Left_Column := Column_Position (X); + Is_Not_A_Subwindow := False; + end if; + end Get_Origin_Relative_To_Parent; +------------------------------------------------------------------------------ + function New_Pad (Lines : Line_Count; + Columns : Column_Count) return Window + is + function Newpad (Lines : C_Int; Columns : C_Int) return Window; + pragma Import (C, Newpad, "newpad"); + + W : Window; + begin + W := Newpad (C_Int (Lines), C_Int (Columns)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end New_Pad; + + function Sub_Pad + (Pad : Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Subpad + (Pad : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Subpad, "subpad"); + + W : Window; + begin + W := Subpad (Pad, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Sub_Pad; + + procedure Refresh + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position) + is + function Prefresh + (Pad : Window; + Source_Top_Row : C_Int; + Source_Left_Column : C_Int; + Destination_Top_Row : C_Int; + Destination_Left_Column : C_Int; + Destination_Bottom_Row : C_Int; + Destination_Right_Column : C_Int) return C_Int; + pragma Import (C, Prefresh, "prefresh"); + begin + if Prefresh (Pad, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh; + + procedure Refresh_Without_Update + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position) + is + function Pnoutrefresh + (Pad : Window; + Source_Top_Row : C_Int; + Source_Left_Column : C_Int; + Destination_Top_Row : C_Int; + Destination_Left_Column : C_Int; + Destination_Bottom_Row : C_Int; + Destination_Right_Column : C_Int) return C_Int; + pragma Import (C, Pnoutrefresh, "pnoutrefresh"); + begin + if Pnoutrefresh (Pad, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh_Without_Update; + + procedure Add_Character_To_Pad_And_Echo_It + (Pad : in Window; + Ch : in Attributed_Character) + is + function Pechochar (Pad : Window; Ch : C_Chtype) + return C_Int; + pragma Import (C, Pechochar, "pechochar"); + begin + if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Add_Character_To_Pad_And_Echo_It; + + procedure Add_Character_To_Pad_And_Echo_It + (Pad : in Window; + Ch : in Character) + is + begin + Add_Character_To_Pad_And_Echo_It + (Pad, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add_Character_To_Pad_And_Echo_It; +------------------------------------------------------------------------------ + procedure Scroll (Win : in Window := Standard_Window; + Amount : in Integer := 1) + is + function Wscrl (Win : Window; N : C_Int) return C_Int; + pragma Import (C, Wscrl, "wscrl"); + + begin + if Wscrl (Win, C_Int (Amount)) = Curses_Err then + raise Curses_Exception; + end if; + end Scroll; + +------------------------------------------------------------------------------ + procedure Delete_Character (Win : in Window := Standard_Window) + is + function Wdelch (Win : Window) return C_Int; + pragma Import (C, Wdelch, "wdelch"); + begin + if Wdelch (Win) = Curses_Err then + raise Curses_Exception; + end if; + end Delete_Character; + + procedure Delete_Character + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position) + is + function Mvwdelch (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Int; + pragma Import (C, Mvwdelch, "mvwdelch"); + begin + if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Delete_Character; +------------------------------------------------------------------------------ + function Peek (Win : Window := Standard_Window) + return Attributed_Character + is + function Winch (Win : Window) return C_Chtype; + pragma Import (C, Winch, "winch"); + begin + return Chtype_To_AttrChar (Winch (Win)); + end Peek; + + function Peek + (Win : Window := Standard_Window; + Line : Line_Position; + Column : Column_Position) return Attributed_Character + is + function Mvwinch (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Chtype; + pragma Import (C, Mvwinch, "mvwinch"); + begin + return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); + end Peek; +------------------------------------------------------------------------------ + procedure Insert (Win : in Window := Standard_Window; + Ch : in Attributed_Character) + is + function Winsch (Win : Window; Ch : C_Chtype) return C_Int; + pragma Import (C, Winsch, "winsch"); + begin + if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Insert; + + procedure Insert + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Attributed_Character) + is + function Mvwinsch (Win : Window; + Lin : C_Int; + Col : C_Int; + Ch : C_Chtype) return C_Int; + pragma Import (C, Mvwinsch, "mvwinsch"); + begin + if Mvwinsch (Win, + C_Int (Line), + C_Int (Column), + AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Insert; +------------------------------------------------------------------------------ + procedure Insert (Win : in Window := Standard_Window; + Str : in String; + Len : in Integer := -1) + is + function Winsnstr (Win : Window; + Str : char_array; + Len : Integer := -1) return C_Int; + pragma Import (C, Winsnstr, "winsnstr"); + + Txt : char_array (0 .. Str'Length); + Length : size_t; + begin + To_C (Str, Txt, Length); + if Winsnstr (Win, Txt, Len) = Curses_Err then + raise Curses_Exception; + end if; + end Insert; + + procedure Insert + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; + Len : in Integer := -1) + is + function Mvwinsnstr (Win : Window; + Line : C_Int; + Column : C_Int; + Str : char_array; + Len : C_Int) return C_Int; + pragma Import (C, Mvwinsnstr, "mvwinsnstr"); + + Txt : char_array (0 .. Str'Length); + Length : size_t; + begin + To_C (Str, Txt, Length); + if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) + = Curses_Err then + raise Curses_Exception; + end if; + end Insert; +------------------------------------------------------------------------------ + procedure Peek (Win : in Window := Standard_Window; + Str : out String; + Len : in Integer := -1) + is + function Winnstr (Win : Window; + Str : char_array; + Len : C_Int) return C_Int; + pragma Import (C, Winnstr, "winnstr"); + + N : Integer := Len; + Txt : char_array (0 .. Str'Length); + Cnt : Natural; + begin + if N < 0 then + N := Str'Length; + end if; + if N > Str'Length then + raise Constraint_Error; + end if; + Txt (0) := Interfaces.C.char'First; + if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; + end if; + To_Ada (Txt, Str, Cnt, True); + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + end if; + end Peek; + + procedure Peek + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Peek (Win, Str, Len); + end Peek; +------------------------------------------------------------------------------ + procedure Peek + (Win : in Window := Standard_Window; + Str : out Attributed_String; + Len : in Integer := -1) + is + function Winchnstr (Win : Window; + Str : chtype_array; -- out + Len : C_Int) return C_Int; + pragma Import (C, Winchnstr, "winchnstr"); + + N : Integer := Len; + Txt : constant chtype_array (0 .. Str'Length) + := (0 => Default_Character); + Cnt : Natural := 0; + begin + if N < 0 then + N := Str'Length; + end if; + if N > Str'Length then + raise Constraint_Error; + end if; + if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; + end if; + for To in Str'Range loop + exit when Txt (size_t (Cnt)) = Default_Character; + Str (To) := Txt (size_t (Cnt)); + Cnt := Cnt + 1; + end loop; + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := + (others => (Ch => ' ', + Color => Color_Pair'First, + Attr => Normal_Video)); + end if; + end Peek; + + procedure Peek + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out Attributed_String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Peek (Win, Str, Len); + end Peek; +------------------------------------------------------------------------------ + procedure Get (Win : in Window := Standard_Window; + Str : out String; + Len : in Integer := -1) + is + function Wgetnstr (Win : Window; + Str : char_array; + Len : C_Int) return C_Int; + pragma Import (C, Wgetnstr, "wgetnstr"); + + N : Integer := Len; + Txt : char_array (0 .. Str'Length); + Cnt : Natural; + begin + if N < 0 then + N := Str'Length; + end if; + if N > Str'Length then + raise Constraint_Error; + end if; + Txt (0) := Interfaces.C.char'First; + if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; + end if; + To_Ada (Txt, Str, Cnt, True); + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + end if; + end Get; + + procedure Get + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Get (Win, Str, Len); + end Get; +------------------------------------------------------------------------------ + procedure Init_Soft_Label_Keys + (Format : in Soft_Label_Key_Format := Three_Two_Three) + is + function Slk_Init (Fmt : C_Int) return C_Int; + pragma Import (C, Slk_Init, "slk_init"); + begin + if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then + raise Curses_Exception; + end if; + end Init_Soft_Label_Keys; + + procedure Set_Soft_Label_Key (Label : in Label_Number; + Text : in String; + Fmt : in Label_Justification := Left) + is + function Slk_Set (Label : C_Int; + Txt : char_array; + Fmt : C_Int) return C_Int; + pragma Import (C, Slk_Set, "slk_set"); + + Txt : char_array (0 .. Text'Length); + Len : size_t; + begin + To_C (Text, Txt, Len); + if Slk_Set (C_Int (Label), Txt, + C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Soft_Label_Key; + + procedure Refresh_Soft_Label_Keys + is + function Slk_Refresh return C_Int; + pragma Import (C, Slk_Refresh, "slk_refresh"); + begin + if Slk_Refresh = Curses_Err then + raise Curses_Exception; + end if; + end Refresh_Soft_Label_Keys; + + procedure Refresh_Soft_Label_Keys_Without_Update + is + function Slk_Noutrefresh return C_Int; + pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); + begin + if Slk_Noutrefresh = Curses_Err then + raise Curses_Exception; + end if; + end Refresh_Soft_Label_Keys_Without_Update; + + procedure Get_Soft_Label_Key (Label : in Label_Number; + Text : out String) + is + function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); + begin + Fill_String (Slk_Label (C_Int (Label)), Text); + end Get_Soft_Label_Key; + + function Get_Soft_Label_Key (Label : in Label_Number) return String + is + function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); + begin + return Fill_String (Slk_Label (C_Int (Label))); + end Get_Soft_Label_Key; + + procedure Clear_Soft_Label_Keys + is + function Slk_Clear return C_Int; + pragma Import (C, Slk_Clear, "slk_clear"); + begin + if Slk_Clear = Curses_Err then + raise Curses_Exception; + end if; + end Clear_Soft_Label_Keys; + + procedure Restore_Soft_Label_Keys + is + function Slk_Restore return C_Int; + pragma Import (C, Slk_Restore, "slk_restore"); + begin + if Slk_Restore = Curses_Err then + raise Curses_Exception; + end if; + end Restore_Soft_Label_Keys; + + procedure Touch_Soft_Label_Keys + is + function Slk_Touch return C_Int; + pragma Import (C, Slk_Touch, "slk_touch"); + begin + if Slk_Touch = Curses_Err then + raise Curses_Exception; + end if; + end Touch_Soft_Label_Keys; + + procedure Switch_Soft_Label_Key_Attributes + (Attr : in Character_Attribute_Set; + On : in Boolean := True) + is + function Slk_Attron (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attron, "slk_attron"); + function Slk_Attroff (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attroff, "slk_attroff"); + + Err : C_Int; + Ch : constant Attributed_Character := (Ch => Character'First, + Attr => Attr, + Color => Color_Pair'First); + begin + if On then + Err := Slk_Attron (AttrChar_To_Chtype (Ch)); + else + Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); + end if; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Switch_Soft_Label_Key_Attributes; + + procedure Set_Soft_Label_Key_Attributes + (Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) + is + function Slk_Attrset (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attrset, "slk_attrset"); + + Ch : constant Attributed_Character := (Ch => Character'First, + Attr => Attr, + Color => Color); + begin + if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Soft_Label_Key_Attributes; + + function Get_Soft_Label_Key_Attributes return Character_Attribute_Set + is + function Slk_Attr return C_Chtype; + pragma Import (C, Slk_Attr, "slk_attr"); + + Attr : constant C_Chtype := Slk_Attr; + begin + return Chtype_To_AttrChar (Attr).Attr; + end Get_Soft_Label_Key_Attributes; + + function Get_Soft_Label_Key_Attributes return Color_Pair + is + function Slk_Attr return C_Chtype; + pragma Import (C, Slk_Attr, "slk_attr"); + + Attr : constant C_Chtype := Slk_Attr; + begin + return Chtype_To_AttrChar (Attr).Color; + end Get_Soft_Label_Key_Attributes; + + procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) + is + function Slk_Color (Color : in C_Short) return C_Int; + pragma Import (C, Slk_Color, "slk_color"); + begin + if Slk_Color (C_Short (Pair)) = Curses_Err then + raise Curses_Exception; + end if; + end Set_Soft_Label_Key_Color; + +------------------------------------------------------------------------------ + procedure Enable_Key (Key : in Special_Key_Code; + Enable : in Boolean := True) + is + function Keyok (Keycode : C_Int; + On_Off : Curses_Bool) return C_Int; + pragma Import (C, Keyok, "keyok"); + begin + if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) + = Curses_Err then + raise Curses_Exception; + end if; + end Enable_Key; +------------------------------------------------------------------------------ + procedure Define_Key (Definition : in String; + Key : in Special_Key_Code) + is + function Defkey (Def : char_array; + Key : C_Int) return C_Int; + pragma Import (C, Defkey, "define_key"); + + Txt : char_array (0 .. Definition'Length); + Length : size_t; + begin + To_C (Definition, Txt, Length); + if Defkey (Txt, C_Int (Key)) = Curses_Err then + raise Curses_Exception; + end if; + end Define_Key; +------------------------------------------------------------------------------ + procedure Un_Control (Ch : in Attributed_Character; + Str : out String) + is + function Unctrl (Ch : C_Chtype) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); + begin + Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); + end Un_Control; + + function Un_Control (Ch : in Attributed_Character) return String + is + function Unctrl (Ch : C_Chtype) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); + begin + return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); + end Un_Control; + + procedure Delay_Output (Msecs : in Natural) + is + function Delayoutput (Msecs : C_Int) return C_Int; + pragma Import (C, Delayoutput, "delay_output"); + begin + if Delayoutput (C_Int (Msecs)) = Curses_Err then + raise Curses_Exception; + end if; + end Delay_Output; + + procedure Flush_Input + is + function Flushinp return C_Int; + pragma Import (C, Flushinp, "flushinp"); + begin + if Flushinp = Curses_Err then -- docu says that never happens, but... + raise Curses_Exception; + end if; + end Flush_Input; +------------------------------------------------------------------------------ + function Baudrate return Natural + is + function Baud return C_Int; + pragma Import (C, Baud, "baudrate"); + begin + return Natural (Baud); + end Baudrate; + + function Erase_Character return Character + is + function Erasechar return C_Int; + pragma Import (C, Erasechar, "erasechar"); + begin + return Character'Val (Erasechar); + end Erase_Character; + + function Kill_Character return Character + is + function Killchar return C_Int; + pragma Import (C, Killchar, "killchar"); + begin + return Character'Val (Killchar); + end Kill_Character; + + function Has_Insert_Character return Boolean + is + function Has_Ic return Curses_Bool; + pragma Import (C, Has_Ic, "has_ic"); + begin + if Has_Ic = Curses_Bool_False then + return False; + else + return True; + end if; + end Has_Insert_Character; + + function Has_Insert_Line return Boolean + is + function Has_Il return Curses_Bool; + pragma Import (C, Has_Il, "has_il"); + begin + if Has_Il = Curses_Bool_False then + return False; + else + return True; + end if; + end Has_Insert_Line; + + function Supported_Attributes return Character_Attribute_Set + is + function Termattrs return C_Chtype; + pragma Import (C, Termattrs, "termattrs"); + + Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); + begin + return Ch.Attr; + end Supported_Attributes; + + procedure Long_Name (Name : out String) + is + function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); + begin + Fill_String (Longname, Name); + end Long_Name; + + function Long_Name return String + is + function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); + begin + return Fill_String (Longname); + end Long_Name; + + procedure Terminal_Name (Name : out String) + is + function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); + begin + Fill_String (Termname, Name); + end Terminal_Name; + + function Terminal_Name return String + is + function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); + begin + return Fill_String (Termname); + end Terminal_Name; +------------------------------------------------------------------------------ + procedure Init_Pair (Pair : in Redefinable_Color_Pair; + Fore : in Color_Number; + Back : in Color_Number) + is + function Initpair (Pair : C_Short; + Fore : C_Short; + Back : C_Short) return C_Int; + pragma Import (C, Initpair, "init_pair"); + begin + if Integer (Pair) >= Number_Of_Color_Pairs then + raise Constraint_Error; + end if; + if Integer (Fore) >= Number_Of_Colors or else + Integer (Back) >= Number_Of_Colors then raise Constraint_Error; + end if; + if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) + = Curses_Err then + raise Curses_Exception; + end if; + end Init_Pair; + + procedure Pair_Content (Pair : in Color_Pair; + Fore : out Color_Number; + Back : out Color_Number) + is + type C_Short_Access is access all C_Short; + function Paircontent (Pair : C_Short; + Fp : C_Short_Access; + Bp : C_Short_Access) return C_Int; + pragma Import (C, Paircontent, "pair_content"); + + F, B : aliased C_Short; + begin + if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then + raise Curses_Exception; + else + Fore := Color_Number (F); + Back := Color_Number (B); + end if; + end Pair_Content; + + function Has_Colors return Boolean + is + function Hascolors return Curses_Bool; + pragma Import (C, Hascolors, "has_colors"); + begin + if Hascolors = Curses_Bool_False then + return False; + else + return True; + end if; + end Has_Colors; + + procedure Init_Color (Color : in Color_Number; + Red : in RGB_Value; + Green : in RGB_Value; + Blue : in RGB_Value) + is + function Initcolor (Col : C_Short; + Red : C_Short; + Green : C_Short; + Blue : C_Short) return C_Int; + pragma Import (C, Initcolor, "init_color"); + begin + if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), + C_Short (Blue)) = Curses_Err then + raise Curses_Exception; + end if; + end Init_Color; + + function Can_Change_Color return Boolean + is + function Canchangecolor return Curses_Bool; + pragma Import (C, Canchangecolor, "can_change_color"); + begin + if Canchangecolor = Curses_Bool_False then + return False; + else + return True; + end if; + end Can_Change_Color; + + procedure Color_Content (Color : in Color_Number; + Red : out RGB_Value; + Green : out RGB_Value; + Blue : out RGB_Value) + is + type C_Short_Access is access all C_Short; + + function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) + return C_Int; + pragma Import (C, Colorcontent, "color_content"); + + R, G, B : aliased C_Short; + begin + if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = + Curses_Err then + raise Curses_Exception; + else + Red := RGB_Value (R); + Green := RGB_Value (G); + Blue := RGB_Value (B); + end if; + end Color_Content; + +------------------------------------------------------------------------------ + procedure Save_Curses_Mode (Mode : in Curses_Mode) + is + function Def_Prog_Mode return C_Int; + pragma Import (C, Def_Prog_Mode, "def_prog_mode"); + function Def_Shell_Mode return C_Int; + pragma Import (C, Def_Shell_Mode, "def_shell_mode"); + + Err : C_Int; + begin + case Mode is + when Curses => Err := Def_Prog_Mode; + when Shell => Err := Def_Shell_Mode; + end case; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Save_Curses_Mode; + + procedure Reset_Curses_Mode (Mode : in Curses_Mode) + is + function Reset_Prog_Mode return C_Int; + pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); + function Reset_Shell_Mode return C_Int; + pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); + + Err : C_Int; + begin + case Mode is + when Curses => Err := Reset_Prog_Mode; + when Shell => Err := Reset_Shell_Mode; + end case; + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Reset_Curses_Mode; + + procedure Save_Terminal_State + is + function Savetty return C_Int; + pragma Import (C, Savetty, "savetty"); + begin + if Savetty = Curses_Err then + raise Curses_Exception; + end if; + end Save_Terminal_State; + + procedure Reset_Terminal_State + is + function Resetty return C_Int; + pragma Import (C, Resetty, "resetty"); + begin + if Resetty = Curses_Err then + raise Curses_Exception; + end if; + end Reset_Terminal_State; + + procedure Rip_Off_Lines (Lines : in Integer; + Proc : in Stdscr_Init_Proc) + is + function Ripoffline (Lines : C_Int; + Proc : Stdscr_Init_Proc) return C_Int; + pragma Import (C, Ripoffline, "_nc_ripoffline"); + begin + if Ripoffline (C_Int (Lines), Proc) = Curses_Err then + raise Curses_Exception; + end if; + end Rip_Off_Lines; + + procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) + is + function Curs_Set (Curs : C_Int) return C_Int; + pragma Import (C, Curs_Set, "curs_set"); + + Res : C_Int; + begin + Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); + if Res /= Curses_Err then + Visibility := Cursor_Visibility'Val (Res); + end if; + end Set_Cursor_Visibility; + + procedure Nap_Milli_Seconds (Ms : in Natural) + is + function Napms (Ms : C_Int) return C_Int; + pragma Import (C, Napms, "napms"); + begin + if Napms (C_Int (Ms)) = Curses_Err then + raise Curses_Exception; + end if; + end Nap_Milli_Seconds; +------------------------------------------------------------------------------ +include(`Public_Variables') +------------------------------------------------------------------------------ + procedure Transform_Coordinates + (W : in Window := Standard_Window; + Line : in out Line_Position; + Column : in out Column_Position; + Dir : in Transform_Direction := From_Screen) + is + type Int_Access is access all C_Int; + function Transform (W : Window; + Y, X : Int_Access; + Dir : Curses_Bool) return C_Int; + pragma Import (C, Transform, "wmouse_trafo"); + + X : aliased C_Int := C_Int (Column); + Y : aliased C_Int := C_Int (Line); + D : Curses_Bool := Curses_Bool_False; + R : C_Int; + begin + if Dir = To_Screen then + D := 1; + end if; + R := Transform (W, Y'Access, X'Access, D); + if R = Curses_False then + raise Curses_Exception; + else + Line := Line_Position (Y); + Column := Column_Position (X); + end if; + end Transform_Coordinates; +------------------------------------------------------------------------------ + procedure Use_Default_Colors is + function C_Use_Default_Colors return C_Int; + pragma Import (C, C_Use_Default_Colors, "use_default_colors"); + Err : constant C_Int := C_Use_Default_Colors; + begin + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Use_Default_Colors; + + procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; + Back : Color_Number := Default_Color) + is + function C_Assume_Default_Colors (Fore : C_Int; + Back : C_Int) return C_Int; + pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); + + Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), + C_Int (Back)); + begin + if Err = Curses_Err then + raise Curses_Exception; + end if; + end Assume_Default_Colors; +------------------------------------------------------------------------------ + function Curses_Version return String + is + function curses_versionC return chars_ptr; + pragma Import (C, curses_versionC, "curses_version"); + Result : constant chars_ptr := curses_versionC; + begin + return Fill_String (Result); + end Curses_Version; +------------------------------------------------------------------------------ + procedure Curses_Free_All is + procedure curses_freeall; + pragma Import (C, curses_freeall, "_nc_freeall"); + begin + -- Use this only for testing: you cannot use curses after calling it, + -- so it has to be the "last" thing done before exiting the program. + -- This will not really free ALL of memory used by curses. That is + -- because it cannot free the memory used for stdout's setbuf. The + -- _nc_free_and_exit() procedure can do that, but it can be invoked + -- safely only from C - and again, that only as the "last" thing done + -- before exiting the program. + curses_freeall; + end Curses_Free_All; +------------------------------------------------------------------------------ + function Use_Extended_Names (Enable : Boolean) return Boolean + is + function use_extended_namesC (e : Curses_Bool) return C_Int; + pragma Import (C, use_extended_namesC, "use_extended_names"); + + Res : constant C_Int := + use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); + begin + if Res = C_Int (Curses_Bool_False) then + return False; + else + return True; + end if; + end Use_Extended_Names; +------------------------------------------------------------------------------ + procedure Screen_Dump_To_File (Filename : in String) + is + function scr_dump (f : char_array) return C_Int; + pragma Import (C, scr_dump, "scr_dump"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; + begin + To_C (Filename, Txt, Length); + if Curses_Err = scr_dump (Txt) then + raise Curses_Exception; + end if; + end Screen_Dump_To_File; + + procedure Screen_Restore_From_File (Filename : in String) + is + function scr_restore (f : char_array) return C_Int; + pragma Import (C, scr_restore, "scr_restore"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; + begin + To_C (Filename, Txt, Length); + if Curses_Err = scr_restore (Txt) then + raise Curses_Exception; + end if; + end Screen_Restore_From_File; + + procedure Screen_Init_From_File (Filename : in String) + is + function scr_init (f : char_array) return C_Int; + pragma Import (C, scr_init, "scr_init"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; + begin + To_C (Filename, Txt, Length); + if Curses_Err = scr_init (Txt) then + raise Curses_Exception; + end if; + end Screen_Init_From_File; + + procedure Screen_Set_File (Filename : in String) + is + function scr_set (f : char_array) return C_Int; + pragma Import (C, scr_set, "scr_set"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; + begin + To_C (Filename, Txt, Length); + if Curses_Err = scr_set (Txt) then + raise Curses_Exception; + end if; + end Screen_Set_File; +------------------------------------------------------------------------------ + procedure Resize (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count) is + function wresize (win : Window; + lines : C_Int; + columns : C_Int) return C_Int; + pragma Import (C, wresize); + begin + if wresize (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns)) = Curses_Err then + raise Curses_Exception; + end if; + end Resize; +------------------------------------------------------------------------------ + +end Terminal_Interface.Curses; diff -Naur ncurses-5.6.orig/Ada95/gen/terminal_interface-curses.ads.m4 ncurses-5.6/Ada95/gen/terminal_interface-curses.ads.m4 --- ncurses-5.6.orig/Ada95/gen/terminal_interface-curses.ads.m4 2006-06-25 10:30:22.000000000 -0400 +++ ncurses-5.6/Ada95/gen/terminal_interface-curses.ads.m4 2007-12-21 00:02:35.000000000 -0500 @@ -9,7 +9,7 @@ -- S P E C -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 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,8 +37,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.37 $ --- $Date: 2006/06/25 14:30:22 $ +-- $Revision: 1.41 $ +-- $Date: 2007/05/05 20:33:52 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Base_Defs') @@ -188,25 +188,21 @@ function Number_Of_Color_Pairs return Natural; pragma Inline (Number_Of_Color_Pairs); - ACS_Map : array (Character'Val (0) .. Character'Val (127)) of - Attributed_Character; - pragma Import (C, ACS_Map, "acs_map"); - -- - -- - -- Constants for several characters from the Alternate Character Set - -- You must use this constants as indices into the ACS_Map array - -- to get the corresponding attributed character at runtime. - -- include(`ACS_Map')dnl -- MANPAGE(`curs_initscr.3x') - -- | Not implemented: newterm, set_term, delscreen, curscr + -- | Not implemented: newterm, set_term, delscreen -- ANCHOR(`stdscr',`Standard_Window') function Standard_Window return Window; -- AKA pragma Inline (Standard_Window); + -- ANCHOR(`curscr',`Current_Window') + function Current_Window return Window; + -- AKA + pragma Inline (Current_Window); + -- ANCHOR(`initscr()',`Init_Screen') procedure Init_Screen; @@ -1478,7 +1474,7 @@ -- Window or if you pass the Null_Window as argument. -- We don't inline this procedure - -- MANPAGE(`dft_fgbg.3x') + -- MANPAGE(`default_colors.3x') -- ANCHOR(`use_default_colors()',`Use_Default_Colors') procedure Use_Default_Colors; @@ -1502,6 +1498,12 @@ function Use_Extended_Names (Enable : Boolean) return Boolean; -- AKA + -- MANPAGE(`curs_trace.3x') + + -- ANCHOR(`_nc_freeall()',`Curses_Free_All') + procedure Curses_Free_All; + -- AKA + -- MANPAGE(`curs_scr_dump.3x') -- ANCHOR(`scr_dump()',`Screen_Dump_To_File') diff -Naur ncurses-5.6.orig/Ada95/samples/ncurses2-attr_test.adb ncurses-5.6/Ada95/samples/ncurses2-attr_test.adb --- ncurses-5.6.orig/Ada95/samples/ncurses2-attr_test.adb 2006-06-25 10:24:40.000000000 -0400 +++ ncurses-5.6/Ada95/samples/ncurses2-attr_test.adb 2007-12-21 00:02:35.000000000 -0500 @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 2000-2006,2007 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,8 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.6 $ --- $Date: 2006/06/25 14:24:40 $ +-- $Revision: 1.8 $ +-- $Date: 2007/05/05 21:28:18 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; @@ -56,7 +56,7 @@ attr : Character_Attribute_Set; name : String; once : Boolean) return Line_Position; - procedure attr_getc (skip : out Integer; + procedure attr_getc (skip : in out Integer; fg, bg : in out Color_Number; result : out Boolean); @@ -233,20 +233,18 @@ return row + 2; end show_attr; - procedure attr_getc (skip : out Integer; fg, bg : in out Color_Number; - result : out Boolean) is + procedure attr_getc (skip : in out Integer; + fg, bg : in out Color_Number; + result : out Boolean) is ch : constant Key_Code := Getchar; nc : constant Color_Number := Color_Number (Number_Of_Colors); - curscr : Window; - pragma Import (C, curscr, "curscr"); - -- curscr is not implemented in the Ada binding begin result := True; if Ada.Characters.Handling.Is_Digit (Character'Val (ch)) then skip := ctoi (Code_To_Char (ch)); elsif ch = CTRL ('L') then Touch; - Touch (curscr); + Touch (Current_Window); Refresh; elsif Has_Colors then case ch is diff -Naur ncurses-5.6.orig/Ada95/samples/ncurses2-m.adb ncurses-5.6/Ada95/samples/ncurses2-m.adb --- ncurses-5.6.orig/Ada95/samples/ncurses2-m.adb 2006-06-25 10:24:40.000000000 -0400 +++ ncurses-5.6/Ada95/samples/ncurses2-m.adb 2007-12-21 00:02:35.000000000 -0500 @@ -35,8 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.6 $ --- $Date: 2006/06/25 14:24:40 $ +-- $Revision: 1.7 $ +-- $Date: 2007/05/05 18:02:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- TODO use Default_Character where appropriate @@ -442,6 +442,7 @@ exit when command = 'q'; end loop; + Curses_Free_All; return 0; -- TODO ExitProgram(EXIT_SUCCESS); end main; diff -Naur ncurses-5.6.orig/Ada95/samples/rain.adb ncurses-5.6/Ada95/samples/rain.adb --- ncurses-5.6.orig/Ada95/samples/rain.adb 2003-10-25 11:39:18.000000000 -0400 +++ ncurses-5.6/Ada95/samples/rain.adb 2007-12-21 00:02:35.000000000 -0500 @@ -36,7 +36,8 @@ -- Author: Laurent Pautet -- Modified by: Juergen Pfeifer, 1997 -- Version Control --- $Revision: 1.6 $ +-- $Revision: 1.7 $ +-- $Date: 2007/05/05 18:54:03 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- -- @@ -158,5 +159,6 @@ Visibility := Normal; Set_Cursor_Visibility (Visibility); End_Windows; + Curses_Free_All; end Rain; diff -Naur ncurses-5.6.orig/Ada95/samples/sample.adb ncurses-5.6/Ada95/samples/sample.adb --- ncurses-5.6.orig/Ada95/samples/sample.adb 2003-10-25 11:39:18.000000000 -0400 +++ ncurses-5.6/Ada95/samples/sample.adb 2007-12-21 00:02:35.000000000 -0500 @@ -35,7 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control --- $Revision: 1.14 $ +-- $Revision: 1.15 $ +-- $Date: 2007/05/05 18:46:21 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Text_IO; @@ -204,6 +205,7 @@ -- We have some fixed key throughout this sample Main_Menu; End_Windows; + Curses_Free_All; exception when Event : others => diff -Naur ncurses-5.6.orig/Ada95/src/Makefile.in ncurses-5.6/Ada95/src/Makefile.in --- ncurses-5.6.orig/Ada95/src/Makefile.in 2004-08-21 17:29:50.000000000 -0400 +++ ncurses-5.6/Ada95/src/Makefile.in 2007-12-21 00:02:35.000000000 -0500 @@ -28,7 +28,7 @@ # # Author: Juergen Pfeifer, 1996 # -# $Id: Makefile.in,v 1.30 2004/08/21 21:29:50 tom Exp $ +# $Id: Makefile.in,v 1.31 2007/09/15 18:22:24 tom Exp $ # .SUFFIXES: @@ -197,7 +197,7 @@ realclean :: distclean -BASEDEPS=$(ABASE).ads $(ABASE)-aux.ads $(srcdir)/$(ABASE).adb +BASEDEPS=$(ABASE).ads $(ABASE)-aux.ads $(ABASE).adb $(ALIB).o: $(srcdir)/$(ALIB).ads $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ALIB).ads @@ -207,8 +207,8 @@ $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-aux.adb -$(ABASE).o: $(srcdir)/$(ABASE).adb $(BASEDEPS) - $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE).adb +$(ABASE).o: $(ABASE).adb $(BASEDEPS) + $(ADA) $(ADAFLAGS) -c -o $@ $(ABASE).adb $(ABASE)-terminfo.o: \ diff -Naur ncurses-5.6.orig/Ada95/src/terminal_interface-curses.adb ncurses-5.6/Ada95/src/terminal_interface-curses.adb --- ncurses-5.6.orig/Ada95/src/terminal_interface-curses.adb 2006-06-25 10:30:22.000000000 -0400 +++ ncurses-5.6/Ada95/src/terminal_interface-curses.adb 1969-12-31 19:00:00.000000000 -0500 @@ -1,2565 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT ncurses Binding -- --- -- --- Terminal_Interface.Curses -- --- -- --- B O D Y -- --- -- ------------------------------------------------------------------------------- --- Copyright (c) 1998-2004,2006 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"), to deal in the Software without restriction, including -- --- without limitation the rights to use, copy, modify, merge, publish, -- --- distribute, distribute with modifications, sublicense, and/or sell -- --- copies of the Software, and to permit persons to whom the Software is -- --- furnished to do so, subject to the following conditions: -- --- -- --- The above copyright notice and this permission notice shall be included -- --- in all copies or substantial portions of the Software. -- --- -- --- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- --- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- --- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- --- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- --- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- --- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- --- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- --- -- --- Except as contained in this notice, the name(s) of the above copyright -- --- holders shall not be used in advertising or otherwise to promote the -- --- sale, use or other dealings in this Software without prior written -- --- authorization. -- ------------------------------------------------------------------------------- --- Author: Juergen Pfeifer, 1996 --- Version Control: --- $Revision: 1.34 $ --- $Date: 2006/06/25 14:30:22 $ --- Binding Version 01.00 ------------------------------------------------------------------------------- -with System; - -with Terminal_Interface.Curses.Aux; -with Interfaces.C; use Interfaces.C; -with Interfaces.C.Strings; use Interfaces.C.Strings; -with Interfaces.C.Pointers; -with Ada.Characters.Handling; use Ada.Characters.Handling; -with Ada.Strings.Fixed; -with Ada.Unchecked_Conversion; - -package body Terminal_Interface.Curses is - - use Aux; - use type System.Bit_Order; - - package ASF renames Ada.Strings.Fixed; - - type chtype_array is array (size_t range <>) - of aliased Attributed_Character; - pragma Convention (C, chtype_array); - ------------------------------------------------------------------------------- - generic - type Element is (<>); - function W_Get_Element (Win : in Window; - Offset : in Natural) return Element; - - function W_Get_Element (Win : in Window; - Offset : in Natural) return Element is - type E_Array is array (Natural range <>) of aliased Element; - package C_E_Array is new - Interfaces.C.Pointers (Natural, Element, E_Array, Element'Val (0)); - use C_E_Array; - - function To_Pointer is new - Ada.Unchecked_Conversion (Window, Pointer); - - P : Pointer := To_Pointer (Win); - begin - if Win = Null_Window then - raise Curses_Exception; - else - P := P + ptrdiff_t (Offset); - return P.all; - end if; - end W_Get_Element; - - function W_Get_Int is new W_Get_Element (C_Int); - function W_Get_Short is new W_Get_Element (C_Short); - function W_Get_Byte is new W_Get_Element (Interfaces.C.unsigned_char); - - function Get_Flag (Win : Window; - Offset : Natural) return Boolean; - - function Get_Flag (Win : Window; - Offset : Natural) return Boolean - is - Res : C_Int; - begin - case Sizeof_bool is - when 1 => Res := C_Int (W_Get_Byte (Win, Offset)); - when 2 => Res := C_Int (W_Get_Short (Win, Offset)); - when 4 => Res := C_Int (W_Get_Int (Win, Offset)); - when others => raise Curses_Exception; - end case; - - case Res is - when 0 => return False; - when others => return True; - end case; - end Get_Flag; - ------------------------------------------------------------------------------- - function Key_Name (Key : in Real_Key_Code) return String - is - function Keyname (K : C_Int) return chars_ptr; - pragma Import (C, Keyname, "keyname"); - - Ch : Character; - begin - if Key <= Character'Pos (Character'Last) then - Ch := Character'Val (Key); - if Is_Control (Ch) then - return Un_Control (Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - elsif Is_Graphic (Ch) then - declare - S : String (1 .. 1); - begin - S (1) := Ch; - return S; - end; - else - return ""; - end if; - else - return Fill_String (Keyname (C_Int (Key))); - end if; - end Key_Name; - - procedure Key_Name (Key : in Real_Key_Code; - Name : out String) - is - begin - ASF.Move (Key_Name (Key), Name); - end Key_Name; - ------------------------------------------------------------------------------- - procedure Init_Screen - is - function Initscr return Window; - pragma Import (C, Initscr, "initscr"); - - W : Window; - begin - W := Initscr; - if W = Null_Window then - raise Curses_Exception; - end if; - end Init_Screen; - - procedure End_Windows - is - function Endwin return C_Int; - pragma Import (C, Endwin, "endwin"); - begin - if Endwin = Curses_Err then - raise Curses_Exception; - end if; - end End_Windows; - - function Is_End_Window return Boolean - is - function Isendwin return Curses_Bool; - pragma Import (C, Isendwin, "isendwin"); - begin - if Isendwin = Curses_Bool_False then - return False; - else - return True; - end if; - end Is_End_Window; ------------------------------------------------------------------------------- - procedure Move_Cursor (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position) - is - function Wmove (Win : Window; - Line : C_Int; - Column : C_Int - ) return C_Int; - pragma Import (C, Wmove, "wmove"); - begin - if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Move_Cursor; ------------------------------------------------------------------------------- - procedure Add (Win : in Window := Standard_Window; - Ch : in Attributed_Character) - is - function Waddch (W : Window; - Ch : C_Chtype) return C_Int; - pragma Import (C, Waddch, "waddch"); - begin - if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Add; - - procedure Add (Win : in Window := Standard_Window; - Ch : in Character) - is - begin - Add (Win, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add; - - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Attributed_Character) - is - function mvwaddch (W : Window; - Y : C_Int; - X : C_Int; - Ch : C_Chtype) return C_Int; - pragma Import (C, mvwaddch, "mvwaddch"); - begin - if mvwaddch (Win, C_Int (Line), - C_Int (Column), - AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Add; - - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Character) - is - begin - Add (Win, - Line, - Column, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add; - - procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) - is - function Wechochar (W : Window; - Ch : C_Chtype) return C_Int; - pragma Import (C, Wechochar, "wechochar"); - begin - if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Add_With_Immediate_Echo; - - procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; - Ch : in Character) - is - begin - Add_With_Immediate_Echo - (Win, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add_With_Immediate_Echo; ------------------------------------------------------------------------------- - function Create (Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Newwin (Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Newwin, "newwin"); - - W : Window; - begin - W := Newwin (C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Create; - - procedure Delete (Win : in out Window) - is - function Wdelwin (W : Window) return C_Int; - pragma Import (C, Wdelwin, "delwin"); - begin - if Wdelwin (Win) = Curses_Err then - raise Curses_Exception; - end if; - Win := Null_Window; - end Delete; - - function Sub_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Subwin - (Win : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Subwin, "subwin"); - - W : Window; - begin - W := Subwin (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Sub_Window; - - function Derived_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Derwin - (Win : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Derwin, "derwin"); - - W : Window; - begin - W := Derwin (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Derived_Window; - - function Duplicate (Win : Window) return Window - is - function Dupwin (Win : Window) return Window; - pragma Import (C, Dupwin, "dupwin"); - - W : constant Window := Dupwin (Win); - begin - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Duplicate; - - procedure Move_Window (Win : in Window; - Line : in Line_Position; - Column : in Column_Position) - is - function Mvwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Mvwin, "mvwin"); - begin - if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Move_Window; - - procedure Move_Derived_Window (Win : in Window; - Line : in Line_Position; - Column : in Column_Position) - is - function Mvderwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Mvderwin, "mvderwin"); - begin - if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Move_Derived_Window; - - procedure Set_Synch_Mode (Win : in Window := Standard_Window; - Mode : in Boolean := False) - is - function Syncok (Win : Window; - Mode : Curses_Bool) return C_Int; - pragma Import (C, Syncok, "syncok"); - begin - if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Synch_Mode; ------------------------------------------------------------------------------- - procedure Add (Win : in Window := Standard_Window; - Str : in String; - Len : in Integer := -1) - is - function Waddnstr (Win : Window; - Str : char_array; - Len : C_Int := -1) return C_Int; - pragma Import (C, Waddnstr, "waddnstr"); - - Txt : char_array (0 .. Str'Length); - Length : size_t; - begin - To_C (Str, Txt, Length); - if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then - raise Curses_Exception; - end if; - end Add; - - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Add (Win, Str, Len); - end Add; ------------------------------------------------------------------------------- - procedure Add - (Win : in Window := Standard_Window; - Str : in Attributed_String; - Len : in Integer := -1) - is - function Waddchnstr (Win : Window; - Str : chtype_array; - Len : C_Int := -1) return C_Int; - pragma Import (C, Waddchnstr, "waddchnstr"); - - Txt : chtype_array (0 .. Str'Length); - begin - for Length in 1 .. size_t (Str'Length) loop - Txt (Length - 1) := Str (Natural (Length)); - end loop; - Txt (Str'Length) := Default_Character; - if Waddchnstr (Win, - Txt, - C_Int (Len)) = Curses_Err then - raise Curses_Exception; - end if; - end Add; - - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in Attributed_String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Add (Win, Str, Len); - end Add; ------------------------------------------------------------------------------- - procedure Border - (Win : in Window := Standard_Window; - Left_Side_Symbol : in Attributed_Character := Default_Character; - Right_Side_Symbol : in Attributed_Character := Default_Character; - Top_Side_Symbol : in Attributed_Character := Default_Character; - Bottom_Side_Symbol : in Attributed_Character := Default_Character; - Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) - is - function Wborder (W : Window; - LS : C_Chtype; - RS : C_Chtype; - TS : C_Chtype; - BS : C_Chtype; - ULC : C_Chtype; - URC : C_Chtype; - LLC : C_Chtype; - LRC : C_Chtype) return C_Int; - pragma Import (C, Wborder, "wborder"); - begin - if Wborder (Win, - AttrChar_To_Chtype (Left_Side_Symbol), - AttrChar_To_Chtype (Right_Side_Symbol), - AttrChar_To_Chtype (Top_Side_Symbol), - AttrChar_To_Chtype (Bottom_Side_Symbol), - AttrChar_To_Chtype (Upper_Left_Corner_Symbol), - AttrChar_To_Chtype (Upper_Right_Corner_Symbol), - AttrChar_To_Chtype (Lower_Left_Corner_Symbol), - AttrChar_To_Chtype (Lower_Right_Corner_Symbol) - ) = Curses_Err - then - raise Curses_Exception; - end if; - end Border; - - procedure Box - (Win : in Window := Standard_Window; - Vertical_Symbol : in Attributed_Character := Default_Character; - Horizontal_Symbol : in Attributed_Character := Default_Character) - is - begin - Border (Win, - Vertical_Symbol, Vertical_Symbol, - Horizontal_Symbol, Horizontal_Symbol); - end Box; - - procedure Horizontal_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; - Line_Symbol : in Attributed_Character := Default_Character) - is - function Whline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; - pragma Import (C, Whline, "whline"); - begin - if Whline (Win, - AttrChar_To_Chtype (Line_Symbol), - C_Int (Line_Size)) = Curses_Err then - raise Curses_Exception; - end if; - end Horizontal_Line; - - procedure Vertical_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; - Line_Symbol : in Attributed_Character := Default_Character) - is - function Wvline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; - pragma Import (C, Wvline, "wvline"); - begin - if Wvline (Win, - AttrChar_To_Chtype (Line_Symbol), - C_Int (Line_Size)) = Curses_Err then - raise Curses_Exception; - end if; - end Vertical_Line; - ------------------------------------------------------------------------------- - function Get_Keystroke (Win : Window := Standard_Window) - return Real_Key_Code - is - function Wgetch (W : Window) return C_Int; - pragma Import (C, Wgetch, "wgetch"); - - C : constant C_Int := Wgetch (Win); - begin - if C = Curses_Err then - return Key_None; - else - return Real_Key_Code (C); - end if; - end Get_Keystroke; - - procedure Undo_Keystroke (Key : in Real_Key_Code) - is - function Ungetch (Ch : C_Int) return C_Int; - pragma Import (C, Ungetch, "ungetch"); - begin - if Ungetch (C_Int (Key)) = Curses_Err then - raise Curses_Exception; - end if; - end Undo_Keystroke; - - function Has_Key (Key : Special_Key_Code) return Boolean - is - function Haskey (Key : C_Int) return C_Int; - pragma Import (C, Haskey, "has_key"); - begin - if Haskey (C_Int (Key)) = Curses_False then - return False; - else - return True; - end if; - end Has_Key; - - function Is_Function_Key (Key : Special_Key_Code) return Boolean - is - L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + - Natural (Function_Key_Number'Last)); - begin - if (Key >= Key_F0) and then (Key <= L) then - return True; - else - return False; - end if; - end Is_Function_Key; - - function Function_Key (Key : Real_Key_Code) - return Function_Key_Number - is - begin - if Is_Function_Key (Key) then - return Function_Key_Number (Key - Key_F0); - else - raise Constraint_Error; - end if; - end Function_Key; - - function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code - is - begin - return Real_Key_Code (Natural (Key_F0) + Natural (Key)); - end Function_Key_Code; ------------------------------------------------------------------------------- - procedure Standout (Win : Window := Standard_Window; - On : Boolean := True) - is - function wstandout (Win : Window) return C_Int; - pragma Import (C, wstandout, "wstandout"); - function wstandend (Win : Window) return C_Int; - pragma Import (C, wstandend, "wstandend"); - - Err : C_Int; - begin - if On then - Err := wstandout (Win); - else - Err := wstandend (Win); - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Standout; - - procedure Switch_Character_Attribute - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; - On : in Boolean := True) - is - function Wattron (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattron, "wattr_on"); - function Wattroff (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattroff, "wattr_off"); - -- In Ada we use the On Boolean to control whether or not we want to - -- switch on or off the attributes in the set. - Err : C_Int; - AC : constant Attributed_Character := (Ch => Character'First, - Color => Color_Pair'First, - Attr => Attr); - begin - if On then - Err := Wattron (Win, AttrChar_To_AttrType (AC)); - else - Err := Wattroff (Win, AttrChar_To_AttrType (AC)); - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Switch_Character_Attribute; - - procedure Set_Character_Attributes - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) - is - function Wattrset (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set - begin - if Wattrset (Win, - AttrChar_To_AttrType (Attributed_Character' - (Ch => Character'First, - Color => Color, - Attr => Attr))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Character_Attributes; - - function Get_Character_Attribute (Win : Window := Standard_Window) - return Character_Attribute_Set - is - function Wattrget (Win : Window; - Atr : access C_AttrType; - Col : access C_Short; - Opt : System.Address) return C_Int; - pragma Import (C, Wattrget, "wattr_get"); - - Attr : aliased C_AttrType; - Col : aliased C_Short; - Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, - System.Null_Address); - Ch : Attributed_Character; - begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); - return Ch.Attr; - else - raise Curses_Exception; - end if; - end Get_Character_Attribute; - - function Get_Character_Attribute (Win : Window := Standard_Window) - return Color_Pair - is - function Wattrget (Win : Window; - Atr : access C_AttrType; - Col : access C_Short; - Opt : System.Address) return C_Int; - pragma Import (C, Wattrget, "wattr_get"); - - Attr : aliased C_AttrType; - Col : aliased C_Short; - Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, - System.Null_Address); - Ch : Attributed_Character; - begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); - return Ch.Color; - else - raise Curses_Exception; - end if; - end Get_Character_Attribute; - - procedure Set_Color (Win : in Window := Standard_Window; - Pair : in Color_Pair) - is - function Wset_Color (Win : Window; - Color : C_Short; - Opts : C_Void_Ptr) return C_Int; - pragma Import (C, Wset_Color, "wcolor_set"); - begin - if Wset_Color (Win, - C_Short (Pair), - C_Void_Ptr (System.Null_Address)) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Color; - - procedure Change_Attributes - (Win : in Window := Standard_Window; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) - is - function Wchgat (Win : Window; - Cnt : C_Int; - Attr : C_AttrType; - Color : C_Short; - Opts : System.Address := System.Null_Address) - return C_Int; - pragma Import (C, Wchgat, "wchgat"); - - Ch : constant Attributed_Character := - (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); - begin - if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), - C_Short (Color)) = Curses_Err then - raise Curses_Exception; - end if; - end Change_Attributes; - - procedure Change_Attributes - (Win : in Window := Standard_Window; - Line : in Line_Position := Line_Position'First; - Column : in Column_Position := Column_Position'First; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) - is - begin - Move_Cursor (Win, Line, Column); - Change_Attributes (Win, Count, Attr, Color); - end Change_Attributes; ------------------------------------------------------------------------------- - procedure Beep - is - function Beeper return C_Int; - pragma Import (C, Beeper, "beep"); - begin - if Beeper = Curses_Err then - raise Curses_Exception; - end if; - end Beep; - - procedure Flash_Screen - is - function Flash return C_Int; - pragma Import (C, Flash, "flash"); - begin - if Flash = Curses_Err then - raise Curses_Exception; - end if; - end Flash_Screen; ------------------------------------------------------------------------------- - procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) - is - function Cbreak return C_Int; - pragma Import (C, Cbreak, "cbreak"); - function NoCbreak return C_Int; - pragma Import (C, NoCbreak, "nocbreak"); - - Err : C_Int; - begin - if SwitchOn then - Err := Cbreak; - else - Err := NoCbreak; - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Set_Cbreak_Mode; - - procedure Set_Raw_Mode (SwitchOn : in Boolean := True) - is - function Raw return C_Int; - pragma Import (C, Raw, "raw"); - function NoRaw return C_Int; - pragma Import (C, NoRaw, "noraw"); - - Err : C_Int; - begin - if SwitchOn then - Err := Raw; - else - Err := NoRaw; - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Set_Raw_Mode; - - procedure Set_Echo_Mode (SwitchOn : in Boolean := True) - is - function Echo return C_Int; - pragma Import (C, Echo, "echo"); - function NoEcho return C_Int; - pragma Import (C, NoEcho, "noecho"); - - Err : C_Int; - begin - if SwitchOn then - Err := Echo; - else - Err := NoEcho; - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Set_Echo_Mode; - - procedure Set_Meta_Mode (Win : in Window := Standard_Window; - SwitchOn : in Boolean := True) - is - function Meta (W : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Meta, "meta"); - begin - if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Meta_Mode; - - procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; - SwitchOn : in Boolean := True) - is - function Keypad (W : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Keypad, "keypad"); - begin - if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_KeyPad_Mode; - - function Get_KeyPad_Mode (Win : in Window := Standard_Window) - return Boolean - is - begin - return Get_Flag (Win, Offset_use_keypad); - end Get_KeyPad_Mode; - - procedure Half_Delay (Amount : in Half_Delay_Amount) - is - function Halfdelay (Amount : C_Int) return C_Int; - pragma Import (C, Halfdelay, "halfdelay"); - begin - if Halfdelay (C_Int (Amount)) = Curses_Err then - raise Curses_Exception; - end if; - end Half_Delay; - - procedure Set_Flush_On_Interrupt_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := True) - is - function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Intrflush, "intrflush"); - begin - if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Flush_On_Interrupt_Mode; - - procedure Set_Queue_Interrupt_Mode - (Win : in Window := Standard_Window; - Flush : in Boolean := True) - is - procedure Qiflush; - pragma Import (C, Qiflush, "qiflush"); - 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 - No_Qiflush; - end if; - end Set_Queue_Interrupt_Mode; - - procedure Set_NoDelay_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := False) - is - function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Nodelay, "nodelay"); - begin - if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_NoDelay_Mode; - - procedure Set_Timeout_Mode (Win : in Window := Standard_Window; - Mode : in Timeout_Mode; - Amount : in Natural) - is - function Wtimeout (Win : Window; Amount : C_Int) return C_Int; - pragma Import (C, Wtimeout, "wtimeout"); - - Time : C_Int; - begin - case Mode is - when Blocking => Time := -1; - when Non_Blocking => Time := 0; - when Delayed => - if Amount = 0 then - raise Constraint_Error; - end if; - Time := C_Int (Amount); - end case; - if Wtimeout (Win, Time) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Timeout_Mode; - - procedure Set_Escape_Timer_Mode - (Win : in Window := Standard_Window; - Timer_Off : in Boolean := False) - is - function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Notimeout, "notimeout"); - begin - if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) - = Curses_Err then - raise Curses_Exception; - end if; - end Set_Escape_Timer_Mode; - ------------------------------------------------------------------------------- - procedure Set_NL_Mode (SwitchOn : in Boolean := True) - is - function NL return C_Int; - pragma Import (C, NL, "nl"); - function NoNL return C_Int; - pragma Import (C, NoNL, "nonl"); - - Err : C_Int; - begin - if SwitchOn then - Err := NL; - else - Err := NoNL; - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Set_NL_Mode; - - procedure Clear_On_Next_Update - (Win : in Window := Standard_Window; - Do_Clear : in Boolean := True) - is - function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, Clear_Ok, "clearok"); - begin - if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then - raise Curses_Exception; - end if; - end Clear_On_Next_Update; - - procedure Use_Insert_Delete_Line - (Win : in Window := Standard_Window; - Do_Idl : in Boolean := True) - is - function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, IDL_Ok, "idlok"); - begin - if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then - raise Curses_Exception; - end if; - end Use_Insert_Delete_Line; - - procedure Use_Insert_Delete_Character - (Win : in Window := Standard_Window; - Do_Idc : in Boolean := True) - is - function IDC_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, IDC_Ok, "idcok"); - begin - if IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))) = Curses_Err then - raise Curses_Exception; - end if; - end Use_Insert_Delete_Character; - - procedure Leave_Cursor_After_Update - (Win : in Window := Standard_Window; - Do_Leave : in Boolean := True) - is - function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, Leave_Ok, "leaveok"); - begin - if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then - raise Curses_Exception; - end if; - end Leave_Cursor_After_Update; - - procedure Immediate_Update_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := False) - is - function Immedok (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Immedok, "immedok"); - begin - if Immedok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; - end if; - end Immediate_Update_Mode; - - procedure Allow_Scrolling - (Win : in Window := Standard_Window; - Mode : in Boolean := False) - is - function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Scrollok, "scrollok"); - begin - if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; - end if; - end Allow_Scrolling; - - function Scrolling_Allowed (Win : Window := Standard_Window) - return Boolean - is - begin - return Get_Flag (Win, Offset_scroll); - end Scrolling_Allowed; - - procedure Set_Scroll_Region - (Win : in Window := Standard_Window; - Top_Line : in Line_Position; - Bottom_Line : in Line_Position) - is - function Wsetscrreg (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Wsetscrreg, "wsetscrreg"); - begin - if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) - = Curses_Err then - raise Curses_Exception; - end if; - end Set_Scroll_Region; ------------------------------------------------------------------------------- - procedure Update_Screen - is - function Do_Update return C_Int; - pragma Import (C, Do_Update, "doupdate"); - begin - if Do_Update = Curses_Err then - raise Curses_Exception; - end if; - end Update_Screen; - - procedure Refresh (Win : in Window := Standard_Window) - is - function Wrefresh (W : Window) return C_Int; - pragma Import (C, Wrefresh, "wrefresh"); - begin - if Wrefresh (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh; - - procedure Refresh_Without_Update - (Win : in Window := Standard_Window) - is - function Wnoutrefresh (W : Window) return C_Int; - pragma Import (C, Wnoutrefresh, "wnoutrefresh"); - begin - if Wnoutrefresh (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh_Without_Update; - - procedure Redraw (Win : in Window := Standard_Window) - is - function Redrawwin (Win : Window) return C_Int; - pragma Import (C, Redrawwin, "redrawwin"); - begin - if Redrawwin (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Redraw; - - procedure Redraw - (Win : in Window := Standard_Window; - Begin_Line : in Line_Position; - Line_Count : in Positive) - is - function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) - return C_Int; - pragma Import (C, Wredrawln, "wredrawln"); - begin - if Wredrawln (Win, - C_Int (Begin_Line), - C_Int (Line_Count)) = Curses_Err then - raise Curses_Exception; - end if; - end Redraw; - ------------------------------------------------------------------------------- - procedure Erase (Win : in Window := Standard_Window) - is - function Werase (W : Window) return C_Int; - pragma Import (C, Werase, "werase"); - begin - if Werase (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Erase; - - procedure Clear (Win : in Window := Standard_Window) - is - function Wclear (W : Window) return C_Int; - pragma Import (C, Wclear, "wclear"); - begin - if Wclear (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Clear; - - procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) - is - function Wclearbot (W : Window) return C_Int; - pragma Import (C, Wclearbot, "wclrtobot"); - begin - if Wclearbot (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Clear_To_End_Of_Screen; - - procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) - is - function Wcleareol (W : Window) return C_Int; - pragma Import (C, Wcleareol, "wclrtoeol"); - begin - if Wcleareol (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Clear_To_End_Of_Line; ------------------------------------------------------------------------------- - procedure Set_Background - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) - is - procedure WBackground (W : in Window; Ch : in C_Chtype); - pragma Import (C, WBackground, "wbkgdset"); - begin - WBackground (Win, AttrChar_To_Chtype (Ch)); - end Set_Background; - - procedure Change_Background - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) - is - function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; - pragma Import (C, WChangeBkgd, "wbkgd"); - begin - if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Change_Background; - - function Get_Background (Win : Window := Standard_Window) - return Attributed_Character - is - function Wgetbkgd (Win : Window) return C_Chtype; - pragma Import (C, Wgetbkgd, "getbkgd"); - begin - return Chtype_To_AttrChar (Wgetbkgd (Win)); - end Get_Background; ------------------------------------------------------------------------------- - procedure Change_Lines_Status (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive; - State : in Boolean) - is - function Wtouchln (Win : Window; - Sta : C_Int; - Cnt : C_Int; - Chg : C_Int) return C_Int; - pragma Import (C, Wtouchln, "wtouchln"); - begin - if Wtouchln (Win, C_Int (Start), C_Int (Count), - C_Int (Boolean'Pos (State))) = Curses_Err then - raise Curses_Exception; - end if; - end Change_Lines_Status; - - procedure Touch (Win : in Window := Standard_Window) - is - Y : Line_Position; - X : Column_Position; - begin - Get_Size (Win, Y, X); - Change_Lines_Status (Win, 0, Positive (Y), True); - end Touch; - - procedure Untouch (Win : in Window := Standard_Window) - is - Y : Line_Position; - X : Column_Position; - begin - Get_Size (Win, Y, X); - Change_Lines_Status (Win, 0, Positive (Y), False); - end Untouch; - - procedure Touch (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive) - is - begin - Change_Lines_Status (Win, Start, Count, True); - end Touch; - - function Is_Touched - (Win : Window := Standard_Window; - Line : Line_Position) return Boolean - is - function WLineTouched (W : Window; L : C_Int) return Curses_Bool; - pragma Import (C, WLineTouched, "is_linetouched"); - begin - if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then - return False; - else - return True; - end if; - end Is_Touched; - - function Is_Touched - (Win : Window := Standard_Window) return Boolean - is - function WWinTouched (W : Window) return Curses_Bool; - pragma Import (C, WWinTouched, "is_wintouched"); - begin - if WWinTouched (Win) = Curses_Bool_False then - return False; - else - return True; - end if; - end Is_Touched; ------------------------------------------------------------------------------- - procedure Copy - (Source_Window : in Window; - Destination_Window : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position; - Non_Destructive_Mode : in Boolean := True) - is - function Copywin (Src : Window; - Dst : Window; - Str : C_Int; - Slc : C_Int; - Dtr : C_Int; - Dlc : C_Int; - Dbr : C_Int; - Drc : C_Int; - Ndm : C_Int) return C_Int; - pragma Import (C, Copywin, "copywin"); - begin - if Copywin (Source_Window, - Destination_Window, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column), - Boolean'Pos (Non_Destructive_Mode) - ) = Curses_Err then - raise Curses_Exception; - end if; - end Copy; - - procedure Overwrite - (Source_Window : in Window; - Destination_Window : in Window) - is - function Overwrite (Src : Window; Dst : Window) return C_Int; - pragma Import (C, Overwrite, "overwrite"); - begin - if Overwrite (Source_Window, Destination_Window) = Curses_Err then - raise Curses_Exception; - end if; - end Overwrite; - - procedure Overlay - (Source_Window : in Window; - Destination_Window : in Window) - is - function Overlay (Src : Window; Dst : Window) return C_Int; - pragma Import (C, Overlay, "overlay"); - begin - if Overlay (Source_Window, Destination_Window) = Curses_Err then - raise Curses_Exception; - end if; - end Overlay; - ------------------------------------------------------------------------------- - procedure Insert_Delete_Lines - (Win : in Window := Standard_Window; - Lines : in Integer := 1) -- default is to insert one line above - is - function Winsdelln (W : Window; N : C_Int) return C_Int; - pragma Import (C, Winsdelln, "winsdelln"); - begin - if Winsdelln (Win, C_Int (Lines)) = Curses_Err then - raise Curses_Exception; - end if; - end Insert_Delete_Lines; - - procedure Delete_Line (Win : in Window := Standard_Window) - is - begin - Insert_Delete_Lines (Win, -1); - end Delete_Line; - - procedure Insert_Line (Win : in Window := Standard_Window) - is - begin - Insert_Delete_Lines (Win, 1); - end Insert_Line; ------------------------------------------------------------------------------- - - procedure Get_Size - (Win : in Window := Standard_Window; - Number_Of_Lines : out Line_Count; - Number_Of_Columns : out Column_Count) - is - -- Please note: in ncurses they are one off. - -- This might be different in other implementations of curses - 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); - end Get_Size; - - procedure Get_Window_Position - (Win : in Window := Standard_Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position) - is - 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); - end Get_Window_Position; - - procedure Get_Cursor_Position - (Win : in Window := Standard_Window; - Line : out Line_Position; - Column : out Column_Position) - is - 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); - end Get_Cursor_Position; - - procedure Get_Origin_Relative_To_Parent - (Win : in Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position; - Is_Not_A_Subwindow : out Boolean) - is - 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; - Top_Left_Column := Column_Position'Last; - Is_Not_A_Subwindow := True; - else - Top_Left_Line := Line_Position (Y); - Top_Left_Column := Column_Position (X); - Is_Not_A_Subwindow := False; - end if; - end Get_Origin_Relative_To_Parent; ------------------------------------------------------------------------------- - function New_Pad (Lines : Line_Count; - Columns : Column_Count) return Window - is - function Newpad (Lines : C_Int; Columns : C_Int) return Window; - pragma Import (C, Newpad, "newpad"); - - W : Window; - begin - W := Newpad (C_Int (Lines), C_Int (Columns)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end New_Pad; - - function Sub_Pad - (Pad : Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Subpad - (Pad : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Subpad, "subpad"); - - W : Window; - begin - W := Subpad (Pad, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Sub_Pad; - - procedure Refresh - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position) - is - function Prefresh - (Pad : Window; - Source_Top_Row : C_Int; - Source_Left_Column : C_Int; - Destination_Top_Row : C_Int; - Destination_Left_Column : C_Int; - Destination_Bottom_Row : C_Int; - Destination_Right_Column : C_Int) return C_Int; - pragma Import (C, Prefresh, "prefresh"); - begin - if Prefresh (Pad, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh; - - procedure Refresh_Without_Update - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position) - is - function Pnoutrefresh - (Pad : Window; - Source_Top_Row : C_Int; - Source_Left_Column : C_Int; - Destination_Top_Row : C_Int; - Destination_Left_Column : C_Int; - Destination_Bottom_Row : C_Int; - Destination_Right_Column : C_Int) return C_Int; - pragma Import (C, Pnoutrefresh, "pnoutrefresh"); - begin - if Pnoutrefresh (Pad, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh_Without_Update; - - procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; - Ch : in Attributed_Character) - is - function Pechochar (Pad : Window; Ch : C_Chtype) - return C_Int; - pragma Import (C, Pechochar, "pechochar"); - begin - if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Add_Character_To_Pad_And_Echo_It; - - procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; - Ch : in Character) - is - begin - Add_Character_To_Pad_And_Echo_It - (Pad, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add_Character_To_Pad_And_Echo_It; ------------------------------------------------------------------------------- - procedure Scroll (Win : in Window := Standard_Window; - Amount : in Integer := 1) - is - function Wscrl (Win : Window; N : C_Int) return C_Int; - pragma Import (C, Wscrl, "wscrl"); - - begin - if Wscrl (Win, C_Int (Amount)) = Curses_Err then - raise Curses_Exception; - end if; - end Scroll; - ------------------------------------------------------------------------------- - procedure Delete_Character (Win : in Window := Standard_Window) - is - function Wdelch (Win : Window) return C_Int; - pragma Import (C, Wdelch, "wdelch"); - begin - if Wdelch (Win) = Curses_Err then - raise Curses_Exception; - end if; - end Delete_Character; - - procedure Delete_Character - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position) - is - function Mvwdelch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Mvwdelch, "mvwdelch"); - begin - if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Delete_Character; ------------------------------------------------------------------------------- - function Peek (Win : Window := Standard_Window) - return Attributed_Character - is - function Winch (Win : Window) return C_Chtype; - pragma Import (C, Winch, "winch"); - begin - return Chtype_To_AttrChar (Winch (Win)); - end Peek; - - function Peek - (Win : Window := Standard_Window; - Line : Line_Position; - Column : Column_Position) return Attributed_Character - is - function Mvwinch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Chtype; - pragma Import (C, Mvwinch, "mvwinch"); - begin - return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); - end Peek; ------------------------------------------------------------------------------- - procedure Insert (Win : in Window := Standard_Window; - Ch : in Attributed_Character) - is - function Winsch (Win : Window; Ch : C_Chtype) return C_Int; - pragma Import (C, Winsch, "winsch"); - begin - if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Insert; - - procedure Insert - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Attributed_Character) - is - function Mvwinsch (Win : Window; - Lin : C_Int; - Col : C_Int; - Ch : C_Chtype) return C_Int; - pragma Import (C, Mvwinsch, "mvwinsch"); - begin - if Mvwinsch (Win, - C_Int (Line), - C_Int (Column), - AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Insert; ------------------------------------------------------------------------------- - procedure Insert (Win : in Window := Standard_Window; - Str : in String; - Len : in Integer := -1) - is - function Winsnstr (Win : Window; - Str : char_array; - Len : Integer := -1) return C_Int; - pragma Import (C, Winsnstr, "winsnstr"); - - Txt : char_array (0 .. Str'Length); - Length : size_t; - begin - To_C (Str, Txt, Length); - if Winsnstr (Win, Txt, Len) = Curses_Err then - raise Curses_Exception; - end if; - end Insert; - - procedure Insert - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; - Len : in Integer := -1) - is - function Mvwinsnstr (Win : Window; - Line : C_Int; - Column : C_Int; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Mvwinsnstr, "mvwinsnstr"); - - Txt : char_array (0 .. Str'Length); - Length : size_t; - begin - To_C (Str, Txt, Length); - if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) - = Curses_Err then - raise Curses_Exception; - end if; - end Insert; ------------------------------------------------------------------------------- - procedure Peek (Win : in Window := Standard_Window; - Str : out String; - Len : in Integer := -1) - is - function Winnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Winnstr, "winnstr"); - - N : Integer := Len; - Txt : char_array (0 .. Str'Length); - Cnt : Natural; - begin - if N < 0 then - N := Str'Length; - end if; - if N > Str'Length then - raise Constraint_Error; - end if; - Txt (0) := Interfaces.C.char'First; - if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then - raise Curses_Exception; - end if; - To_Ada (Txt, Str, Cnt, True); - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); - end if; - end Peek; - - procedure Peek - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Peek (Win, Str, Len); - end Peek; ------------------------------------------------------------------------------- - procedure Peek - (Win : in Window := Standard_Window; - Str : out Attributed_String; - Len : in Integer := -1) - is - function Winchnstr (Win : Window; - Str : chtype_array; -- out - Len : C_Int) return C_Int; - pragma Import (C, Winchnstr, "winchnstr"); - - N : Integer := Len; - Txt : constant chtype_array (0 .. Str'Length) - := (0 => Default_Character); - Cnt : Natural := 0; - begin - if N < 0 then - N := Str'Length; - end if; - if N > Str'Length then - raise Constraint_Error; - end if; - if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then - raise Curses_Exception; - end if; - for To in Str'Range loop - exit when Txt (size_t (Cnt)) = Default_Character; - Str (To) := Txt (size_t (Cnt)); - Cnt := Cnt + 1; - end loop; - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := - (others => (Ch => ' ', - Color => Color_Pair'First, - Attr => Normal_Video)); - end if; - end Peek; - - procedure Peek - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out Attributed_String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Peek (Win, Str, Len); - end Peek; ------------------------------------------------------------------------------- - procedure Get (Win : in Window := Standard_Window; - Str : out String; - Len : in Integer := -1) - is - function Wgetnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Wgetnstr, "wgetnstr"); - - N : Integer := Len; - Txt : char_array (0 .. Str'Length); - Cnt : Natural; - begin - if N < 0 then - N := Str'Length; - end if; - if N > Str'Length then - raise Constraint_Error; - end if; - Txt (0) := Interfaces.C.char'First; - if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then - raise Curses_Exception; - end if; - To_Ada (Txt, Str, Cnt, True); - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); - end if; - end Get; - - procedure Get - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Get (Win, Str, Len); - end Get; ------------------------------------------------------------------------------- - procedure Init_Soft_Label_Keys - (Format : in Soft_Label_Key_Format := Three_Two_Three) - is - function Slk_Init (Fmt : C_Int) return C_Int; - pragma Import (C, Slk_Init, "slk_init"); - begin - if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then - raise Curses_Exception; - end if; - end Init_Soft_Label_Keys; - - procedure Set_Soft_Label_Key (Label : in Label_Number; - Text : in String; - Fmt : in Label_Justification := Left) - is - function Slk_Set (Label : C_Int; - Txt : char_array; - Fmt : C_Int) return C_Int; - pragma Import (C, Slk_Set, "slk_set"); - - Txt : char_array (0 .. Text'Length); - Len : size_t; - begin - To_C (Text, Txt, Len); - if Slk_Set (C_Int (Label), Txt, - C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Soft_Label_Key; - - procedure Refresh_Soft_Label_Keys - is - function Slk_Refresh return C_Int; - pragma Import (C, Slk_Refresh, "slk_refresh"); - begin - if Slk_Refresh = Curses_Err then - raise Curses_Exception; - end if; - end Refresh_Soft_Label_Keys; - - procedure Refresh_Soft_Label_Keys_Without_Update - is - function Slk_Noutrefresh return C_Int; - pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); - begin - if Slk_Noutrefresh = Curses_Err then - raise Curses_Exception; - end if; - end Refresh_Soft_Label_Keys_Without_Update; - - procedure Get_Soft_Label_Key (Label : in Label_Number; - Text : out String) - is - function Slk_Label (Label : C_Int) return chars_ptr; - pragma Import (C, Slk_Label, "slk_label"); - begin - Fill_String (Slk_Label (C_Int (Label)), Text); - end Get_Soft_Label_Key; - - function Get_Soft_Label_Key (Label : in Label_Number) return String - is - function Slk_Label (Label : C_Int) return chars_ptr; - pragma Import (C, Slk_Label, "slk_label"); - begin - return Fill_String (Slk_Label (C_Int (Label))); - end Get_Soft_Label_Key; - - procedure Clear_Soft_Label_Keys - is - function Slk_Clear return C_Int; - pragma Import (C, Slk_Clear, "slk_clear"); - begin - if Slk_Clear = Curses_Err then - raise Curses_Exception; - end if; - end Clear_Soft_Label_Keys; - - procedure Restore_Soft_Label_Keys - is - function Slk_Restore return C_Int; - pragma Import (C, Slk_Restore, "slk_restore"); - begin - if Slk_Restore = Curses_Err then - raise Curses_Exception; - end if; - end Restore_Soft_Label_Keys; - - procedure Touch_Soft_Label_Keys - is - function Slk_Touch return C_Int; - pragma Import (C, Slk_Touch, "slk_touch"); - begin - if Slk_Touch = Curses_Err then - raise Curses_Exception; - end if; - end Touch_Soft_Label_Keys; - - procedure Switch_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set; - On : in Boolean := True) - is - function Slk_Attron (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attron, "slk_attron"); - function Slk_Attroff (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attroff, "slk_attroff"); - - Err : C_Int; - Ch : constant Attributed_Character := (Ch => Character'First, - Attr => Attr, - Color => Color_Pair'First); - begin - if On then - Err := Slk_Attron (AttrChar_To_Chtype (Ch)); - else - Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); - end if; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Switch_Soft_Label_Key_Attributes; - - procedure Set_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) - is - function Slk_Attrset (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attrset, "slk_attrset"); - - Ch : constant Attributed_Character := (Ch => Character'First, - Attr => Attr, - Color => Color); - begin - if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Soft_Label_Key_Attributes; - - function Get_Soft_Label_Key_Attributes return Character_Attribute_Set - is - function Slk_Attr return C_Chtype; - pragma Import (C, Slk_Attr, "slk_attr"); - - Attr : constant C_Chtype := Slk_Attr; - begin - return Chtype_To_AttrChar (Attr).Attr; - end Get_Soft_Label_Key_Attributes; - - function Get_Soft_Label_Key_Attributes return Color_Pair - is - function Slk_Attr return C_Chtype; - pragma Import (C, Slk_Attr, "slk_attr"); - - Attr : constant C_Chtype := Slk_Attr; - begin - return Chtype_To_AttrChar (Attr).Color; - end Get_Soft_Label_Key_Attributes; - - procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) - is - function Slk_Color (Color : in C_Short) return C_Int; - pragma Import (C, Slk_Color, "slk_color"); - begin - if Slk_Color (C_Short (Pair)) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Soft_Label_Key_Color; - ------------------------------------------------------------------------------- - procedure Enable_Key (Key : in Special_Key_Code; - Enable : in Boolean := True) - is - function Keyok (Keycode : C_Int; - On_Off : Curses_Bool) return C_Int; - pragma Import (C, Keyok, "keyok"); - begin - if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) - = Curses_Err then - raise Curses_Exception; - end if; - end Enable_Key; ------------------------------------------------------------------------------- - procedure Define_Key (Definition : in String; - Key : in Special_Key_Code) - is - function Defkey (Def : char_array; - Key : C_Int) return C_Int; - pragma Import (C, Defkey, "define_key"); - - Txt : char_array (0 .. Definition'Length); - Length : size_t; - begin - To_C (Definition, Txt, Length); - if Defkey (Txt, C_Int (Key)) = Curses_Err then - raise Curses_Exception; - end if; - end Define_Key; ------------------------------------------------------------------------------- - procedure Un_Control (Ch : in Attributed_Character; - Str : out String) - is - function Unctrl (Ch : C_Chtype) return chars_ptr; - pragma Import (C, Unctrl, "unctrl"); - begin - Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); - end Un_Control; - - function Un_Control (Ch : in Attributed_Character) return String - is - function Unctrl (Ch : C_Chtype) return chars_ptr; - pragma Import (C, Unctrl, "unctrl"); - begin - return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); - end Un_Control; - - procedure Delay_Output (Msecs : in Natural) - is - function Delayoutput (Msecs : C_Int) return C_Int; - pragma Import (C, Delayoutput, "delay_output"); - begin - if Delayoutput (C_Int (Msecs)) = Curses_Err then - raise Curses_Exception; - end if; - end Delay_Output; - - procedure Flush_Input - is - function Flushinp return C_Int; - pragma Import (C, Flushinp, "flushinp"); - begin - if Flushinp = Curses_Err then -- docu says that never happens, but... - raise Curses_Exception; - end if; - end Flush_Input; ------------------------------------------------------------------------------- - function Baudrate return Natural - is - function Baud return C_Int; - pragma Import (C, Baud, "baudrate"); - begin - return Natural (Baud); - end Baudrate; - - function Erase_Character return Character - is - function Erasechar return C_Int; - pragma Import (C, Erasechar, "erasechar"); - begin - return Character'Val (Erasechar); - end Erase_Character; - - function Kill_Character return Character - is - function Killchar return C_Int; - pragma Import (C, Killchar, "killchar"); - begin - return Character'Val (Killchar); - end Kill_Character; - - function Has_Insert_Character return Boolean - is - function Has_Ic return Curses_Bool; - pragma Import (C, Has_Ic, "has_ic"); - begin - if Has_Ic = Curses_Bool_False then - return False; - else - return True; - end if; - end Has_Insert_Character; - - function Has_Insert_Line return Boolean - is - function Has_Il return Curses_Bool; - pragma Import (C, Has_Il, "has_il"); - begin - if Has_Il = Curses_Bool_False then - return False; - else - return True; - end if; - end Has_Insert_Line; - - function Supported_Attributes return Character_Attribute_Set - is - function Termattrs return C_Chtype; - pragma Import (C, Termattrs, "termattrs"); - - Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); - begin - return Ch.Attr; - end Supported_Attributes; - - procedure Long_Name (Name : out String) - is - function Longname return chars_ptr; - pragma Import (C, Longname, "longname"); - begin - Fill_String (Longname, Name); - end Long_Name; - - function Long_Name return String - is - function Longname return chars_ptr; - pragma Import (C, Longname, "longname"); - begin - return Fill_String (Longname); - end Long_Name; - - procedure Terminal_Name (Name : out String) - is - function Termname return chars_ptr; - pragma Import (C, Termname, "termname"); - begin - Fill_String (Termname, Name); - end Terminal_Name; - - function Terminal_Name return String - is - function Termname return chars_ptr; - pragma Import (C, Termname, "termname"); - begin - return Fill_String (Termname); - end Terminal_Name; ------------------------------------------------------------------------------- - procedure Init_Pair (Pair : in Redefinable_Color_Pair; - Fore : in Color_Number; - Back : in Color_Number) - is - function Initpair (Pair : C_Short; - Fore : C_Short; - Back : C_Short) return C_Int; - pragma Import (C, Initpair, "init_pair"); - begin - if Integer (Pair) >= Number_Of_Color_Pairs then - raise Constraint_Error; - end if; - if Integer (Fore) >= Number_Of_Colors or else - Integer (Back) >= Number_Of_Colors then raise Constraint_Error; - end if; - if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) - = Curses_Err then - raise Curses_Exception; - end if; - end Init_Pair; - - procedure Pair_Content (Pair : in Color_Pair; - Fore : out Color_Number; - Back : out Color_Number) - is - type C_Short_Access is access all C_Short; - function Paircontent (Pair : C_Short; - Fp : C_Short_Access; - Bp : C_Short_Access) return C_Int; - pragma Import (C, Paircontent, "pair_content"); - - F, B : aliased C_Short; - begin - if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then - raise Curses_Exception; - else - Fore := Color_Number (F); - Back := Color_Number (B); - end if; - end Pair_Content; - - function Has_Colors return Boolean - is - function Hascolors return Curses_Bool; - pragma Import (C, Hascolors, "has_colors"); - begin - if Hascolors = Curses_Bool_False then - return False; - else - return True; - end if; - end Has_Colors; - - procedure Init_Color (Color : in Color_Number; - Red : in RGB_Value; - Green : in RGB_Value; - Blue : in RGB_Value) - is - function Initcolor (Col : C_Short; - Red : C_Short; - Green : C_Short; - Blue : C_Short) return C_Int; - pragma Import (C, Initcolor, "init_color"); - begin - if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), - C_Short (Blue)) = Curses_Err then - raise Curses_Exception; - end if; - end Init_Color; - - function Can_Change_Color return Boolean - is - function Canchangecolor return Curses_Bool; - pragma Import (C, Canchangecolor, "can_change_color"); - begin - if Canchangecolor = Curses_Bool_False then - return False; - else - return True; - end if; - end Can_Change_Color; - - procedure Color_Content (Color : in Color_Number; - Red : out RGB_Value; - Green : out RGB_Value; - Blue : out RGB_Value) - is - type C_Short_Access is access all C_Short; - - function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) - return C_Int; - pragma Import (C, Colorcontent, "color_content"); - - R, G, B : aliased C_Short; - begin - if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = - Curses_Err then - raise Curses_Exception; - else - Red := RGB_Value (R); - Green := RGB_Value (G); - Blue := RGB_Value (B); - end if; - end Color_Content; - ------------------------------------------------------------------------------- - procedure Save_Curses_Mode (Mode : in Curses_Mode) - is - function Def_Prog_Mode return C_Int; - pragma Import (C, Def_Prog_Mode, "def_prog_mode"); - function Def_Shell_Mode return C_Int; - pragma Import (C, Def_Shell_Mode, "def_shell_mode"); - - Err : C_Int; - begin - case Mode is - when Curses => Err := Def_Prog_Mode; - when Shell => Err := Def_Shell_Mode; - end case; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Save_Curses_Mode; - - procedure Reset_Curses_Mode (Mode : in Curses_Mode) - is - function Reset_Prog_Mode return C_Int; - pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); - function Reset_Shell_Mode return C_Int; - pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); - - Err : C_Int; - begin - case Mode is - when Curses => Err := Reset_Prog_Mode; - when Shell => Err := Reset_Shell_Mode; - end case; - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Reset_Curses_Mode; - - procedure Save_Terminal_State - is - function Savetty return C_Int; - pragma Import (C, Savetty, "savetty"); - begin - if Savetty = Curses_Err then - raise Curses_Exception; - end if; - end Save_Terminal_State; - - procedure Reset_Terminal_State - is - function Resetty return C_Int; - pragma Import (C, Resetty, "resetty"); - begin - if Resetty = Curses_Err then - raise Curses_Exception; - end if; - end Reset_Terminal_State; - - procedure Rip_Off_Lines (Lines : in Integer; - Proc : in Stdscr_Init_Proc) - is - function Ripoffline (Lines : C_Int; - Proc : Stdscr_Init_Proc) return C_Int; - pragma Import (C, Ripoffline, "_nc_ripoffline"); - begin - if Ripoffline (C_Int (Lines), Proc) = Curses_Err then - raise Curses_Exception; - end if; - end Rip_Off_Lines; - - procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) - is - function Curs_Set (Curs : C_Int) return C_Int; - pragma Import (C, Curs_Set, "curs_set"); - - Res : C_Int; - begin - Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); - if Res /= Curses_Err then - Visibility := Cursor_Visibility'Val (Res); - end if; - end Set_Cursor_Visibility; - - procedure Nap_Milli_Seconds (Ms : in Natural) - is - function Napms (Ms : C_Int) return C_Int; - pragma Import (C, Napms, "napms"); - begin - if Napms (C_Int (Ms)) = Curses_Err then - raise Curses_Exception; - end if; - end Nap_Milli_Seconds; ------------------------------------------------------------------------------- - - function Standard_Window return Window - is - Stdscr : Window; - pragma Import (C, Stdscr, "stdscr"); - begin - return Stdscr; - end Standard_Window; - - function Lines return Line_Count - is - C_Lines : C_Int; - pragma Import (C, C_Lines, "LINES"); - begin - return Line_Count (C_Lines); - end Lines; - - function Columns return Column_Count - is - C_Columns : C_Int; - pragma Import (C, C_Columns, "COLS"); - begin - return Column_Count (C_Columns); - end Columns; - - function Tab_Size return Natural - is - C_Tab_Size : C_Int; - pragma Import (C, C_Tab_Size, "TABSIZE"); - begin - return Natural (C_Tab_Size); - end Tab_Size; - - function Number_Of_Colors return Natural - is - C_Number_Of_Colors : C_Int; - pragma Import (C, C_Number_Of_Colors, "COLORS"); - begin - return Natural (C_Number_Of_Colors); - end Number_Of_Colors; - - function Number_Of_Color_Pairs return Natural - is - C_Number_Of_Color_Pairs : C_Int; - pragma Import (C, C_Number_Of_Color_Pairs, "COLOR_PAIRS"); - begin - return Natural (C_Number_Of_Color_Pairs); - end Number_Of_Color_Pairs; ------------------------------------------------------------------------------- - procedure Transform_Coordinates - (W : in Window := Standard_Window; - Line : in out Line_Position; - Column : in out Column_Position; - Dir : in Transform_Direction := From_Screen) - is - type Int_Access is access all C_Int; - function Transform (W : Window; - Y, X : Int_Access; - Dir : Curses_Bool) return C_Int; - pragma Import (C, Transform, "wmouse_trafo"); - - X : aliased C_Int := C_Int (Column); - Y : aliased C_Int := C_Int (Line); - D : Curses_Bool := Curses_Bool_False; - R : C_Int; - begin - if Dir = To_Screen then - D := 1; - end if; - R := Transform (W, Y'Access, X'Access, D); - if R = Curses_False then - raise Curses_Exception; - else - Line := Line_Position (Y); - Column := Column_Position (X); - end if; - end Transform_Coordinates; ------------------------------------------------------------------------------- - procedure Use_Default_Colors is - function C_Use_Default_Colors return C_Int; - pragma Import (C, C_Use_Default_Colors, "use_default_colors"); - Err : constant C_Int := C_Use_Default_Colors; - begin - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Use_Default_Colors; - - procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; - Back : Color_Number := Default_Color) - is - function C_Assume_Default_Colors (Fore : C_Int; - Back : C_Int) return C_Int; - pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); - - Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), - C_Int (Back)); - begin - if Err = Curses_Err then - raise Curses_Exception; - end if; - end Assume_Default_Colors; ------------------------------------------------------------------------------- - function Curses_Version return String - is - function curses_versionC return chars_ptr; - pragma Import (C, curses_versionC, "curses_version"); - Result : constant chars_ptr := curses_versionC; - begin - return Fill_String (Result); - end Curses_Version; ------------------------------------------------------------------------------- - function Use_Extended_Names (Enable : Boolean) return Boolean - is - function use_extended_namesC (e : Curses_Bool) return C_Int; - pragma Import (C, use_extended_namesC, "use_extended_names"); - - Res : constant C_Int := - use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); - begin - if Res = C_Int (Curses_Bool_False) then - return False; - else - return True; - end if; - end Use_Extended_Names; ------------------------------------------------------------------------------- - procedure Screen_Dump_To_File (Filename : in String) - is - function scr_dump (f : char_array) return C_Int; - pragma Import (C, scr_dump, "scr_dump"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_dump (Txt) then - raise Curses_Exception; - end if; - end Screen_Dump_To_File; - - procedure Screen_Restore_From_File (Filename : in String) - is - function scr_restore (f : char_array) return C_Int; - pragma Import (C, scr_restore, "scr_restore"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_restore (Txt) then - raise Curses_Exception; - end if; - end Screen_Restore_From_File; - - procedure Screen_Init_From_File (Filename : in String) - is - function scr_init (f : char_array) return C_Int; - pragma Import (C, scr_init, "scr_init"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_init (Txt) then - raise Curses_Exception; - end if; - end Screen_Init_From_File; - - procedure Screen_Set_File (Filename : in String) - is - function scr_set (f : char_array) return C_Int; - pragma Import (C, scr_set, "scr_set"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_set (Txt) then - raise Curses_Exception; - end if; - end Screen_Set_File; ------------------------------------------------------------------------------- - procedure Resize (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count) is - function wresize (win : Window; - lines : C_Int; - columns : C_Int) return C_Int; - pragma Import (C, wresize); - begin - if wresize (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns)) = Curses_Err then - raise Curses_Exception; - end if; - end Resize; ------------------------------------------------------------------------------- - -end Terminal_Interface.Curses; diff -Naur ncurses-5.6.orig/INSTALL ncurses-5.6/INSTALL --- ncurses-5.6.orig/INSTALL 2006-12-17 14:58:19.000000000 -0500 +++ ncurses-5.6/INSTALL 2007-12-21 00:02:35.000000000 -0500 @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.114 2006/12/17 19:58:19 tom Exp $ +-- $Id: INSTALL,v 1.122 2007/12/01 19:37:47 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -304,6 +304,11 @@ return deceptive results, so you may have to override the configure script. Or you may be building tic for a smaller machine. + --disable-big-strings + Disable compile-time optimization of predefined tables which puts + all of their strings into a very long string, to reduce relocation + overhead. + --disable-database Use only built-in data. The ncurses libraries normally read terminfo and termcap data from disk. You can configure ncurses to have a @@ -334,6 +339,16 @@ For testing, compile-in code that frees memory that normally would not be freed, to simplify analysis of memory-leaks. + Any implementation of curses must not free the memory associated with + a screen, since (even after calling endwin()), it must be available + for use in the next call to refresh(). There are also chunks of + memory held for performance reasons. That makes it hard to analyze + curses applications for memory leaks. To work around this, build + a debugging version of the ncurses library which frees those chunks + which it can, and provides the _nc_free_and_exit() function to free + the remainder on exit. The ncurses utility and test programs use this + feature, e.g., via the ExitProgram() macro. + --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 @@ -358,6 +373,13 @@ rather than the include directory. This makes it simpler to avoid compile-time conflicts with other versions of curses.h + --disable-relink + If --enable-rpath is given, the generated makefiles normally will + rebuild the libraries during install. Use this option to simply + copy whatever the linked produced. + + This option is ignored if --enable-rpath is not given. + --disable-root-environ Compile with environment restriction, so certain environment variables are not available when running as root, or via a setuid/setgid @@ -476,12 +498,22 @@ may not be accurate, or that your stty settings have disabled the use of tabs. + --enable-mixed-case + Controls whether the filesystem on which the terminfo database resides + supports mixed-case filenames (normal for UNIX, but not on other + systems). If you do not specify this option, the configure script + checks the current filesystem. + --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 terminfo entries. This is the default, unless you have disabled the extended functions. + --enable-reentrant + Compile experimental configuration which improves reentrant use of the + library by reducing global and static variables. + --enable-rpath Use rpath option when generating shared libraries, and (with some restrictions) when linking the corresponding programs. This originally @@ -495,6 +527,9 @@ environment variable, they do not work with setuid applications since the LD_LIBRARY_PATH variable would be unset in that situation. + This option does not apply to --with-libtool, since libtool makes + extra assumptions about rpath. + --enable-safe-sprintf Compile with experimental safe-sprintf code. You may consider using this if you are building ncurses for a system that has neither @@ -659,10 +694,16 @@ See also --without-dlsym - --with-hashed-db + --with-hashed-db[=XXX] Use a hashed database for storing terminfo data rather than storing each compiled entry in a separate binary file within a directory tree. + + In particular, this uses the Berkeley database 1.8.5 interface, as + provided by that and its successors db 2, 3, and 4. The actual + interface is slightly different in the successor versions of the + Berkeley database. The database should have been configured using + "--enable-compat185". If you use this option for configuring ncurses, tic will only be able to write entries in the hashed database. infocmp can still read @@ -674,6 +715,12 @@ You cannot have a directory containing both hashed-database and filesystem-based terminfo entries. + Use the parameter value to give the install-prefix used for the + datbase, e.g., + --with-hashed-db=/usr/local/BigBase + to find the corresponding include- and lib-directories under the + given directory. + See also the --enable-getcap option. --with-install-prefix=XXX @@ -833,6 +880,15 @@ Specify a search-list of termcap files which will be compiled into the ncurses library (default: /etc/termcap:/usr/share/misc/termcap) + --with-ticlib[=XXX] + When building the ncurses library, build a separate library for + the modules that are used only by the utility programs. Normally + those would be bundled with the termlib or ncurses libraries. + + If an option value is given, that overrides the name of the tic + library. As in termlib, there is no ABI difference between the + "wide" libticw.so and libtic.so + --with-trace Configure the trace() function as part of the all models of the ncurses library. Normally it is part of the debug (libncurses_g) library only. diff -Naur ncurses-5.6.orig/MANIFEST ncurses-5.6/MANIFEST --- ncurses-5.6.orig/MANIFEST 2006-11-25 21:21:05.000000000 -0500 +++ ncurses-5.6/MANIFEST 2007-12-21 00:02:35.000000000 -0500 @@ -4,6 +4,7 @@ ./Ada95/README ./Ada95/TODO ./Ada95/gen/Makefile.in +./Ada95/gen/adacurses-config.in ./Ada95/gen/gen.c ./Ada95/gen/html.m4 ./Ada95/gen/normal.m4 @@ -20,6 +21,7 @@ ./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 ./Ada95/gen/terminal_interface-curses-panels.ads.m4 ./Ada95/gen/terminal_interface-curses-trace.ads.m4 +./Ada95/gen/terminal_interface-curses.adb.m4 ./Ada95/gen/terminal_interface-curses.ads.m4 ./Ada95/samples/Makefile.in ./Ada95/samples/README @@ -163,7 +165,6 @@ ./Ada95/src/terminal_interface-curses-text_io.adb ./Ada95/src/terminal_interface-curses-text_io.ads ./Ada95/src/terminal_interface-curses-trace.adb_p -./Ada95/src/terminal_interface-curses.adb ./Ada95/src/terminal_interface.ads ./INSTALL ./MANIFEST @@ -553,8 +554,10 @@ ./man/curs_instr.3x ./man/curs_inwstr.3x ./man/curs_kernel.3x +./man/curs_legacy.3x ./man/curs_mouse.3x ./man/curs_move.3x +./man/curs_opaque.3x ./man/curs_outopts.3x ./man/curs_overlay.3x ./man/curs_pad.3x @@ -709,7 +712,8 @@ ./mk-0th.awk ./mk-1st.awk ./mk-2nd.awk -./mkinstalldirs +./mk-hdr.awk +./mkdirs.sh ./ncurses/Makefile.in ./ncurses/README ./ncurses/README.IZ @@ -799,6 +803,7 @@ ./ncurses/base/safe_sprintf.c ./ncurses/base/sigaction.c ./ncurses/base/tries.c +./ncurses/base/use_window.c ./ncurses/base/version.c ./ncurses/base/vsscanf.c ./ncurses/base/wresize.c @@ -808,6 +813,8 @@ ./ncurses/llib-lncursesw ./ncurses/modules ./ncurses/tinfo/MKcaptab.awk +./ncurses/tinfo/MKcaptab.sh +./ncurses/tinfo/MKcodes.awk ./ncurses/tinfo/MKfallback.sh ./ncurses/tinfo/MKkeys_list.sh ./ncurses/tinfo/MKnames.awk @@ -824,6 +831,7 @@ ./ncurses/tinfo/comp_scan.c ./ncurses/tinfo/db_iterator.c ./ncurses/tinfo/doalloc.c +./ncurses/tinfo/entries.c ./ncurses/tinfo/free_ttype.c ./ncurses/tinfo/getenv_num.c ./ncurses/tinfo/hashed_db.c @@ -856,6 +864,7 @@ ./ncurses/tinfo/setbuf.c ./ncurses/tinfo/strings.c ./ncurses/tinfo/trim_sgr0.c +./ncurses/tinfo/use_screen.c ./ncurses/tinfo/write_entry.c ./ncurses/trace/README ./ncurses/trace/lib_trace.c @@ -891,6 +900,7 @@ ./ncurses/widechar/lib_in_wchnstr.c ./ncurses/widechar/lib_ins_wch.c ./ncurses/widechar/lib_inwstr.c +./ncurses/widechar/lib_key_name.c ./ncurses/widechar/lib_pecho_wchar.c ./ncurses/widechar/lib_slk_wset.c ./ncurses/widechar/lib_unget_wch.c @@ -934,29 +944,6 @@ ./progs/toe.c ./progs/tput.c ./progs/tset.c -./tack/COPYING -./tack/HISTORY -./tack/Makefile.in -./tack/README -./tack/ansi.c -./tack/charset.c -./tack/color.c -./tack/control.c -./tack/crum.c -./tack/edit.c -./tack/fun.c -./tack/init.c -./tack/menu.c -./tack/modes.c -./tack/modules -./tack/output.c -./tack/pad.c -./tack/scan.c -./tack/sync.c -./tack/sysdep.c -./tack/tack.1 -./tack/tack.c -./tack/tack.h ./tar-copy.sh ./test/Makefile.in ./test/README @@ -981,6 +968,7 @@ ./test/demo_termcap.c ./test/ditto.c ./test/dots.c +./test/dots_mvcur.c ./test/echochar.c ./test/edit_field.c ./test/edit_field.h @@ -992,8 +980,11 @@ ./test/gdc.c ./test/hanoi.c ./test/hashtest.c +./test/inch_wide.c +./test/inchs.c ./test/ins_wide.c ./test/inserts.c +./test/key_names.c ./test/keynames.c ./test/knight.c ./test/linux-color.dat @@ -1010,8 +1001,15 @@ ./test/rain.c ./test/redraw.c ./test/savescreen.c +./test/savescreen.sh ./test/tclock.c ./test/test.priv.h +./test/test_arrays.c +./test/test_get_wstr.c +./test/test_getstr.c +./test/test_instr.c +./test/test_inwstr.c +./test/test_opaque.c ./test/testaddch.c ./test/testcurs.c ./test/testscanw.c diff -Naur ncurses-5.6.orig/NEWS ncurses-5.6/NEWS --- ncurses-5.6.orig/NEWS 2006-12-17 15:36:26.000000000 -0500 +++ ncurses-5.6/NEWS 2007-12-21 00:02:36.000000000 -0500 @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 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 -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1056 2006/12/17 20:36:26 tom Exp $ +-- $Id: NEWS,v 1.1187 2007/12/16 00:23:41 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,9 +45,508 @@ Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20071215 + + add several functions to C++ binding which wrap C functions that + pass a WINDOW* parameter (request by Chris Lee). + +20071201 + + add note about configure options needed for Berkeley database to the + INSTALL file. + + improve checks for version of Berkeley database libraries. + + amend fix for rpath to not modify LDFLAGS if the platform has no + applicable transformation (report by Christian Ebert, cf: 20071124). + +20071124 + + modify configure option --with-hashed-db to accept a parameter which + is the install-prefix of a given Berkeley Database (prompted by + pierre4d2 comments). + + rewrite wrapper for wcrtomb(), making it work on Solaris. This is + used in the form library to determine the length of the buffer needed + by field_buffer (report by Alfred Fung). + + remove unneeded window-parameter from C++ binding for wresize (report + by Chris Lee). + +20071117 + + modify the support for filesystems which do not support mixed-case to + generate 2-character (hexadecimal) codes for the lower-level of the + filesystem terminfo database (request by Michail Vidiassov). + + add configure option --enable-mixed-case, to allow overriding the + configure script's check if the filesystem supports mixed-case + filenames. + + add wresize() to C++ binding (request by Chris Lee). + + define NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS in curses.h to make + it simpler to tell if the extended functions and/or colors are + declared. + +20071103 + + update memory-leak checks for changes to names.c and codes.c + + correct acsc strings in h19, z100 (patch by Benjamin C W Sittler). + +20071020 + + continue implementing support for threading demo by adding mutex + for use_window(). + + add mrxvt terminfo entry, add/fix xterm building blocks for modified + cursor keys -TD + + compile with FreeBSD "contemporary" TTY interface (patch by + Rong-En Fan). + +20071013 + + modify makefile rules to allow clear, tput and tset to be built + without libtic. The other programs (infocmp, tic and toe) rely on + that library. + + add/modify null-pointer checks in several functions for SP and/or + the WINDOW* parameter (report by Thorben Krueger). + + fixes for field_buffer() in formw library (see Redhat Bugzilla + #310071, patches by Miroslav Lichvar). + + improve performance of NCURSES_CHAR_EQ code (patch by Miroslav + Lichvar). + + update/improve mlterm and rxvt terminfo entries, e.g., for + the modified cursor- and keypad-keys -TD + +20071006 + + add code to curses.priv.h ifdef'd with NCURSES_CHAR_EQ, which + changes the CharEq() macro to an inline function to allow comparing + cchar_t struct's without comparing gaps in a possibly unpacked + memory layout (report by Miroslav Lichvar). + +20070929 + + add new functions to lib_trace.c to setup mutex's for the _tracef() + calls within the ncurses library. + + for the reentrant model, move _nc_tputs_trace and _nc_outchars into + the SCREEN. + + start modifying test/worm.c to provide threading demo (incomplete). + + separated ifdef's for some BSD-related symbols in tset.c, to make + it compile on LynxOS (report by Greg Gemmer). +20070915 + + modify Ada95/gen/Makefile to use shlib script, to simplify building + shared-library configuration on platforms lacking rpath support. + + build-fix for Ada95/src/Makefile to reflect changed dependency for + the terminal-interface-curses-aux.adb file which is now generated. + + restructuring test/worm.c, for use_window() example. + +20070908 + + add use_window() and use_screen() functions, to develop into support + for threaded library (incomplete). + + fix typos in man/curs_opaque.3x which kept the install script from + creating symbolic links to two aliases created in 20070818 (report by + Rong-En Fan). + +20070901 + + remove a spurious newline from output of html.m4, which caused links + for Ada95 html to be incorrect for the files generated using m4. + + start investigating mutex's for SCREEN manipulation (incomplete). + + minor cleanup of codes.c/names.c for --enable-const + + expand/revise "Routine and Argument Names" section of ncurses manpage + to address report by David Givens in newsgroup discussion. + + fix interaction between --without-progs/--with-termcap configure + options (report by Michail Vidiassov). + + fix typo in "--disable-relink" option (report by Michail Vidiassov). + +20070825 + + fix a sign-extension bug in infocmp's repair_acsc() function + (cf: 971004). + + fix old configure script bug which prevented "--disable-warnings" + option from working (patch by Mike Frysinger). + +20070818 + + add 9term terminal description (request by Juhapekka Tolvanen) -TD + + modify comp_hash.c's string output to avoid misinterpreting a null + "\0" followed by a digit. + + modify MKnames.awk and MKcodes.awk to support big-strings. + This only applies to the cases (broken linker, reentrant) where + the corresponding arrays are accessed via wrapper functions. + + split MKnames.awk into two scripts, eliminating the shell redirection + which complicated the make process and also the bogus timestamp file + which was introduced to fix "make -j". + + add test/test_opaque.c, test/test_arrays.c + + add wgetscrreg() and wgetparent() for applications that may need it + when NCURSES_OPAQUE is defined (prompted by Bryan Christ). + +20070812 + + amend treatment of infocmp "-r" option to retain the 1023-byte limit + unless "-T" is given (cf: 981017). + + modify comp_captab.c generation to use big-strings. + + make _nc_capalias_table and _nc_infoalias_table private accessed via + _nc_get_alias_table() since the tables are used only within the tic + library. + + modify configure script to skip Intel compiler in CF_C_INLINE. + + make _nc_info_hash_table and _nc_cap_hash_table private accessed via + _nc_get_hash_table() since the tables are used only within the tic + library. + +20070728 + + make _nc_capalias_table and _nc_infoalias_table private, accessed via + _nc_get_alias_table() since they are used only by parse_entry.c + + make _nc_key_names private since it is used only by lib_keyname.c + + add --disable-big-strings configure option to control whether + unctrl.c is generated using the big-string optimization - which may + use strings longer than supported by a given compiler. + + reduce relocation tables for tic, infocmp by changing type of + internal hash tables to short, and make those private symbols. + + eliminate large fixed arrays from progs/infocmp.c + +20070721 + + change winnstr() to stop at the end of the line (cf: 970315). + + add test/test_get_wstr.c + + add test/test_getstr.c + + add test/test_inwstr.c + + add test/test_instr.c + +20070716 + + restore a call to obtain screen-size in _nc_setupterm(), which + is used in tput and other non-screen applications via setupterm() + (Debian #433357, reported by Florent Bayle, Christian Ohm, + cf: 20070310). + +20070714 + + add test/savescreen.c test-program + + add check to trace-file open, if the given name is a directory, add + ".log" to the name and try again. + + add konsole-256color entry -TD + + add extra gcc warning options from xterm. + + minor fixes for ncurses/hashmap test-program. + + modify configure script to quiet c++ build with libtool when the + --disable-echo option is used. + + modify configure script to disable ada95 if libtool is selected, + writing a warning message (addresses FreeBSD ports/114493). + + update config.guess, config.sub + +20070707 + + add continuous-move "M" to demo_panels to help test refresh changes. + + improve fix for refresh of window on top of multi-column characters, + taking into account some split characters on left/right window + boundaries. + +20070630 + + add "widec" row to _tracedump() output to help diagnose remaining + problems with multi-column characters. + + partial fix for refresh of window on top of multi-column characters + which are partly overwritten (report by Sadrul H Chowdhury). + + ignore A_CHARTEXT bits in vidattr() and vid_attr(), in case + multi-column extension bits are passed there. + + add setlocale() call to demo_panels.c, needed for wide-characters. + + add some output flags to _nc_trace_ttymode to help diagnose a bug + report by Larry Virden, i.e., ONLCR, OCRNL, ONOCR and ONLRET, + +20070623 + + add test/demo_panels.c + + implement opaque version of setsyx() and getsyx(). + +20070612 + + corrected xterm+pcf2 terminfo modifiers for F1-F4, to match xterm + #226 -TD + + split-out key_name() from MKkeyname.awk since it now depends upon + wunctrl() which is not in libtinfo (report by Rong-En Fan). + +20070609 + + add test/key_name.c + + add stdscr cases to test/inchs.c and test_inch_wide.c + + update test/configure + + correct formatting of DEL (0x7f) in _nc_vischar(). + + null-terminate result of wunctrl(). + + add null-pointer check in key_name() (report by Andreas Krennmair, + cf: 20020901). + +20070602 + + adapt mouse-handling code from menu library in form-library + (discussion with Clive Nicolson). + + add a modification of test/dots.c, i.e., test/dots_mvcur.c to + illustrate how to use mvcur(). + + modify wide-character flavor of SetAttr() to preserve the + WidecExt() value stored in the .attr field, e.g., in case it + is overwritten by chgat (report by Aleksi Torhamo). + + correct buffer-size for _nc_viswbuf2n() (report by Aleksi Torhamo). + + build-fixes for Solaris 2.6 and 2.7 (patch by Peter O'Gorman). + +20070526 + + modify keyname() to use "^X" form only if meta() has been called, or + if keyname() is called without initializing curses, e.g., via + initscr() or newterm() (prompted by LinuxBase #1604). + + document some portability issues in man/curs_util.3x + + add a shadow copy of TTY buffer to _nc_prescreen to fix applications + broken by moving that data into SCREEN (cf: 20061230). + +20070512 + + add 'O' (wide-character panel test) in ncurses.c to demonstrate a + problem reported by Sadrul H Chowdhury with repainting parts of + a fullwidth cell. + + modify slk_init() so that if there are preceding calls to + ripoffline(), those affect the available lines for soft-keys (adapted + from patch by Clive Nicolson). + + document some portability issues in man/curs_getyx.3x + +20070505 + + fix a bug in Ada95/samples/ncurses which caused a variable to + become uninitialized in the "b" test. + + fix Ada95/gen/Makefile.in adahtml rule to account for recent + movement of files, fix a few incorrect manpage references in the + generated html. + + add Ada95 binding to _nc_freeall() as Curses_Free_All to help with + memory-checking. + + correct some functions in Ada95 binding which were using return value + from C where none was returned: idcok(), immedok() and wtimeout(). + + amend recent changes for Ada95 binding to make it build with + Cygwin's linker, e.g., with configure options + --enable-broken-linker --with-ticlib + +20070428 + + add a configure check for gcc's options for inlining, use that to + quiet a warning message where gcc's default behavior changed from + 3.x to 4.x. + + improve warning message when checking if GPM is linked to curses + library by not warning if its use of "wgetch" is via a weak symbol. + + add loader options when building with static libraries to ensure that + an installed shared library for ncurses does not conflict. This is + reported as problem with Tru64, but could affect other platforms + (report Martin Mokrejs, analysis by Tim Mooney). + + fix build on cygwin after recent ticlib/termlib changes, i.e., + + adjust TINFO_SUFFIX value to work with cygwin's dll naming + + revert a change from 20070303 which commented out dependency of + SHLIB_LIST in form/menu/panel/c++ libraries. + + fix initialization of ripoff stack pointer (cf: 20070421). + +20070421 + + move most static variables into structures _nc_globals and + _nc_prescreen, to simplify storage. + + add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding + type for data manipulated by signal handlers (prompted by comments + in mailing.openbsd.bugs newsgroup). + + modify CF_WITH_LIBTOOL to allow one to pass options such as -static + to the libtool create- and link-operations. + +20070414 + + fix whitespace in curs_opaque.3x which caused a spurious ';' in + the installed aliases (report by Peter Santoro). + + fix configure script to not try to generate adacurses-config when + Ada95 tree is not built. + +20070407 + + add man/curs_legacy.3x, man/curs_opaque.3x + + fix acs_map binding for Ada95 when --enable-reentrant is used. + + add adacurses-config to the Ada95 install, based on version from + FreeBSD port, in turn by Juergen Pfeifer in 2000 (prompted by + comment on comp.lang.ada newsgroup). + + fix includes in c++ binding to build with Intel compiler + (cf: 20061209). + + update install rule in Ada95 to use mkdirs.sh + > other fixes prompted by inspection for Coverity report: + + modify ifdef's for c++ binding to use try/catch/throw statements + + add a null-pointer check in tack/ansi.c request_cfss() + + fix a memory leak in ncurses/base/wresize.c + + corrected check for valid memu/meml capabilities in + progs/dump_entry.c when handling V_HPUX case. + > fixes based on Coverity report: + + remove dead code in test/bs.c + + remove dead code in test/demo_defkey.c + + remove an unused assignment in progs/infocmp.c + + fix a limit check in tack/ansi.c tools_charset() + + fix tack/ansi.c tools_status() to perform the VT320/VT420 + tests in request_cfss(). The function had exited too soon. + + fix a memory leak in tic.c's make_namelist() + + fix a couple of places in tack/output.c which did not check for EOF. + + fix a loop-condition in test/bs.c + + add index checks in lib_color.c for color palettes + + add index checks in progs/dump_entry.c for version_filter() handling + of V_BSD case. + + fix a possible null-pointer dereference in copywin() + + fix a possible null-pointer dereference in waddchnstr() + + add a null-pointer check in _nc_expand_try() + + add a null-pointer check in tic.c's make_namelist() + + add a null-pointer check in _nc_expand_try() + + add null-pointer checks in test/cardfile.c + + fix a double-free in ncurses/tinfo/trim_sgr0.c + + fix a double-free in ncurses/base/wresize.c + + add try/catch block to c++/cursesmain.cc + +20070331 + + modify Ada95 binding to build with --enable-reentrant by wrapping + global variables (bug: acs_map does not yet work). + + modify Ada95 binding to use the new access-functions, allowing it + to build/run when NCURSES_OPAQUE is set. + + add access-functions and macros to return properties of the WINDOW + structure, e.g., when NCURSES_OPAQUE is set. + + improved install-sh's quoting. + + use mkdirs.sh rather than mkinstalldirs, e.g., to use fixes from + other programs. + +20070324 + + eliminate part of the direct use of WINDOW data from Ada95 interface. + + fix substitutions for termlib filename to make configure option + --enable-reentrant work with --with-termlib. + + change a constructor for NCursesWindow to allow compiling with + NCURSES_OPAQUE set, since we cannot pass a reference to + an opaque pointer. + +20070317 + + ignore --with-chtype=unsigned since unsigned is always added to + the type in curses.h; do the same for --with-mmask-t. + + change warning regarding --enable-ext-colors and wide-character + in the configure script to an error. + + tweak error message in CF_WITH_LIBTOOL to distinguish other programs + such as Darwin's libtool program (report by Michail Vidiassov) + + modify edit_man.sh to allow for multiple substitutions per line. + + set locale in misc/ncurses-config.in since it uses a range + + change permissions libncurses++.a install (report by Michail + Vidiassov). + + corrected length of temporary buffer in wide-character version + of set_field_buffer() (related to report by Bryan Christ). + +20070311 + + fix mk-1st.awk script install_shlib() function, broken in 20070224 + changes for cygwin (report by Michail Vidiassov). + +20070310 + + increase size of array in _nc_visbuf2n() to make "tic -v" work + properly in its similar_sgr() function (report/analysis by Peter + Santoro). + + add --enable-reentrant configure option for ongoing changes to + implement a reentrant version of ncurses: + + libraries are suffixed with "t" + + wrap several global variables (curscr, newscr, stdscr, ttytype, + COLORS, COLOR_PAIRS, COLS, ESCDELAY, LINES and TABSIZE) as + functions returning values stored in SCREEN or cur_term. + + move some initialization (LINES, COLS) from lib_setup.c, + i.e., setupterm() to _nc_setupscreen(), i.e., newterm(). + +20070303 + + regenerated html documentation. + + add NCURSES_OPAQUE symbol to curses.h, will use to make structs + opaque in selected configurations. + + move the chunk in lib_acs.c which resets acs capabilities when + running on a terminal whose locale interferes with those into + _nc_setupscreen(), so the libtinfo/libtinfow files can be made + identical (requested by Miroslav Lichvar). + + do not use configure variable SHLIB_LIBS for building libraries + outside the ncurses directory, since that symbol is customized + only for that directory, and using it introduces an unneeded + dependency on libdl (requested by Miroslav Lichvar). + + modify mk-1st.awk so the generated makefile rules for linking or + installing shared libraries do not first remove the library, in + case it is in use, e.g., libncurses.so by /bin/sh (report by Jeff + Chua). + + revised section "Using NCURSES under XTERM" in ncurses-intro.html + (prompted by newsgroup comment by Nick Guenther). + +20070224 + + change internal return codes of _nc_wgetch() to check for cases + where KEY_CODE_YES should be returned, e.g., if a KEY_RESIZE was + ungetch'd, and read by wget_wch(). + + fix static-library build broken in 20070217 changes to remove "-ldl" + (report by Miroslav Lichvar). + + change makefile/scripts for cygwin to allow building termlib. + + use Form_Hook in manpages to match form.h + + use Menu_Hook in manpages, as well as a few places in menu.h + + correct form- and menu-manpages to use specific Field_Options, + Menu_Options and Item_Options types. + + correct prototype for _tracechar() in manpage (cf: 20011229). + + correct prototype for wunctrl() in manpage. + +20070217 + + fixes for $(TICS_LIST) in ncurses/Makefile (report by Miroslav + Lichvar). + + modify relinking of shared libraries to apply only when rpath is + enabled, and add --disable-relink option which can be used to + disable the feature altogether (reports by Michail Vidiassov, + Adam J Richter). + + fix --with-termlib option for wide-character configuration, stripping + the "w" suffix in one place (report by Miroslav Lichvar). + + remove "-ldl" from some library lists to reduce dependencies in + programs (report by Miroslav Lichvar). + + correct description of --enable-signed-char in configure --help + (report by Michail Vidiassov). + + add pattern for GNU/kFreeBSD configuration to CF_XOPEN_SOURCE, + which matches an earlier change to CF_SHARED_OPTS, from xterm #224 + fixes. + + remove "${DESTDIR}" from -install_name option used for linking + shared libraries on Darwin (report by Michail Vidiassov). + +20070210 + + add test/inchs.c, test_inch_wide.c, to test win_wchnstr(). + + remove libdl from library list for termlib (report by Miroslav + Lichvar). + + fix configure.in to allow --without-progs --with-termlib (patch by + Miroslav Lichvar). + + modify win_wchnstr() to ensure that only a base cell is returned + for each multi-column character (prompted by report by Wei Kong + regarding change in mvwin_wch() cf: 20041023). + +20070203 + + modify fix_wchnstr() in form library to strip attributes (and color) + from the cchar_t array (field cells) read from a field's window. + Otherwise, when copying the field cells back to the window, the + associated color overrides the field's background color (report by + Ricardo Cantu). + + improve tracing for form library, showing created forms, fields, etc. + + ignore --enable-rpath configure option if --with-shared was omitted. + + add _nc_leaks_tinfo(), _nc_free_tic(), _nc_free_tinfo() entrypoints + to allow leak-checking when both tic- and tinfo-libraries are built. + + drop CF_CPP_VSCAN_FUNC macro from configure script, since C++ binding + no longer relies on it. + + disallow combining configure script options --with-ticlib and + --enable-termcap (report by Rong-En Fan). + + remove tack from ncurses tree. + +20070128 + + fix typo in configure script that broke --with-termlib option + (report by Rong-En Fan). + +20070127 + + improve fix for FreeBSD gnu/98975, to allow for null pointer passed + to tgetent() (report by Rong-en Fan). + + update tack/HISTORY and tack/README to tell how to build it after + it is removed from the ncurses tree. + + fix configure check for libtool's version to trim blank lines + (report by sci-fi@hush.ai). + + review/eliminate other original-file artifacts in cursesw.cc, making + its license consistent with ncurses. + + use ncurses vw_scanw() rather than reading into a fixed buffer in + the c++ binding for scanw() methods (prompted by report by Nuno Dias). + + eliminate fixed-buffer vsprintf() calls in c++ binding. + +20070120 + + add _nc_leaks_tic() to separate leak-checking of tic library from + term/ncurses libraries, and thereby eliminate a library dependency. + + fix test/mk-test.awk to ignore blank lines. + + correct paths in include/headers, for --srcdir (patch by Miroslav + Lichvar). + +20070113 + + add a break-statement in misc/shlib to ensure that it exits on the + _first_ matched directory (report by Paul Novak). + + add tack/configure, which can be used to build tack outside the + ncurses build-tree. + + add --with-ticlib option, to build/install the tic-support functions + in a separate library (suggested by Miroslav Lichvar). + +20070106 + + change MKunctrl.awk to reduce relocation table for unctrl.o + + change MKkeyname.awk to reduce relocation table for keyname.o + (patch by Miroslav Lichvar). + +20061230 + + modify configure check for libtool's version to trim blank lines + (report by sci-fi@hush.ai). + + modify some modules to allow them to be reentrant if _REENTRANT is + defined: lib_baudrate.c, resizeterm.c (local data only) + + eliminate static data from some modules: add_tries.c, hardscroll.c, + lib_ttyflags.c, lib_twait.c + + improve manpage install to add aliases for the transformed program + names, e.g., from --program-prefix. + + used linklint to verify links in the HTML documentation, made fixes + to manpages as needed. + + fix a typo in curs_mouse.3x (report by William McBrine). + + fix install-rule for ncurses5-config to make the bin-directory. + +20061223 + + modify configure script to omit the tic (terminfo compiler) support + from ncurses library if --without-progs option is given. + + modify install rule for ncurses5-config to do this via "install.libs" + + modify shared-library rules to allow FreeBSD 3.x to use rpath. + + update config.guess, config.sub + 20061217 5.6 release for upload to ftp.gnu.org -20061217 +20061217 + add ifdef's for for HPUX, which has the corresponding definitions in . + revert the va_copy() change from 20061202, since it was neither @@ -62,7 +561,7 @@ + modify configure --with-gpm option to allow it to accept a parameter, i.e., the name of the dynamic GPM library to load via dlopen() (requested by Bryan Henderson). - + add configure option --with-valgrind (from vile). + + add configure option --with-valgrind, changes from vile. + modify configure script AC_TRY_RUN and AC_TRY_LINK checks to use 'return' in preference to 'exit()'. @@ -1524,7 +2023,8 @@ 20031108 + add DJGPP to special case of DOS-style drive letters potentially appearing in TERMCAP environment variable. - + fix some spelling in comments (reports by jmc, Jonathon Gray). + + fix some spelling in comments (reports by Jason McIntyre, Jonathon + Gray). + update config.guess, config.sub 20031101 @@ -1814,7 +2314,7 @@ "--srcdir" work (report by Warren L Dodge). + correct missing definition of $(CC) in Ada95/gen/Makefile.in (reported by Warren L Dodge ). - + fix typos and whitespace in manpages (patch by jmc + + fix typos and whitespace in manpages (patch by Jason McIntyre ). 20030503 @@ -3449,7 +3949,7 @@ 20000923 + modify rs2 capability in xterm-r6 and similar where cursor - save/restore bracketed the sequence for resetting video attributes. + save/restore bracketed the sequence for resetting video attributes. The cursor restore would undo that (report by John Hawkinson (see NetBSD misc/11052)). + using parameter check added to tic, corrected 27 typos in @@ -4266,7 +4766,7 @@ )). + change renaming of dft_fgbg.3x to use_default_colors.3ncurses in man_db.renames, since Debian is not concerned with 14-character - filename limitation (from Debian bug report by Josip Rodin + filename limitation (Debian bug report by Josip Rodin ). + corrected scoansi terminfo entry by testing with scoterm and console. + revert change from 990614 to terminal_interface-curses-forms.ads.m4, @@ -5309,7 +5809,7 @@ 980321 + revise configure macro CF_SPEED_TYPE so that termcap.h has speed_t - declared (from Adam J. Richter ) + declared (from Adam J Richter ) + remove spurious curs_set() call from leaveok() (J T Conklin). + corrected handling leaveok() in doupdate() (patch by Alexander V. Lukyanov). diff -Naur ncurses-5.6.orig/TO-DO ncurses-5.6/TO-DO --- ncurses-5.6.orig/TO-DO 2006-10-28 15:49:16.000000000 -0400 +++ ncurses-5.6/TO-DO 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 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 -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: TO-DO,v 1.48 2006/10/28 19:49:16 tom Exp $ +-- $Id: TO-DO,v 1.49 2007/02/03 16:29:17 tom Exp $ ------------------------------------------------------------------------------- SHORT-TERM TO-DO ITEMS: @@ -58,9 +58,6 @@ + The window classes defined in the c++ subdirectory need documentation. Some C++ programmer could earn a lot of good karma by doing this... -+ The resizeterm() function does not handle ripped-off lines such as that done - for the slk_XXX functions. - + vid_attr() should support the set_a_attributes (sgr1) string, but does not. There appear to be no terminals that require that functionality. @@ -75,19 +72,19 @@ ncurses/tty/lib_tstp.c . + In theory, vwprintw and vwscanf are supposed to use the older varargs.h - interface for handling variadic argument lists. Linux doesn't have - varargs.h, it has the newer X/Open-standard stdargs.h equivalent. So these - functions use stdargs instead. This is unlikely to be a problem unless - you're building ncurses on a System V old enough to only have varargs.h. - (Solaris 2.5.1 uses the stdarg.h binding as well). + interface for handling variadic argument lists (and are deprecated by X/Open + for that reason). Linux doesn't have varargs.h, it has the newer + X/Open-standard stdargs.h equivalent. So these functions use stdargs + instead. This is unlikely to be a problem unless you're building ncurses on + a System V old enough to only have varargs.h. (Solaris 2.5.1 used the + stdarg.h binding as well). + If you're using a BSD earlier than 4.4BSD, or a Linux old enough not to have a native vsscanf(3) in its library, vwscanw() will not work. You lose. (It should work on any System V, however). If you want to fix this, add an implementation to ncurses/vsscanf.c. -+ The C++ binding fails to build with a few C++ compilers, mainly with - configure script problems with vsscanf(). ++ The C++ binding fails to build with a few C++ compilers. + terminfo.5 does not format with the SunOS (and most other platform's) tbl utility because it relies on a diversion for each table entry. Get the @@ -106,7 +103,7 @@ 1. Extended COSE conformance -There is an XPG4 standard recently released which describes a superset +There is an XPG4 standard released in 1996 which describes a superset of the SVr4 API. The library is BASE conformant with this standard. We would like to make ncurses fully conformant at the EXTENDED level supporting internationalization. diff -Naur ncurses-5.6.orig/aclocal.m4 ncurses-5.6/aclocal.m4 --- ncurses-5.6.orig/aclocal.m4 2006-12-17 11:12:38.000000000 -0500 +++ ncurses-5.6/aclocal.m4 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2006,2007 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,7 +28,7 @@ dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.407 2006/12/17 16:12:38 tom Exp $ +dnl $Id: aclocal.m4,v 1.442 2007/12/01 20:02:42 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -168,6 +168,99 @@ ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ADD_INCDIR version: 8 updated: 2007/07/30 19:22:58 +dnl ------------- +dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's +dnl redundant. We don't normally need to add -I/usr/local/include for gcc, +dnl but old versions (and some misinstalled ones) need that. To make things +dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to +dnl the include-path). +AC_DEFUN([CF_ADD_INCDIR], +[ +if test -n "$1" ; then + for cf_add_incdir in $1 + do + while test $cf_add_incdir != /usr/include + do + if test -d $cf_add_incdir + then + cf_have_incdir=no + if test -n "$CFLAGS$CPPFLAGS" ; then + # a loop is needed to ensure we can add subdirs of existing dirs + for cf_test_incdir in $CFLAGS $CPPFLAGS ; do + if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then + cf_have_incdir=yes; break + fi + done + fi + + if test "$cf_have_incdir" = no ; then + if test "$cf_add_incdir" = /usr/local/include ; then + if test "$GCC" = yes + then + cf_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + AC_TRY_COMPILE([#include ], + [printf("Hello")], + [], + [cf_have_incdir=yes]) + CPPFLAGS=$cf_save_CPPFLAGS + fi + fi + fi + + if test "$cf_have_incdir" = no ; then + AC_VERBOSE(adding $cf_add_incdir to include-path) + ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)" + + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + else + break + fi + fi + done + done +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ADD_LIBDIR version: 5 updated: 2007/07/30 19:12:03 +dnl ------------- +dnl Adds to the library-path +dnl +dnl Some machines have trouble with multiple -L options. +dnl +dnl $1 is the (list of) directory(s) to add +dnl $2 is the optional name of the variable to update (default LDFLAGS) +dnl +AC_DEFUN([CF_ADD_LIBDIR], +[ +if test -n "$1" ; then + for cf_add_libdir in $1 + do + if test $cf_add_libdir = /usr/lib ; then + : + elif test -d $cf_add_libdir + then + cf_have_libdir=no + if test -n "$LDFLAGS$LIBS" ; then + # a loop is needed to ensure we can add subdirs of existing dirs + for cf_test_libdir in $LDFLAGS $LIBS ; do + if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then + cf_have_libdir=yes; break + fi + done + fi + if test "$cf_have_libdir" = no ; then + AC_VERBOSE(adding $cf_add_libdir to library-path) + ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)" + fi + fi + done +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34 dnl ---------------- dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' @@ -612,6 +705,50 @@ ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CHECK_GPM_WGETCH version: 1 updated: 2007/04/28 14:38:06 +dnl ------------------- +dnl Check if GPM is already linked with curses. If so - and if the linkage +dnl is not "weak" - warn about this because it can create problems linking +dnl applications with ncurses. +AC_DEFUN([CF_CHECK_GPM_WGETCH],[ +AC_CHECK_LIB(gpm,Gpm_Wgetch,[ + +AC_CACHE_CHECK(if GPM is weakly bound to curses library, cf_cv_check_gpm_wgetch,[ +cf_cv_check_gpm_wgetch=unknown +if test "$cross_compiling" != yes ; then + +cat >conftest.$ac_ext < +int main() +{ + Gpm_Wgetch(); + ${cf_cv_main_return:-return}(0); +} +CF_EOF + + cf_save_LIBS="$LIBS" + # This only works if we can look at the symbol table. If a shared + # library is stripped for install, we cannot use that. So we're forced + # to rely on the static library, noting that some packagers may not + # include it. + LIBS="-static -lgpm -dynamic $LIBS" + if AC_TRY_EVAL(ac_compile) ; then + if AC_TRY_EVAL(ac_link) ; then + cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\' | egrep '\<[[vVwW]]\>'` + test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes + test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no + fi + fi + rm -f conftest* + LIBS="$cf_save_LIBS" +fi +]) + +if test "$cf_cv_check_gpm_wgetch" != yes ; then + AC_MSG_WARN(GPM library is already linked with curses - read the FAQ) +fi +])])dnl +dnl --------------------------------------------------------------------------- dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18 dnl ----------------- dnl Check if the C++ compiler accepts duplicate parameter initialization. This @@ -703,82 +840,36 @@ test "$cf_cv_cpp_static_cast" = yes && AC_DEFINE(CPP_HAS_STATIC_CAST) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CPP_VSCAN_FUNC version: 5 updated: 2001/12/02 01:39:28 -dnl ----------------- -dnl Check if the g++ compiler supports vscan function (not a standard feature). -AC_DEFUN([CF_CPP_VSCAN_FUNC], -[ -if test -n "$CXX"; then - -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -AC_CHECK_HEADERS(strstream.h) - -AC_CACHE_CHECK(if $CXX supports vscan function,cf_cv_cpp_vscan_func,[ - for cf_vscan_func in strstream strstream_cast stdio - do - case $cf_vscan_func in #(vi - stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi - strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;; - strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;; - esac - AC_TRY_LINK([ -#include -#include -#define $cf_vscan_defs 1 -#if defined(USE_STDIO_VSCAN) -#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN) -#include -#endif - -int scanw(const char* fmt, ...) -{ - int result = -1; - char buf[BUFSIZ]; - - va_list args; - va_start(args, fmt); -#if defined(USE_STDIO_VSCAN) - if (::vsscanf(buf, fmt, args) != -1) - result = 0; -#elif defined(USE_STRSTREAM_VSCAN) - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, args) != -1) - result = 0; -#elif defined(USE_STRSTREAM_VSCAN_CAST) - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, (_IO_va_list)args) != -1) - result = 0; -#else -#error case $cf_vscan_func failed -#endif - va_end(args); - return result; -} -],[int tmp, foo = scanw("%d", &tmp)], - [cf_cv_cpp_vscan_func=$cf_vscan_func; break], - [cf_cv_cpp_vscan_func=no]) - test "$cf_cv_cpp_vscan_func" != no && break - done -]) - -AC_LANG_RESTORE +dnl CF_C_INLINE version: 2 updated: 2007/08/11 14:09:50 +dnl ----------- +dnl Check if the C compiler supports "inline". +dnl $1 is the name of a shell variable to set if inline is supported +dnl $2 is the threshold for gcc 4.x's option controlling maximum inline size +AC_DEFUN([CF_C_INLINE],[ +AC_C_INLINE +$1= +if test "$ac_cv_c_inline" != no ; then + $1=inline + if test "$INTEL_COMPILER" = yes + then + : + elif test "$GCC" = yes + then + AC_CACHE_CHECK(if gcc supports options to tune inlining,cf_cv_gcc_inline,[ + cf_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS --param max-inline-insns-single=$2" + AC_TRY_COMPILE([inline int foo(void) { return 1; }], + [${cf_cv_main_return:-return} foo()], + [cf_cv_gcc_inline=yes], + [cf_cv_gcc_inline=no]) + CFLAGS=$cf_save_CFLAGS + ]) + if test "$cf_cv_gcc_inline" = yes ; then + CF_ADD_CFLAGS([--param max-inline-insns-single=$2]) + fi + fi fi - -case $cf_cv_cpp_vscan_func in #(vi -stdio) #(vi - AC_DEFINE(CPP_HAS_VSCAN_FUNC) - AC_DEFINE(USE_STDIO_VSCAN) - ;; -strstream) - AC_DEFINE(CPP_HAS_VSCAN_FUNC) - AC_DEFINE(USE_STRSTREAM_VSCAN) - ;; -strstream_cast) - AC_DEFINE(CPP_HAS_VSCAN_FUNC) - AC_DEFINE(USE_STRSTREAM_VSCAN_CAST) - ;; -esac +AC_SUBST($1) ])dnl dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 @@ -1070,7 +1161,7 @@ ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 10 updated: 2005/05/28 13:16:28 +dnl CF_GCC_ATTRIBUTES version: 11 updated: 2007/07/29 09:55:12 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -1097,7 +1188,7 @@ then AC_CHECKING([for $CC __attribute__ directives]) cat > conftest.$ac_ext < conftest.$ac_ext <$cf_dir/Makefile.out mv $cf_dir/Makefile.out $cf_dir/Makefile @@ -1968,13 +2129,20 @@ case $cf_subset in *base*) ;; - termlib*) + *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 - ;; + ;; + ticlib*) + cf_libname=$TICS_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 @@ -2015,8 +2183,11 @@ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ + TermlibRoot=$TINFO_NAME \ + TermlibSuffix=$TINFO_SUFFIX \ ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ + ReLink=${cf_cv_do_relink-no} \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ @@ -2103,8 +2274,8 @@ cat >> Makefile <>$cf_dir/Makefile <>$cf_dir/Makefile - j=$i - done - - echo " $j" >>$cf_dir/Makefile - - for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` - do - echo " @ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile - test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h && \${LN_S} curses.h ncurses.h)" >>$cf_dir/Makefile - done - - cat >>$cf_dir/Makefile <>$cf_dir/Makefile - test $i = curses.h && echo " -@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile - done + $AWK -f $srcdir/mk-hdr.awk \ + subset="$LIB_SUBSETS" \ + compat="$WITH_CURSES_H" \ + $srcdir/$cf_dir/headers >>$cf_dir/Makefile fi if test -f $srcdir/$cf_dir/modules; then @@ -2776,7 +2916,7 @@ AC_MSG_RESULT($MANPAGE_TBL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAN_PAGES version: 31 updated: 2006/12/09 12:27:08 +dnl CF_MAN_PAGES version: 35 updated: 2007/03/31 11:47:29 dnl ------------ dnl Try to determine if the man-pages on the system are compressed, and if dnl so, what format is used. Use this information to construct a script that @@ -2826,6 +2966,7 @@ esac cf_edit_man=./edit_man.sh +cf_man_alias=`pwd`/man_alias.sed cat >$cf_edit_man <>$cf_man_alias <<-CF_EOF2 + s,@DATADIR@,\$datadir,g + s,@TERMINFO@,\$TERMINFO,g + s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g + s,@NCURSES_MINOR@,\$NCURSES_MINOR,g + s,@NCURSES_PATCH@,\$NCURSES_PATCH,g + s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g +CF_EOF + ifelse($1,,,[ + for cf_name in $1 + do + cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` + cf_name=`echo $cf_name|sed "$program_transform_name"` +cat >>$cf_edit_man <<-CF_EOF + s,@$cf_NAME@,$cf_name, +CF_EOF + done + ]) +cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <&AC_FD_CC +echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_ABI_6 version: 1 updated: 2005/09/17 18:42:49 @@ -3680,7 +3828,73 @@ -e 's/-[[UD]]$3\(=[[^ ]]*\)\?[$]//g'` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 41 updated: 2006/12/09 12:32:00 +dnl CF_REMOVE_LIB version: 1 updated: 2007/02/17 14:11:52 +dnl ------------- +dnl Remove the given library from the symbol +dnl +dnl $1 = target (which could be the same as the source variable) +dnl $2 = source (including '$') +dnl $3 = library to remove +define([CF_REMOVE_LIB], +[ +# remove $3 library from $2 +$1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'` +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_RPATH_HACK version: 3 updated: 2007/12/01 11:14:13 +dnl ------------- +AC_DEFUN([CF_RPATH_HACK], +[ +AC_REQUIRE([CF_SHARED_OPTS]) +AC_MSG_CHECKING(for updated LDFLAGS) +if test -n "$LDFLAGS" ; then +AC_MSG_RESULT(maybe) +CF_VERBOSE(...checking LDFLAGS $LDFLAGS) +CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS) +case "$EXTRA_LDFLAGS" in #(vi +-Wl,-rpath,*) #(vi + cf_rpath_hack="-Wl,-rpath," + ;; +-R\ *) + cf_rpath_hack="-R " + ;; +-R*) + cf_rpath_hack="-R" + ;; +*) + cf_rpath_hack= + ;; +esac +if test -n "$cf_rpath_hack" ; then + cf_rpath_dst= + for cf_rpath_src in $LDFLAGS + do + CF_VERBOSE(Filtering $cf_rpath_src) + case $cf_rpath_src in #(vi + -L*) #(vi + if test "$cf_rpath_hack" = "-R " ; then + cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'` + else + cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%` + fi + CF_VERBOSE(...Filter $cf_rpath_tmp) + EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" + ;; + *) + cf_rpath_dst="$cf_rpath_dst $cf_rpath_src" + ;; + esac + done + LDFLAGS=$cf_rpath_dst + CF_VERBOSE(...checked LDFLAGS $LDFLAGS) + CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) +fi +else +AC_MSG_RESULT(no) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_SHARED_OPTS version: 46 updated: 2007/02/24 18:58:09 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -3757,14 +3971,27 @@ ;; cygwin*) CC_SHARED_OPTS= - MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}' + MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' cf_cv_shlib_version=cygdll cf_cv_shlib_version_infix=cygdll + cat >mk_shared_lib.sh <<-CF_EOF + #!/bin/sh + SHARED_LIB=\[$]1 + IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` + shift + cat <<-EOF + Linking shared library + ** SHARED_LIB \[$]SHARED_LIB + ** IMPORT_LIB \[$]IMPORT_LIB +EOF + exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB} +CF_EOF + chmod +x mk_shared_lib.sh ;; darwin*) EXTRA_CFLAGS="-no-cpp-precomp" CC_SHARED_OPTS="-dynamic" - MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' + MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi cf_cv_shlib_version_infix=yes AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [ @@ -3818,11 +4045,11 @@ CF_SHARED_SONAME MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $[@]' ;; - openbsd2*) + openbsd[[2-9]].*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $[@].${ABI_VERSION}` -o $[@]' ;; - openbsd*|freebsd[[23]]*) + openbsd*|freebsd[[12]].*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='${LD} -Bshareable -o $[@]' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel @@ -4043,6 +4270,41 @@ fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12 +dnl --------------- +dnl signal handler, but there are some gcc depedencies in that recommendation. +dnl Try anyway. +AC_DEFUN([CF_SIG_ATOMIC_T], +[ +AC_MSG_CHECKING(for signal global datatype) +AC_CACHE_VAL(cf_cv_sig_atomic_t,[ + for cf_type in \ + "volatile sig_atomic_t" \ + "sig_atomic_t" \ + "int" + do + AC_TRY_COMPILE([ +#include +#include +#include + +extern $cf_type x; +$cf_type x; +static void handler(int sig) +{ + x = 5; +}], + [signal(SIGINT, handler); + x = 1], + [cf_cv_sig_atomic_t=$cf_type], + [cf_cv_sig_atomic_t=no]) + test "$cf_cv_sig_atomic_t" != no && break + done + ]) +AC_MSG_RESULT($cf_cv_sig_atomic_t) +test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16 dnl ------------- dnl Check for definitions & structures needed for window size-changing @@ -4503,11 +4765,12 @@ $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14 +dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 dnl ---------- dnl Use AC_VERBOSE w/o the warnings AC_DEFUN([CF_VERBOSE], [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG +CF_MSG_LOG([$1]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20 @@ -4643,7 +4906,7 @@ fi ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 10 updated: 2006/10/14 15:23:15 +dnl CF_WITH_LIBTOOL version: 18 updated: 2007/04/08 20:02:38 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -4692,7 +4955,7 @@ # doing: LIB_CLEAN= LIB_COMPILE= -LIB_LINK= +LIB_LINK='${CC}' LIB_INSTALL= LIB_UNINSTALL= @@ -4718,12 +4981,12 @@ AC_MSG_ERROR(Cannot find libtool) fi ])dnl - LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o' - LIB_OBJECT='${OBJECTS}.o=.lo)' + LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o' + LIB_OBJECT='${OBJECTS:.o=.lo}' LIB_SUFFIX=.la LIB_CLEAN='${LIBTOOL} --mode=clean' LIB_COMPILE='${LIBTOOL} --mode=compile' - LIB_LINK='${LIBTOOL} --mode=link' + LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}' LIB_INSTALL='${LIBTOOL} --mode=install' LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' LIB_PREP=: @@ -4734,10 +4997,10 @@ # 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.]].*//'` + cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` AC_MSG_RESULT($cf_cv_libtool_version) if test -z "$cf_cv_libtool_version" ; then - AC_MSG_ERROR(This is not libtool) + AC_MSG_ERROR(This is not GNU libtool) fi # special hack to add --tag option for C++ compiler @@ -4758,6 +5021,7 @@ AC_SUBST(LIBTOOL) AC_SUBST(LIBTOOL_CXX) +AC_SUBST(LIBTOOL_OPTS) AC_SUBST(LIB_CREATE) AC_SUBST(LIB_OBJECT) @@ -4772,7 +5036,7 @@ ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATH version: 7 updated: 2006/08/03 15:20:08 +dnl CF_WITH_PATH version: 8 updated: 2007/05/13 13:16:35 dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. @@ -4786,7 +5050,9 @@ AC_DEFUN([CF_WITH_PATH], [AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),, ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl +if ifelse($5,,true,[test -n "$5"]) ; then CF_PATH_SYNTAX(withval) +fi $3="$withval" AC_SUBST($3)dnl ])dnl @@ -4896,7 +5162,7 @@ [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 24 updated: 2006/04/02 16:41:09 +dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38 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, @@ -4930,7 +5196,7 @@ irix[[56]].*) #(vi CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE" ;; -linux*|gnu*) #(vi +linux*|gnu*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi diff -Naur ncurses-5.6.orig/c++/Makefile.in ncurses-5.6/c++/Makefile.in --- ncurses-5.6.orig/c++/Makefile.in 2006-10-21 13:07:49.000000000 -0400 +++ ncurses-5.6/c++/Makefile.in 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.78 2006/10/21 17:07:49 tom Exp $ +# $Id: Makefile.in,v 1.84 2007/04/28 15:29:12 tom Exp $ ############################################################################## -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. # +# Copyright (c) 1998-2006,2007 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"), # @@ -57,6 +57,7 @@ LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ +INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ INSTALL_DATA = @INSTALL_DATA@ AR = @AR@ @@ -74,6 +75,7 @@ INCDIR = ../include CPPFLAGS = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ +CC = ${CXX} CCFLAGS = $(CPPFLAGS) $(CXXFLAGS) CFLAGS_LIBTOOL = $(CCFLAGS) @@ -91,7 +93,7 @@ LOCAL_LIBDIR = @top_builddir@/lib -LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CXX) @CXXLDFLAGS@ +LINK = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@ SHLIB_DIRS = -L../lib SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ @@ -109,7 +111,9 @@ LINK_PROFILE = $(LINK_FLAGS) LINK_SHARED = $(LINK_FLAGS) -LDFLAGS = @TEST_ARGS@ @LDFLAGS@ \ +TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ + +LDFLAGS = $(TEST_ARGS) @LDFLAGS@ \ @LD_MODEL@ @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS) LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) @@ -173,11 +177,11 @@ sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@ $(DESTDIR)$(libdir) : - sh $(srcdir)/../mkinstalldirs $@ + sh $(srcdir)/../mkdirs.sh $@ install \ install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir) - $(LIBTOOL_INSTALL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME) + $(LIBTOOL_INSTALL) $(INSTALL_LIB) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME) uninstall \ uninstall.libs:: diff -Naur ncurses-5.6.orig/c++/README-first ncurses-5.6/c++/README-first --- ncurses-5.6.orig/c++/README-first 2006-04-22 18:19:37.000000000 -0400 +++ ncurses-5.6/c++/README-first 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 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 -- @@ -25,38 +25,38 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README-first,v 1.8 2006/04/22 22:19:37 tom Exp $ +-- $Id: README-first,v 1.9 2007/01/27 18:27:09 tom Exp $ ------------------------------------------------------------------------------- C++ interface to ncurses routines ----------------------------------------------------------------------- This directory contains the source code for several C++ classes which -ease the use of writing ncurses-based programs. The code is derived -from the libg++ CursesWindow class but enhanced for ncurses. +ease the use of writing ncurses-based programs. The code was originally +derived from the libg++ CursesWindow class, but rewritten for ncurses. The classes simplify the use of window specific functions by encapsulating them in the window object. Function overloading is -used in order to narrow the interface. E.g. you don't have the +used in order to narrow the interface. For example, you do not have the distinction between `printw' and `mvprintw' anymore. A second benefit is the removal of all #defines which are included in the curses.h file. This is a steady cause of trouble because many common identifiers are used. Instead now all #defines are inline -functions which also allows strict type checking of arguments. +functions, which also allows strict type checking of arguments. The next enhancement is color support. It was originally provided by a -derived class. This caused some trouble if you think about Panels or -Menus and Forms with colors. We decided to put color support into the +derived class. This caused some trouble if you think about Panels or +Menus and Forms with colors. We decided to put color support into the base class so that any derived class may use color support also. The implementation chosen here is directed to unrestricted use -of mixes of color and monochrome windows. The original NCursesColorWindow +of mixes of color and monochrome windows. The original NCursesColorWindow class is maintained for compatibility reasons. The last point to mention is the support of other packages that are -distributed with the ncurses package: the panels library, the menu library -and the form library. This support is provided by the NCursesPanel class, +distributed with the ncurses package: the panels library, the menu library +and the form library. This support is provided by the NCursesPanel class, which is also derived from the NCursesWindow class and the NCursesMenu -and NCursesForm classes which are derived from NCursesPanel. This allows +and NCursesForm classes which are derived from NCursesPanel. This allows building interfaces with windows. Please see the example program for a quick introduction. @@ -68,14 +68,6 @@ Suggestions for enhancements and contributions of code (and docs) are welcome. Please let us know which functionality you miss. - ATTENTION LINUX USERS: There is currently some discussion of - replacing the BSD curses in the Linux libc with ncurses. If - this is done we could perhaps include these classes in the Linux - libg++ replacing the original CursesWindow class (and renaming it - to CursesWindow). This could be done because NCursesWindow can - be made easily to a superset of the CursesWindow class. - - Original author: Eric Newton for FSF's libg++ @@ -83,5 +75,6 @@ Ulrich Drepper and Anatoly Ivasyuk -Author of this release: +Authors of this release: Juergen Pfeifer + Thomas E. Dickey diff -Naur ncurses-5.6.orig/c++/cursesapp.cc ncurses-5.6/c++/cursesapp.cc --- ncurses-5.6.orig/c++/cursesapp.cc 2005-04-03 08:25:23.000000000 -0400 +++ ncurses-5.6/c++/cursesapp.cc 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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 @@ #include "internal.h" #include "cursesapp.h" -MODULE_ID("$Id: cursesapp.cc,v 1.13 2005/04/03 12:25:23 tom Exp $") +MODULE_ID("$Id: cursesapp.cc,v 1.14 2007/01/27 20:16:42 tom Exp $") void NCursesApplication::init(bool bColors) @@ -72,11 +72,16 @@ Soft_Label_Key_Set* S; delete titleWindow; + titleWindow = 0; + while( (S=top()) ) { pop(); delete S; } + delete Root_Window; + Root_Window = 0; + ::endwin(); } diff -Naur ncurses-5.6.orig/c++/cursesmain.cc ncurses-5.6/c++/cursesmain.cc --- ncurses-5.6.orig/c++/cursesmain.cc 2003-10-25 10:53:13.000000000 -0400 +++ ncurses-5.6/c++/cursesmain.cc 2007-12-21 00:02:35.000000000 -0500 @@ -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,2007 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,14 @@ #include "internal.h" #include "cursesapp.h" -MODULE_ID("$Id: cursesmain.cc,v 1.11 2003/10/25 14:53:13 tom Exp $") +#if CPP_HAS_TRY_CATCH && HAVE_IOSTREAM +#include +#else +#undef CPP_HAS_TRY_CATCH +#define CPP_HAS_TRY_CATCH 0 +#endif + +MODULE_ID("$Id: cursesmain.cc,v 1.14 2007/04/07 17:10:11 tom Exp $") #if HAVE_LOCALE_H #include @@ -42,6 +49,10 @@ #define setlocale(name,string) /* nothing */ #endif +#if NO_LEAKS +#include +#endif + /* This is the default implementation of main() for a NCursesApplication. * You only have to instantiate a static NCursesApplication object in your * main application source file and link this module with your application. @@ -58,8 +69,25 @@ A->handleArgs(argc,argv); ::endwin(); +#if CPP_HAS_TRY_CATCH + try { + res = (*A)(); + ::endwin(); + } + catch(const NCursesException &e) { + ::endwin(); + std::cerr << e.message << std::endl; + res = e.errorno; + } +#else res = (*A)(); ::endwin(); +#endif +#if NO_LEAKS + delete A; + _nc_free_and_exit(res); +#else return(res); +#endif } } diff -Naur ncurses-5.6.orig/c++/cursesp.h ncurses-5.6/c++/cursesp.h --- ncurses-5.6.orig/c++/cursesp.h 2005-08-13 14:09:21.000000000 -0400 +++ ncurses-5.6/c++/cursesp.h 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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.26 2005/08/13 18:09:21 tom Exp $ +// $Id: cursesp.h,v 1.27 2007/04/07 17:12:54 tom Exp $ #include @@ -83,7 +83,7 @@ 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)); diff -Naur ncurses-5.6.orig/c++/cursespad.cc ncurses-5.6/c++/cursespad.cc --- ncurses-5.6.orig/c++/cursespad.cc 2005-07-23 16:51:23.000000000 -0400 +++ ncurses-5.6/c++/cursespad.cc 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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 * @@ -33,12 +33,10 @@ #include "internal.h" -#include +#include +#include -#include "etip.h" -#include "cursesw.h" - -MODULE_ID("$Id: cursespad.cc,v 1.11 2005/07/23 20:51:23 tom Exp $") +MODULE_ID("$Id: cursespad.cc,v 1.12 2007/04/07 18:43:54 tom Exp $") NCursesPad::NCursesPad(int nlines, int ncols) : NCursesWindow(), diff -Naur ncurses-5.6.orig/c++/cursesw.cc ncurses-5.6/c++/cursesw.cc --- ncurses-5.6.orig/c++/cursesw.cc 2005-08-13 14:12:17.000000000 -0400 +++ ncurses-5.6/c++/cursesw.cc 2007-12-21 00:02:36.000000000 -0500 @@ -1,77 +1,83 @@ // * this is for making emacs happy: -*-Mode: C++;-*- +/**************************************************************************** + * Copyright (c) 2007 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"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ /* - Copyright (C) 1989 Free Software Foundation - written by Eric Newton (newton@rocky.oswego.edu) - - This file is part of the GNU C++ Library. This library is free - software; you can redistribute it and/or modify it under the terms of - the GNU Library General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your - option) any later version. This library is distributed in the hope - that it will be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - - modified by Ulrich Drepper (drepper@karlsruhe.gmd.de) - and Anatoly Ivasyuk (anatoly@nick.csh.rit.edu) - - modified by Juergen Pfeifer - and Thomas Dickey (noting that more than 70% of this file has been changed) -*/ + * Authors: + * Thomas E. Dickey + * Juergen Pfeifer + * + * The NCursesWindow class was originally based on a file written by + * Eric Newton, later modified by Ulrich Drepper and Anatoly Ivasyuk. + * However, aside from the compatible interface definition, no trace + * of the original code remains in this version: it consists only of + * changes introduced since 1995. + */ #include "internal.h" #include "cursesw.h" -MODULE_ID("$Id: cursesw.cc,v 1.32 2005/08/13 18:12:17 tom Exp $") +MODULE_ID("$Id: cursesw.cc,v 1.49 2007/12/15 23:01:57 tom Exp $") #define COLORS_NEED_INITIALIZATION -1 #define COLORS_NOT_INITIALIZED 0 #define COLORS_MONOCHROME 1 #define COLORS_ARE_REALLY_THERE 2 +#define HaveColors() (colorInitialized == COLORS_ARE_REALLY_THERE) + // declare static variables for the class long NCursesWindow::count = 0L; bool NCursesWindow::b_initialized = FALSE; -/* - * The ncurses library has a fallback for vsscanf(), which may work... - */ -#if !(USE_STRSTREAM_VSCAN || USE_STRSTREAM_VSCAN_CAST) -# undef USE_STDIO_VSCAN -# define USE_STDIO_VSCAN 1 -#endif +int +NCursesWindow::scanw(const char* fmt, ...) +{ + int result = ERR; + + va_list args; + va_start(args, fmt); + result = ::vw_scanw (w, const_cast(fmt), args); + va_end(args); + + return result; +} -#if defined(__GNUG__) -# ifndef _IO_va_list -# define _IO_va_list char * -# endif -#endif int -NCursesWindow::scanw(const char* fmt, ...) +NCursesWindow::scanw(int y, int x, const char* fmt, ...) { int result = ERR; - char buf[BUFSIZ]; - if (::wgetnstr(w, buf, sizeof(buf)) != ERR) { + if (::wmove(w, y, x) != ERR) { va_list args; va_start(args, fmt); -#if USE_STDIO_VSCAN - if (::vsscanf(buf, fmt, args) != -1) - result = OK; -#elif USE_STRSTREAM_VSCAN /* powerpc, os390 */ - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, args) != -1) - result = OK; -#elif USE_STRSTREAM_VSCAN_CAST /* pre-gcc 3.0 */ - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, (_IO_va_list)args) != -1) - result = OK; -#endif + result = ::vw_scanw (w, const_cast(fmt), args); va_end(args); } return result; @@ -79,29 +85,23 @@ int -NCursesWindow::scanw(int y, int x, const char* fmt, ...) +NCursesWindow::scanw(const char* fmt, va_list args) +{ + int result = ERR; + + result = ::vw_scanw (w, const_cast(fmt), args); + + return result; +} + + +int +NCursesWindow::scanw(int y, int x, const char* fmt, va_list args) { int result = ERR; - char buf[BUFSIZ]; if (::wmove(w, y, x) != ERR) { - if (::wgetnstr(w, buf, sizeof(buf)) != ERR) { - va_list args; - va_start(args, fmt); -#if USE_STDIO_VSCAN - if (::vsscanf(buf, fmt, args) != -1) - result = OK; -#elif USE_STRSTREAM_VSCAN /* powerpc, os390 */ - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, args) != -1) - result = OK; -#elif USE_STRSTREAM_VSCAN_CAST /* pre-gcc 3.0 */ - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, (_IO_va_list)args) != -1) - result = OK; -#endif - va_end(args); - } + result = ::vw_scanw (w, const_cast(fmt), args); } return result; } @@ -112,10 +112,9 @@ { va_list args; va_start(args, fmt); - char buf[BUFSIZ]; - ::vsprintf(buf, fmt, args); + int result = ::vw_printw(w, fmt, args); va_end(args); - return waddstr(w, buf); + return result; } @@ -126,21 +125,37 @@ va_start(args, fmt); int result = ::wmove(w, y, x); if (result == OK) { - char buf[BUFSIZ]; - ::vsprintf(buf, fmt, args); - result = waddstr(w, buf); + result = ::vw_printw(w, fmt, args); } va_end(args); return result; } +int +NCursesWindow::printw(const char * fmt, va_list args) +{ + int result = ::vw_printw(w, fmt, args); + return result; +} + + +int +NCursesWindow::printw(int y, int x, const char * fmt, va_list args) +{ + int result = ::wmove(w, y, x); + if (result == OK) { + result = ::vw_printw(w, fmt, args); + } + return result; +} + + void -NCursesWindow::init(void) +NCursesWindow::set_keyboard(void) { - leaveok(0); - keypad(1); - meta(1); + keypad(TRUE); + meta(TRUE); } void @@ -152,73 +167,73 @@ void NCursesWindow::initialize() { - if (!b_initialized) { - ::initscr(); - b_initialized = TRUE; - if (colorInitialized==COLORS_NEED_INITIALIZATION) { - colorInitialized=COLORS_NOT_INITIALIZED; - useColors(); - } - ::noecho(); - ::cbreak(); - } + if (!b_initialized) { + ::initscr(); + b_initialized = TRUE; + if (colorInitialized == COLORS_NEED_INITIALIZATION) { + colorInitialized = COLORS_NOT_INITIALIZED; + useColors(); + } + ::noecho(); + ::cbreak(); + } +} + +void +NCursesWindow::constructing() +{ + initialize(); + ++count; } NCursesWindow::NCursesWindow() - : w(0), alloced(0), par(0), subwins(0), sib(0) + : w(0), alloced(FALSE), par(0), subwins(0), sib(0) { - initialize(); + constructing(); - w = static_cast(0); - init(); - alloced = FALSE; - subwins = par = sib = 0; - count++; + w = static_cast(0); + set_keyboard(); } NCursesWindow::NCursesWindow(int nlines, int ncols, int begin_y, int begin_x) - : w(0), alloced(0), par(0), subwins(0), sib(0) + : w(0), alloced(TRUE), par(0), subwins(0), sib(0) { - initialize(); + constructing(); w = ::newwin(nlines, ncols, begin_y, begin_x); if (w == 0) { err_handler("Cannot construct window"); } - init(); - - alloced = TRUE; - subwins = par = sib = 0; - count++; + set_keyboard(); } -NCursesWindow::NCursesWindow(WINDOW* &window) - : w(0), alloced(0), par(0), subwins(0), sib(0) +NCursesWindow::NCursesWindow(WINDOW* window) + : w(0), alloced(FALSE), par(0), subwins(0), sib(0) { - initialize(); + constructing(); - w = window; - init(); - alloced = FALSE; - subwins = par = sib = 0; - count++; + // We used to use a reference on the "window" parameter, but we cannot do + // that with an opaque pointer (see NCURSES_OPAQUE). If the parameter was + // "::stdscr", that is first set via the "constructing() call, and is null + // up to that point. So we allow a null pointer here as meaning the "same" + // as "::stdscr". + w = window ? window : ::stdscr; + set_keyboard(); } -NCursesWindow::NCursesWindow(NCursesWindow& win, int l, int c, +NCursesWindow::NCursesWindow(NCursesWindow& win, int ny, int nx, int begin_y, int begin_x, char absrel) - : w(0), alloced(0), par(0), subwins(0), sib(0) + : w(0), alloced(TRUE), par(0), subwins(0), sib(0) { - initialize(); - if (absrel == 'a') { // absolute origin + constructing(); + if (absrel == 'a') { // absolute origin begin_y -= win.begy(); begin_x -= win.begx(); } - // Even though we treat subwindows as a tree, the standard curses - // library needs the `subwin' call to link to the parent in - // order to correctly perform refreshes, etc. - // Friendly enough, this also works for pads. - w = ::derwin(win.w, l, c, begin_y, begin_x); + // Link this window into its parent's list of subwindows. + // We use derwin(), since this also works for pads. + w = ::derwin(win.w, ny, nx, begin_y, begin_x); if (w == 0) { err_handler("Cannot construct subwindow"); } @@ -226,45 +241,40 @@ par = &win; sib = win.subwins; win.subwins = this; - subwins = 0; - alloced = TRUE; - count++; } NCursesWindow::NCursesWindow(NCursesWindow& win, bool do_box NCURSES_PARAM_INIT(TRUE)) - : w(0), alloced(0), par(0), subwins(0), sib(0) + : w(0), alloced(TRUE), par(0), subwins(0), sib(0) { - initialize(); - int myHeight = win.height(); - int myWidth = win.width(); - w = :: derwin(win.w, myHeight - 2, myWidth - 2, 1, 1); - if (w == 0) { - err_handler("Cannot construct subwindow"); - } - - par = &win; - sib = win.subwins; - win.subwins = this; - subwins = 0; - alloced = TRUE; - count++; - - if (do_box) { - win.box(); - win.touchwin(); - } + constructing(); + int myHeight = win.height(); + int myWidth = win.width(); + w = :: derwin(win.w, myHeight - 2, myWidth - 2, 1, 1); + if (w == 0) { + err_handler("Cannot construct subwindow"); + } + + par = &win; + sib = win.subwins; + win.subwins = this; + subwins = 0; + + if (do_box) { + win.box(); + win.touchwin(); + } } NCursesWindow NCursesWindow::Clone() { - WINDOW *d = ::dupwin(w); - NCursesWindow W(d); - W.subwins = subwins; - W.sib = sib; - W.par = par; - W.alloced = alloced; - return W; + WINDOW *d = ::dupwin(w); + NCursesWindow W(d); + W.subwins = subwins; + W.sib = sib; + W.par = par; + W.alloced = alloced; + return W; } typedef int (*RIPOFFINIT)(NCursesWindow&); @@ -273,62 +283,64 @@ static RIPOFFINIT* prip = R_INIT; NCursesWindow::NCursesWindow(WINDOW *win, int ncols) - : w(0), alloced(0), par(0), subwins(0), sib(0) + : w(0), alloced(FALSE), par(0), subwins(0), sib(0) { - initialize(); - w = win; - assert((w->_maxx+1)==ncols); - alloced = FALSE; - subwins = par = sib = 0; + initialize(); + w = win; + assert((w->_maxx +1 ) == ncols); } int _nc_xx_ripoff_init(WINDOW *w, int ncols) { - int res = ERR; + int res = ERR; - RIPOFFINIT init = *prip++; - if (init) { - NCursesWindow* W = new NCursesWindow(w,ncols); - res = init(*W); - } - return res; + RIPOFFINIT init = *prip++; + if (init) { + 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,_nc_xx_ripoff_init); - if (code==OK && init && ripoff_lines) { - R_INIT[r_init_idx++] = init; - } - return code; + int code = ::_nc_ripoffline(ripoff_lines,_nc_xx_ripoff_init); + if (code == OK && init && ripoff_lines) { + R_INIT[r_init_idx++] = init; + } + return code; } bool NCursesWindow::isDescendant(NCursesWindow& win) { - for (NCursesWindow* p = subwins; p != NULL; p = p->sib) { - if (p==&win) - return TRUE; - else { - if (p->isDescendant(win)) - return TRUE; + bool result = FALSE; + + for (NCursesWindow* p = subwins; p != NULL; p = p->sib) { + if (p == &win || p->isDescendant(win)) { + result = TRUE; + break; + } } - } - return FALSE; + return result; } void NCursesWindow::kill_subwindows() { - for (NCursesWindow* p = subwins; p != 0; p = p->sib) { + NCursesWindow* p = subwins; + + subwins = 0; + while (p != 0) { + NCursesWindow* q = p->sib; p->kill_subwindows(); if (p->alloced) { if (p->w != 0) ::delwin(p->w); - p->alloced = FALSE; } - p->w = 0; // cause a run-time error if anyone attempts to use... + delete p; + p = q; } } @@ -337,22 +349,21 @@ { kill_subwindows(); - if (par != 0) { // Snip us from the parent's list of subwindows. - NCursesWindow * win = par->subwins; - NCursesWindow * trail = 0; - for (;;) { - if (win == 0) + if (par != 0) { + // Remove this window from the parent's list of subwindows. + NCursesWindow * next = par->subwins; + NCursesWindow * prev = 0; + while (next != 0) { + if (next == this) { + if (prev != 0) { + prev->sib = next->sib; + } else { + par->subwins = next->sib; + } break; - else if (win == this) { - if (trail != 0) - trail->sib = win->sib; - else - par->subwins = win->sib; - break; - } else { - trail = win; - win = win->sib; } + prev = next; + next = next->sib; } } @@ -360,13 +371,12 @@ ::delwin(w); if (alloced) { - --count; - if (count == 0) { - ::endwin(); - } - else if (count < 0) { // cannot happen! - err_handler("Too many windows destroyed"); - } + --count; + if (count == 0) { + ::endwin(); + } else if (count < 0) { // cannot happen! + err_handler("Too many windows destroyed"); + } } } @@ -379,89 +389,82 @@ NCursesWindow::useColors(void) { if (colorInitialized == COLORS_NOT_INITIALIZED) { - if (b_initialized) { - if (::has_colors()) { - ::start_color(); - colorInitialized = COLORS_ARE_REALLY_THERE; + if (b_initialized) { + if (::has_colors()) { + ::start_color(); + colorInitialized = COLORS_ARE_REALLY_THERE; + } else { + colorInitialized = COLORS_MONOCHROME; + } + } else { + colorInitialized = COLORS_NEED_INITIALIZATION; } - else - colorInitialized = COLORS_MONOCHROME; - } - else - colorInitialized = COLORS_NEED_INITIALIZATION; } } short +NCursesWindow::getPair() const +{ + return static_cast(PAIR_NUMBER(getattrs(w))); +} + +short NCursesWindow::getcolor(int getback) const { short fore, back; - if (colorInitialized==COLORS_ARE_REALLY_THERE) { - if (::pair_content(static_cast(PAIR_NUMBER(w->_attrs)), &fore, &back)) - err_handler("Can't get color pair"); - } - else { - // Monochrome means white on black - back = COLOR_BLACK; - fore = COLOR_WHITE; + if (HaveColors()) { + if (::pair_content(getPair(), &fore, &back) == ERR) + err_handler("Can't get color pair"); + } else { + // Monochrome means white on black + back = COLOR_BLACK; + fore = COLOR_WHITE; } return getback ? back : fore; } int NCursesWindow::NumberOfColors() { - if (colorInitialized==COLORS_ARE_REALLY_THERE) - return COLORS; - else - return 1; // monochrome (actually there are two ;-) + return (HaveColors()) ? COLORS : 1; } short NCursesWindow::getcolor() const { - if (colorInitialized==COLORS_ARE_REALLY_THERE) - return PAIR_NUMBER(w->_attrs); - else - return 0; // we only have pair zero + return (HaveColors()) ? getPair() : 0; } int NCursesWindow::setpalette(short fore, short back, short pair) { - if (colorInitialized==COLORS_ARE_REALLY_THERE) - return ::init_pair(pair, fore, back); - else - return OK; + return (HaveColors()) ? ::init_pair(pair, fore, back) : OK; } int NCursesWindow::setpalette(short fore, short back) { - if (colorInitialized==COLORS_ARE_REALLY_THERE) - return setpalette(fore, back, static_cast(PAIR_NUMBER(w->_attrs))); - else - return OK; + return setpalette(fore, back, getPair()); } int NCursesWindow::setcolor(short pair) { - if (colorInitialized==COLORS_ARE_REALLY_THERE) { - if ((pair < 1) || (pair > COLOR_PAIRS)) - err_handler("Can't set color pair"); - - attroff(A_COLOR); - attrset(COLOR_PAIR(pair)); - } - return OK; + if (HaveColors()) { + if ((pair < 1) || (pair > COLOR_PAIRS)) + err_handler("Can't set color pair"); + + attroff(A_COLOR); + attrset(COLOR_PAIR(pair)); + } + return OK; } #if HAVE_HAS_KEY bool NCursesWindow::has_mouse() const { - return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse()) - ? TRUE : FALSE); + return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse()) + ? TRUE : FALSE); } #endif diff -Naur ncurses-5.6.orig/c++/cursesw.h ncurses-5.6/c++/cursesw.h --- ncurses-5.6.orig/c++/cursesw.h 2005-07-23 16:51:39.000000000 -0400 +++ ncurses-5.6/c++/cursesw.h 2007-12-21 00:02:36.000000000 -0500 @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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,17 +30,10 @@ #ifndef NCURSES_CURSESW_H_incl #define NCURSES_CURSESW_H_incl 1 -// $Id: cursesw.h,v 1.38 2005/07/23 20:51:39 tom Exp $ - -#include -#include +// $Id: cursesw.h,v 1.47 2007/12/16 00:21:05 tom Exp $ #include -#if HAVE_STRSTREAM_H && (USE_STRSTREAM_VSCAN||USE_STRSTREAM_VSCAN_CAST) -#include -#endif - extern "C" { # include } @@ -61,16 +54,17 @@ #define addch UNDEF(addch) #endif -#ifdef echochar -inline int UNDEF(echochar)(chtype ch) { return echochar(ch); } -#undef echochar -#define echochar UNDEF(echochar) +#ifdef addchstr +inline int UNDEF(addchstr)(chtype *at) { return addchstr(at); } +#undef addchstr +#define addchstr UNDEF(addchstr) #endif -#ifdef insdelln -inline int UNDEF(insdelln)(int n) { return insdelln(n); } -#undef insdelln -#define insdelln UNDEF(insdelln) +#ifdef addnstr +inline int UNDEF(addnstr)(const char *str, int n) +{ return addnstr(str, n); } +#undef addnstr +#define addnstr UNDEF(addnstr) #endif #ifdef addstr @@ -79,28 +73,34 @@ #define addstr UNDEF(addstr) #endif -#ifdef attron -inline int UNDEF(attron)(chtype at) { return attron(at); } -#undef attron -#define attron UNDEF(attron) -#endif - #ifdef attroff inline int UNDEF(attroff)(chtype at) { return attroff(at); } #undef attroff #define attroff UNDEF(attroff) #endif +#ifdef attron +inline int UNDEF(attron)(chtype at) { return attron(at); } +#undef attron +#define attron UNDEF(attron) +#endif + #ifdef attrset inline chtype UNDEF(attrset)(chtype at) { return attrset(at); } #undef attrset #define attrset UNDEF(attrset) #endif -#ifdef color_set -inline chtype UNDEF(color_set)(short p, void* opts) { return color_set(p, opts); } -#undef color_set -#define color_set UNDEF(color_set) +#ifdef bkgd +inline int UNDEF(bkgd)(chtype ch) { return bkgd(ch); } +#undef bkgd +#define bkgd UNDEF(bkgd) +#endif + +#ifdef bkgdset +inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); } +#undef bkgdset +#define bkgdset UNDEF(bkgdset) #endif #ifdef border @@ -116,18 +116,11 @@ #define box UNDEF(box) #endif -#ifdef mvwhline -inline int UNDEF(mvwhline)(WINDOW *win, int y, int x, chtype c, int n) { - return mvwhline(win, y, x, c, n); } -#undef mvwhline -#define mvwhline UNDEF(mvwhline) -#endif - -#ifdef mvwvline -inline int UNDEF(mvwvline)(WINDOW *win, int y, int x, chtype c, int n) { - return mvwvline(win, y, x, c, n); } -#undef mvwvline -#define mvwvline UNDEF(mvwvline) +#ifdef chgat +inline int UNDEF(chgat)(int n, attr_t attr, short color, const void *opts) { + return chgat(n, attr, color, opts); } +#undef chgat +#define chgat UNDEF(chgat) #endif #ifdef clear @@ -156,6 +149,18 @@ #define clrtoeol UNDEF(clrtoeol) #endif +#ifdef color_set +inline chtype UNDEF(color_set)(short p, void* opts) { return color_set(p, opts); } +#undef color_set +#define color_set UNDEF(color_set) +#endif + +#ifdef crmode +inline int UNDEF(crmode)(void) { return crmode(); } +#undef crmode +#define crmode UNDEF(crmode) +#endif + #ifdef delch inline int UNDEF(delch)() { return delch(); } #undef delch @@ -168,12 +173,24 @@ #define deleteln UNDEF(deleteln) #endif +#ifdef echochar +inline int UNDEF(echochar)(chtype ch) { return echochar(ch); } +#undef echochar +#define echochar UNDEF(echochar) +#endif + #ifdef erase inline int UNDEF(erase)() { return erase(); } #undef erase #define erase UNDEF(erase) #endif +#ifdef fixterm +inline int UNDEF(fixterm)(void) { return fixterm(); } +#undef fixterm +#define fixterm UNDEF(fixterm) +#endif + #ifdef flushok inline int UNDEF(flushok)(WINDOW* _win, bool _bf) { return flushok(_win, _bf); } @@ -183,91 +200,34 @@ #define _no_flushok #endif -#ifdef getch -inline int UNDEF(getch)() { return getch(); } -#undef getch -#define getch UNDEF(getch) -#endif - -#ifdef getstr -inline int UNDEF(getstr)(char *_str) { return getstr(_str); } -#undef getstr -#define getstr UNDEF(getstr) -#endif - -#ifdef instr -inline int UNDEF(instr)(char *_str) { return instr(_str); } -#undef instr -#define instr UNDEF(instr) -#endif - -#ifdef innstr -inline int UNDEF(innstr)(char *_str, int n) { return innstr(_str, n); } -#undef innstr -#define innstr UNDEF(innstr) -#endif - -#ifdef mvwinnstr -inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) { - return mvwinnstr(win, y, x, _str, n); } -#undef mvwinnstr -#define mvwinnstr UNDEF(mvwinnstr) -#endif - -#ifdef mvinnstr -inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) { - return mvinnstr(y, x, _str, n); } -#undef mvinnstr -#define mvinnstr UNDEF(mvinnstr) -#endif - -#ifdef winsstr -inline int UNDEF(winsstr)(WINDOW *w, const char *_str) { - return winsstr(w, _str); } -#undef winsstr -#define winsstr UNDEF(winsstr) -#endif - -#ifdef mvwinsstr -inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) { - return mvwinsstr(w, y, x, _str); } -#undef mvwinsstr -#define mvwinsstr UNDEF(mvwinsstr) -#endif - -#ifdef insstr -inline int UNDEF(insstr)(const char *_str) { - return insstr(_str); } -#undef insstr -#define insstr UNDEF(insstr) +#ifdef getattrs +inline int UNDEF(getattrs)(WINDOW *win) { return getattrs(win); } +#undef getattrs +#define getattrs UNDEF(getattrs) #endif -#ifdef mvinsstr -inline int UNDEF(mvinsstr)(int y, int x, const char *_str) { - return mvinsstr(y, x, _str); } -#undef mvinsstr -#define mvinsstr UNDEF(mvinsstr) +#ifdef getbegyx +inline void UNDEF(getbegyx)(WINDOW* win, int& y, int& x) { getbegyx(win, y, x); } +#undef getbegyx +#define getbegyx UNDEF(getbegyx) #endif -#ifdef insnstr -inline int UNDEF(insnstr)(const char *_str, int n) { - return insnstr(_str, n); } -#undef insnstr -#define insnstr UNDEF(insnstr) +#ifdef getbkgd +inline chtype UNDEF(getbkgd)(const WINDOW *win) { return getbkgd(win); } +#undef getbkgd +#define getbkgd UNDEF(getbkgd) #endif -#ifdef mvwinsnstr -inline int UNDEF(mvwinsnstr)(WINDOW *w, int y, int x, const char *_str, int n) { - return mvwinsnstr(w, y, x, _str, n); } -#undef mvwinsnstr -#define mvwinsnstr UNDEF(mvwinsnstr) +#ifdef getch +inline int UNDEF(getch)() { return getch(); } +#undef getch +#define getch UNDEF(getch) #endif -#ifdef mvinsnstr -inline int UNDEF(mvinsnstr)(int y, int x, const char *_str, int n) { - return mvinsnstr(y, x, _str, n); } -#undef mvinsnstr -#define mvinsnstr UNDEF(mvinsnstr) +#ifdef getmaxyx +inline void UNDEF(getmaxyx)(WINDOW* win, int& y, int& x) { getmaxyx(win, y, x); } +#undef getmaxyx +#define getmaxyx UNDEF(getmaxyx) #endif #ifdef getnstr @@ -276,6 +236,18 @@ #define getnstr UNDEF(getnstr) #endif +#ifdef getparyx +inline void UNDEF(getparyx)(WINDOW* win, int& y, int& x) { getparyx(win, y, x); } +#undef getparyx +#define getparyx UNDEF(getparyx) +#endif + +#ifdef getstr +inline int UNDEF(getstr)(char *_str) { return getstr(_str); } +#undef getstr +#define getstr UNDEF(getstr) +#endif + #ifdef getyx inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) { getyx(win, y, x); } @@ -283,18 +255,6 @@ #define getyx UNDEF(getyx) #endif -#ifdef getbegyx -inline void UNDEF(getbegyx)(WINDOW* win, int& y, int& x) { getbegyx(win, y, x); } -#undef getbegyx -#define getbegyx UNDEF(getbegyx) -#endif - -#ifdef getmaxyx -inline void UNDEF(getmaxyx)(WINDOW* win, int& y, int& x) { getmaxyx(win, y, x); } -#undef getmaxyx -#define getmaxyx UNDEF(getmaxyx) -#endif - #ifdef hline inline int UNDEF(hline)(chtype ch, int n) { return hline(ch, n); } #undef hline @@ -307,18 +267,62 @@ #define inch UNDEF(inch) #endif +#ifdef inchstr +inline int UNDEF(inchstr)(chtype *str) { return inchstr(str); } +#undef inchstr +#define inchstr UNDEF(inchstr) +#endif + +#ifdef innstr +inline int UNDEF(innstr)(char *_str, int n) { return innstr(_str, n); } +#undef innstr +#define innstr UNDEF(innstr) +#endif + #ifdef insch inline int UNDEF(insch)(chtype c) { return insch(c); } #undef insch #define insch UNDEF(insch) #endif +#ifdef insdelln +inline int UNDEF(insdelln)(int n) { return insdelln(n); } +#undef insdelln +#define insdelln UNDEF(insdelln) +#endif + #ifdef insertln inline int UNDEF(insertln)() { return insertln(); } #undef insertln #define insertln UNDEF(insertln) #endif +#ifdef insnstr +inline int UNDEF(insnstr)(const char *_str, int n) { + return insnstr(_str, n); } +#undef insnstr +#define insnstr UNDEF(insnstr) +#endif + +#ifdef insstr +inline int UNDEF(insstr)(const char *_str) { + return insstr(_str); } +#undef insstr +#define insstr UNDEF(insstr) +#endif + +#ifdef instr +inline int UNDEF(instr)(char *_str) { return instr(_str); } +#undef instr +#define instr UNDEF(instr) +#endif + +#ifdef intrflush +inline void UNDEF(intrflush)(WINDOW *win, bool bf) { intrflush(); } +#undef intrflush +#define intrflush UNDEF(intrflush) +#endif + #ifdef leaveok inline int UNDEF(leaveok)(WINDOW* win, bool bf) { return leaveok(win, bf); } #undef leaveok @@ -333,142 +337,127 @@ #define move UNDEF(move) #endif -#ifdef refresh -inline int UNDEF(refresh)() { return refresh(); } -#undef refresh -#define refresh UNDEF(refresh) -#endif - -#ifdef redrawwin -inline int UNDEF(redrawwin)(WINDOW *win) { return redrawwin(win); } -#undef redrawwin -#define redrawwin UNDEF(redrawwin) +#ifdef mvaddch +inline int UNDEF(mvaddch)(int y, int x, chtype ch) +{ return mvaddch(y, x, ch); } +#undef mvaddch +#define mvaddch UNDEF(mvaddch) #endif -#ifdef scrl -inline int UNDEF(scrl)(int l) { return scrl(l); } -#undef scrl -#define scrl UNDEF(scrl) +#ifdef mvaddnstr +inline int UNDEF(mvaddnstr)(int y, int x, const char *str, int n) +{ return mvaddnstr(y, x, str, n); } +#undef mvaddnstr +#define mvaddnstr UNDEF(mvaddnstr) #endif -#ifdef scroll -inline int UNDEF(scroll)(WINDOW *win) { return scroll(win); } -#undef scroll -#define scroll UNDEF(scroll) -#endif - -#ifdef scrollok -inline int UNDEF(scrollok)(WINDOW* win, bool bf) { return scrollok(win, bf); } -#undef scrollok -#define scrollok UNDEF(scrollok) -#else -#if defined(__NCURSES_H) -extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool); -#else -extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char); -#endif -#endif - -#ifdef setscrreg -inline int UNDEF(setscrreg)(int t, int b) { return setscrreg(t, b); } -#undef setscrreg -#define setscrreg UNDEF(setscrreg) +#ifdef mvaddstr +inline int UNDEF(mvaddstr)(int y, int x, const char * str) +{ return mvaddstr(y, x, str); } +#undef mvaddstr +#define mvaddstr UNDEF(mvaddstr) #endif -#ifdef standend -inline int UNDEF(standend)() { return standend(); } -#undef standend -#define standend UNDEF(standend) +#ifdef mvchgat +inline int UNDEF(mvchgat)(int y, int x, int n, + attr_t attr, short color, const void *opts) { + return mvchgat(y, x, n, attr, color, opts); } +#undef mvchgat +#define mvchgat UNDEF(mvchgat) #endif -#ifdef standout -inline int UNDEF(standout)() { return standout(); } -#undef standout -#define standout UNDEF(standout) +#ifdef mvdelch +inline int UNDEF(mvdelch)(int y, int x) { return mvdelch(y, x);} +#undef mvdelch +#define mvdelch UNDEF(mvdelch) #endif -#ifdef subpad -inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x) -{ return derwin(p, l, c, y, x); } -#undef subpad -#define subpad UNDEF(subpad) +#ifdef mvgetch +inline int UNDEF(mvgetch)(int y, int x) { return mvgetch(y, x);} +#undef mvgetch +#define mvgetch UNDEF(mvgetch) #endif -#ifdef timeout -inline void UNDEF(timeout)(int delay) { timeout(delay); } -#undef timeout -#define timeout UNDEF(timeout) +#ifdef mvgetnstr +inline int UNDEF(mvgetnstr)(int y, int x, char *str, int n) { + return mvgetnstr(y, x, str, n);} +#undef mvgetnstr +#define mvgetnstr UNDEF(mvgetnstr) #endif -#ifdef touchline -inline int UNDEF(touchline)(WINDOW *win, int s, int c) -{ return touchline(win, s, c); } -#undef touchline -#define touchline UNDEF(touchline) +#ifdef mvgetstr +inline int UNDEF(mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);} +#undef mvgetstr +#define mvgetstr UNDEF(mvgetstr) #endif -#ifdef touchwin -inline int UNDEF(touchwin)(WINDOW *win) { return touchwin(win); } -#undef touchwin -#define touchwin UNDEF(touchwin) +#ifdef mvinch +inline chtype UNDEF(mvinch)(int y, int x) { return mvinch(y, x);} +#undef mvinch +#define mvinch UNDEF(mvinch) #endif -#ifdef untouchwin -inline int UNDEF(untouchwin)(WINDOW *win) { return untouchwin(win); } -#undef untouchwin -#define untouchwin UNDEF(untouchwin) +#ifdef mvinnstr +inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) { + return mvinnstr(y, x, _str, n); } +#undef mvinnstr +#define mvinnstr UNDEF(mvinnstr) #endif -#ifdef vline -inline int UNDEF(vline)(chtype ch, int n) { return vline(ch, n); } -#undef vline -#define vline UNDEF(vline) +#ifdef mvinsch +inline int UNDEF(mvinsch)(int y, int x, chtype c) +{ return mvinsch(y, x, c); } +#undef mvinsch +#define mvinsch UNDEF(mvinsch) #endif -#ifdef waddstr -inline int UNDEF(waddstr)(WINDOW *win, char *str) { return waddstr(win, str); } -#undef waddstr -#define waddstr UNDEF(waddstr) +#ifdef mvinsnstr +inline int UNDEF(mvinsnstr)(int y, int x, const char *_str, int n) { + return mvinsnstr(y, x, _str, n); } +#undef mvinsnstr +#define mvinsnstr UNDEF(mvinsnstr) #endif -#ifdef waddchstr -inline int UNDEF(waddchstr)(WINDOW *win, chtype *at) { return waddchstr(win, at); } -#undef waddchstr -#define waddchstr UNDEF(waddchstr) +#ifdef mvinsstr +inline int UNDEF(mvinsstr)(int y, int x, const char *_str) { + return mvinsstr(y, x, _str); } +#undef mvinsstr +#define mvinsstr UNDEF(mvinsstr) #endif -#ifdef wstandend -inline int UNDEF(wstandend)(WINDOW *win) { return wstandend(win); } -#undef wstandend -#define wstandend UNDEF(wstandend) +#ifdef mvwaddch +inline int UNDEF(mvwaddch)(WINDOW *win, int y, int x, const chtype ch) +{ return mvwaddch(win, y, x, ch); } +#undef mvwaddch +#define mvwaddch UNDEF(mvwaddch) #endif -#ifdef wstandout -inline int UNDEF(wstandout)(WINDOW *win) { return wstandout(win); } -#undef wstandout -#define wstandout UNDEF(wstandout) +#ifdef mvwaddchnstr +inline int UNDEF(mvwaddchnstr)(WINDOW *win, int y, int x, const chtype *str, int n) +{ return mvwaddchnstr(win, y, x, str, n); } +#undef mvwaddchnstr +#define mvwaddchnstr UNDEF(mvwaddchnstr) #endif - -#ifdef wattroff -inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); } -#undef wattroff -#define wattroff UNDEF(wattroff) +#ifdef mvwaddchstr +inline int UNDEF(mvwaddchstr)(WINDOW *win, int y, int x, const chtype *str) +{ return mvwaddchstr(win, y, x, str); } +#undef mvwaddchstr +#define mvwaddchstr UNDEF(mvwaddchstr) #endif -#ifdef chgat -inline int UNDEF(chgat)(int n, attr_t attr, short color, const void *opts) { - return chgat(n, attr, color, opts); } -#undef chgat -#define chgat UNDEF(chgat) +#ifdef mvwaddnstr +inline int UNDEF(mvwaddnstr)(WINDOW *win, int y, int x, const char *str, int n) +{ return mvwaddnstr(win, y, x, str, n); } +#undef mvwaddnstr +#define mvwaddnstr UNDEF(mvwaddnstr) #endif -#ifdef mvchgat -inline int UNDEF(mvchgat)(int y, int x, int n, - attr_t attr, short color, const void *opts) { - return mvchgat(y, x, n, attr, color, opts); } -#undef mvchgat -#define mvchgat UNDEF(mvchgat) +#ifdef mvwaddstr +inline int UNDEF(mvwaddstr)(WINDOW *win, int y, int x, const char * str) +{ return mvwaddstr(win, y, x, str); } +#undef mvwaddstr +#define mvwaddstr UNDEF(mvwaddstr) #endif #ifdef mvwchgat @@ -479,212 +468,275 @@ #define mvwchgat UNDEF(mvwchgat) #endif -#ifdef wattrset -inline int UNDEF(wattrset)(WINDOW *win, int att) { return wattrset(win, att); } -#undef wattrset -#define wattrset UNDEF(wattrset) +#ifdef mvwdelch +inline int UNDEF(mvwdelch)(WINDOW *win, int y, int x) +{ return mvwdelch(win, y, x); } +#undef mvwdelch +#define mvwdelch UNDEF(mvwdelch) #endif -#ifdef winch -inline chtype UNDEF(winch)(const WINDOW* win) { return winch(win); } -#undef winch -#define winch UNDEF(winch) +#ifdef mvwgetch +inline int UNDEF(mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);} +#undef mvwgetch +#define mvwgetch UNDEF(mvwgetch) #endif -#ifdef mvwaddch -inline int UNDEF(mvwaddch)(WINDOW *win, int y, int x, const chtype ch) -{ return mvwaddch(win, y, x, ch); } -#undef mvwaddch -#define mvwaddch UNDEF(mvwaddch) +#ifdef mvwgetnstr +inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n) +{return mvwgetnstr(win, y, x, str, n);} +#undef mvwgetnstr +#define mvwgetnstr UNDEF(mvwgetnstr) #endif -#ifdef mvwaddchnstr -inline int UNDEF(mvwaddchnstr)(WINDOW *win, int y, int x, chtype *str, int n) -{ return mvwaddchnstr(win, y, x, str, n); } -#undef mvwaddchnstr -#define mvwaddchnstr UNDEF(mvwaddchnstr) +#ifdef mvwgetstr +inline int UNDEF(mvwgetstr)(WINDOW *win, int y, int x, char *str) +{return mvwgetstr(win, y, x, str);} +#undef mvwgetstr +#define mvwgetstr UNDEF(mvwgetstr) #endif -#ifdef mvwaddchstr -inline int UNDEF(mvwaddchstr)(WINDOW *win, int y, int x, chtype *str) -{ return mvwaddchstr(win, y, x, str); } -#undef mvwaddchstr -#define mvwaddchstr UNDEF(mvwaddchstr) +#ifdef mvwhline +inline int UNDEF(mvwhline)(WINDOW *win, int y, int x, chtype c, int n) { + return mvwhline(win, y, x, c, n); } +#undef mvwhline +#define mvwhline UNDEF(mvwhline) #endif -#ifdef addnstr -inline int UNDEF(addnstr)(const char *str, int n) -{ return addnstr(str, n); } -#undef addnstr -#define addnstr UNDEF(addnstr) +#ifdef mvwinch +inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) { + return mvwinch(win, y, x);} +#undef mvwinch +#define mvwinch UNDEF(mvwinch) +#endif + +#ifdef mvwinchnstr +inline int UNDEF(mvwinchnstr)(WINDOW *win, int y, int x, chtype *str, int n) { return mvwinchnstr(win, y, x, str, n); } +#undef mvwinchnstr +#define mvwinchnstr UNDEF(mvwinchnstr) +#endif + +#ifdef mvwinchstr +inline int UNDEF(mvwinchstr)(WINDOW *win, int y, int x, chtype *str) { return mvwinchstr(win, y, x, str); } +#undef mvwinchstr +#define mvwinchstr UNDEF(mvwinchstr) +#endif + +#ifdef mvwinnstr +inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) { + return mvwinnstr(win, y, x, _str, n); } +#undef mvwinnstr +#define mvwinnstr UNDEF(mvwinnstr) +#endif + +#ifdef mvwinsch +inline int UNDEF(mvwinsch)(WINDOW *win, int y, int x, chtype c) +{ return mvwinsch(win, y, x, c); } +#undef mvwinsch +#define mvwinsch UNDEF(mvwinsch) +#endif + +#ifdef mvwinsnstr +inline int UNDEF(mvwinsnstr)(WINDOW *w, int y, int x, const char *_str, int n) { + return mvwinsnstr(w, y, x, _str, n); } +#undef mvwinsnstr +#define mvwinsnstr UNDEF(mvwinsnstr) +#endif + +#ifdef mvwinsstr +inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) { + return mvwinsstr(w, y, x, _str); } +#undef mvwinsstr +#define mvwinsstr UNDEF(mvwinsstr) +#endif + +#ifdef mvwvline +inline int UNDEF(mvwvline)(WINDOW *win, int y, int x, chtype c, int n) { + return mvwvline(win, y, x, c, n); } +#undef mvwvline +#define mvwvline UNDEF(mvwvline) +#endif + +#ifdef napms +inline void UNDEF(napms)(unsigned long x) { napms(x); } +#undef napms +#define napms UNDEF(napms) +#endif + +#ifdef nocrmode +inline int UNDEF(nocrmode)(void) { return nocrmode(); } +#undef nocrmode +#define nocrmode UNDEF(nocrmode) +#endif + +#ifdef nodelay +inline void UNDEF(nodelay)() { nodelay(); } +#undef nodelay +#define nodelay UNDEF(nodelay) #endif -#ifdef mvwaddnstr -inline int UNDEF(mvwaddnstr)(WINDOW *win, int y, int x, const char *str, int n) -{ return mvwaddnstr(win, y, x, str, n); } -#undef mvwaddnstr -#define mvwaddnstr UNDEF(mvwaddnstr) +#ifdef redrawwin +inline int UNDEF(redrawwin)(WINDOW *win) { return redrawwin(win); } +#undef redrawwin +#define redrawwin UNDEF(redrawwin) #endif -#ifdef mvwaddstr -inline int UNDEF(mvwaddstr)(WINDOW *win, int y, int x, const char * str) -{ return mvwaddstr(win, y, x, str); } -#undef mvwaddstr -#define mvwaddstr UNDEF(mvwaddstr) +#ifdef refresh +inline int UNDEF(refresh)() { return refresh(); } +#undef refresh +#define refresh UNDEF(refresh) #endif -#ifdef mvwdelch -inline int UNDEF(mvwdelch)(WINDOW *win, int y, int x) -{ return mvwdelch(win, y, x); } -#undef mvwdelch -#define mvwdelch UNDEF(mvwdelch) +#ifdef resetterm +inline int UNDEF(resetterm)(void) { return resetterm(); } +#undef resetterm +#define resetterm UNDEF(resetterm) #endif -#ifdef mvwgetch -inline int UNDEF(mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);} -#undef mvwgetch -#define mvwgetch UNDEF(mvwgetch) +#ifdef saveterm +inline int UNDEF(saveterm)(void) { return saveterm(); } +#undef saveterm +#define saveterm UNDEF(saveterm) #endif -#ifdef mvwgetstr -inline int UNDEF(mvwgetstr)(WINDOW *win, int y, int x, char *str) -{return mvwgetstr(win, y, x, str);} -#undef mvwgetstr -#define mvwgetstr UNDEF(mvwgetstr) +#ifdef scrl +inline int UNDEF(scrl)(int l) { return scrl(l); } +#undef scrl +#define scrl UNDEF(scrl) #endif -#ifdef mvwgetnstr -inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n) -{return mvwgetnstr(win, y, x, str, n);} -#undef mvwgetnstr -#define mvwgetnstr UNDEF(mvwgetnstr) +#ifdef scroll +inline int UNDEF(scroll)(WINDOW *win) { return scroll(win); } +#undef scroll +#define scroll UNDEF(scroll) #endif -#ifdef mvwinch -inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) { - return mvwinch(win, y, x);} -#undef mvwinch -#define mvwinch UNDEF(mvwinch) +#ifdef scrollok +inline int UNDEF(scrollok)(WINDOW* win, bool bf) { return scrollok(win, bf); } +#undef scrollok +#define scrollok UNDEF(scrollok) +#else +#if defined(__NCURSES_H) +extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool); +#else +extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char); +#endif #endif -#ifdef mvwinsch -inline int UNDEF(mvwinsch)(WINDOW *win, int y, int x, chtype c) -{ return mvwinsch(win, y, x, c); } -#undef mvwinsch -#define mvwinsch UNDEF(mvwinsch) +#ifdef setscrreg +inline int UNDEF(setscrreg)(int t, int b) { return setscrreg(t, b); } +#undef setscrreg +#define setscrreg UNDEF(setscrreg) #endif -#ifdef mvaddch -inline int UNDEF(mvaddch)(int y, int x, chtype ch) -{ return mvaddch(y, x, ch); } -#undef mvaddch -#define mvaddch UNDEF(mvaddch) +#ifdef standend +inline int UNDEF(standend)() { return standend(); } +#undef standend +#define standend UNDEF(standend) #endif -#ifdef mvaddnstr -inline int UNDEF(mvaddnstr)(int y, int x, const char *str, int n) -{ return mvaddnstr(y, x, str, n); } -#undef mvaddnstr -#define mvaddnstr UNDEF(mvaddnstr) +#ifdef standout +inline int UNDEF(standout)() { return standout(); } +#undef standout +#define standout UNDEF(standout) #endif -#ifdef mvaddstr -inline int UNDEF(mvaddstr)(int y, int x, const char * str) -{ return mvaddstr(y, x, str); } -#undef mvaddstr -#define mvaddstr UNDEF(mvaddstr) +#ifdef subpad +inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x) +{ return derwin(p, l, c, y, x); } +#undef subpad +#define subpad UNDEF(subpad) #endif -#ifdef mvdelch -inline int UNDEF(mvdelch)(int y, int x) { return mvdelch(y, x);} -#undef mvdelch -#define mvdelch UNDEF(mvdelch) +#ifdef timeout +inline void UNDEF(timeout)(int delay) { timeout(delay); } +#undef timeout +#define timeout UNDEF(timeout) #endif -#ifdef mvgetch -inline int UNDEF(mvgetch)(int y, int x) { return mvgetch(y, x);} -#undef mvgetch -#define mvgetch UNDEF(mvgetch) +#ifdef touchline +inline int UNDEF(touchline)(WINDOW *win, int s, int c) +{ return touchline(win, s, c); } +#undef touchline +#define touchline UNDEF(touchline) #endif -#ifdef mvgetstr -inline int UNDEF(mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);} -#undef mvgetstr -#define mvgetstr UNDEF(mvgetstr) +#ifdef touchwin +inline int UNDEF(touchwin)(WINDOW *win) { return touchwin(win); } +#undef touchwin +#define touchwin UNDEF(touchwin) #endif -#ifdef mvgetnstr -inline int UNDEF(mvgetnstr)(int y, int x, char *str, int n) { - return mvgetnstr(y, x, str, n);} -#undef mvgetnstr -#define mvgetnstr UNDEF(mvgetnstr) +#ifdef untouchwin +inline int UNDEF(untouchwin)(WINDOW *win) { return untouchwin(win); } +#undef untouchwin +#define untouchwin UNDEF(untouchwin) #endif -#ifdef mvinch -inline chtype UNDEF(mvinch)(int y, int x) { return mvinch(y, x);} -#undef mvinch -#define mvinch UNDEF(mvinch) +#ifdef vline +inline int UNDEF(vline)(chtype ch, int n) { return vline(ch, n); } +#undef vline +#define vline UNDEF(vline) #endif -#ifdef mvinsch -inline int UNDEF(mvinsch)(int y, int x, chtype c) -{ return mvinsch(y, x, c); } -#undef mvinsch -#define mvinsch UNDEF(mvinsch) +#ifdef waddchstr +inline int UNDEF(waddchstr)(WINDOW *win, chtype *at) { return waddchstr(win, at); } +#undef waddchstr +#define waddchstr UNDEF(waddchstr) #endif -#ifdef napms -inline void UNDEF(napms)(unsigned long x) { napms(x); } -#undef napms -#define napms UNDEF(napms) +#ifdef waddstr +inline int UNDEF(waddstr)(WINDOW *win, char *str) { return waddstr(win, str); } +#undef waddstr +#define waddstr UNDEF(waddstr) #endif -#ifdef fixterm -inline int UNDEF(fixterm)(void) { return fixterm(); } -#undef fixterm -#define fixterm UNDEF(fixterm) +#ifdef wattroff +inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); } +#undef wattroff +#define wattroff UNDEF(wattroff) #endif -#ifdef resetterm -inline int UNDEF(resetterm)(void) { return resetterm(); } -#undef resetterm -#define resetterm UNDEF(resetterm) +#ifdef wattrset +inline int UNDEF(wattrset)(WINDOW *win, int att) { return wattrset(win, att); } +#undef wattrset +#define wattrset UNDEF(wattrset) #endif -#ifdef saveterm -inline int UNDEF(saveterm)(void) { return saveterm(); } -#undef saveterm -#define saveterm UNDEF(saveterm) +#ifdef winch +inline chtype UNDEF(winch)(const WINDOW* win) { return winch(win); } +#undef winch +#define winch UNDEF(winch) #endif -#ifdef crmode -inline int UNDEF(crmode)(void) { return crmode(); } -#undef crmode -#define crmode UNDEF(crmode) +#ifdef winchnstr +inline int UNDEF(winchnstr)(WINDOW *win, chtype *str, int n) { return winchnstr(win, str, n); } +#undef winchnstr +#define winchnstr UNDEF(winchnstr) #endif -#ifdef nocrmode -inline int UNDEF(nocrmode)(void) { return nocrmode(); } -#undef nocrmode -#define nocrmode UNDEF(nocrmode) +#ifdef winchstr +inline int UNDEF(winchstr)(WINDOW *win, chtype *str) { return winchstr(win, str); } +#undef winchstr +#define winchstr UNDEF(winchstr) #endif -#ifdef getbkgd -inline chtype UNDEF(getbkgd)(const WINDOW *win) { return getbkgd(win); } -#undef getbkgd -#define getbkgd UNDEF(getbkgd) +#ifdef winsstr +inline int UNDEF(winsstr)(WINDOW *w, const char *_str) { + return winsstr(w, _str); } +#undef winsstr +#define winsstr UNDEF(winsstr) #endif -#ifdef bkgd -inline int UNDEF(bkgd)(chtype ch) { return bkgd(ch); } -#undef bkgd -#define bkgd UNDEF(bkgd) +#ifdef wstandend +inline int UNDEF(wstandend)(WINDOW *win) { return wstandend(win); } +#undef wstandend +#define wstandend UNDEF(wstandend) #endif -#ifdef bkgdset -inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); } -#undef bkgdset -#define bkgdset UNDEF(bkgdset) +#ifdef wstandout +inline int UNDEF(wstandout)(WINDOW *win) { return wstandout(win); } +#undef wstandout +#define wstandout UNDEF(wstandout) #endif /* @@ -705,11 +757,13 @@ private: static bool b_initialized; static void initialize(); + void constructing(); friend int _nc_xx_ripoff_init(WINDOW *, int); - void init(); + void set_keyboard(); short getcolor(int getback) const; + short getPair() const; static int setpalette(short fore, short back, short pair); static int colorInitialized; @@ -743,7 +797,7 @@ NCursesWindow(); public: - NCursesWindow(WINDOW* &window); // useful only for stdscr + NCursesWindow(WINDOW* window); // useful only for stdscr NCursesWindow(int nlines, // number of lines int ncols, // number of columns @@ -823,16 +877,22 @@ int width() const { return maxx() + 1; } // Number of columns in this window - int begx() const { return w->_begx; } + int begx() const { return getbegx(w); } + // Column of top left corner relative to stdscr + + int begy() const { return getbegy(w); } + // Line of top left corner relative to stdscr + + int curx() const { return getcurx(w); } // Column of top left corner relative to stdscr - int begy() const { return w->_begy; } + int cury() const { return getcury(w); } // Line of top left corner relative to stdscr - int maxx() const { return w->_maxx; } + int maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; } // Largest x coord in window - int maxy() const { return w->_maxy; } + int maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; } // Largest y coord in window short getcolor() const; @@ -867,6 +927,15 @@ void getyx(int& y, int& x) const { ::getyx(w, y, x); } // Get current position of the cursor + void getbegyx(int& y, int& x) const { ::getbegyx(w, y, x); } + // Get beginning of the window + + void getmaxyx(int& y, int& x) const { ::getmaxyx(w, y, x); } + // Get size of the window + + void getparyx(int& y, int& x) const { ::getparyx(w, y, x); } + // Get parent's beginning of the window + int mvcur(int oldrow, int oldcol, int newrow, int newcol) const { return ::mvcur(oldrow, oldcol, newrow, newcol); } // Perform lowlevel cursor motion that takes effect immediately. @@ -909,6 +978,9 @@ ; #endif + int scanw(const char*, va_list); + // Perform a scanw function from the window. + int scanw(int y, int x, const char* fmt, ...) // Move the cursor to the requested position and then perform a scanw // from the window. @@ -918,6 +990,10 @@ ; #endif + int scanw(int y, int x, const char* fmt, va_list); + // Move the cursor to the requested position and then perform a scanw + // from the window. + // ------------------------------------------------------------------------- // output // ------------------------------------------------------------------------- @@ -939,7 +1015,17 @@ int addstr(int y, int x, const char * str, int n=-1) { return ::mvwaddnstr(w, y, x, str, n); } - // Move the cursor to the requested position and then perform the addstr + // Move the cursor to the requested position and then perform the addchstr + // as described above. + + int addchstr(const chtype* str, int n=-1) { + return ::waddchnstr(w, str, n); } + // Write the string str to the window, stop writing if the terminating + // NUL or the limit n is reached. If n is negative, it is ignored. + + int addchstr(int y, int x, const chtype * str, int n=-1) { + return ::mvwaddchnstr(w, y, x, str, n); } + // Move the cursor to the requested position and then perform the addchstr // as described above. int printw(const char* fmt, ...) @@ -958,6 +1044,12 @@ ; #endif + int printw(const char* fmt, va_list args); + // Do a formatted print to the window. + + int printw(int y, int x, const char * fmt, va_list args); + // Move the cursor and then do a formatted print to the window. + chtype inch() const { return ::winch(w); } // Retrieve attributed character under the current cursor position. @@ -965,6 +1057,16 @@ // Move cursor to requested position and then retrieve attributed character // at this position. + int inchstr(chtype* str, int n=-1) { + return ::winchnstr(w, str, n); } + // Read the string str from the window, stop reading if the terminating + // NUL or the limit n is reached. If n is negative, it is ignored. + + int inchstr(int y, int x, chtype * str, int n=-1) { + return ::mvwinchnstr(w, y, x, str, n); } + // Move the cursor to the requested position and then perform the inchstr + // as described above. + int insch(chtype ch) { return ::winsch(w, ch); } // Insert attributed character into the window before current cursor // position. @@ -1001,6 +1103,9 @@ int attrset(chtype at) { return ::wattrset(w, static_cast(at)); } // Set the window attributes; + chtype attrget() { return ::getattrs(w); } + // Get the window attributes; + int color_set(short color_pair_number, void* opts=NULL) { return ::wcolor_set(w, color_pair_number, opts); } // Set the window color attribute; @@ -1116,11 +1221,13 @@ // If bf is TRUE, use insert/delete line hardware support if possible. // Otherwise do it in software. - void idcok(bool bf) { ::idcok(w, bf); } // If bf is TRUE, use insert/delete character hardware support if possible. // Otherwise do it in software. + int touchline(int s, int c) { return ::touchline(w, s, c); } + // Mark the given lines as modified. + int touchwin() { return ::wtouchln(w, 0, height(), 1); } // Mark the whole window as modified. @@ -1173,9 +1280,13 @@ // If called with bf=TRUE, any change in the window will cause an // automatic immediate refresh() + int intrflush(bool bf) { return ::intrflush(w, bf); } + int keypad(bool bf) { return ::keypad(w, bf); } // If called with bf=TRUE, the application will interpret function keys. + int nodelay(bool bf) { return ::nodelay(w, bf); } + int meta(bool bf) { return ::meta(w, bf); } // If called with bf=TRUE, keys may generate 8-Bit characters. Otherwise // 7-Bit characters are generated. @@ -1220,6 +1331,14 @@ // sminrow,smincol. // ------------------------------------------------------------------------- + // Extended functions + // ------------------------------------------------------------------------- +#ifdef NCURSES_EXT_FUNCS + int wresize(int newLines, int newColumns) { + return ::wresize(w, newLines, newColumns); } +#endif + + // ------------------------------------------------------------------------- // Mouse related // ------------------------------------------------------------------------- bool has_mouse() const; diff -Naur ncurses-5.6.orig/c++/demo.cc ncurses-5.6/c++/demo.cc --- ncurses-5.6.orig/c++/demo.cc 2006-04-22 18:38:57.000000000 -0400 +++ ncurses-5.6/c++/demo.cc 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 @@ * Demo code for NCursesMenu and NCursesForm written by * Juergen Pfeifer * - * $Id: demo.cc,v 1.34 2006/04/22 22:38:57 tom Exp $ + * $Id: demo.cc,v 1.36 2007/04/07 20:24:49 tom Exp $ */ #include "internal.h" @@ -55,30 +55,30 @@ public: void run(int sleeptime) { - NCursesPanel *std = new NCursesPanel(); + NCursesPanel *mystd = new NCursesPanel(); // Make a few small demo panels - NCursesPanel *u = new NCursesPanel(8,20,12,4); - NCursesPanel *v = new NCursesPanel(8,20,10,6); - NCursesPanel *w = new NCursesPanel(8,20,8,8); - NCursesPanel *x = new NCursesPanel(8,20,6,10); - NCursesPanel *y = new NCursesPanel(8,20,4,12); - NCursesPanel *z = new NCursesPanel(8,30,2,14); + NCursesPanel *u = new NCursesPanel(8, 20, 12, 4); + NCursesPanel *v = new NCursesPanel(8, 20, 10, 6); + NCursesPanel *w = new NCursesPanel(8, 20, 8, 8); + NCursesPanel *x = new NCursesPanel(8, 20, 6, 10); + NCursesPanel *y = new NCursesPanel(8, 20, 4, 12); + NCursesPanel *z = new NCursesPanel(8, 30, 2, 14); // Draw something on the main screen, so we can see what happens // when panels get moved or deleted. - std->box(); - std->move(std->height()/2,1); - std->hline(std->width()-2); - std->move(1,std->width()/2); - std->vline(std->height()-2); - std->addch(0,std->width()/2,ACS_TTEE); - std->addch(std->height()-1,std->width()/2,ACS_BTEE); - std->addch(std->height()/2,0,ACS_LTEE); - std->addch(std->height()/2,std->width()-1,ACS_RTEE); - std->addch(std->height()/2,std->width()/2,ACS_PLUS); + mystd->box(); + mystd->move(mystd->height()/2, 1); + mystd->hline(mystd->width()-2); + mystd->move(1, mystd->width()/2); + mystd->vline(mystd->height()-2); + mystd->addch(0, mystd->width()/2, ACS_TTEE); + mystd->addch(mystd->height()-1, mystd->width()/2, ACS_BTEE); + mystd->addch(mystd->height()/2, 0, ACS_LTEE); + mystd->addch(mystd->height()/2, mystd->width()-1, ACS_RTEE); + mystd->addch(mystd->height()/2, mystd->width()/2, ACS_PLUS); // Draw frames with titles around panels so that we can see where // the panels are located. @@ -98,56 +98,56 @@ } // A refresh to any valid panel updates all panels and refreshes - // the screen. Using std is just convenient - We know it's always + // the screen. Using mystd is just convenient - We know it's always // valid until the end of the program. - std->refresh(); + mystd->refresh(); sleep(sleeptime); // Show what happens when panels are deleted and moved. sleep(sleeptime); delete u; - std->refresh(); + mystd->refresh(); sleep(sleeptime); delete z; - std->refresh(); + mystd->refresh(); sleep(sleeptime); delete v; - std->refresh(); + mystd->refresh(); // show how it looks when a panel moves sleep(sleeptime); - y->mvwin(5,30); - std->refresh(); + y->mvwin(5, 30); + mystd->refresh(); sleep(sleeptime); delete y; - std->refresh(); + mystd->refresh(); // show how it looks when you raise a panel sleep(sleeptime); w->top(); - std->refresh(); + mystd->refresh(); sleep(sleeptime); delete w; - std->refresh(); + mystd->refresh(); sleep(sleeptime); delete x; - std->clear(); - std->refresh(); + mystd->clear(); + mystd->refresh(); // Don't forget to clean up the main screen. Since this is the // last thing using NCursesWindow, this has the effect of // shutting down ncurses and restoring the terminal state. sleep(sleeptime); - delete std; + delete mystd; } }; @@ -247,21 +247,21 @@ F = new NCursesFormField*[10]; mft = new MyFieldType('X'); - ift = new Integer_Field(0,1,10); + ift = new Integer_Field(0, 1, 10); eft = new Enumeration_Field(weekdays); - F[0] = new Label("Demo Entry Form",0,16); - F[1] = new Label("Weekday Enum",2,1); - F[2] = new Label("Number(1-10)",2,21); - F[3] = new Label("Only 'X'",2,35); - F[4] = new Label("Multiline Field (Dynamic and Scrollable)",5,1); - F[5] = new NCursesFormField(1,18,3,1); - F[6] = new NCursesFormField(1,12,3,21); - F[7] = new NCursesFormField(1,12,3,35); - F[8] = new NCursesFormField(4,46,6,1,2); + F[0] = new Label("Demo Entry Form", 0, 16); + F[1] = new Label("Weekday Enum", 2, 1); + F[2] = new Label("Number(1-10)", 2, 21); + F[3] = new Label("Only 'X'", 2, 35); + F[4] = new Label("Multiline Field (Dynamic and Scrollable)", 5, 1); + F[5] = new NCursesFormField(1, 18, 3, 1); + F[6] = new NCursesFormField(1, 12, 3, 21); + F[7] = new NCursesFormField(1, 12, 3, 35); + F[8] = new NCursesFormField(4, 46, 6, 1, 2); F[9] = new NCursesFormField(); - InitForm(F,TRUE,TRUE); + InitForm(F, TRUE, TRUE); boldframe(); F[5]->set_fieldtype(*eft); @@ -312,7 +312,7 @@ Soft_Label_Key_Set* S = new Soft_Label_Key_Set; for(int i=1; i <= S->labels(); i++) { char buf[8]; - ::sprintf(buf,"Frm%02d",i); + ::sprintf(buf, "Frm%02d", i); (*S)[i] = buf; // Text (*S)[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification } @@ -336,9 +336,9 @@ const int PADSIZE = 200; unsigned gridcount = 0; - NCursesPanel std; - NCursesPanel P(std.lines()-2,std.cols()-2,1,1); - NCursesFramedPad FP(P,PADSIZE,PADSIZE); + NCursesPanel mystd; + NCursesPanel P(mystd.lines()-2, mystd.cols()-2, 1, 1); + NCursesFramedPad FP(P, PADSIZE, PADSIZE); for (int i=0; i < PADSIZE; i++) { for (int j=0; j < PADSIZE; j++) { @@ -357,7 +357,7 @@ } } - P.label("Pad Demo",NULL); + P.label("Pad Demo", NULL); FP(); P.clear(); return FALSE; @@ -385,9 +385,9 @@ } bool action() { - NCursesPanel *std = new NCursesPanel(); + NCursesPanel *mystd = new NCursesPanel(); - NCursesPanel *w = new NCursesPanel(std->lines() - 2, std->cols() - 2, 1, 1); + NCursesPanel *w = new NCursesPanel(mystd->lines() - 2, mystd->cols() - 2, 1, 1); w->box(); w->refresh(); @@ -411,7 +411,7 @@ delete s; delete w; - delete std; + delete mystd; ::noecho(); return FALSE; } @@ -444,10 +444,10 @@ I[6] = new QuitItem(); I[7] = new NCursesMenuItem(); // Terminating empty item - InitMenu(I,TRUE,TRUE); + InitMenu(I, TRUE, TRUE); - P = new NCursesPanel(1,n_items,LINES-1,1); - boldframe("Demo","Silly"); + P = new NCursesPanel(1, n_items, LINES-1, 1); + boldframe("Demo", "Silly"); P->show(); } @@ -474,7 +474,7 @@ virtual void On_Menu_Init() { NCursesWindow W(::stdscr); - P->move(0,0); + P->move(0, 0); P->clrtoeol(); for(int i=1; i<=count(); i++) P->addch('0' + i); @@ -484,25 +484,25 @@ virtual void On_Menu_Termination() { - P->move(0,0); + P->move(0, 0); P->clrtoeol(); refresh(); } virtual void On_Item_Init(NCursesMenuItem& item) { - P->move(0,item.index()); + P->move(0, item.index()); P->attron(A_REVERSE); - P->printw("%1d",1+item.index()); + P->printw("%1d", 1+item.index()); P->attroff(A_REVERSE); refresh(); } virtual void On_Item_Termination(NCursesMenuItem& item) { - P->move(0,item.index()); + P->move(0, item.index()); P->attroff(A_REVERSE); - P->printw("%1d",1+item.index()); + P->printw("%1d", 1+item.index()); refresh(); } }; @@ -530,7 +530,7 @@ { for(int i=1; i <= S.labels(); i++) { char buf[8]; - ::sprintf(buf,"Key%02d",i); + ::sprintf(buf, "Key%02d", i); S[i] = buf; // Text S[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification } @@ -542,7 +542,7 @@ const int len = ::strlen(titleText); titleWindow->bkgd(screen_titles()); - titleWindow->addstr(0,(titleWindow->cols() - len)/2, titleText); + titleWindow->addstr(0, (titleWindow->cols() - len)/2, titleText); titleWindow->noutrefresh(); } @@ -557,4 +557,4 @@ // // ------------------------------------------------------------------------- // -static TestApplication Demo; +static TestApplication *Demo = new TestApplication(); diff -Naur ncurses-5.6.orig/c++/edit_cfg.sh ncurses-5.6/c++/edit_cfg.sh --- ncurses-5.6.orig/c++/edit_cfg.sh 2005-04-30 17:00:22.000000000 -0400 +++ ncurses-5.6/c++/edit_cfg.sh 2007-12-21 00:02:35.000000000 -0500 @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: edit_cfg.sh,v 1.14 2005/04/30 21:00:22 tom Exp $ +# $Id: edit_cfg.sh,v 1.16 2007/04/07 19:08:49 tom Exp $ ############################################################################## -# Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. # +# Copyright (c) 1998-2005,2007 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,7 +28,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997 +# Author: Thomas E. Dickey 1997-on # # Edit the default value of the etip.h file based on the autoconf-generated # values: @@ -45,11 +45,9 @@ HAVE_BUILTIN_H \ HAVE_GPP_BUILTIN_H \ HAVE_GXX_BUILTIN_H \ - HAVE_STRSTREAM_H \ + HAVE_IOSTREAM \ HAVE_TYPEINFO \ - HAVE_VALUES_H \ - USE_STRSTREAM_VSCAN \ - USE_STRSTREAM_VSCAN_CAST + HAVE_VALUES_H do rm -f $2.bak mv $2 $2.bak diff -Naur ncurses-5.6.orig/c++/etip.h.in ncurses-5.6/c++/etip.h.in --- ncurses-5.6.orig/c++/etip.h.in 2005-08-06 15:55:57.000000000 -0400 +++ ncurses-5.6/c++/etip.h.in 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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.32 2005/08/06 19:55:57 tom Exp $ +// $Id: etip.h.in,v 1.36 2007/04/07 18:56:32 tom Exp $ #ifndef NCURSES_ETIP_H_incl #define NCURSES_ETIP_H_incl 1 @@ -49,8 +49,8 @@ #define HAVE_GPP_BUILTIN_H 0 #endif -#ifndef HAVE_STRSTREAM_H -#define HAVE_STRSTREAM_H 0 +#ifndef HAVE_IOSTREAM +#define HAVE_IOSTREAM 0 #endif #ifndef HAVE_TYPEINFO @@ -77,14 +77,6 @@ #define CPP_HAS_STATIC_CAST 0 // workaround for g++ 2.95.3 #endif -#ifndef USE_STRSTREAM_VSCAN -#define USE_STRSTREAM_VSCAN 0 -#endif - -#ifndef USE_STRSTREAM_VSCAN_CAST -#define USE_STRSTREAM_VSCAN_CAST 0 -#endif - #ifdef __GNUG__ # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8)) # if HAVE_TYPEINFO @@ -335,30 +327,46 @@ }; #if !((defined(__GNUG__) && defined(__EXCEPTIONS)) || defined(__SUNPRO_CC)) -# include +# if HAVE_IOSTREAM +# include +using std::cerr; +using std::endl; +# else +# include +# endif extern "C" void exit(int); #endif inline void THROW(const NCursesException *e) { #if defined(__GNUG__) && defined(__EXCEPTIONS) # if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8)) - (*lib_error_handler)(e?e->classname():"",e?e->message:""); + (*lib_error_handler)(e ? e->classname() : "", e ? e->message : ""); #else - throw *e; +#define CPP_HAS_TRY_CATCH 1 #endif #elif defined(__SUNPRO_CC) # if !defined(__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT < 5) genericerror(1, ((e != 0) ? (char *)(e->message) : "")); #else - throw *e; +#define CPP_HAS_TRY_CATCH 1 #endif #else if (e) cerr << e->message << endl; exit(0); #endif -} -#define THROWS(s) +#ifndef CPP_HAS_TRY_CATCH +#define CPP_HAS_TRY_CATCH 0 +#define NCURSES_CPP_TRY /* nothing */ +#define NCURSES_CPP_CATCH(e) if (false) +#define THROWS(s) /* nothing */ +#elif CPP_HAS_TRY_CATCH + throw *e; +#define NCURSES_CPP_TRY try +#define NCURSES_CPP_CATCH(e) catch(e) +#define THROWS(s) throw(s) +#endif +} #endif /* NCURSES_ETIP_H_incl */ diff -Naur ncurses-5.6.orig/c++/headers ncurses-5.6/c++/headers --- ncurses-5.6.orig/c++/headers 1998-02-11 07:13:40.000000000 -0500 +++ ncurses-5.6/c++/headers 2007-12-21 00:02:35.000000000 -0500 @@ -1,7 +1,7 @@ # C++ headers -# $Id: headers,v 1.2 1998/02/11 12:13:40 tom Exp $ +# $Id: headers,v 1.3 2006/12/24 16:25:45 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998,2006 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"), # @@ -37,3 +37,4 @@ $(srcdir)/cursesw.h $(srcdir)/cursslk.h etip.h +# vile:makemode diff -Naur ncurses-5.6.orig/c++/internal.h ncurses-5.6/c++/internal.h --- ncurses-5.6.orig/c++/internal.h 2006-09-30 17:59:57.000000000 -0400 +++ ncurses-5.6/c++/internal.h 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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,13 +31,15 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: internal.h,v 1.13 2006/09/30 21:59:57 tom Exp $ +// $Id: internal.h,v 1.15 2007/06/02 15:58:00 tom Exp $ #ifndef NCURSES_CPLUS_INTERNAL_H #define NCURSES_CPLUS_INTERNAL_H 1 #include +#include + #if USE_RCS_IDS #define MODULE_ID(id) static const char Ident[] = id; #else diff -Naur ncurses-5.6.orig/c++/modules ncurses-5.6/c++/modules --- ncurses-5.6.orig/c++/modules 1999-07-31 05:46:54.000000000 -0400 +++ ncurses-5.6/c++/modules 2007-12-21 00:02:35.000000000 -0500 @@ -1,7 +1,7 @@ # Program modules -# $Id: modules,v 1.6 1999/07/31 09:46:54 juergen Exp $ +# $Id: modules,v 1.7 2006/12/24 00:53:08 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998,2006 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,7 +28,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1995,1997 +# Author: Thomas E. Dickey 1995-on # @ base @@ -41,3 +41,5 @@ cursesapp c++ $(srcdir) $(cursesapp_h) cursesmain c++ $(srcdir) $(cursesapp_h) demo c++ $(srcdir) $(cursesf_h) $(cursesm_h) $(cursesapp_h) + +# vile:makemode diff -Naur ncurses-5.6.orig/config.guess ncurses-5.6/config.guess --- ncurses-5.6.orig/config.guess 2006-07-22 11:57:37.000000000 -0400 +++ ncurses-5.6/config.guess 2007-12-21 00:02:35.000000000 -0500 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-07-02' +timestamp='2007-05-17' # 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 @@ -161,6 +161,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -329,7 +330,7 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -780,7 +781,7 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -790,12 +791,15 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -950,6 +954,9 @@ x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -1208,6 +1215,15 @@ SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff -Naur ncurses-5.6.orig/config.sub ncurses-5.6/config.sub --- ncurses-5.6.orig/config.sub 2006-08-14 12:00:00.000000000 -0400 +++ ncurses-5.6/config.sub 2007-12-21 00:02:35.000000000 -0500 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-08-14' +timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -245,12 +245,12 @@ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -276,6 +276,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ @@ -323,7 +324,7 @@ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ @@ -474,8 +475,8 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -682,6 +683,10 @@ basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -924,6 +929,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1218,7 +1226,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1370,6 +1378,9 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; spu-*) os=-elf ;; @@ -1410,6 +1421,9 @@ m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff -Naur ncurses-5.6.orig/configure ncurses-5.6/configure --- ncurses-5.6.orig/configure 2006-12-17 11:33:38.000000000 -0500 +++ ncurses-5.6/configure 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.383 . +# From configure.in Revision: 1.429 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20061216. # @@ -699,6 +699,7 @@ --without-ada suppress check for Ada95, don't build demo --without-progs suppress build with programs (e.g., tic) --without-curses-h install curses.h as ncurses.h only + --enable-mixed-case tic should assume mixed-case filenames --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) @@ -714,10 +715,12 @@ --with-debug generate debug-libraries (default) --with-profile generate profile-libraries --with-termlib generate separate terminfo library + --with-ticlib generate separate tic library --with-gpm use Alessandro Rubini's GPM library --without-dlsym do not use dlsym() to load GPM dynamically --with-sysmouse use sysmouse (FreeBSD console) --enable-rpath use rpath option when generating shared libraries + --disable-relink relink shared libraries during install --with-shlib-version=X Specify rel or abi version for shared libs Fine-Tuning Your Configuration: --disable-overwrite leave out the link to -lcurses @@ -729,6 +732,7 @@ --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 + --disable-big-strings assume compiler has only standard-size strings --enable-termcap compile in termcap fallback support --with-termpath=XXX specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap) --enable-getcap fast termcap load, no xrefs to terminfo @@ -759,7 +763,7 @@ --disable-ext-funcs disable function-extensions --enable-const compile with extra/non-standard const --enable-no-padding compile with $NCURSES_NO_PADDING code - --enable-signed-char compile with SIGWINCH handler + --enable-signed-char compile using signed Boolean's in term.h --enable-sigwinch compile with SIGWINCH handler --enable-tcap-names compile with user-definable terminal capabilities Development Code: @@ -772,6 +776,7 @@ --enable-colorfgbg compile with $COLORFGBG code --enable-ext-colors compile for experimental 256-color support --enable-ext-mouse compile for experimental mouse-encoding + --enable-reentrant compile with experimental reentrant code --enable-safe-sprintf compile with experimental safe-sprintf code --disable-scroll-hints compile without scroll-hints code --enable-wgetch-events compile with experimental wgetch-events code @@ -986,7 +991,7 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:989: loading site script $ac_site_file" >&5 + { echo "$as_me:994: 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" @@ -997,7 +1002,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:1000: loading cache $cache_file" >&5 + { echo "$as_me:1005: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -1005,7 +1010,7 @@ esac fi else - { echo "$as_me:1008: creating cache $cache_file" >&5 + { echo "$as_me:1013: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1021,21 +1026,21 @@ eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:1024: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:1029: 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:1028: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:1033: 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:1034: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:1039: 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:1036: former value: $ac_old_val" >&5 + { echo "$as_me:1041: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:1038: current value: $ac_new_val" >&5 + { echo "$as_me:1043: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -1054,9 +1059,9 @@ fi done if $ac_cache_corrupted; then - { echo "$as_me:1057: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:1062: 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:1059: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:1064: 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 @@ -1077,10 +1082,10 @@ echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:1080: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:1085: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:1083: \$? = $ac_status" >&5 + echo "$as_me:1088: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else @@ -1093,7 +1098,7 @@ top_builddir=`pwd` -echo "$as_me:1096: checking for egrep" >&5 +echo "$as_me:1101: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1103,11 +1108,11 @@ else ac_cv_prog_egrep='egrep' fi fi -echo "$as_me:1106: result: $ac_cv_prog_egrep" >&5 +echo "$as_me:1111: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep -test -z "$EGREP" && { { echo "$as_me:1110: error: No egrep program found" >&5 +test -z "$EGREP" && { { echo "$as_me:1115: error: No egrep program found" >&5 echo "$as_me: error: No egrep program found" >&2;} { (exit 1); exit 1; }; } @@ -1117,7 +1122,7 @@ cf_cv_abi_version=${NCURSES_MAJOR} cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} cf_cv_timestamp=`date` -echo "$as_me:1120: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5 +echo "$as_me:1125: 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 @@ -1125,7 +1130,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:1128: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5 + { echo "$as_me:1133: 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; @@ -1138,13 +1143,13 @@ [0-9]*) #(vi ;; *) - { { echo "$as_me:1141: error: Release major-version is not a number: $NCURSES_MAJOR" >&5 + { { echo "$as_me:1146: 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:1147: error: Release major-version value is empty" >&5 + { { echo "$as_me:1152: error: Release major-version value is empty" >&5 echo "$as_me: error: Release major-version value is empty" >&2;} { (exit 1); exit 1; }; } fi @@ -1154,13 +1159,13 @@ [0-9]*) #(vi ;; *) - { { echo "$as_me:1157: error: Release minor-version is not a number: $NCURSES_MINOR" >&5 + { { echo "$as_me:1162: 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:1163: error: Release minor-version value is empty" >&5 + { { echo "$as_me:1168: error: Release minor-version value is empty" >&5 echo "$as_me: error: Release minor-version value is empty" >&2;} { (exit 1); exit 1; }; } fi @@ -1170,7 +1175,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:1173: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5 + { echo "$as_me:1178: 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; @@ -1180,13 +1185,13 @@ [0-9]*) #(vi ;; *) - { { echo "$as_me:1183: error: ABI version is not a number: $cf_cv_abi_version" >&5 + { { echo "$as_me:1188: 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:1189: error: ABI version value is empty" >&5 + { { echo "$as_me:1194: error: ABI version value is empty" >&5 echo "$as_me: error: ABI version value is empty" >&2;} { (exit 1); exit 1; }; } fi @@ -1208,7 +1213,7 @@ fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1211: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1216: 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 @@ -1218,11 +1223,11 @@ # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1221: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1226: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1225: checking build system type" >&5 +echo "$as_me:1230: 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 @@ -1231,23 +1236,23 @@ test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1234: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1239: 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:1238: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1243: 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:1243: result: $ac_cv_build" >&5 +echo "$as_me:1248: 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:1250: checking host system type" >&5 +echo "$as_me:1255: 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 @@ -1256,12 +1261,12 @@ 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:1259: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1264: 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:1264: result: $ac_cv_host" >&5 +echo "$as_me:1269: 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/'` @@ -1269,7 +1274,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then - echo "$as_me:1272: checking target system type" >&5 + echo "$as_me:1277: 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 @@ -1278,12 +1283,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:1281: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1286: 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:1286: result: $ac_cv_target" >&5 +echo "$as_me:1291: 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/'` @@ -1314,13 +1319,13 @@ fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1317: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1322: 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:1321: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1326: 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:1323: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1328: 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 @@ -1328,7 +1333,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:1331: WARNING: overriding system type to $withval" >&5 + { echo "$as_me:1336: WARNING: overriding system type to $withval" >&5 echo "$as_me: WARNING: overriding system type to $withval" >&2;} cf_cv_system_name=$withval fi; @@ -1338,7 +1343,7 @@ ### Default install-location -echo "$as_me:1341: checking for prefix" >&5 +echo "$as_me:1346: 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 @@ -1350,11 +1355,11 @@ ;; esac fi -echo "$as_me:1353: result: $prefix" >&5 +echo "$as_me:1358: result: $prefix" >&5 echo "${ECHO_T}$prefix" >&6 if test "x$prefix" = "xNONE" ; then -echo "$as_me:1357: checking for default include-directory" >&5 +echo "$as_me:1362: 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 \ @@ -1377,7 +1382,7 @@ fi test -n "$verbose" && echo " tested $cf_dir" 1>&6 done -echo "$as_me:1380: result: $includedir" >&5 +echo "$as_me:1385: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 fi @@ -1391,7 +1396,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:1394: checking for $ac_word" >&5 +echo "$as_me:1399: 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 @@ -1406,7 +1411,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:1409: found $ac_dir/$ac_word" >&5 +echo "$as_me:1414: found $ac_dir/$ac_word" >&5 break done @@ -1414,10 +1419,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1417: result: $CC" >&5 + echo "$as_me:1422: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1420: result: no" >&5 + echo "$as_me:1425: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1426,7 +1431,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:1429: checking for $ac_word" >&5 +echo "$as_me:1434: 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 @@ -1441,7 +1446,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:1444: found $ac_dir/$ac_word" >&5 +echo "$as_me:1449: found $ac_dir/$ac_word" >&5 break done @@ -1449,10 +1454,10 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1452: result: $ac_ct_CC" >&5 + echo "$as_me:1457: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1455: result: no" >&5 + echo "$as_me:1460: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1465,7 +1470,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:1468: checking for $ac_word" >&5 +echo "$as_me:1473: 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 @@ -1480,7 +1485,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:1483: found $ac_dir/$ac_word" >&5 +echo "$as_me:1488: found $ac_dir/$ac_word" >&5 break done @@ -1488,10 +1493,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1491: result: $CC" >&5 + echo "$as_me:1496: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1494: result: no" >&5 + echo "$as_me:1499: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1500,7 +1505,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:1503: checking for $ac_word" >&5 +echo "$as_me:1508: 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 @@ -1515,7 +1520,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:1518: found $ac_dir/$ac_word" >&5 +echo "$as_me:1523: found $ac_dir/$ac_word" >&5 break done @@ -1523,10 +1528,10 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1526: result: $ac_ct_CC" >&5 + echo "$as_me:1531: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1529: result: no" >&5 + echo "$as_me:1534: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1539,7 +1544,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:1542: checking for $ac_word" >&5 +echo "$as_me:1547: 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 @@ -1559,7 +1564,7 @@ continue fi ac_cv_prog_CC="cc" -echo "$as_me:1562: found $ac_dir/$ac_word" >&5 +echo "$as_me:1567: found $ac_dir/$ac_word" >&5 break done @@ -1581,10 +1586,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1584: result: $CC" >&5 + echo "$as_me:1589: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1587: result: no" >&5 + echo "$as_me:1592: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1595,7 +1600,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:1598: checking for $ac_word" >&5 +echo "$as_me:1603: 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 @@ -1610,7 +1615,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:1613: found $ac_dir/$ac_word" >&5 +echo "$as_me:1618: found $ac_dir/$ac_word" >&5 break done @@ -1618,10 +1623,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1621: result: $CC" >&5 + echo "$as_me:1626: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1624: result: no" >&5 + echo "$as_me:1629: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1634,7 +1639,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:1637: checking for $ac_word" >&5 +echo "$as_me:1642: 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 @@ -1649,7 +1654,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:1652: found $ac_dir/$ac_word" >&5 +echo "$as_me:1657: found $ac_dir/$ac_word" >&5 break done @@ -1657,10 +1662,10 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1660: result: $ac_ct_CC" >&5 + echo "$as_me:1665: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1663: result: no" >&5 + echo "$as_me:1668: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1672,32 +1677,32 @@ fi -test -z "$CC" && { { echo "$as_me:1675: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1680: 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:1680:" \ +echo "$as_me:1685:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1683: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1688: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1686: \$? = $ac_status" >&5 + echo "$as_me:1691: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1688: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1693: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1691: \$? = $ac_status" >&5 + echo "$as_me:1696: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1693: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1698: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1696: \$? = $ac_status" >&5 + echo "$as_me:1701: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1700 "configure" +#line 1705 "configure" #include "confdefs.h" int @@ -1713,13 +1718,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:1716: checking for C compiler default output" >&5 +echo "$as_me:1721: 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:1719: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1722: \$? = $ac_status" >&5 + echo "$as_me:1727: \$? = $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 @@ -1742,34 +1747,34 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1745: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1750: 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:1751: result: $ac_file" >&5 +echo "$as_me:1756: 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:1756: checking whether the C compiler works" >&5 +echo "$as_me:1761: 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:1762: \"$ac_try\"") >&5 + { (eval echo "$as_me:1767: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1765: \$? = $ac_status" >&5 + echo "$as_me:1770: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1772: error: cannot run C compiled programs. + { { echo "$as_me:1777: 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;} @@ -1777,24 +1782,24 @@ fi fi fi -echo "$as_me:1780: result: yes" >&5 +echo "$as_me:1785: 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:1787: checking whether we are cross compiling" >&5 +echo "$as_me:1792: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1789: result: $cross_compiling" >&5 +echo "$as_me:1794: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1792: checking for executable suffix" >&5 +echo "$as_me:1797: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1794: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1799: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1797: \$? = $ac_status" >&5 + echo "$as_me:1802: \$? = $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 @@ -1810,25 +1815,25 @@ esac done else - { { echo "$as_me:1813: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1818: 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:1819: result: $ac_cv_exeext" >&5 +echo "$as_me:1824: 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:1825: checking for object suffix" >&5 +echo "$as_me:1830: 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 1831 "configure" +#line 1836 "configure" #include "confdefs.h" int @@ -1840,10 +1845,10 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1846: \$? = $ac_status" >&5 + echo "$as_me:1851: \$? = $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 @@ -1855,24 +1860,24 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1858: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1863: 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:1865: result: $ac_cv_objext" >&5 +echo "$as_me:1870: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1869: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1874: 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 1875 "configure" +#line 1880 "configure" #include "confdefs.h" int @@ -1887,16 +1892,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1893: \$? = $ac_status" >&5 + echo "$as_me:1898: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1896: \"$ac_try\"") >&5 + { (eval echo "$as_me:1901: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1899: \$? = $ac_status" >&5 + echo "$as_me:1904: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1908,19 +1913,19 @@ ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1911: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1916: 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:1917: checking whether $CC accepts -g" >&5 +echo "$as_me:1922: 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 1923 "configure" +#line 1928 "configure" #include "confdefs.h" int @@ -1932,16 +1937,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1935: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1938: \$? = $ac_status" >&5 + echo "$as_me:1943: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1941: \"$ac_try\"") >&5 + { (eval echo "$as_me:1946: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1944: \$? = $ac_status" >&5 + echo "$as_me:1949: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1951,7 +1956,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1954: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1959: 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 @@ -1978,16 +1983,16 @@ #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1984: \$? = $ac_status" >&5 + echo "$as_me:1989: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1987: \"$ac_try\"") >&5 + { (eval echo "$as_me:1992: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1990: \$? = $ac_status" >&5 + echo "$as_me:1995: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1999,7 +2004,7 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 2002 "configure" +#line 2007 "configure" #include "confdefs.h" #include $ac_declaration @@ -2012,16 +2017,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2018: \$? = $ac_status" >&5 + echo "$as_me:2023: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2021: \"$ac_try\"") >&5 + { (eval echo "$as_me:2026: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2024: \$? = $ac_status" >&5 + echo "$as_me:2029: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2031,7 +2036,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 2034 "configure" +#line 2039 "configure" #include "confdefs.h" $ac_declaration int @@ -2043,16 +2048,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2046: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2049: \$? = $ac_status" >&5 + echo "$as_me:2054: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2052: \"$ac_try\"") >&5 + { (eval echo "$as_me:2057: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2055: \$? = $ac_status" >&5 + echo "$as_me:2060: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -2082,11 +2087,11 @@ GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:2085: checking version of $CC" >&5 + echo "$as_me:2090: 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/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:2089: result: $GCC_VERSION" >&5 + echo "$as_me:2094: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi @@ -2096,7 +2101,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return -echo "$as_me:2099: checking how to run the C preprocessor" >&5 +echo "$as_me:2104: 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 @@ -2117,18 +2122,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 2120 "configure" +#line 2125 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2125: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:2130: \"$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:2131: \$? = $ac_status" >&5 + echo "$as_me:2136: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2151,17 +2156,17 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2154 "configure" +#line 2159 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2158: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:2163: \"$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:2164: \$? = $ac_status" >&5 + echo "$as_me:2169: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2198,7 +2203,7 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2201: result: $CPP" >&5 +echo "$as_me:2206: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2208,18 +2213,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 2211 "configure" +#line 2216 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2216: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:2221: \"$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:2222: \$? = $ac_status" >&5 + echo "$as_me:2227: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2242,17 +2247,17 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2245 "configure" +#line 2250 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2249: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:2254: \"$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:2255: \$? = $ac_status" >&5 + echo "$as_me:2260: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2280,7 +2285,7 @@ if $ac_preproc_ok; then : else - { { echo "$as_me:2283: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:2288: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2293,14 +2298,14 @@ ac_main_return=return if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:2296: checking whether $CC needs -traditional" >&5 + echo "$as_me:2301: 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 2303 "configure" +#line 2308 "configure" #include "confdefs.h" #include int Autoconf = TIOCGETP; @@ -2315,7 +2320,7 @@ if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF -#line 2318 "configure" +#line 2323 "configure" #include "confdefs.h" #include int Autoconf = TCGETA; @@ -2328,14 +2333,14 @@ fi fi -echo "$as_me:2331: result: $ac_cv_prog_gcc_traditional" >&5 +echo "$as_me:2336: 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:2338: checking whether $CC understands -c and -o together" >&5 +echo "$as_me:2343: 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 @@ -2351,15 +2356,15 @@ # 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:2354: \"$ac_try\"") >&5 +if { (eval echo "$as_me:2359: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2357: \$? = $ac_status" >&5 + echo "$as_me:2362: \$? = $ac_status" >&5 (exit $ac_status); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:2359: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:2364: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2362: \$? = $ac_status" >&5 + echo "$as_me:2367: \$? = $ac_status" >&5 (exit $ac_status); }; then eval cf_cv_prog_CC_c_o=yes @@ -2370,19 +2375,19 @@ fi if test $cf_cv_prog_CC_c_o = yes; then - echo "$as_me:2373: result: yes" >&5 + echo "$as_me:2378: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2376: result: no" >&5 + echo "$as_me:2381: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:2380: checking for POSIXized ISC" >&5 +echo "$as_me:2385: 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:2385: result: yes" >&5 + echo "$as_me:2390: result: yes" >&5 echo "${ECHO_T}yes" >&6 ISC=yes # If later tests want to check for ISC. @@ -2396,12 +2401,12 @@ CC="$CC -Xp" fi else - echo "$as_me:2399: result: no" >&5 + echo "$as_me:2404: result: no" >&5 echo "${ECHO_T}no" >&6 ISC= fi -echo "$as_me:2404: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "$as_me:2409: 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 @@ -2495,7 +2500,7 @@ fi cat >conftest.$ac_ext <<_ACEOF -#line 2498 "configure" +#line 2503 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -2516,16 +2521,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2519: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2522: \$? = $ac_status" >&5 + echo "$as_me:2527: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2525: \"$ac_try\"") >&5 + { (eval echo "$as_me:2530: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2528: \$? = $ac_status" >&5 + echo "$as_me:2533: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_ansi_cc="$cf_arg"; break else @@ -2538,7 +2543,7 @@ CPPFLAGS="$cf_save_CPPFLAGS" fi -echo "$as_me:2541: result: $cf_cv_ansi_cc" >&5 +echo "$as_me:2546: result: $cf_cv_ansi_cc" >&5 echo "${ECHO_T}$cf_cv_ansi_cc" >&6 if test "$cf_cv_ansi_cc" != "no"; then @@ -2621,7 +2626,7 @@ fi if test "$cf_cv_ansi_cc" = "no"; then - { { echo "$as_me:2624: error: Your compiler does not appear to recognize prototypes. + { { echo "$as_me:2629: 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 @@ -2661,7 +2666,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:2664: checking for $ac_word" >&5 +echo "$as_me:2669: 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 @@ -2678,7 +2683,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:2681: found $ac_dir/$ac_word" >&5 + echo "$as_me:2686: found $ac_dir/$ac_word" >&5 break fi done @@ -2689,10 +2694,10 @@ LDCONFIG=$ac_cv_path_LDCONFIG if test -n "$LDCONFIG"; then - echo "$as_me:2692: result: $LDCONFIG" >&5 + echo "$as_me:2697: result: $LDCONFIG" >&5 echo "${ECHO_T}$LDCONFIG" >&6 else - echo "$as_me:2695: result: no" >&5 + echo "$as_me:2700: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2700,7 +2705,7 @@ esac fi -echo "$as_me:2703: checking if you want to ensure bool is consistent with C++" >&5 +echo "$as_me:2708: 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. @@ -2710,7 +2715,7 @@ else cf_with_cxx=yes fi; -echo "$as_me:2713: result: $cf_with_cxx" >&5 +echo "$as_me:2718: result: $cf_with_cxx" >&5 echo "${ECHO_T}$cf_with_cxx" >&6 if test "X$cf_with_cxx" = Xno ; then CXX="" @@ -2728,7 +2733,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:2731: checking for $ac_word" >&5 +echo "$as_me:2736: 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 @@ -2743,7 +2748,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:2746: found $ac_dir/$ac_word" >&5 +echo "$as_me:2751: found $ac_dir/$ac_word" >&5 break done @@ -2751,10 +2756,10 @@ fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:2754: result: $CXX" >&5 + echo "$as_me:2759: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:2757: result: no" >&5 + echo "$as_me:2762: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2767,7 +2772,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:2770: checking for $ac_word" >&5 +echo "$as_me:2775: 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 @@ -2782,7 +2787,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:2785: found $ac_dir/$ac_word" >&5 +echo "$as_me:2790: found $ac_dir/$ac_word" >&5 break done @@ -2790,10 +2795,10 @@ fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:2793: result: $ac_ct_CXX" >&5 + echo "$as_me:2798: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:2796: result: no" >&5 + echo "$as_me:2801: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2805,32 +2810,32 @@ fi # Provide some information about the compiler. -echo "$as_me:2808:" \ +echo "$as_me:2813:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:2811: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:2816: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:2814: \$? = $ac_status" >&5 + echo "$as_me:2819: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2816: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:2821: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:2819: \$? = $ac_status" >&5 + echo "$as_me:2824: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:2821: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:2826: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:2824: \$? = $ac_status" >&5 + echo "$as_me:2829: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:2827: checking whether we are using the GNU C++ compiler" >&5 +echo "$as_me:2832: 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 2833 "configure" +#line 2838 "configure" #include "confdefs.h" int @@ -2845,16 +2850,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2848: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2851: \$? = $ac_status" >&5 + echo "$as_me:2856: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2854: \"$ac_try\"") >&5 + { (eval echo "$as_me:2859: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2857: \$? = $ac_status" >&5 + echo "$as_me:2862: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -2866,19 +2871,19 @@ ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:2869: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:2874: 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:2875: checking whether $CXX accepts -g" >&5 +echo "$as_me:2880: 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 2881 "configure" +#line 2886 "configure" #include "confdefs.h" int @@ -2890,16 +2895,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2893: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2898: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2896: \$? = $ac_status" >&5 + echo "$as_me:2901: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2899: \"$ac_try\"") >&5 + { (eval echo "$as_me:2904: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2902: \$? = $ac_status" >&5 + echo "$as_me:2907: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else @@ -2909,7 +2914,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2912: result: $ac_cv_prog_cxx_g" >&5 +echo "$as_me:2917: 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 @@ -2936,7 +2941,7 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 2939 "configure" +#line 2944 "configure" #include "confdefs.h" #include $ac_declaration @@ -2949,16 +2954,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2952: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2955: \$? = $ac_status" >&5 + echo "$as_me:2960: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2958: \"$ac_try\"") >&5 + { (eval echo "$as_me:2963: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2961: \$? = $ac_status" >&5 + echo "$as_me:2966: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2968,7 +2973,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 2971 "configure" +#line 2976 "configure" #include "confdefs.h" $ac_declaration int @@ -2980,16 +2985,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2983: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2986: \$? = $ac_status" >&5 + echo "$as_me:2991: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2989: \"$ac_try\"") >&5 + { (eval echo "$as_me:2994: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2992: \$? = $ac_status" >&5 + echo "$as_me:2997: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -3016,7 +3021,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:3019: checking for $ac_word" >&5 +echo "$as_me:3024: 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 @@ -3033,7 +3038,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:3036: found $ac_dir/$ac_word" >&5 + echo "$as_me:3041: found $ac_dir/$ac_word" >&5 break fi done @@ -3044,16 +3049,16 @@ CXX=$ac_cv_path_CXX if test -n "$CXX"; then - echo "$as_me:3047: result: $CXX" >&5 + echo "$as_me:3052: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:3050: result: no" >&5 + echo "$as_me:3055: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$CXX" = "g++" ; then - { echo "$as_me:3056: WARNING: ignoring hardcoded g++" >&5 + { echo "$as_me:3061: WARNING: ignoring hardcoded g++" >&5 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;} cf_with_cxx=no; CXX=""; GXX=""; fi @@ -3061,11 +3066,11 @@ GXX_VERSION=none if test "$GXX" = yes; then - echo "$as_me:3064: checking version of g++" >&5 + echo "$as_me:3069: checking version of g++" >&5 echo $ECHO_N "checking version of g++... $ECHO_C" >&6 GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GXX_VERSION" && GXX_VERSION=unknown - echo "$as_me:3068: result: $GXX_VERSION" >&5 + echo "$as_me:3073: result: $GXX_VERSION" >&5 echo "${ECHO_T}$GXX_VERSION" >&6 fi @@ -3073,12 +3078,12 @@ 1*|2.[0-6]*) # GXX=""; CXX=""; ac_cv_prog_gxx=no # cf_cxx_library=no - { echo "$as_me:3076: WARNING: templates do not work" >&5 + { echo "$as_me:3081: WARNING: templates do not work" >&5 echo "$as_me: WARNING: templates do not work" >&2;} ;; esac -echo "$as_me:3081: checking if you want to build C++ binding and demo" >&5 +echo "$as_me:3086: 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. @@ -3088,10 +3093,10 @@ else cf_with_cxx_binding=$cf_with_cxx fi; -echo "$as_me:3091: result: $cf_with_cxx_binding" >&5 +echo "$as_me:3096: result: $cf_with_cxx_binding" >&5 echo "${ECHO_T}$cf_with_cxx_binding" >&6 -echo "$as_me:3094: checking if you want to build with Ada95" >&5 +echo "$as_me:3099: 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. @@ -3101,10 +3106,10 @@ else cf_with_ada=yes fi; -echo "$as_me:3104: result: $cf_with_ada" >&5 +echo "$as_me:3109: result: $cf_with_ada" >&5 echo "${ECHO_T}$cf_with_ada" >&6 -echo "$as_me:3107: checking if you want to build programs such as tic" >&5 +echo "$as_me:3112: 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. @@ -3114,10 +3119,10 @@ else cf_with_progs=yes fi; -echo "$as_me:3117: result: $cf_with_progs" >&5 +echo "$as_me:3122: result: $cf_with_progs" >&5 echo "${ECHO_T}$cf_with_progs" >&6 -echo "$as_me:3120: checking if you wish to install curses.h" >&5 +echo "$as_me:3125: 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. @@ -3127,7 +3132,7 @@ else with_curses_h=yes fi; -echo "$as_me:3130: result: $with_curses_h" >&5 +echo "$as_me:3135: result: $with_curses_h" >&5 echo "${ECHO_T}$with_curses_h" >&6 modules_to_build="ncurses" @@ -3153,7 +3158,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:3156: checking for $ac_word" >&5 +echo "$as_me:3161: 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 @@ -3168,7 +3173,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:3171: found $ac_dir/$ac_word" >&5 +echo "$as_me:3176: found $ac_dir/$ac_word" >&5 break done @@ -3176,21 +3181,21 @@ fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:3179: result: $AWK" >&5 + echo "$as_me:3184: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:3182: result: no" >&5 + echo "$as_me:3187: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done -test -z "$AWK" && { { echo "$as_me:3189: error: No awk program found" >&5 +test -z "$AWK" && { { echo "$as_me:3194: error: No awk program found" >&5 echo "$as_me: error: No awk program found" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:3193: checking for egrep" >&5 +echo "$as_me:3198: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3200,11 +3205,11 @@ else ac_cv_prog_egrep='egrep' fi fi -echo "$as_me:3203: result: $ac_cv_prog_egrep" >&5 +echo "$as_me:3208: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep -test -z "$EGREP" && { { echo "$as_me:3207: error: No egrep program found" >&5 +test -z "$EGREP" && { { echo "$as_me:3212: error: No egrep program found" >&5 echo "$as_me: error: No egrep program found" >&2;} { (exit 1); exit 1; }; } @@ -3220,7 +3225,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:3223: checking for a BSD compatible install" >&5 +echo "$as_me:3228: 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 @@ -3269,7 +3274,7 @@ INSTALL=$ac_install_sh fi fi -echo "$as_me:3272: result: $INSTALL" >&5 +echo "$as_me:3277: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -3294,7 +3299,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:3297: checking for $ac_word" >&5 +echo "$as_me:3302: 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 @@ -3309,7 +3314,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LINT="$ac_prog" -echo "$as_me:3312: found $ac_dir/$ac_word" >&5 +echo "$as_me:3317: found $ac_dir/$ac_word" >&5 break done @@ -3317,57 +3322,91 @@ fi LINT=$ac_cv_prog_LINT if test -n "$LINT"; then - echo "$as_me:3320: result: $LINT" >&5 + echo "$as_me:3325: result: $LINT" >&5 echo "${ECHO_T}$LINT" >&6 else - echo "$as_me:3323: result: no" >&5 + echo "$as_me:3328: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$LINT" && break done -echo "$as_me:3330: checking whether ln -s works" >&5 +echo "$as_me:3335: 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:3334: result: yes" >&5 + echo "$as_me:3339: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:3337: result: no, using $LN_S" >&5 + echo "$as_me:3342: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi -echo "$as_me:3341: 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 +echo "$as_me:3346: 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 else - cat >conftest.make <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes + ac_cv_sys_long_file_names=yes +# Test for long file names in all the places we know might matter: +# . the current directory, where building will happen +# $prefix/lib where we will be installing things +# $exec_prefix/lib likewise +# eval it to expand exec_prefix. +# $TMPDIR if set, where it might want to write temporary files +# if $TMPDIR is not set: +# /tmp where it might want to write temporary files +# /var/tmp likewise +# /usr/tmp likewise +if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then + ac_tmpdirs=$TMPDIR else - eval ac_cv_prog_make_${ac_make}_set=no + ac_tmpdirs='/tmp /var/tmp /usr/tmp' fi -rm -f conftest.make +for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do + test -d $ac_dir || continue + test -w $ac_dir || continue # It is less confusing to not echo anything here. + ac_xdir=$ac_dir/cf$$ + (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue + ac_tf1=$ac_xdir/conftest9012345 + ac_tf2=$ac_xdir/conftest9012346 + (echo 1 >$ac_tf1) 2>/dev/null + (echo 2 >$ac_tf2) 2>/dev/null + ac_val=`cat $ac_tf1 2>/dev/null` + if test ! -f $ac_tf1 || test "$ac_val" != 1; then + ac_cv_sys_long_file_names=no + rm -rf $ac_xdir 2>/dev/null + break + fi + rm -rf $ac_xdir 2>/dev/null +done fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:3361: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SET_MAKE= -else - echo "$as_me:3365: result: no" >&5 -echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" +echo "$as_me:3385: 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 + +cat >>confdefs.h <<\EOF +#define HAVE_LONG_FILE_NAMES 1 +EOF + fi -echo "$as_me:3370: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:3395: checking if we should assume mixed-case filenames" >&5 +echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6 + +# Check whether --enable-mixed-case or --disable-mixed-case was given. +if test "${enable_mixed_case+set}" = set; then + enableval="$enable_mixed_case" + enable_mixedcase=$enableval +else + enable_mixedcase=auto +fi; +echo "$as_me:3405: result: $enable_mixedcase" >&5 +echo "${ECHO_T}$enable_mixedcase" >&6 +if test "$enable_mixedcase" = "auto" ; then + +echo "$as_me:3409: 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 @@ -3394,15 +3433,55 @@ fi fi -echo "$as_me:3397: result: $cf_cv_mixedcase" >&5 +echo "$as_me:3436: 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 +else + cf_cv_mixedcase=$enable_mixedcase + if test "$enable_mixedcase" = "yes" ; then + cat >>confdefs.h <<\EOF +#define MIXEDCASE_FILENAMES 1 +EOF + + fi +fi + +# do this after mixed-case option (tags/TAGS is not as important as tic). +echo "$as_me:3453: 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:3473: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:3477: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +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:3405: checking for $ac_word" >&5 +echo "$as_me:3484: 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 @@ -3417,7 +3496,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:3420: found $ac_dir/$ac_word" >&5 +echo "$as_me:3499: found $ac_dir/$ac_word" >&5 break done @@ -3426,17 +3505,17 @@ fi MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS if test -n "$MAKE_LOWER_TAGS"; then - echo "$as_me:3429: result: $MAKE_LOWER_TAGS" >&5 + echo "$as_me:3508: result: $MAKE_LOWER_TAGS" >&5 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 else - echo "$as_me:3432: result: no" >&5 + echo "$as_me:3511: 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:3439: checking for $ac_word" >&5 +echo "$as_me:3518: 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 @@ -3451,7 +3530,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:3454: found $ac_dir/$ac_word" >&5 +echo "$as_me:3533: found $ac_dir/$ac_word" >&5 break done @@ -3460,10 +3539,10 @@ fi MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS if test -n "$MAKE_UPPER_TAGS"; then - echo "$as_me:3463: result: $MAKE_UPPER_TAGS" >&5 + echo "$as_me:3542: result: $MAKE_UPPER_TAGS" >&5 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 else - echo "$as_me:3466: result: no" >&5 + echo "$as_me:3545: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3483,7 +3562,7 @@ MAKE_LOWER_TAGS="#" fi -echo "$as_me:3486: checking for makeflags variable" >&5 +echo "$as_me:3565: 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 @@ -3517,95 +3596,13 @@ rm -f cf_makeflags.tmp fi -echo "$as_me:3520: result: $cf_cv_makeflags" >&5 +echo "$as_me:3599: result: $cf_cv_makeflags" >&5 echo "${ECHO_T}$cf_cv_makeflags" >&6 -echo "$as_me:3523: 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 -else - ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# eval it to expand exec_prefix. -# $TMPDIR if set, where it might want to write temporary files -# if $TMPDIR is not set: -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then - ac_tmpdirs=$TMPDIR -else - ac_tmpdirs='/tmp /var/tmp /usr/tmp' -fi -for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do - test -d $ac_dir || continue - test -w $ac_dir || continue # It is less confusing to not echo anything here. - ac_xdir=$ac_dir/cf$$ - (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue - ac_tf1=$ac_xdir/conftest9012345 - ac_tf2=$ac_xdir/conftest9012346 - (echo 1 >$ac_tf1) 2>/dev/null - (echo 2 >$ac_tf2) 2>/dev/null - ac_val=`cat $ac_tf1 2>/dev/null` - if test ! -f $ac_tf1 || test "$ac_val" != 1; then - ac_cv_sys_long_file_names=no - rm -rf $ac_xdir 2>/dev/null - break - fi - rm -rf $ac_xdir 2>/dev/null -done -fi -echo "$as_me:3562: 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 - -cat >>confdefs.h <<\EOF -#define HAVE_LONG_FILE_NAMES 1 -EOF - -fi - -echo "$as_me:3572: 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 -else - -if test "$cross_compiling" = yes ; then - case $target_alias in #(vi - *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi - cf_cv_mixedcase=no - ;; - *) - cf_cv_mixedcase=yes - ;; - esac -else - rm -f conftest CONFTEST - echo test >conftest - if test -f CONFTEST ; then - cf_cv_mixedcase=no - else - cf_cv_mixedcase=yes - fi - rm -f conftest CONFTEST -fi - -fi -echo "$as_me:3599: 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 - 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:3608: checking for $ac_word" >&5 +echo "$as_me:3605: 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 @@ -3620,7 +3617,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:3623: found $ac_dir/$ac_word" >&5 +echo "$as_me:3620: found $ac_dir/$ac_word" >&5 break done @@ -3628,10 +3625,10 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:3631: result: $RANLIB" >&5 + echo "$as_me:3628: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else - echo "$as_me:3634: result: no" >&5 + echo "$as_me:3631: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3640,7 +3637,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:3643: checking for $ac_word" >&5 +echo "$as_me:3640: 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 @@ -3655,7 +3652,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:3658: found $ac_dir/$ac_word" >&5 +echo "$as_me:3655: found $ac_dir/$ac_word" >&5 break done @@ -3664,10 +3661,10 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:3667: result: $ac_ct_RANLIB" >&5 + echo "$as_me:3664: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$as_me:3670: result: no" >&5 + echo "$as_me:3667: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3679,7 +3676,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:3682: checking for $ac_word" >&5 +echo "$as_me:3679: 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 @@ -3694,7 +3691,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:3697: found $ac_dir/$ac_word" >&5 +echo "$as_me:3694: found $ac_dir/$ac_word" >&5 break done @@ -3702,10 +3699,10 @@ fi LD=$ac_cv_prog_LD if test -n "$LD"; then - echo "$as_me:3705: result: $LD" >&5 + echo "$as_me:3702: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else - echo "$as_me:3708: result: no" >&5 + echo "$as_me:3705: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3714,7 +3711,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:3717: checking for $ac_word" >&5 +echo "$as_me:3714: 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 @@ -3729,7 +3726,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:3732: found $ac_dir/$ac_word" >&5 +echo "$as_me:3729: found $ac_dir/$ac_word" >&5 break done @@ -3738,10 +3735,10 @@ fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then - echo "$as_me:3741: result: $ac_ct_LD" >&5 + echo "$as_me:3738: result: $ac_ct_LD" >&5 echo "${ECHO_T}$ac_ct_LD" >&6 else - echo "$as_me:3744: result: no" >&5 + echo "$as_me:3741: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3753,7 +3750,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:3756: checking for $ac_word" >&5 +echo "$as_me:3753: 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 @@ -3768,7 +3765,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:3771: found $ac_dir/$ac_word" >&5 +echo "$as_me:3768: found $ac_dir/$ac_word" >&5 break done @@ -3776,10 +3773,10 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:3779: result: $AR" >&5 + echo "$as_me:3776: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else - echo "$as_me:3782: result: no" >&5 + echo "$as_me:3779: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3788,7 +3785,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:3791: checking for $ac_word" >&5 +echo "$as_me:3788: 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 @@ -3803,7 +3800,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:3806: found $ac_dir/$ac_word" >&5 +echo "$as_me:3803: found $ac_dir/$ac_word" >&5 break done @@ -3812,10 +3809,10 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:3815: result: $ac_ct_AR" >&5 + echo "$as_me:3812: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else - echo "$as_me:3818: result: no" >&5 + echo "$as_me:3815: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3828,7 +3825,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5 +echo "$as_me:3828: checking for archiver options (symbol AR_OPTS)" >&5 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6 if test -z "$AR_OPTS" ; then @@ -3837,12 +3834,12 @@ fi cf_cv_subst_AR_OPTS=$AR_OPTS -echo "$as_me:3840: result: $AR_OPTS" >&5 +echo "$as_me:3837: result: $AR_OPTS" >&5 echo "${ECHO_T}$AR_OPTS" >&6 fi -echo "$as_me:3845: checking if you have specified an install-prefix" >&5 +echo "$as_me:3842: 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. @@ -3855,7 +3852,7 @@ ;; esac fi; -echo "$as_me:3858: result: $DESTDIR" >&5 +echo "$as_me:3855: result: $DESTDIR" >&5 echo "${ECHO_T}$DESTDIR" >&6 ############################################################################### @@ -3883,7 +3880,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:3886: checking for $ac_word" >&5 +echo "$as_me:3883: 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 @@ -3898,7 +3895,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:3901: found $ac_dir/$ac_word" >&5 +echo "$as_me:3898: found $ac_dir/$ac_word" >&5 break done @@ -3906,10 +3903,10 @@ fi BUILD_CC=$ac_cv_prog_BUILD_CC if test -n "$BUILD_CC"; then - echo "$as_me:3909: result: $BUILD_CC" >&5 + echo "$as_me:3906: result: $BUILD_CC" >&5 echo "${ECHO_T}$BUILD_CC" >&6 else - echo "$as_me:3912: result: no" >&5 + echo "$as_me:3909: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3917,12 +3914,12 @@ done fi; - echo "$as_me:3920: checking for native build C compiler" >&5 + echo "$as_me:3917: checking for native build C compiler" >&5 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6 - echo "$as_me:3922: result: $BUILD_CC" >&5 + echo "$as_me:3919: result: $BUILD_CC" >&5 echo "${ECHO_T}$BUILD_CC" >&6 - echo "$as_me:3925: checking for native build C preprocessor" >&5 + echo "$as_me:3922: checking for native build C preprocessor" >&5 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6 # Check whether --with-build-cpp or --without-build-cpp was given. @@ -3932,10 +3929,10 @@ else BUILD_CPP='${BUILD_CC} -E' fi; - echo "$as_me:3935: result: $BUILD_CPP" >&5 + echo "$as_me:3932: result: $BUILD_CPP" >&5 echo "${ECHO_T}$BUILD_CPP" >&6 - echo "$as_me:3938: checking for native build C flags" >&5 + echo "$as_me:3935: checking for native build C flags" >&5 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6 # Check whether --with-build-cflags or --without-build-cflags was given. @@ -3943,10 +3940,10 @@ withval="$with_build_cflags" BUILD_CFLAGS="$withval" fi; - echo "$as_me:3946: result: $BUILD_CFLAGS" >&5 + echo "$as_me:3943: result: $BUILD_CFLAGS" >&5 echo "${ECHO_T}$BUILD_CFLAGS" >&6 - echo "$as_me:3949: checking for native build C preprocessor-flags" >&5 + echo "$as_me:3946: checking for native build C preprocessor-flags" >&5 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6 # Check whether --with-build-cppflags or --without-build-cppflags was given. @@ -3954,10 +3951,10 @@ withval="$with_build_cppflags" BUILD_CPPFLAGS="$withval" fi; - echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5 + echo "$as_me:3954: result: $BUILD_CPPFLAGS" >&5 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6 - echo "$as_me:3960: checking for native build linker-flags" >&5 + echo "$as_me:3957: checking for native build linker-flags" >&5 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6 # Check whether --with-build-ldflags or --without-build-ldflags was given. @@ -3965,10 +3962,10 @@ withval="$with_build_ldflags" BUILD_LDFLAGS="$withval" fi; - echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5 + echo "$as_me:3965: result: $BUILD_LDFLAGS" >&5 echo "${ECHO_T}$BUILD_LDFLAGS" >&6 - echo "$as_me:3971: checking for native build linker-libraries" >&5 + echo "$as_me:3968: checking for native build linker-libraries" >&5 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6 # Check whether --with-build-libs or --without-build-libs was given. @@ -3976,7 +3973,7 @@ withval="$with_build_libs" BUILD_LIBS="$withval" fi; - echo "$as_me:3979: result: $BUILD_LIBS" >&5 + echo "$as_me:3976: result: $BUILD_LIBS" >&5 echo "${ECHO_T}$BUILD_LIBS" >&6 # this assumes we're on Unix. @@ -3986,7 +3983,7 @@ : ${BUILD_CC:='${CC}'} if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then - { { echo "$as_me:3989: error: Cross-build requires two compilers. + { { echo "$as_me:3986: 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;} @@ -4023,11 +4020,11 @@ # doing: LIB_CLEAN= LIB_COMPILE= -LIB_LINK= +LIB_LINK='${CC}' LIB_INSTALL= LIB_UNINSTALL= -echo "$as_me:4030: checking if you want to build libraries with libtool" >&5 +echo "$as_me:4027: 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. @@ -4037,7 +4034,7 @@ else with_libtool=no fi; -echo "$as_me:4040: result: $with_libtool" >&5 +echo "$as_me:4037: result: $with_libtool" >&5 echo "${ECHO_T}$with_libtool" >&6 if test "$with_libtool" != "no"; then @@ -4068,7 +4065,7 @@ with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5 + { { echo "$as_me:4068: error: expected a pathname, not \"$with_libtool\"" >&5 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -4078,7 +4075,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:4081: checking for $ac_word" >&5 +echo "$as_me:4078: 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 @@ -4095,7 +4092,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:4098: found $ac_dir/$ac_word" >&5 + echo "$as_me:4095: found $ac_dir/$ac_word" >&5 break fi done @@ -4106,42 +4103,42 @@ LIBTOOL=$ac_cv_path_LIBTOOL if test -n "$LIBTOOL"; then - echo "$as_me:4109: result: $LIBTOOL" >&5 + echo "$as_me:4106: result: $LIBTOOL" >&5 echo "${ECHO_T}$LIBTOOL" >&6 else - echo "$as_me:4112: result: no" >&5 + echo "$as_me:4109: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$LIBTOOL" ; then - { { echo "$as_me:4118: error: Cannot find libtool" >&5 + { { echo "$as_me:4115: error: Cannot find libtool" >&5 echo "$as_me: error: Cannot find libtool" >&2;} { (exit 1); exit 1; }; } fi - LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o' - LIB_OBJECT='${OBJECTS}.o=.lo)' + LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o' + LIB_OBJECT='${OBJECTS:.o=.lo}' LIB_SUFFIX=.la LIB_CLEAN='${LIBTOOL} --mode=clean' LIB_COMPILE='${LIBTOOL} --mode=compile' - LIB_LINK='${LIBTOOL} --mode=link' + LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}' LIB_INSTALL='${LIBTOOL} --mode=install' LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' LIB_PREP=: # Show the version of libtool - echo "$as_me:4133: checking version of libtool" >&5 + echo "$as_me:4130: 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:4140: result: $cf_cv_libtool_version" >&5 + cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'` + echo "$as_me:4137: 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:4143: error: This is not libtool" >&5 -echo "$as_me: error: This is not libtool" >&2;} + { { echo "$as_me:4140: error: This is not GNU libtool" >&5 +echo "$as_me: error: This is not GNU libtool" >&2;} { (exit 1); exit 1; }; } fi @@ -4167,7 +4164,7 @@ else -echo "$as_me:4170: checking if you want to build shared libraries" >&5 +echo "$as_me:4167: 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. @@ -4177,11 +4174,11 @@ else with_shared=no fi; -echo "$as_me:4180: result: $with_shared" >&5 +echo "$as_me:4177: result: $with_shared" >&5 echo "${ECHO_T}$with_shared" >&6 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" -echo "$as_me:4184: checking if you want to build static libraries" >&5 +echo "$as_me:4181: 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. @@ -4191,11 +4188,11 @@ else with_normal=yes fi; -echo "$as_me:4194: result: $with_normal" >&5 +echo "$as_me:4191: result: $with_normal" >&5 echo "${ECHO_T}$with_normal" >&6 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal" -echo "$as_me:4198: checking if you want to build debug libraries" >&5 +echo "$as_me:4195: 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. @@ -4205,11 +4202,11 @@ else with_debug=yes fi; -echo "$as_me:4208: result: $with_debug" >&5 +echo "$as_me:4205: result: $with_debug" >&5 echo "${ECHO_T}$with_debug" >&6 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug" -echo "$as_me:4212: checking if you want to build profiling libraries" >&5 +echo "$as_me:4209: 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. @@ -4219,7 +4216,7 @@ else with_profile=no fi; -echo "$as_me:4222: result: $with_profile" >&5 +echo "$as_me:4219: result: $with_profile" >&5 echo "${ECHO_T}$with_profile" >&6 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile" @@ -4227,23 +4224,25 @@ ############################################################################### -echo "$as_me:4230: checking for specified models" >&5 +echo "$as_me:4227: 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:4234: result: $cf_list_models" >&5 +echo "$as_me:4231: 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:4239: checking for default model" >&5 +echo "$as_me:4236: 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:4242: result: $DFT_LWR_MODEL" >&5 +echo "$as_me:4239: result: $DFT_LWR_MODEL" >&5 echo "${ECHO_T}$DFT_LWR_MODEL" >&6 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +TICS_NAME=tic + TINFO_NAME=tinfo LIB_NAME=ncurses @@ -4264,7 +4263,7 @@ ############################################################################### -echo "$as_me:4267: checking if you want to build a separate terminfo library" >&5 +echo "$as_me:4266: 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. @@ -4274,13 +4273,26 @@ else with_termlib=no fi; -echo "$as_me:4277: result: $with_termlib" >&5 +echo "$as_me:4276: result: $with_termlib" >&5 echo "${ECHO_T}$with_termlib" >&6 +echo "$as_me:4279: checking if you want to build a separate tic library" >&5 +echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6 + +# Check whether --with-ticlib or --without-ticlib was given. +if test "${with_ticlib+set}" = set; then + withval="$with_ticlib" + with_ticlib=$withval +else + with_ticlib=no +fi; +echo "$as_me:4289: result: $with_ticlib" >&5 +echo "${ECHO_T}$with_ticlib" >&6 + ### Checks for special libraries, must be done up-front. SHLIB_LIST="" -echo "$as_me:4283: checking if you want to link with the GPM mouse library" >&5 +echo "$as_me:4295: 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. @@ -4290,27 +4302,27 @@ else with_gpm=maybe fi; -echo "$as_me:4293: result: $with_gpm" >&5 +echo "$as_me:4305: result: $with_gpm" >&5 echo "${ECHO_T}$with_gpm" >&6 if test "$with_gpm" != no ; then - echo "$as_me:4297: checking for gpm.h" >&5 + echo "$as_me:4309: 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 4303 "configure" +#line 4315 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4307: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4319: \"$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:4313: \$? = $ac_status" >&5 + echo "$as_me:4325: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4329,7 +4341,7 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4332: result: $ac_cv_header_gpm_h" >&5 +echo "$as_me:4344: 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 @@ -4340,12 +4352,14 @@ if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then test -n "$verbose" && echo " assuming we really have GPM library" 1>&6 +echo "${as_me-configure}:4355: testing assuming we really have GPM library ..." 1>&5 + cat >>confdefs.h <<\EOF #define HAVE_LIBGPM 1 EOF else - echo "$as_me:4348: checking for Gpm_Open in -lgpm" >&5 + echo "$as_me:4362: 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 @@ -4353,7 +4367,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4356 "configure" +#line 4370 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4372,16 +4386,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4375: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4389: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4378: \$? = $ac_status" >&5 + echo "$as_me:4392: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4381: \"$ac_try\"") >&5 + { (eval echo "$as_me:4395: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4384: \$? = $ac_status" >&5 + echo "$as_me:4398: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else @@ -4392,13 +4406,13 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4395: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +echo "$as_me:4409: 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 : else - { { echo "$as_me:4401: error: Cannot link with GPM library" >&5 + { { echo "$as_me:4415: error: Cannot link with GPM library" >&5 echo "$as_me: error: Cannot link with GPM library" >&2;} { (exit 1); exit 1; }; } fi @@ -4408,7 +4422,7 @@ else - test "$with_gpm" != maybe && { echo "$as_me:4411: WARNING: Cannot find GPM header" >&5 + test "$with_gpm" != maybe && { echo "$as_me:4425: WARNING: Cannot find GPM header" >&5 echo "$as_me: WARNING: Cannot find GPM header" >&2;} with_gpm=no @@ -4417,7 +4431,7 @@ fi if test "$with_gpm" != no ; then - echo "$as_me:4420: checking if you want to load GPM dynamically" >&5 + echo "$as_me:4434: checking if you want to load GPM dynamically" >&5 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6 # Check whether --with-dlsym or --without-dlsym was given. @@ -4427,18 +4441,18 @@ else with_dlsym=yes fi; - echo "$as_me:4430: result: $with_dlsym" >&5 + echo "$as_me:4444: result: $with_dlsym" >&5 echo "${ECHO_T}$with_dlsym" >&6 if test "$with_dlsym" = yes ; then cf_have_dlsym=no -echo "$as_me:4435: checking for dlsym" >&5 +echo "$as_me:4449: 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 cat >conftest.$ac_ext <<_ACEOF -#line 4441 "configure" +#line 4455 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlsym (); below. */ @@ -4469,16 +4483,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4472: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4486: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4475: \$? = $ac_status" >&5 + echo "$as_me:4489: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4478: \"$ac_try\"") >&5 + { (eval echo "$as_me:4492: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4481: \$? = $ac_status" >&5 + echo "$as_me:4495: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlsym=yes else @@ -4488,14 +4502,14 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4491: result: $ac_cv_func_dlsym" >&5 +echo "$as_me:4505: 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:4498: checking for dlsym in -ldl" >&5 +echo "$as_me:4512: 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 @@ -4503,7 +4517,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4506 "configure" +#line 4520 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4522,16 +4536,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4525: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4539: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4528: \$? = $ac_status" >&5 + echo "$as_me:4542: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4531: \"$ac_try\"") >&5 + { (eval echo "$as_me:4545: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4534: \$? = $ac_status" >&5 + echo "$as_me:4548: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlsym=yes else @@ -4542,7 +4556,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4545: result: $ac_cv_lib_dl_dlsym" >&5 +echo "$as_me:4559: 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 @@ -4555,10 +4569,10 @@ if test "$cf_have_dlsym" = yes ; then test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS" - echo "$as_me:4558: checking whether able to link to dl*() functions" >&5 + echo "$as_me:4572: 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 4561 "configure" +#line 4575 "configure" #include "confdefs.h" #include int @@ -4576,16 +4590,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4579: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4593: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4582: \$? = $ac_status" >&5 + echo "$as_me:4596: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4585: \"$ac_try\"") >&5 + { (eval echo "$as_me:4599: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4588: \$? = $ac_status" >&5 + echo "$as_me:4602: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF @@ -4596,15 +4610,15 @@ echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { echo "$as_me:4599: error: Cannot link test program for libdl" >&5 + { { echo "$as_me:4613: 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:4604: result: ok" >&5 + echo "$as_me:4618: result: ok" >&5 echo "${ECHO_T}ok" >&6 else - { { echo "$as_me:4607: error: Cannot find dlsym function" >&5 + { { echo "$as_me:4621: error: Cannot find dlsym function" >&5 echo "$as_me: error: Cannot find dlsym function" >&2;} { (exit 1); exit 1; }; } fi @@ -4612,10 +4626,12 @@ if test "$with_gpm" != yes ; then test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6 +echo "${as_me-configure}:4629: testing assuming soname for gpm is $with_gpm ..." 1>&5 + cf_cv_gpm_soname="$with_gpm" else -echo "$as_me:4618: checking for soname of gpm library" >&5 +echo "$as_me:4634: checking for soname of gpm library" >&5 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6 if test "${cf_cv_gpm_soname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4633,15 +4649,15 @@ CF_EOF cf_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" - if { (eval echo "$as_me:4636: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4639: \$? = $ac_status" >&5 + echo "$as_me:4655: \$? = $ac_status" >&5 (exit $ac_status); } ; then - if { (eval echo "$as_me:4641: \"$ac_link\"") >&5 + if { (eval echo "$as_me:4657: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4644: \$? = $ac_status" >&5 + echo "$as_me:4660: \$? = $ac_status" >&5 (exit $ac_status); } ; then cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.` test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown @@ -4652,7 +4668,7 @@ fi fi -echo "$as_me:4655: result: $cf_cv_gpm_soname" >&5 +echo "$as_me:4671: result: $cf_cv_gpm_soname" >&5 echo "${ECHO_T}$cf_cv_gpm_soname" >&6 fi @@ -4668,7 +4684,7 @@ #define HAVE_LIBGPM 1 EOF - echo "$as_me:4671: checking for Gpm_Wgetch in -lgpm" >&5 +echo "$as_me:4687: 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 @@ -4676,7 +4692,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4679 "configure" +#line 4695 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4695,16 +4711,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4698: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4714: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4701: \$? = $ac_status" >&5 + echo "$as_me:4717: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4704: \"$ac_try\"") >&5 + { (eval echo "$as_me:4720: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4707: \$? = $ac_status" >&5 + echo "$as_me:4723: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_gpm_Gpm_Wgetch=yes else @@ -4715,12 +4731,61 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4718: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5 +echo "$as_me:4734: 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:4722: WARNING: GPM library is already linked with curses - read the FAQ" >&5 +echo "$as_me:4738: checking if GPM is weakly bound to curses library" >&5 +echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6 +if test "${cf_cv_check_gpm_wgetch+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cf_cv_check_gpm_wgetch=unknown +if test "$cross_compiling" != yes ; then + +cat >conftest.$ac_ext < +int main() +{ + Gpm_Wgetch(); + ${cf_cv_main_return:-return}(0); +} +CF_EOF + + cf_save_LIBS="$LIBS" + # This only works if we can look at the symbol table. If a shared + # library is stripped for install, we cannot use that. So we're forced + # to rely on the static library, noting that some packagers may not + # include it. + LIBS="-static -lgpm -dynamic $LIBS" + if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4765: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + if { (eval echo "$as_me:4767: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4770: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\' | egrep '\<[vVwW]\>'` + test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes + test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no + fi + fi + rm -f conftest* + LIBS="$cf_save_LIBS" +fi + +fi +echo "$as_me:4782: result: $cf_cv_check_gpm_wgetch" >&5 +echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6 + +if test "$cf_cv_check_gpm_wgetch" != yes ; then + { echo "$as_me:4786: 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 @@ -4728,7 +4793,7 @@ # not everyone has "test -c" if test -c /dev/sysmouse 2>/dev/null ; then -echo "$as_me:4731: checking if you want to use sysmouse" >&5 +echo "$as_me:4796: 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. @@ -4740,7 +4805,7 @@ fi; if test "$cf_with_sysmouse" != no ; then cat >conftest.$ac_ext <<_ACEOF -#line 4743 "configure" +#line 4808 "configure" #include "confdefs.h" #include @@ -4763,16 +4828,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4766: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4769: \$? = $ac_status" >&5 + echo "$as_me:4834: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4772: \"$ac_try\"") >&5 + { (eval echo "$as_me:4837: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4775: \$? = $ac_status" >&5 + echo "$as_me:4840: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_with_sysmouse=yes else @@ -4782,7 +4847,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4785: result: $cf_with_sysmouse" >&5 +echo "$as_me:4850: 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 @@ -4800,7 +4865,7 @@ test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT='' fi -echo "$as_me:4803: checking for default loader flags" >&5 +echo "$as_me:4868: 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='' ;; @@ -4809,10 +4874,12 @@ profile) LD_MODEL='-pg';; shared) LD_MODEL='' ;; esac -echo "$as_me:4812: result: $LD_MODEL" >&5 +echo "$as_me:4877: result: $LD_MODEL" >&5 echo "${ECHO_T}$LD_MODEL" >&6 -echo "$as_me:4815: checking if rpath option should be used" >&5 +case $DFT_LWR_MODEL in +shared) +echo "$as_me:4882: 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. @@ -4822,8 +4889,22 @@ else cf_cv_ld_rpath=no fi; -echo "$as_me:4825: result: $cf_cv_ld_rpath" >&5 +echo "$as_me:4892: result: $cf_cv_ld_rpath" >&5 echo "${ECHO_T}$cf_cv_ld_rpath" >&6 +echo "$as_me:4894: checking if shared libraries should be relinked during install" >&5 +echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6 + +# Check whether --enable-relink or --disable-relink was given. +if test "${enable_relink+set}" = set; then + enableval="$enable_relink" + cf_cv_do_relink=$enableval +else + cf_cv_do_relink=yes +fi; +echo "$as_me:4904: result: $cf_cv_do_relink" >&5 +echo "${ECHO_T}$cf_cv_do_relink" >&6 + ;; +esac LOCAL_LDFLAGS= LOCAL_LDFLAGS2= @@ -4832,7 +4913,7 @@ cf_cv_do_symlinks=no - echo "$as_me:4835: checking if release/abi version should be used for shared libs" >&5 + echo "$as_me:4916: 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. @@ -4847,7 +4928,7 @@ cf_cv_shlib_version=$withval ;; *) - { { echo "$as_me:4850: error: option value must be one of: rel, abi, auto or no" >&5 + { { echo "$as_me:4931: 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; }; } ;; @@ -4856,7 +4937,7 @@ else cf_cv_shlib_version=auto fi; - echo "$as_me:4859: result: $cf_cv_shlib_version" >&5 + echo "$as_me:4940: result: $cf_cv_shlib_version" >&5 echo "${ECHO_T}$cf_cv_shlib_version" >&6 cf_cv_rm_so_locs=no @@ -4865,14 +4946,14 @@ CC_SHARED_OPTS= if test "$GCC" = yes then - echo "$as_me:4868: checking which $CC option to use" >&5 + echo "$as_me:4949: 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 4875 "configure" +#line 4956 "configure" #include "confdefs.h" #include int @@ -4884,16 +4965,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4887: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4890: \$? = $ac_status" >&5 + echo "$as_me:4971: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4893: \"$ac_try\"") >&5 + { (eval echo "$as_me:4974: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4896: \$? = $ac_status" >&5 + echo "$as_me:4977: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -4902,7 +4983,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext done - echo "$as_me:4905: result: $CC_SHARED_OPTS" >&5 + echo "$as_me:4986: result: $CC_SHARED_OPTS" >&5 echo "${ECHO_T}$CC_SHARED_OPTS" >&6 CFLAGS="$cf_save_CFLAGS" fi @@ -4915,17 +4996,30 @@ ;; cygwin*) CC_SHARED_OPTS= - MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}' + MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}' cf_cv_shlib_version=cygdll cf_cv_shlib_version_infix=cygdll + cat >mk_shared_lib.sh <<-CF_EOF + #!/bin/sh + SHARED_LIB=\$1 + IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\` + shift + cat <<-EOF + Linking shared library + ** SHARED_LIB \$SHARED_LIB + ** IMPORT_LIB \$IMPORT_LIB +EOF + exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB} +CF_EOF + chmod +x mk_shared_lib.sh ;; darwin*) EXTRA_CFLAGS="-no-cpp-precomp" CC_SHARED_OPTS="-dynamic" - MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@' + MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi cf_cv_shlib_version_infix=yes - echo "$as_me:4928: checking if ld -search_paths_first works" >&5 + echo "$as_me:5022: checking if ld -search_paths_first works" >&5 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4934,7 +5028,7 @@ cf_save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat >conftest.$ac_ext <<_ACEOF -#line 4937 "configure" +#line 5031 "configure" #include "confdefs.h" int @@ -4946,16 +5040,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4949: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5043: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4952: \$? = $ac_status" >&5 + echo "$as_me:5046: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4955: \"$ac_try\"") >&5 + { (eval echo "$as_me:5049: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4958: \$? = $ac_status" >&5 + echo "$as_me:5052: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_ldflags_search_paths_first=yes else @@ -4966,7 +5060,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LDFLAGS=$cf_save_LDFLAGS fi -echo "$as_me:4969: result: $cf_cv_ldflags_search_paths_first" >&5 +echo "$as_me:5063: result: $cf_cv_ldflags_search_paths_first" >&5 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 if test $cf_cv_ldflags_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -5021,11 +5115,11 @@ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@' ;; - openbsd2*) + openbsd[2-9].*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@' ;; - openbsd*|freebsd[23]*) + openbsd*|freebsd[12].*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='${LD} -Bshareable -o $@' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel @@ -5162,7 +5256,7 @@ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes ;; *) - { echo "$as_me:5165: WARNING: ignored --with-shlib-version" >&5 + { echo "$as_me:5259: WARNING: ignored --with-shlib-version" >&5 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;} ;; esac @@ -5170,12 +5264,12 @@ esac if test -n "$cf_ld_rpath_opt" ; then - echo "$as_me:5173: checking if we need a space after rpath option" >&5 + echo "$as_me:5267: 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 5178 "configure" +#line 5272 "configure" #include "confdefs.h" int @@ -5187,16 +5281,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5190: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5284: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5193: \$? = $ac_status" >&5 + echo "$as_me:5287: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5196: \"$ac_try\"") >&5 + { (eval echo "$as_me:5290: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5199: \$? = $ac_status" >&5 + echo "$as_me:5293: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_rpath_space=no else @@ -5206,7 +5300,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save_LIBS" - echo "$as_me:5209: result: $cf_rpath_space" >&5 + echo "$as_me:5303: 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}" @@ -5215,7 +5309,7 @@ if test "$CC_SHARED_OPTS" = "unknown"; then for model in $cf_list_models; do if test "$model" = "shared"; then - { { echo "$as_me:5218: error: Shared libraries are not supported in this version" >&5 + { { echo "$as_me:5312: 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 @@ -5225,7 +5319,7 @@ ############################################################################### ### use option --disable-overwrite to leave out the link to -lcurses -echo "$as_me:5228: checking if you wish to install ncurses overwriting curses" >&5 +echo "$as_me:5322: 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. @@ -5235,10 +5329,10 @@ else if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi fi; -echo "$as_me:5238: result: $with_overwrite" >&5 +echo "$as_me:5332: result: $with_overwrite" >&5 echo "${ECHO_T}$with_overwrite" >&6 -echo "$as_me:5241: checking if external terminfo-database is used" >&5 +echo "$as_me:5335: 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. @@ -5248,7 +5342,7 @@ else use_database=yes fi; -echo "$as_me:5251: result: $use_database" >&5 +echo "$as_me:5345: result: $use_database" >&5 echo "${ECHO_T}$use_database" >&6 case $host_os in #(vi @@ -5270,7 +5364,7 @@ #define USE_DATABASE 1 EOF - echo "$as_me:5273: checking which terminfo source-file will be installed" >&5 + echo "$as_me:5367: 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. @@ -5278,10 +5372,10 @@ enableval="$enable_database" TERMINFO_SRC=$withval fi; - echo "$as_me:5281: result: $TERMINFO_SRC" >&5 + echo "$as_me:5375: result: $TERMINFO_SRC" >&5 echo "${ECHO_T}$TERMINFO_SRC" >&6 - echo "$as_me:5284: checking whether to use hashed database instead of directory/tree" >&5 + echo "$as_me:5378: checking whether to use hashed database instead of directory/tree" >&5 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6 # Check whether --with-hashed-db or --without-hashed-db was given. @@ -5291,11 +5385,11 @@ else with_hashed_db=no fi; - echo "$as_me:5294: result: $with_hashed_db" >&5 + echo "$as_me:5388: result: $with_hashed_db" >&5 echo "${ECHO_T}$with_hashed_db" >&6 fi -echo "$as_me:5298: checking for list of fallback descriptions" >&5 +echo "$as_me:5392: 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. @@ -5305,11 +5399,11 @@ else with_fallback= fi; -echo "$as_me:5308: result: $with_fallback" >&5 +echo "$as_me:5402: result: $with_fallback" >&5 echo "${ECHO_T}$with_fallback" >&6 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'` -echo "$as_me:5312: checking if you want modern xterm or antique" >&5 +echo "$as_me:5406: 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. @@ -5323,7 +5417,7 @@ no) with_xterm_new=xterm-old;; *) with_xterm_new=xterm-new;; esac -echo "$as_me:5326: result: $with_xterm_new" >&5 +echo "$as_me:5420: result: $with_xterm_new" >&5 echo "${ECHO_T}$with_xterm_new" >&6 WHICH_XTERM=$with_xterm_new @@ -5333,7 +5427,7 @@ MAKE_TERMINFO="#" else -echo "$as_me:5336: checking for list of terminfo directories" >&5 +echo "$as_me:5430: 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. @@ -5373,7 +5467,7 @@ cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:5376: error: expected a pathname, not \"$cf_src_path\"" >&5 + { { echo "$as_me:5470: 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; }; } ;; @@ -5386,13 +5480,13 @@ eval 'TERMINFO_DIRS="$cf_dst_path"' -echo "$as_me:5389: result: $TERMINFO_DIRS" >&5 +echo "$as_me:5483: result: $TERMINFO_DIRS" >&5 echo "${ECHO_T}$TERMINFO_DIRS" >&6 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <&5 +echo "$as_me:5489: 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. @@ -5401,7 +5495,8 @@ else withval="${TERMINFO-${datadir}/terminfo}" -fi; +fi; if test -n "${datadir}/terminfo" ; then + if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else @@ -5427,15 +5522,16 @@ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:5430: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:5525: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; esac +fi TERMINFO="$withval" -echo "$as_me:5438: result: $TERMINFO" >&5 +echo "$as_me:5534: result: $TERMINFO" >&5 echo "${ECHO_T}$TERMINFO" >&6 cat >>confdefs.h <&5 +echo "$as_me:5544: 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. @@ -5457,7 +5553,7 @@ with_big_core=no else cat >conftest.$ac_ext <<_ACEOF -#line 5460 "configure" +#line 5556 "configure" #include "confdefs.h" #include @@ -5471,15 +5567,15 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5474: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5570: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5477: \$? = $ac_status" >&5 + echo "$as_me:5573: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5479: \"$ac_try\"") >&5 + { (eval echo "$as_me:5575: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5482: \$? = $ac_status" >&5 + echo "$as_me:5578: \$? = $ac_status" >&5 (exit $ac_status); }; }; then with_big_core=yes else @@ -5491,14 +5587,32 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi; -echo "$as_me:5494: result: $with_big_core" >&5 +echo "$as_me:5590: 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 +### ISO C only guarantees 512-char strings, we have tables which load faster +### when constructed using "big" strings. +echo "$as_me:5598: checking if big-strings option selected" >&5 +echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6 + +# Check whether --enable-big-strings or --disable-big-strings was given. +if test "${enable_big_strings+set}" = set; then + enableval="$enable_big_strings" + with_big_strings=no +else + with_big_strings=yes +fi; +echo "$as_me:5608: result: $with_big_strings" >&5 +echo "${ECHO_T}$with_big_strings" >&6 + +USE_BIG_STRINGS=0 +test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1 + ### use option --enable-termcap to compile in the termcap fallback support -echo "$as_me:5501: checking if you want termcap-fallback support" >&5 +echo "$as_me:5615: 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. @@ -5508,13 +5622,13 @@ else with_termcap=no fi; -echo "$as_me:5511: result: $with_termcap" >&5 +echo "$as_me:5625: 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:5517: error: You have disabled the database w/o specifying fallbacks" >&5 + { { echo "$as_me:5631: 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 @@ -5525,11 +5639,17 @@ else +if test "$with_ticlib" != no ; then + { { echo "$as_me:5643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5 +echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;} + { (exit 1); exit 1; }; } +fi + cat >>confdefs.h <<\EOF #define USE_TERMCAP 1 EOF -echo "$as_me:5532: checking for list of termcap files" >&5 +echo "$as_me:5652: 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. @@ -5569,7 +5689,7 @@ cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:5572: error: expected a pathname, not \"$cf_src_path\"" >&5 + { { echo "$as_me:5692: 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; }; } ;; @@ -5582,14 +5702,14 @@ eval 'TERMPATH="$cf_dst_path"' -echo "$as_me:5585: result: $TERMPATH" >&5 +echo "$as_me:5705: result: $TERMPATH" >&5 echo "${ECHO_T}$TERMPATH" >&6 test -n "$TERMPATH" && cat >>confdefs.h <&5 +echo "$as_me:5712: 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. @@ -5599,13 +5719,13 @@ else with_getcap=no fi; -echo "$as_me:5602: result: $with_getcap" >&5 +echo "$as_me:5722: 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:5608: checking if translated termcaps will be cached in ~/.terminfo" >&5 +echo "$as_me:5728: 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. @@ -5615,7 +5735,7 @@ else with_getcap_cache=no fi; -echo "$as_me:5618: result: $with_getcap_cache" >&5 +echo "$as_me:5738: 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 @@ -5624,7 +5744,7 @@ fi ### Use option --disable-home-terminfo to completely remove ~/.terminfo -echo "$as_me:5627: checking if ~/.terminfo is wanted" >&5 +echo "$as_me:5747: 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. @@ -5634,13 +5754,13 @@ else with_home_terminfo=yes fi; -echo "$as_me:5637: result: $with_home_terminfo" >&5 +echo "$as_me:5757: 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:5643: checking if you want to use restricted environment when running as root" >&5 +echo "$as_me:5763: checking if you want to use restricted environment when running as root" >&5 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6 # Check whether --enable-root-environ or --disable-root-environ was given. @@ -5650,7 +5770,7 @@ else with_root_environ=yes fi; -echo "$as_me:5653: result: $with_root_environ" >&5 +echo "$as_me:5773: 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 @@ -5664,13 +5784,13 @@ unlink do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5667: checking for $ac_func" >&5 +echo "$as_me:5787: 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 5673 "configure" +#line 5793 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5701,16 +5821,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5704: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5824: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5707: \$? = $ac_status" >&5 + echo "$as_me:5827: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5710: \"$ac_try\"") >&5 + { (eval echo "$as_me:5830: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5713: \$? = $ac_status" >&5 + echo "$as_me:5833: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5720,7 +5840,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5723: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:5843: 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 <&5 +echo "$as_me:5860: 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 5746 "configure" +#line 5866 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5774,16 +5894,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5777: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5897: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5780: \$? = $ac_status" >&5 + echo "$as_me:5900: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5783: \"$ac_try\"") >&5 + { (eval echo "$as_me:5903: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5786: \$? = $ac_status" >&5 + echo "$as_me:5906: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5793,7 +5913,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5796: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:5916: 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 <&5 + echo "$as_me:5927: 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 @@ -5817,7 +5937,7 @@ eval 'ac_cv_func_'$cf_func'=error' else cat >conftest.$ac_ext <<_ACEOF -#line 5820 "configure" +#line 5940 "configure" #include "confdefs.h" #include @@ -5847,15 +5967,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5850: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5970: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5853: \$? = $ac_status" >&5 + echo "$as_me:5973: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5855: \"$ac_try\"") >&5 + { (eval echo "$as_me:5975: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5858: \$? = $ac_status" >&5 + echo "$as_me:5978: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_link_funcs="$cf_cv_link_funcs $cf_func" @@ -5873,7 +5993,7 @@ test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no fi -echo "$as_me:5876: result: $cf_cv_link_funcs" >&5 +echo "$as_me:5996: 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 @@ -5891,7 +6011,7 @@ # soft links (symbolic links) are useful for some systems where hard links do # not work, or to make it simpler to copy terminfo trees around. if test "$ac_cv_func_symlink" = yes ; then - echo "$as_me:5894: checking if tic should use symbolic links" >&5 + echo "$as_me:6014: 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. @@ -5901,21 +6021,21 @@ else with_symlinks=no fi; - echo "$as_me:5904: result: $with_symlinks" >&5 + echo "$as_me:6024: result: $with_symlinks" >&5 echo "${ECHO_T}$with_symlinks" >&6 fi # If we have hard links and did not choose to use soft links instead, there is # no reason to make this choice optional - use the hard links. if test "$with_symlinks" = no ; then - echo "$as_me:5911: checking if tic should use hard links" >&5 + echo "$as_me:6031: 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:5918: result: $with_links" >&5 + echo "$as_me:6038: result: $with_links" >&5 echo "${ECHO_T}$with_links" >&6 fi @@ -5928,7 +6048,7 @@ EOF ### use option --enable-broken-linker to force on use of broken-linker support -echo "$as_me:5931: checking if you want broken-linker support code" >&5 +echo "$as_me:6051: 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. @@ -5938,7 +6058,7 @@ else with_broken_linker=${BROKEN_LINKER-no} fi; -echo "$as_me:5941: result: $with_broken_linker" >&5 +echo "$as_me:6061: result: $with_broken_linker" >&5 echo "${ECHO_T}$with_broken_linker" >&6 BROKEN_LINKER=0 @@ -5958,12 +6078,14 @@ BROKEN_LINKER=1 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6 +echo "${as_me-configure}:6081: testing cygwin linker is broken anyway ..." 1>&5 + ;; esac fi ### use option --enable-bsdpad to have tputs process BSD-style prefix padding -echo "$as_me:5966: checking if tputs should process BSD-style prefix padding" >&5 +echo "$as_me:6088: 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. @@ -5973,7 +6095,7 @@ else with_bsdpad=no fi; -echo "$as_me:5976: result: $with_bsdpad" >&5 +echo "$as_me:6098: result: $with_bsdpad" >&5 echo "${ECHO_T}$with_bsdpad" >&6 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF #define BSD_TPUTS 1 @@ -5990,7 +6112,7 @@ # Check to define _XOPEN_SOURCE "automatically" -echo "$as_me:5993: checking if $CC -U and -D options work together" >&5 +echo "$as_me:6115: checking if $CC -U and -D options work together" >&5 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6 if test "${cf_cv_cc_u_d_options+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5999,7 +6121,7 @@ cf_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS" cat >conftest.$ac_ext <<_ACEOF -#line 6002 "configure" +#line 6124 "configure" #include "confdefs.h" int @@ -6018,16 +6140,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6143: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6024: \$? = $ac_status" >&5 + echo "$as_me:6146: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6027: \"$ac_try\"") >&5 + { (eval echo "$as_me:6149: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6030: \$? = $ac_status" >&5 + echo "$as_me:6152: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cc_u_d_options=yes @@ -6041,7 +6163,7 @@ CPPFLAGS="$cf_save_CPPFLAGS" fi -echo "$as_me:6044: result: $cf_cv_cc_u_d_options" >&5 +echo "$as_me:6166: result: $cf_cv_cc_u_d_options" >&5 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6 cf_XOPEN_SOURCE=500 @@ -6065,16 +6187,16 @@ irix[56].*) #(vi CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE" ;; -linux*|gnu*) #(vi +linux*|gnu*|k*bsd*-gnu) #(vi -echo "$as_me:6070: checking if we must define _GNU_SOURCE" >&5 +echo "$as_me:6192: 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 cat >conftest.$ac_ext <<_ACEOF -#line 6077 "configure" +#line 6199 "configure" #include "confdefs.h" #include int @@ -6089,16 +6211,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6214: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6095: \$? = $ac_status" >&5 + echo "$as_me:6217: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6098: \"$ac_try\"") >&5 + { (eval echo "$as_me:6220: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6101: \$? = $ac_status" >&5 + echo "$as_me:6223: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_gnu_source=no else @@ -6107,7 +6229,7 @@ cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" cat >conftest.$ac_ext <<_ACEOF -#line 6110 "configure" +#line 6232 "configure" #include "confdefs.h" #include int @@ -6122,16 +6244,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6125: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6247: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6128: \$? = $ac_status" >&5 + echo "$as_me:6250: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6131: \"$ac_try\"") >&5 + { (eval echo "$as_me:6253: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6134: \$? = $ac_status" >&5 + echo "$as_me:6256: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_gnu_source=no else @@ -6146,7 +6268,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6149: result: $cf_cv_gnu_source" >&5 +echo "$as_me:6271: 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" @@ -6173,14 +6295,14 @@ CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__" ;; *) - echo "$as_me:6176: checking if we should define _XOPEN_SOURCE" >&5 + echo "$as_me:6298: 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 cat >conftest.$ac_ext <<_ACEOF -#line 6183 "configure" +#line 6305 "configure" #include "confdefs.h" #include int @@ -6195,16 +6317,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6201: \$? = $ac_status" >&5 + echo "$as_me:6323: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6204: \"$ac_try\"") >&5 + { (eval echo "$as_me:6326: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6207: \$? = $ac_status" >&5 + echo "$as_me:6329: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -6213,7 +6335,7 @@ cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >conftest.$ac_ext <<_ACEOF -#line 6216 "configure" +#line 6338 "configure" #include "confdefs.h" #include int @@ -6228,16 +6350,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6353: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6234: \$? = $ac_status" >&5 + echo "$as_me:6356: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6237: \"$ac_try\"") >&5 + { (eval echo "$as_me:6359: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6240: \$? = $ac_status" >&5 + echo "$as_me:6362: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -6252,7 +6374,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6255: result: $cf_cv_xopen_source" >&5 +echo "$as_me:6377: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -6286,16 +6408,16 @@ sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'` -echo "$as_me:6289: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:6411: 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 -echo "(line 6295) testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me-configure}:6417: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 6298 "configure" +#line 6420 "configure" #include "confdefs.h" #include int @@ -6310,16 +6432,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6316: \$? = $ac_status" >&5 + echo "$as_me:6438: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6319: \"$ac_try\"") >&5 + { (eval echo "$as_me:6441: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6322: \$? = $ac_status" >&5 + echo "$as_me:6444: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else @@ -6340,7 +6462,7 @@ esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF -#line 6343 "configure" +#line 6465 "configure" #include "confdefs.h" #include int @@ -6355,16 +6477,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6358: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6480: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6361: \$? = $ac_status" >&5 + echo "$as_me:6483: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6364: \"$ac_try\"") >&5 + { (eval echo "$as_me:6486: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6367: \$? = $ac_status" >&5 + echo "$as_me:6489: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -6375,15 +6497,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "(line 6378) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me-configure}:6500: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" -echo "(line 6383) testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me-configure}:6505: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 6386 "configure" +#line 6508 "configure" #include "confdefs.h" #include int @@ -6398,16 +6520,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6401: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6523: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6404: \$? = $ac_status" >&5 + echo "$as_me:6526: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6407: \"$ac_try\"") >&5 + { (eval echo "$as_me:6529: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6410: \$? = $ac_status" >&5 + echo "$as_me:6532: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -6423,7 +6545,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6426: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:6548: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -6442,14 +6564,14 @@ # Work around breakage on OS X -echo "$as_me:6445: checking if SIGWINCH is defined" >&5 +echo "$as_me:6567: checking if SIGWINCH is defined" >&5 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6 if test "${cf_cv_define_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6452 "configure" +#line 6574 "configure" #include "confdefs.h" #include @@ -6464,23 +6586,23 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6467: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6470: \$? = $ac_status" >&5 + echo "$as_me:6592: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6473: \"$ac_try\"") >&5 + { (eval echo "$as_me:6595: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6476: \$? = $ac_status" >&5 + echo "$as_me:6598: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_define_sigwinch=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 6483 "configure" +#line 6605 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -6498,16 +6620,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6501: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6623: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6504: \$? = $ac_status" >&5 + echo "$as_me:6626: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6507: \"$ac_try\"") >&5 + { (eval echo "$as_me:6629: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6510: \$? = $ac_status" >&5 + echo "$as_me:6632: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_define_sigwinch=maybe else @@ -6521,11 +6643,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6524: result: $cf_cv_define_sigwinch" >&5 +echo "$as_me:6646: result: $cf_cv_define_sigwinch" >&5 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6 if test "$cf_cv_define_sigwinch" = maybe ; then -echo "$as_me:6528: checking for actual SIGWINCH definition" >&5 +echo "$as_me:6650: checking for actual SIGWINCH definition" >&5 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6 if test "${cf_cv_fixup_sigwinch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6536,7 +6658,7 @@ while test $cf_sigwinch != 1 do cat >conftest.$ac_ext <<_ACEOF -#line 6539 "configure" +#line 6661 "configure" #include "confdefs.h" #undef _XOPEN_SOURCE @@ -6558,16 +6680,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6561: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6564: \$? = $ac_status" >&5 + echo "$as_me:6686: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6567: \"$ac_try\"") >&5 + { (eval echo "$as_me:6689: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6570: \$? = $ac_status" >&5 + echo "$as_me:6692: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_fixup_sigwinch=$cf_sigwinch break @@ -6581,7 +6703,7 @@ done fi -echo "$as_me:6584: result: $cf_cv_fixup_sigwinch" >&5 +echo "$as_me:6706: result: $cf_cv_fixup_sigwinch" >&5 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6 if test "$cf_cv_fixup_sigwinch" != unknown ; then @@ -6591,13 +6713,13 @@ # Checks for CODESET support. - echo "$as_me:6594: checking for nl_langinfo and CODESET" >&5 + echo "$as_me:6716: 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 6600 "configure" +#line 6722 "configure" #include "confdefs.h" #include int @@ -6609,16 +6731,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6612: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6734: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6615: \$? = $ac_status" >&5 + echo "$as_me:6737: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6618: \"$ac_try\"") >&5 + { (eval echo "$as_me:6740: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6621: \$? = $ac_status" >&5 + echo "$as_me:6743: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_langinfo_codeset=yes else @@ -6629,7 +6751,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6632: result: $am_cv_langinfo_codeset" >&5 +echo "$as_me:6754: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test $am_cv_langinfo_codeset = yes; then @@ -6643,7 +6765,7 @@ NCURSES_OK_WCHAR_T= NCURSES_OK_WINT_T= -echo "$as_me:6646: checking if you want wide-character code" >&5 +echo "$as_me:6768: checking if you want wide-character code" >&5 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6 # Check whether --enable-widec or --disable-widec was given. @@ -6653,7 +6775,7 @@ else with_widec=no fi; -echo "$as_me:6656: result: $with_widec" >&5 +echo "$as_me:6778: result: $with_widec" >&5 echo "${ECHO_T}$with_widec" >&6 if test "$with_widec" = yes ; then LIB_SUFFIX="w${LIB_SUFFIX}" @@ -6661,10 +6783,10 @@ #define USE_WIDEC_SUPPORT 1 EOF -echo "$as_me:6664: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 +echo "$as_me:6786: 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 6667 "configure" +#line 6789 "configure" #include "confdefs.h" #include @@ -6680,16 +6802,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6805: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6686: \$? = $ac_status" >&5 + echo "$as_me:6808: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6689: \"$ac_try\"") >&5 + { (eval echo "$as_me:6811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6692: \$? = $ac_status" >&5 + echo "$as_me:6814: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=no else @@ -6698,16 +6820,16 @@ cf_result=yes fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:6701: result: $cf_result" >&5 +echo "$as_me:6823: 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:6707: checking checking for compatible value versus " >&5 + echo "$as_me:6829: 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 6710 "configure" +#line 6832 "configure" #include "confdefs.h" #include @@ -6723,16 +6845,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:6848: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6729: \$? = $ac_status" >&5 + echo "$as_me:6851: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6732: \"$ac_try\"") >&5 + { (eval echo "$as_me:6854: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6735: \$? = $ac_status" >&5 + echo "$as_me:6857: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=yes else @@ -6741,7 +6863,7 @@ cf_result=no fi rm -f conftest.$ac_objext conftest.$ac_ext - echo "$as_me:6744: result: $cf_result" >&5 + echo "$as_me:6866: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = no ; then # perhaps we can override it - try... @@ -6755,13 +6877,13 @@ 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:6758: checking for $ac_func" >&5 +echo "$as_me:6880: 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 6764 "configure" +#line 6886 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -6792,16 +6914,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6795: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6917: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6798: \$? = $ac_status" >&5 + echo "$as_me:6920: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6801: \"$ac_try\"") >&5 + { (eval echo "$as_me:6923: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6804: \$? = $ac_status" >&5 + echo "$as_me:6926: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -6811,7 +6933,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6814: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:6936: 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 <&5 +echo "$as_me:6948: 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 @@ -6832,7 +6954,7 @@ cf_save_LIBS="$LIBS" LIBS="-lutf8 $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 6835 "configure" +#line 6957 "configure" #include "confdefs.h" #include @@ -6845,16 +6967,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6848: \"$ac_link\"") >&5 +if { (eval echo "$as_me:6970: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6851: \$? = $ac_status" >&5 + echo "$as_me:6973: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6854: \"$ac_try\"") >&5 + { (eval echo "$as_me:6976: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6857: \$? = $ac_status" >&5 + echo "$as_me:6979: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_libutf8=yes else @@ -6866,7 +6988,7 @@ LIBS="$cf_save_LIBS" fi -echo "$as_me:6869: result: $cf_cv_libutf8" >&5 +echo "$as_me:6991: result: $cf_cv_libutf8" >&5 echo "${ECHO_T}$cf_cv_libutf8" >&6 if test "$cf_cv_libutf8" = yes ; then @@ -6883,14 +7005,14 @@ fi # This is needed on Tru64 5.0 to declare mbstate_t -echo "$as_me:6886: checking if we must include wchar.h to declare mbstate_t" >&5 +echo "$as_me:7008: 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 6893 "configure" +#line 7015 "configure" #include "confdefs.h" #include @@ -6908,23 +7030,23 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6911: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7033: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6914: \$? = $ac_status" >&5 + echo "$as_me:7036: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6917: \"$ac_try\"") >&5 + { (eval echo "$as_me:7039: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6920: \$? = $ac_status" >&5 + echo "$as_me:7042: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_mbstate_t=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 6927 "configure" +#line 7049 "configure" #include "confdefs.h" #include @@ -6943,16 +7065,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6946: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7068: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6949: \$? = $ac_status" >&5 + echo "$as_me:7071: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6952: \"$ac_try\"") >&5 + { (eval echo "$as_me:7074: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6955: \$? = $ac_status" >&5 + echo "$as_me:7077: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_mbstate_t=yes else @@ -6964,7 +7086,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6967: result: $cf_cv_mbstate_t" >&5 +echo "$as_me:7089: result: $cf_cv_mbstate_t" >&5 echo "${ECHO_T}$cf_cv_mbstate_t" >&6 if test "$cf_cv_mbstate_t" = yes ; then @@ -6981,14 +7103,14 @@ fi # This is needed on Tru64 5.0 to declare wchar_t -echo "$as_me:6984: checking if we must include wchar.h to declare wchar_t" >&5 +echo "$as_me:7106: 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 >conftest.$ac_ext <<_ACEOF -#line 6991 "configure" +#line 7113 "configure" #include "confdefs.h" #include @@ -7006,23 +7128,23 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7009: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7131: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7012: \$? = $ac_status" >&5 + echo "$as_me:7134: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7015: \"$ac_try\"") >&5 + { (eval echo "$as_me:7137: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7018: \$? = $ac_status" >&5 + echo "$as_me:7140: \$? = $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 7025 "configure" +#line 7147 "configure" #include "confdefs.h" #include @@ -7041,16 +7163,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7044: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7166: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7047: \$? = $ac_status" >&5 + echo "$as_me:7169: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7050: \"$ac_try\"") >&5 + { (eval echo "$as_me:7172: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7053: \$? = $ac_status" >&5 + echo "$as_me:7175: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_wchar_t=yes else @@ -7062,7 +7184,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7065: result: $cf_cv_wchar_t" >&5 +echo "$as_me:7187: result: $cf_cv_wchar_t" >&5 echo "${ECHO_T}$cf_cv_wchar_t" >&6 if test "$cf_cv_wchar_t" = yes ; then @@ -7084,14 +7206,14 @@ fi # This is needed on Tru64 5.0 to declare wint_t -echo "$as_me:7087: checking if we must include wchar.h to declare wint_t" >&5 +echo "$as_me:7209: 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 cat >conftest.$ac_ext <<_ACEOF -#line 7094 "configure" +#line 7216 "configure" #include "confdefs.h" #include @@ -7109,23 +7231,23 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7112: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7234: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7115: \$? = $ac_status" >&5 + echo "$as_me:7237: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7118: \"$ac_try\"") >&5 + { (eval echo "$as_me:7240: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7121: \$? = $ac_status" >&5 + echo "$as_me:7243: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_wint_t=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 7128 "configure" +#line 7250 "configure" #include "confdefs.h" #include @@ -7144,16 +7266,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7147: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7269: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7150: \$? = $ac_status" >&5 + echo "$as_me:7272: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7153: \"$ac_try\"") >&5 + { (eval echo "$as_me:7275: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7156: \$? = $ac_status" >&5 + echo "$as_me:7278: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_wint_t=yes else @@ -7165,7 +7287,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7168: result: $cf_cv_wint_t" >&5 +echo "$as_me:7290: result: $cf_cv_wint_t" >&5 echo "${ECHO_T}$cf_cv_wint_t" >&6 if test "$cf_cv_wint_t" = yes ; then @@ -7204,7 +7326,7 @@ ;; esac -echo "$as_me:7207: checking whether to enable _LP64 definition in curses.h" >&5 +echo "$as_me:7329: checking whether to enable _LP64 definition in curses.h" >&5 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6 # Check whether --enable-lp64 or --disable-lp64 was given. @@ -7214,7 +7336,7 @@ else with_lp64=$default_with_lp64 fi; -echo "$as_me:7217: result: $with_lp64" >&5 +echo "$as_me:7339: result: $with_lp64" >&5 echo "${ECHO_T}$with_lp64" >&6 if test "$with_lp64" = yes ; then @@ -7230,7 +7352,7 @@ fi; if test "$enable_largefile" != no; then - echo "$as_me:7233: checking for special C compiler options needed for large files" >&5 + echo "$as_me:7355: 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 @@ -7242,7 +7364,7 @@ # 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 7245 "configure" +#line 7367 "configure" #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -7262,16 +7384,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7265: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7387: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7268: \$? = $ac_status" >&5 + echo "$as_me:7390: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7271: \"$ac_try\"") >&5 + { (eval echo "$as_me:7393: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7274: \$? = $ac_status" >&5 + echo "$as_me:7396: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -7281,16 +7403,16 @@ rm -f conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext -if { (eval echo "$as_me:7284: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7406: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7287: \$? = $ac_status" >&5 + echo "$as_me:7409: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7290: \"$ac_try\"") >&5 + { (eval echo "$as_me:7412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7293: \$? = $ac_status" >&5 + echo "$as_me:7415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_largefile_CC=' -n32'; break else @@ -7304,13 +7426,13 @@ rm -f conftest.$ac_ext fi fi -echo "$as_me:7307: result: $ac_cv_sys_largefile_CC" >&5 +echo "$as_me:7429: 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 - echo "$as_me:7313: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + echo "$as_me:7435: 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 @@ -7318,7 +7440,7 @@ while :; do ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF -#line 7321 "configure" +#line 7443 "configure" #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -7338,16 +7460,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7341: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7344: \$? = $ac_status" >&5 + echo "$as_me:7466: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7347: \"$ac_try\"") >&5 + { (eval echo "$as_me:7469: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7350: \$? = $ac_status" >&5 + echo "$as_me:7472: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -7356,7 +7478,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 7359 "configure" +#line 7481 "configure" #include "confdefs.h" #define _FILE_OFFSET_BITS 64 #include @@ -7377,16 +7499,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7380: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7502: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7383: \$? = $ac_status" >&5 + echo "$as_me:7505: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7386: \"$ac_try\"") >&5 + { (eval echo "$as_me:7508: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7389: \$? = $ac_status" >&5 + echo "$as_me:7511: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_file_offset_bits=64; break else @@ -7397,7 +7519,7 @@ break done fi -echo "$as_me:7400: result: $ac_cv_sys_file_offset_bits" >&5 +echo "$as_me:7522: 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 @@ -7407,7 +7529,7 @@ fi rm -f conftest* - echo "$as_me:7410: checking for _LARGE_FILES value needed for large files" >&5 + echo "$as_me:7532: 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 @@ -7415,7 +7537,7 @@ while :; do ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF -#line 7418 "configure" +#line 7540 "configure" #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -7435,16 +7557,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7438: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7560: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7441: \$? = $ac_status" >&5 + echo "$as_me:7563: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7444: \"$ac_try\"") >&5 + { (eval echo "$as_me:7566: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7447: \$? = $ac_status" >&5 + echo "$as_me:7569: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -7453,7 +7575,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 7456 "configure" +#line 7578 "configure" #include "confdefs.h" #define _LARGE_FILES 1 #include @@ -7474,16 +7596,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7477: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7599: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7480: \$? = $ac_status" >&5 + echo "$as_me:7602: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7483: \"$ac_try\"") >&5 + { (eval echo "$as_me:7605: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7486: \$? = $ac_status" >&5 + echo "$as_me:7608: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_large_files=1; break else @@ -7494,7 +7616,7 @@ break done fi -echo "$as_me:7497: result: $ac_cv_sys_large_files" >&5 +echo "$as_me:7619: 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 @@ -7507,7 +7629,7 @@ fi if test "$enable_largefile" != no ; then - echo "$as_me:7510: checking for _LARGEFILE_SOURCE value needed for large files" >&5 + echo "$as_me:7632: 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 @@ -7515,7 +7637,7 @@ while :; do ac_cv_sys_largefile_source=no cat >conftest.$ac_ext <<_ACEOF -#line 7518 "configure" +#line 7640 "configure" #include "confdefs.h" #include int @@ -7527,16 +7649,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7530: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7652: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7533: \$? = $ac_status" >&5 + echo "$as_me:7655: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7536: \"$ac_try\"") >&5 + { (eval echo "$as_me:7658: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7539: \$? = $ac_status" >&5 + echo "$as_me:7661: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -7545,7 +7667,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 7548 "configure" +#line 7670 "configure" #include "confdefs.h" #define _LARGEFILE_SOURCE 1 #include @@ -7558,16 +7680,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7561: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7683: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7564: \$? = $ac_status" >&5 + echo "$as_me:7686: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7567: \"$ac_try\"") >&5 + { (eval echo "$as_me:7689: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7570: \$? = $ac_status" >&5 + echo "$as_me:7692: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_largefile_source=1; break else @@ -7578,7 +7700,7 @@ break done fi -echo "$as_me:7581: result: $ac_cv_sys_largefile_source" >&5 +echo "$as_me:7703: 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 @@ -7592,13 +7714,13 @@ # 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:7595: checking for fseeko" >&5 +echo "$as_me:7717: 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 cat >conftest.$ac_ext <<_ACEOF -#line 7601 "configure" +#line 7723 "configure" #include "confdefs.h" #include int @@ -7610,16 +7732,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7613: \"$ac_link\"") >&5 +if { (eval echo "$as_me:7735: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7616: \$? = $ac_status" >&5 + echo "$as_me:7738: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7619: \"$ac_try\"") >&5 + { (eval echo "$as_me:7741: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7622: \$? = $ac_status" >&5 + echo "$as_me:7744: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fseeko=yes else @@ -7629,7 +7751,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7632: result: $ac_cv_func_fseeko" >&5 +echo "$as_me:7754: result: $ac_cv_func_fseeko" >&5 echo "${ECHO_T}$ac_cv_func_fseeko" >&6 if test $ac_cv_func_fseeko = yes; then @@ -7648,15 +7770,16 @@ # the config.h test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES " test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE " + test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits " - echo "$as_me:7652: checking whether to use struct dirent64" >&5 + echo "$as_me:7775: checking whether to use struct dirent64" >&5 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6 if test "${cf_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7659 "configure" +#line 7782 "configure" #include "confdefs.h" #include @@ -7677,16 +7800,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7680: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:7803: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7683: \$? = $ac_status" >&5 + echo "$as_me:7806: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7686: \"$ac_try\"") >&5 + { (eval echo "$as_me:7809: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7689: \$? = $ac_status" >&5 + echo "$as_me:7812: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_struct_dirent64=yes else @@ -7697,7 +7820,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7700: result: $cf_cv_struct_dirent64" >&5 +echo "$as_me:7823: result: $cf_cv_struct_dirent64" >&5 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6 test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF #define HAVE_STRUCT_DIRENT64 1 @@ -7706,7 +7829,7 @@ fi ### use option --disable-tparm-varargs to make tparm() conform to X/Open -echo "$as_me:7709: checking if you want tparm not to use X/Open fixed-parameter list" >&5 +echo "$as_me:7832: checking if you want tparm not to use X/Open fixed-parameter list" >&5 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given. @@ -7716,13 +7839,13 @@ else with_tparm_varargs=yes fi; -echo "$as_me:7719: result: $with_tparm_varargs" >&5 +echo "$as_me:7842: result: $with_tparm_varargs" >&5 echo "${ECHO_T}$with_tparm_varargs" >&6 NCURSES_TPARM_VARARGS=0 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1 ### use option --with-bool to override bool's type -echo "$as_me:7725: checking for type of bool" >&5 +echo "$as_me:7848: 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. @@ -7732,10 +7855,10 @@ else NCURSES_BOOL=auto fi; -echo "$as_me:7735: result: $NCURSES_BOOL" >&5 +echo "$as_me:7858: result: $NCURSES_BOOL" >&5 echo "${ECHO_T}$NCURSES_BOOL" >&6 -echo "$as_me:7738: checking for alternate terminal capabilities file" >&5 +echo "$as_me:7861: 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. @@ -7746,11 +7869,11 @@ TERMINFO_CAPS=Caps fi; test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps -echo "$as_me:7749: result: $TERMINFO_CAPS" >&5 +echo "$as_me:7872: result: $TERMINFO_CAPS" >&5 echo "${ECHO_T}$TERMINFO_CAPS" >&6 ### use option --with-chtype to override chtype's type -echo "$as_me:7753: checking for type of chtype" >&5 +echo "$as_me:7876: checking for type of chtype" >&5 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6 # Check whether --with-chtype or --without-chtype was given. @@ -7760,11 +7883,11 @@ else NCURSES_CHTYPE=auto fi; -echo "$as_me:7763: result: $NCURSES_CHTYPE" >&5 +echo "$as_me:7886: result: $NCURSES_CHTYPE" >&5 echo "${ECHO_T}$NCURSES_CHTYPE" >&6 ### use option --with-ospeed to override ospeed's type -echo "$as_me:7767: checking for type of ospeed" >&5 +echo "$as_me:7890: 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. @@ -7774,11 +7897,11 @@ else NCURSES_OSPEED=short fi; -echo "$as_me:7777: result: $NCURSES_OSPEED" >&5 +echo "$as_me:7900: result: $NCURSES_OSPEED" >&5 echo "${ECHO_T}$NCURSES_OSPEED" >&6 ### use option --with-mmask-t to override mmask_t's type -echo "$as_me:7781: checking for type of mmask_t" >&5 +echo "$as_me:7904: checking for type of mmask_t" >&5 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6 # Check whether --with-mmask-t or --without-mmask-t was given. @@ -7788,11 +7911,11 @@ else NCURSES_MMASK_T=auto fi; -echo "$as_me:7791: result: $NCURSES_MMASK_T" >&5 +echo "$as_me:7914: result: $NCURSES_MMASK_T" >&5 echo "${ECHO_T}$NCURSES_MMASK_T" >&6 ### Enable compiling-in rcs id's -echo "$as_me:7795: checking if RCS identifiers should be compiled-in" >&5 +echo "$as_me:7918: 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. @@ -7802,7 +7925,7 @@ else with_rcs_ids=no fi; -echo "$as_me:7805: result: $with_rcs_ids" >&5 +echo "$as_me:7928: 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 @@ -7810,7 +7933,7 @@ ############################################################################### -echo "$as_me:7813: checking format of man-pages" >&5 +echo "$as_me:7936: 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. @@ -7899,14 +8022,14 @@ ;; esac -echo "$as_me:7902: result: $MANPAGE_FORMAT" >&5 +echo "$as_me:8025: result: $MANPAGE_FORMAT" >&5 echo "${ECHO_T}$MANPAGE_FORMAT" >&6 if test -n "$cf_unknown" ; then - { echo "$as_me:7905: WARNING: Unexpected manpage-format $cf_unknown" >&5 + { echo "$as_me:8028: WARNING: Unexpected manpage-format $cf_unknown" >&5 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;} fi -echo "$as_me:7909: checking for manpage renaming" >&5 +echo "$as_me:8032: 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. @@ -7934,7 +8057,7 @@ 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:7937: error: not a filename: $MANPAGE_RENAMES" >&5 + { { echo "$as_me:8060: error: not a filename: $MANPAGE_RENAMES" >&5 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;} { (exit 1); exit 1; }; } fi @@ -7948,10 +8071,10 @@ fi fi -echo "$as_me:7951: result: $MANPAGE_RENAMES" >&5 +echo "$as_me:8074: result: $MANPAGE_RENAMES" >&5 echo "${ECHO_T}$MANPAGE_RENAMES" >&6 -echo "$as_me:7954: checking if manpage aliases will be installed" >&5 +echo "$as_me:8077: 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. @@ -7962,7 +8085,7 @@ MANPAGE_ALIASES=yes fi; -echo "$as_me:7965: result: $MANPAGE_ALIASES" >&5 +echo "$as_me:8088: result: $MANPAGE_ALIASES" >&5 echo "${ECHO_T}$MANPAGE_ALIASES" >&6 if test "$LN_S" = "ln -s"; then @@ -7973,7 +8096,7 @@ MANPAGE_SYMLINKS=no if test "$MANPAGE_ALIASES" = yes ; then -echo "$as_me:7976: checking if manpage symlinks should be used" >&5 +echo "$as_me:8099: 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. @@ -7986,17 +8109,17 @@ if test "$$cf_use_symlinks" = no; then if test "$MANPAGE_SYMLINKS" = yes ; then - { echo "$as_me:7989: WARNING: cannot make symlinks" >&5 + { echo "$as_me:8112: WARNING: cannot make symlinks" >&5 echo "$as_me: WARNING: cannot make symlinks" >&2;} MANPAGE_SYMLINKS=no fi fi -echo "$as_me:7995: result: $MANPAGE_SYMLINKS" >&5 +echo "$as_me:8118: result: $MANPAGE_SYMLINKS" >&5 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6 fi -echo "$as_me:7999: checking for manpage tbl" >&5 +echo "$as_me:8122: checking for manpage tbl" >&5 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6 # Check whether --with-manpage-tbl or --without-manpage-tbl was given. @@ -8007,7 +8130,7 @@ MANPAGE_TBL=no fi; -echo "$as_me:8010: result: $MANPAGE_TBL" >&5 +echo "$as_me:8133: result: $MANPAGE_TBL" >&5 echo "${ECHO_T}$MANPAGE_TBL" >&6 if test "$prefix" = "NONE" ; then @@ -8047,6 +8170,7 @@ esac cf_edit_man=./edit_man.sh +cf_man_alias=`pwd`/man_alias.sed cat >$cf_edit_man <>$cf_man_alias <<-CF_EOF2 + s,@DATADIR@,\$datadir,g + s,@TERMINFO@,\$TERMINFO,g + s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g + s,@NCURSES_MINOR@,\$NCURSES_MINOR,g + s,@NCURSES_PATCH@,\$NCURSES_PATCH,g + s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g +CF_EOF + + for cf_name in captoinfo clear infocmp infotocap tic toe tput + do + cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` + cf_name=`echo $cf_name|sed "$program_transform_name"` +cat >>$cf_edit_man <<-CF_EOF + s,@$cf_NAME@,$cf_name, +CF_EOF + done + +cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <&5 +echo "$as_me:8444: 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 # Check whether --enable-ext-funcs or --disable-ext-funcs was given. @@ -8318,7 +8451,7 @@ else with_ext_funcs=yes fi; -echo "$as_me:8321: result: $with_ext_funcs" >&5 +echo "$as_me:8454: result: $with_ext_funcs" >&5 echo "${ECHO_T}$with_ext_funcs" >&6 if test "$with_ext_funcs" = yes ; then NCURSES_EXT_FUNCS=1 @@ -8355,7 +8488,7 @@ fi ### use option --enable-const to turn on use of const beyond that in XSI. -echo "$as_me:8358: checking for extended use of const keyword" >&5 +echo "$as_me:8491: 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. @@ -8365,14 +8498,14 @@ else with_ext_const=no fi; -echo "$as_me:8368: result: $with_ext_const" >&5 +echo "$as_me:8501: 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 -echo "$as_me:8375: checking if you want \$NCURSES_NO_PADDING code" >&5 +echo "$as_me:8508: 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. @@ -8382,19 +8515,19 @@ else with_no_padding=$with_ext_funcs fi; -echo "$as_me:8385: result: $with_no_padding" >&5 +echo "$as_me:8518: 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 -echo "$as_me:8391: checking for ANSI C header files" >&5 +echo "$as_me:8524: 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 8397 "configure" +#line 8530 "configure" #include "confdefs.h" #include #include @@ -8402,13 +8535,13 @@ #include _ACEOF -if { (eval echo "$as_me:8405: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:8538: \"$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:8411: \$? = $ac_status" >&5 + echo "$as_me:8544: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -8430,7 +8563,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 8433 "configure" +#line 8566 "configure" #include "confdefs.h" #include @@ -8448,7 +8581,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 8451 "configure" +#line 8584 "configure" #include "confdefs.h" #include @@ -8469,7 +8602,7 @@ : else cat >conftest.$ac_ext <<_ACEOF -#line 8472 "configure" +#line 8605 "configure" #include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) @@ -8495,15 +8628,15 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:8498: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8631: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8501: \$? = $ac_status" >&5 + echo "$as_me:8634: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:8503: \"$ac_try\"") >&5 + { (eval echo "$as_me:8636: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8506: \$? = $ac_status" >&5 + echo "$as_me:8639: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -8516,7 +8649,7 @@ fi fi fi -echo "$as_me:8519: result: $ac_cv_header_stdc" >&5 +echo "$as_me:8652: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then @@ -8532,28 +8665,28 @@ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:8535: checking for $ac_header" >&5 +echo "$as_me:8668: 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 8541 "configure" +#line 8674 "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8547: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8550: \$? = $ac_status" >&5 + echo "$as_me:8683: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8553: \"$ac_try\"") >&5 + { (eval echo "$as_me:8686: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8556: \$? = $ac_status" >&5 + echo "$as_me:8689: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else @@ -8563,7 +8696,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:8566: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:8699: 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 <&5 +echo "$as_me:8709: checking for signed char" >&5 echo $ECHO_N "checking for signed char... $ECHO_C" >&6 if test "${ac_cv_type_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8582 "configure" +#line 8715 "configure" #include "confdefs.h" $ac_includes_default int @@ -8594,16 +8727,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8600: \$? = $ac_status" >&5 + echo "$as_me:8733: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8603: \"$ac_try\"") >&5 + { (eval echo "$as_me:8736: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8606: \$? = $ac_status" >&5 + echo "$as_me:8739: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signed_char=yes else @@ -8613,10 +8746,10 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:8616: result: $ac_cv_type_signed_char" >&5 +echo "$as_me:8749: result: $ac_cv_type_signed_char" >&5 echo "${ECHO_T}$ac_cv_type_signed_char" >&6 -echo "$as_me:8619: checking size of signed char" >&5 +echo "$as_me:8752: checking size of signed char" >&5 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6 if test "${ac_cv_sizeof_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8625,7 +8758,7 @@ if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line 8628 "configure" +#line 8761 "configure" #include "confdefs.h" $ac_includes_default int @@ -8637,21 +8770,21 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8643: \$? = $ac_status" >&5 + echo "$as_me:8776: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8646: \"$ac_try\"") >&5 + { (eval echo "$as_me:8779: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8649: \$? = $ac_status" >&5 + echo "$as_me:8782: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 8654 "configure" +#line 8787 "configure" #include "confdefs.h" $ac_includes_default int @@ -8663,16 +8796,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8666: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8799: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8669: \$? = $ac_status" >&5 + echo "$as_me:8802: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8672: \"$ac_try\"") >&5 + { (eval echo "$as_me:8805: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8675: \$? = $ac_status" >&5 + echo "$as_me:8808: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else @@ -8688,7 +8821,7 @@ ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line 8691 "configure" +#line 8824 "configure" #include "confdefs.h" $ac_includes_default int @@ -8700,16 +8833,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8836: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8706: \$? = $ac_status" >&5 + echo "$as_me:8839: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8709: \"$ac_try\"") >&5 + { (eval echo "$as_me:8842: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8712: \$? = $ac_status" >&5 + echo "$as_me:8845: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else @@ -8725,7 +8858,7 @@ while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line 8728 "configure" +#line 8861 "configure" #include "confdefs.h" $ac_includes_default int @@ -8737,16 +8870,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:8873: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:8743: \$? = $ac_status" >&5 + echo "$as_me:8876: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:8746: \"$ac_try\"") >&5 + { (eval echo "$as_me:8879: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8749: \$? = $ac_status" >&5 + echo "$as_me:8882: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else @@ -8759,12 +8892,12 @@ ac_cv_sizeof_signed_char=$ac_lo else if test "$cross_compiling" = yes; then - { { echo "$as_me:8762: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:8895: 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 8767 "configure" +#line 8900 "configure" #include "confdefs.h" $ac_includes_default int @@ -8780,15 +8913,15 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:8783: \"$ac_link\"") >&5 +if { (eval echo "$as_me:8916: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8786: \$? = $ac_status" >&5 + echo "$as_me:8919: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:8788: \"$ac_try\"") >&5 + { (eval echo "$as_me:8921: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8791: \$? = $ac_status" >&5 + echo "$as_me:8924: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_signed_char=`cat conftest.val` else @@ -8804,7 +8937,7 @@ ac_cv_sizeof_signed_char=0 fi fi -echo "$as_me:8807: result: $ac_cv_sizeof_signed_char" >&5 +echo "$as_me:8940: result: $ac_cv_sizeof_signed_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6 cat >>confdefs.h <&5 +echo "$as_me:8951: checking if you want to use signed Boolean array in term.h" >&5 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6 # Check whether --enable-signed-char or --disable-signed-char was given. @@ -8825,12 +8958,12 @@ else with_signed_char=no fi; -echo "$as_me:8828: result: $with_signed_char" >&5 +echo "$as_me:8961: result: $with_signed_char" >&5 echo "${ECHO_T}$with_signed_char" >&6 test "$with_signed_char" != yes && NCURSES_SBOOL="char" ### use option --enable-sigwinch to turn on use of SIGWINCH logic -echo "$as_me:8833: checking if you want SIGWINCH handler" >&5 +echo "$as_me:8966: checking if you want SIGWINCH handler" >&5 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6 # Check whether --enable-sigwinch or --disable-sigwinch was given. @@ -8840,14 +8973,14 @@ else with_sigwinch=$with_ext_funcs fi; -echo "$as_me:8843: result: $with_sigwinch" >&5 +echo "$as_me:8976: 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:8850: checking if you want user-definable terminal capabilities like termcap" >&5 +echo "$as_me:8983: 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. @@ -8857,7 +8990,7 @@ else with_tcap_names=$with_ext_funcs fi; -echo "$as_me:8860: result: $with_tcap_names" >&5 +echo "$as_me:8993: result: $with_tcap_names" >&5 echo "${ECHO_T}$with_tcap_names" >&6 NCURSES_XNAMES=0 test "$with_tcap_names" = yes && NCURSES_XNAMES=1 @@ -8865,7 +8998,7 @@ ############################################################################### # These options are relatively safe to experiment with. -echo "$as_me:8868: checking if you want all development code" >&5 +echo "$as_me:9001: checking if you want all development code" >&5 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6 # Check whether --with-develop or --without-develop was given. @@ -8875,11 +9008,11 @@ else with_develop=no fi; -echo "$as_me:8878: result: $with_develop" >&5 +echo "$as_me:9011: result: $with_develop" >&5 echo "${ECHO_T}$with_develop" >&6 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize -echo "$as_me:8882: checking if you want hard-tabs code" >&5 +echo "$as_me:9015: checking if you want hard-tabs code" >&5 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6 # Check whether --enable-hard-tabs or --disable-hard-tabs was given. @@ -8889,14 +9022,14 @@ else enable_hard_tabs=$with_develop fi; -echo "$as_me:8892: result: $enable_hard_tabs" >&5 +echo "$as_me:9025: result: $enable_hard_tabs" >&5 echo "${ECHO_T}$enable_hard_tabs" >&6 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF #define USE_HARD_TABS 1 EOF ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize -echo "$as_me:8899: checking if you want limited support for xmc" >&5 +echo "$as_me:9032: checking if you want limited support for xmc" >&5 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given. @@ -8906,7 +9039,7 @@ else enable_xmc_glitch=$with_develop fi; -echo "$as_me:8909: result: $enable_xmc_glitch" >&5 +echo "$as_me:9042: result: $enable_xmc_glitch" >&5 echo "${ECHO_T}$enable_xmc_glitch" >&6 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF #define USE_XMC_SUPPORT 1 @@ -8915,7 +9048,7 @@ ############################################################################### # These are just experimental, probably should not be in a package: -echo "$as_me:8918: checking if you do not want to assume colors are white-on-black" >&5 +echo "$as_me:9051: 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. @@ -8925,14 +9058,14 @@ else with_assumed_color=yes fi; -echo "$as_me:8928: result: $with_assumed_color" >&5 +echo "$as_me:9061: 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:8935: checking if you want hashmap scrolling-optimization code" >&5 +echo "$as_me:9068: 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. @@ -8942,14 +9075,14 @@ else with_hashmap=yes fi; -echo "$as_me:8945: result: $with_hashmap" >&5 +echo "$as_me:9078: result: $with_hashmap" >&5 echo "${ECHO_T}$with_hashmap" >&6 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF #define USE_HASHMAP 1 EOF ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment -echo "$as_me:8952: checking if you want colorfgbg code" >&5 +echo "$as_me:9085: 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. @@ -8959,14 +9092,14 @@ else with_colorfgbg=no fi; -echo "$as_me:8962: result: $with_colorfgbg" >&5 +echo "$as_me:9095: 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:8969: checking if you want to use experimental extended colors" >&5 +echo "$as_me:9102: 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. @@ -8976,13 +9109,14 @@ else with_ext_colors=no fi; -echo "$as_me:8979: result: $with_ext_colors" >&5 +echo "$as_me:9112: 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:8984: WARNING: This option applies only to wide-character library" >&5 -echo "$as_me: WARNING: This option applies only to wide-character library" >&2;} + { { echo "$as_me:9117: error: This option applies only to wide-character library" >&5 +echo "$as_me: error: This option applies only to wide-character library" >&2;} + { (exit 1); exit 1; }; } else # cannot be ABI 5 since it changes sizeof(cchar_t) @@ -8991,7 +9125,7 @@ 5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - { echo "$as_me:8994: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5 + { echo "$as_me:9128: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;} ;; esac @@ -9006,7 +9140,7 @@ fi ### use option --enable-ext-mouse to modify coding to support 5-button mice -echo "$as_me:9009: checking if you want to use experimental extended mouse encoding" >&5 +echo "$as_me:9143: 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 # Check whether --enable-ext-mouse or --disable-ext-mouse was given. @@ -9016,7 +9150,7 @@ else with_ext_mouse=no fi; -echo "$as_me:9019: result: $with_ext_mouse" >&5 +echo "$as_me:9153: result: $with_ext_mouse" >&5 echo "${ECHO_T}$with_ext_mouse" >&6 NCURSES_MOUSE_VERSION=1 if test "$with_ext_mouse" = yes ; then @@ -9027,7 +9161,7 @@ 5.*) cf_cv_rel_version=6.0 cf_cv_abi_version=6 - { echo "$as_me:9030: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5 + { echo "$as_me:9164: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;} ;; esac @@ -9035,7 +9169,49 @@ fi -echo "$as_me:9038: checking if you want experimental safe-sprintf code" >&5 +# Reentrant code has to be opaque; there's little advantage to making ncurses +# opaque outside of that, so there is no --enable-opaque option. +echo "$as_me:9174: checking if you want experimental reentrant code" >&5 +echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6 + +# Check whether --enable-reentrant or --disable-reentrant was given. +if test "${enable_reentrant+set}" = set; then + enableval="$enable_reentrant" + with_reentrant=$enableval +else + with_reentrant=no +fi; +echo "$as_me:9184: result: $with_reentrant" >&5 +echo "${ECHO_T}$with_reentrant" >&6 +if test "$with_reentrant" = yes ; then + cf_cv_enable_reentrant=1 + cf_cv_enable_opaque="NCURSES_INTERNALS" + NCURSES_OPAQUE=1 + NCURSES_SIZE_T=int + LIB_SUFFIX="t${LIB_SUFFIX}" + cat >>confdefs.h <<\EOF +#define USE_REENTRANT 1 +EOF + +if test "${with_abi_version+set}" != set; then + case $cf_cv_rel_version in + 5.*) + cf_cv_rel_version=6.0 + cf_cv_abi_version=6 + { echo "$as_me:9201: 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 + +else + cf_cv_enable_reentrant=0 + cf_cv_enable_opaque="NCURSES_OPAQUE" + NCURSES_OPAQUE=0 + NCURSES_SIZE_T=short +fi + +echo "$as_me:9214: 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. @@ -9045,7 +9221,7 @@ else with_safe_sprintf=no fi; -echo "$as_me:9048: result: $with_safe_sprintf" >&5 +echo "$as_me:9224: 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 @@ -9054,7 +9230,7 @@ ### 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:9057: checking if you want to experiment without scrolling-hints code" >&5 +echo "$as_me:9233: 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 --enable-scroll-hints or --disable-scroll-hints was given. @@ -9064,7 +9240,7 @@ else with_scroll_hints=yes fi; -echo "$as_me:9067: result: $with_scroll_hints" >&5 +echo "$as_me:9243: 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 @@ -9072,7 +9248,7 @@ fi -echo "$as_me:9075: checking if you want experimental wgetch-events code" >&5 +echo "$as_me:9251: checking if you want experimental wgetch-events code" >&5 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6 # Check whether --enable-wgetch-events or --disable-wgetch-events was given. @@ -9082,7 +9258,7 @@ else with_wgetch_events=no fi; -echo "$as_me:9085: result: $with_wgetch_events" >&5 +echo "$as_me:9261: result: $with_wgetch_events" >&5 echo "${ECHO_T}$with_wgetch_events" >&6 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF #define NCURSES_WGETCH_EVENTS 1 @@ -9091,7 +9267,7 @@ ############################################################################### ### use option --disable-echo to suppress full display compiling commands -echo "$as_me:9094: checking if you want to display full commands during build" >&5 +echo "$as_me:9270: 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. @@ -9106,12 +9282,13 @@ else ECHO_LINK='@ echo linking $@ ... ;' test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent" + test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent" fi -echo "$as_me:9110: result: $with_echo" >&5 +echo "$as_me:9287: result: $with_echo" >&5 echo "${ECHO_T}$with_echo" >&6 ### use option --enable-warnings to turn on all gcc warnings -echo "$as_me:9114: checking if you want to see compiler warnings" >&5 +echo "$as_me:9291: 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. @@ -9119,10 +9296,10 @@ enableval="$enable_warnings" with_warnings=$enableval fi; -echo "$as_me:9122: result: $with_warnings" >&5 +echo "$as_me:9299: result: $with_warnings" >&5 echo "${ECHO_T}$with_warnings" >&6 -if test -n "$with_warnings"; then +if test "x$with_warnings" = "xyes"; then ADAFLAGS="$ADAFLAGS -gnatg" INTEL_COMPILER=no @@ -9130,12 +9307,12 @@ if test "$GCC" = yes ; then case $host_os in linux*|gnu*) - echo "$as_me:9133: checking if this is really Intel C compiler" >&5 + echo "$as_me:9310: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF -#line 9138 "configure" +#line 9315 "configure" #include "confdefs.h" int @@ -9152,16 +9329,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:9155: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9158: \$? = $ac_status" >&5 + echo "$as_me:9335: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:9161: \"$ac_try\"") >&5 + { (eval echo "$as_me:9338: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9164: \$? = $ac_status" >&5 + echo "$as_me:9341: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc" @@ -9172,14 +9349,14 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:9175: result: $INTEL_COMPILER" >&5 + echo "$as_me:9352: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac fi cat > conftest.$ac_ext <&5 + { echo "$as_me:9377: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" - for cf_opt in \ + for cf_opt in \ wd1419 \ wd1682 \ wd1683 \ @@ -9214,12 +9391,12 @@ wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:9394: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9220: \$? = $ac_status" >&5 + echo "$as_me:9397: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:9222: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:9399: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -9228,7 +9405,7 @@ elif test "$GCC" = yes then - { echo "$as_me:9231: checking for $CC warning options..." >&5 + { echo "$as_me:9408: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" @@ -9245,15 +9422,15 @@ Wpointer-arith \ Wshadow \ Wstrict-prototypes \ - Wundef $cf_warn_CONST + Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:9251: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:9428: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9254: \$? = $ac_status" >&5 + echo "$as_me:9431: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:9256: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:9433: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case $cf_opt in #(vi Wcast-qual) #(vi @@ -9264,6 +9441,8 @@ 3.3*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 +echo "${as_me-configure}:9444: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 + continue;; esac ;; @@ -9282,12 +9461,12 @@ if test "$GCC" = yes ; then case $host_os in linux*|gnu*) - echo "$as_me:9285: checking if this is really Intel C++ compiler" >&5 + echo "$as_me:9464: checking if this is really Intel C++ compiler" >&5 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF -#line 9290 "configure" +#line 9469 "configure" #include "confdefs.h" int @@ -9304,16 +9483,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:9307: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:9486: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9310: \$? = $ac_status" >&5 + echo "$as_me:9489: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:9313: \"$ac_try\"") >&5 + { (eval echo "$as_me:9492: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9316: \$? = $ac_status" >&5 + echo "$as_me:9495: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_CPLUSPLUS=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc" @@ -9324,7 +9503,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$cf_save_CFLAGS" - echo "$as_me:9327: result: $INTEL_CPLUSPLUS" >&5 + echo "$as_me:9506: result: $INTEL_CPLUSPLUS" >&5 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6 ;; esac @@ -9338,7 +9517,7 @@ ac_main_return=return cat > conftest.$ac_ext <&5 + { echo "$as_me:9538: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CXXFLAGS="$CXXFLAGS" EXTRA_CXXFLAGS="-Wall" @@ -9373,12 +9552,12 @@ wd981 do CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt" - if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:9555: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9379: \$? = $ac_status" >&5 + echo "$as_me:9558: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:9381: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:9560: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt" fi @@ -9387,7 +9566,7 @@ elif test "$GXX" = yes then - { echo "$as_me:9390: checking for $CXX warning options..." >&5 + { echo "$as_me:9569: checking for $CXX warning options..." >&5 echo "$as_me: checking for $CXX warning options..." >&6;} cf_save_CXXFLAGS="$CXXFLAGS" EXTRA_CXXFLAGS="-W -Wall" @@ -9416,16 +9595,16 @@ Wundef $cf_gxx_extra_warnings Wno-unused do CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt" - if { (eval echo "$as_me:9419: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:9598: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9422: \$? = $ac_status" >&5 + echo "$as_me:9601: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:9424: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:9603: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt" else - test -n "$verbose" && echo "$as_me:9428: result: ... no -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:9607: result: ... no -$cf_opt" >&5 echo "${ECHO_T}... no -$cf_opt" >&6 fi done @@ -9461,10 +9640,10 @@ EOF if test "$GCC" = yes then - { echo "$as_me:9464: checking for $CC __attribute__ directives..." >&5 + { echo "$as_me:9643: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:9684: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:9508: \$? = $ac_status" >&5 + echo "$as_me:9687: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:9510: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:9689: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h fi @@ -9519,7 +9698,7 @@ fi ### use option --enable-assertions to turn on generation of assertion code -echo "$as_me:9522: checking if you want to enable runtime assertions" >&5 +echo "$as_me:9701: 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. @@ -9529,7 +9708,7 @@ else with_assertions=no fi; -echo "$as_me:9532: result: $with_assertions" >&5 +echo "$as_me:9711: result: $with_assertions" >&5 echo "${ECHO_T}$with_assertions" >&6 if test -n "$GCC" then @@ -9547,7 +9726,7 @@ ### use option --disable-leaks to suppress "permanent" leaks, for testing -echo "$as_me:9550: checking if you want to use dmalloc for testing" >&5 +echo "$as_me:9729: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. @@ -9563,7 +9742,7 @@ else with_dmalloc= fi; -echo "$as_me:9566: result: ${with_dmalloc:-no}" >&5 +echo "$as_me:9745: result: ${with_dmalloc:-no}" >&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case .$with_cflags in #(vi @@ -9647,23 +9826,23 @@ esac if test "$with_dmalloc" = yes ; then - echo "$as_me:9650: checking for dmalloc.h" >&5 + echo "$as_me:9829: 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 9656 "configure" +#line 9835 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:9660: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:9839: \"$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:9666: \$? = $ac_status" >&5 + echo "$as_me:9845: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -9682,11 +9861,11 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:9685: result: $ac_cv_header_dmalloc_h" >&5 +echo "$as_me:9864: 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:9689: checking for dmalloc_debug in -ldmalloc" >&5 +echo "$as_me:9868: 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 @@ -9694,7 +9873,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9697 "configure" +#line 9876 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9713,16 +9892,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9716: \"$ac_link\"") >&5 +if { (eval echo "$as_me:9895: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9719: \$? = $ac_status" >&5 + echo "$as_me:9898: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9722: \"$ac_try\"") >&5 + { (eval echo "$as_me:9901: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9725: \$? = $ac_status" >&5 + echo "$as_me:9904: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else @@ -9733,7 +9912,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9736: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 +echo "$as_me:9915: 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 <&5 +echo "$as_me:9930: checking if you want to use dbmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. @@ -9764,7 +9943,7 @@ else with_dbmalloc= fi; -echo "$as_me:9767: result: ${with_dbmalloc:-no}" >&5 +echo "$as_me:9946: result: ${with_dbmalloc:-no}" >&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case .$with_cflags in #(vi @@ -9848,23 +10027,23 @@ esac if test "$with_dbmalloc" = yes ; then - echo "$as_me:9851: checking for dbmalloc.h" >&5 + echo "$as_me:10030: 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 9857 "configure" +#line 10036 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:9861: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:10040: \"$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:9867: \$? = $ac_status" >&5 + echo "$as_me:10046: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -9883,11 +10062,11 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:9886: result: $ac_cv_header_dbmalloc_h" >&5 +echo "$as_me:10065: 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:9890: checking for debug_malloc in -ldbmalloc" >&5 +echo "$as_me:10069: 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 @@ -9895,7 +10074,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9898 "configure" +#line 10077 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -9914,16 +10093,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9917: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10096: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9920: \$? = $ac_status" >&5 + echo "$as_me:10099: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9923: \"$ac_try\"") >&5 + { (eval echo "$as_me:10102: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9926: \$? = $ac_status" >&5 + echo "$as_me:10105: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else @@ -9934,7 +10113,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9937: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 +echo "$as_me:10116: 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 <&5 +echo "$as_me:10131: checking if you want to use valgrind for testing" >&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. @@ -9965,7 +10144,7 @@ else with_valgrind= fi; -echo "$as_me:9968: result: ${with_valgrind:-no}" >&5 +echo "$as_me:10147: result: ${with_valgrind:-no}" >&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case .$with_cflags in #(vi @@ -10048,7 +10227,7 @@ ;; esac -echo "$as_me:10051: checking if you want to perform memory-leak testing" >&5 +echo "$as_me:10230: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. @@ -10058,7 +10237,7 @@ else : ${with_no_leaks:=no} fi; -echo "$as_me:10061: result: $with_no_leaks" >&5 +echo "$as_me:10240: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$with_no_leaks" = yes ; then @@ -10103,7 +10282,7 @@ ;; esac -echo "$as_me:10106: checking whether to add trace feature to all models" >&5 +echo "$as_me:10285: 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. @@ -10113,7 +10292,7 @@ else cf_with_trace=$cf_all_traces fi; -echo "$as_me:10116: result: $cf_with_trace" >&5 +echo "$as_me:10295: result: $cf_with_trace" >&5 echo "${ECHO_T}$cf_with_trace" >&6 if test "$cf_with_trace" = yes ; then @@ -10194,13 +10373,13 @@ fi ### Checks for libraries. -echo "$as_me:10197: checking for gettimeofday" >&5 +echo "$as_me:10376: 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 10203 "configure" +#line 10382 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gettimeofday (); below. */ @@ -10231,16 +10410,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10234: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10413: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10237: \$? = $ac_status" >&5 + echo "$as_me:10416: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10240: \"$ac_try\"") >&5 + { (eval echo "$as_me:10419: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10243: \$? = $ac_status" >&5 + echo "$as_me:10422: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else @@ -10250,7 +10429,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10253: result: $ac_cv_func_gettimeofday" >&5 +echo "$as_me:10432: 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 @@ -10259,7 +10438,7 @@ else -echo "$as_me:10262: checking for gettimeofday in -lbsd" >&5 +echo "$as_me:10441: 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 @@ -10267,7 +10446,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10270 "configure" +#line 10449 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10286,16 +10465,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10289: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10468: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10292: \$? = $ac_status" >&5 + echo "$as_me:10471: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10295: \"$ac_try\"") >&5 + { (eval echo "$as_me:10474: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10298: \$? = $ac_status" >&5 + echo "$as_me:10477: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else @@ -10306,7 +10485,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10309: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "$as_me:10488: 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 @@ -10318,14 +10497,14 @@ fi -echo "$as_me:10321: checking if -lm needed for math functions" >&5 +echo "$as_me:10500: 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 10328 "configure" +#line 10507 "configure" #include "confdefs.h" #include @@ -10340,16 +10519,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10343: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10522: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10346: \$? = $ac_status" >&5 + echo "$as_me:10525: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10349: \"$ac_try\"") >&5 + { (eval echo "$as_me:10528: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10352: \$? = $ac_status" >&5 + echo "$as_me:10531: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_need_libm=no else @@ -10359,7 +10538,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10362: result: $cf_cv_need_libm" >&5 +echo "$as_me:10541: result: $cf_cv_need_libm" >&5 echo "${ECHO_T}$cf_cv_need_libm" >&6 if test "$cf_cv_need_libm" = yes then @@ -10367,13 +10546,13 @@ fi ### Checks for header files. -echo "$as_me:10370: checking for ANSI C header files" >&5 +echo "$as_me:10549: 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 10376 "configure" +#line 10555 "configure" #include "confdefs.h" #include #include @@ -10381,13 +10560,13 @@ #include _ACEOF -if { (eval echo "$as_me:10384: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:10563: \"$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:10390: \$? = $ac_status" >&5 + echo "$as_me:10569: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -10409,7 +10588,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 10412 "configure" +#line 10591 "configure" #include "confdefs.h" #include @@ -10427,7 +10606,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 10430 "configure" +#line 10609 "configure" #include "confdefs.h" #include @@ -10448,7 +10627,7 @@ : else cat >conftest.$ac_ext <<_ACEOF -#line 10451 "configure" +#line 10630 "configure" #include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) @@ -10474,15 +10653,15 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:10477: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10656: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10480: \$? = $ac_status" >&5 + echo "$as_me:10659: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:10482: \"$ac_try\"") >&5 + { (eval echo "$as_me:10661: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10485: \$? = $ac_status" >&5 + echo "$as_me:10664: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -10495,7 +10674,7 @@ fi fi fi -echo "$as_me:10498: result: $ac_cv_header_stdc" >&5 +echo "$as_me:10677: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then @@ -10508,13 +10687,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:10511: checking for $ac_hdr that defines DIR" >&5 +echo "$as_me:10690: 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 10517 "configure" +#line 10696 "configure" #include "confdefs.h" #include #include <$ac_hdr> @@ -10529,16 +10708,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10711: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10535: \$? = $ac_status" >&5 + echo "$as_me:10714: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:10538: \"$ac_try\"") >&5 + { (eval echo "$as_me:10717: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10541: \$? = $ac_status" >&5 + echo "$as_me:10720: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else @@ -10548,7 +10727,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:10551: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:10730: 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 <&5 + echo "$as_me:10743: 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 @@ -10569,7 +10748,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldir $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10572 "configure" +#line 10751 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10588,16 +10767,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10591: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10770: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10594: \$? = $ac_status" >&5 + echo "$as_me:10773: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10597: \"$ac_try\"") >&5 + { (eval echo "$as_me:10776: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10600: \$? = $ac_status" >&5 + echo "$as_me:10779: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dir_opendir=yes else @@ -10608,14 +10787,14 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10611: result: $ac_cv_lib_dir_opendir" >&5 +echo "$as_me:10790: 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:10618: checking for opendir in -lx" >&5 + echo "$as_me:10797: 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 @@ -10623,7 +10802,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lx $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10626 "configure" +#line 10805 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -10642,16 +10821,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10645: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10824: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10648: \$? = $ac_status" >&5 + echo "$as_me:10827: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10651: \"$ac_try\"") >&5 + { (eval echo "$as_me:10830: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10654: \$? = $ac_status" >&5 + echo "$as_me:10833: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_x_opendir=yes else @@ -10662,7 +10841,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10665: result: $ac_cv_lib_x_opendir" >&5 +echo "$as_me:10844: 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" @@ -10670,13 +10849,13 @@ fi -echo "$as_me:10673: checking whether time.h and sys/time.h may both be included" >&5 +echo "$as_me:10852: 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 10679 "configure" +#line 10858 "configure" #include "confdefs.h" #include #include @@ -10692,16 +10871,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:10695: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:10874: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:10698: \$? = $ac_status" >&5 + echo "$as_me:10877: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:10701: \"$ac_try\"") >&5 + { (eval echo "$as_me:10880: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10704: \$? = $ac_status" >&5 + echo "$as_me:10883: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else @@ -10711,7 +10890,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:10714: result: $ac_cv_header_time" >&5 +echo "$as_me:10893: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then @@ -10721,14 +10900,14 @@ fi -echo "$as_me:10724: checking for regular-expression headers" >&5 +echo "$as_me:10903: 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 10731 "configure" +#line 10910 "configure" #include "confdefs.h" #include #include @@ -10746,16 +10925,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10749: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10928: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10752: \$? = $ac_status" >&5 + echo "$as_me:10931: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10755: \"$ac_try\"") >&5 + { (eval echo "$as_me:10934: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10758: \$? = $ac_status" >&5 + echo "$as_me:10937: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_regex="regex.h" else @@ -10763,7 +10942,7 @@ cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 10766 "configure" +#line 10945 "configure" #include "confdefs.h" #include int @@ -10778,16 +10957,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10781: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10960: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10784: \$? = $ac_status" >&5 + echo "$as_me:10963: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10787: \"$ac_try\"") >&5 + { (eval echo "$as_me:10966: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10790: \$? = $ac_status" >&5 + echo "$as_me:10969: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_regex="regexp.h" else @@ -10797,7 +10976,7 @@ cf_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10800 "configure" +#line 10979 "configure" #include "confdefs.h" #include int @@ -10812,16 +10991,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10815: \"$ac_link\"") >&5 +if { (eval echo "$as_me:10994: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10818: \$? = $ac_status" >&5 + echo "$as_me:10997: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10821: \"$ac_try\"") >&5 + { (eval echo "$as_me:11000: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10824: \$? = $ac_status" >&5 + echo "$as_me:11003: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_regex="regexpr.h" else @@ -10837,7 +11016,7 @@ fi -echo "$as_me:10840: result: $cf_cv_regex" >&5 +echo "$as_me:11019: result: $cf_cv_regex" >&5 echo "${ECHO_T}$cf_cv_regex" >&6 case $cf_cv_regex in regex.h) cat >>confdefs.h <<\EOF @@ -10873,23 +11052,23 @@ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:10876: checking for $ac_header" >&5 +echo "$as_me:11055: 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 10882 "configure" +#line 11061 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:10886: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:11065: \"$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:10892: \$? = $ac_status" >&5 + echo "$as_me:11071: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -10908,7 +11087,7 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:10911: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:11090: 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 < to declare fd_set if test "$ISC" = yes ; then -echo "$as_me:10925: checking for main in -lcposix" >&5 +echo "$as_me:11104: 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 @@ -10930,7 +11109,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10933 "configure" +#line 11112 "configure" #include "confdefs.h" int @@ -10942,16 +11121,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10945: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11124: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10948: \$? = $ac_status" >&5 + echo "$as_me:11127: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10951: \"$ac_try\"") >&5 + { (eval echo "$as_me:11130: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10954: \$? = $ac_status" >&5 + echo "$as_me:11133: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cposix_main=yes else @@ -10962,7 +11141,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10965: result: $ac_cv_lib_cposix_main" >&5 +echo "$as_me:11144: 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 <&5 + echo "$as_me:11155: 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 @@ -10981,7 +11160,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10984 "configure" +#line 11163 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -11000,16 +11179,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11003: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11182: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11006: \$? = $ac_status" >&5 + echo "$as_me:11185: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11009: \"$ac_try\"") >&5 + { (eval echo "$as_me:11188: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11012: \$? = $ac_status" >&5 + echo "$as_me:11191: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet_bzero=yes else @@ -11020,21 +11199,21 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:11023: result: $ac_cv_lib_inet_bzero" >&5 +echo "$as_me:11202: 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:11030: checking if sys/time.h works with sys/select.h" >&5 +echo "$as_me:11209: 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 11037 "configure" +#line 11216 "configure" #include "confdefs.h" #include @@ -11054,16 +11233,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11057: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11236: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11060: \$? = $ac_status" >&5 + echo "$as_me:11239: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11063: \"$ac_try\"") >&5 + { (eval echo "$as_me:11242: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11066: \$? = $ac_status" >&5 + echo "$as_me:11245: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_sys_time_select=yes else @@ -11075,7 +11254,7 @@ fi -echo "$as_me:11078: result: $cf_cv_sys_time_select" >&5 +echo "$as_me:11257: 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 @@ -11089,7 +11268,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return -echo "$as_me:11092: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:11271: 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 @@ -11097,7 +11276,7 @@ ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line 11100 "configure" +#line 11279 "configure" #include "confdefs.h" #include #include @@ -11146,16 +11325,16 @@ do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:11149: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11152: \$? = $ac_status" >&5 + echo "$as_me:11331: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11155: \"$ac_try\"") >&5 + { (eval echo "$as_me:11334: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11158: \$? = $ac_status" >&5 + echo "$as_me:11337: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -11172,21 +11351,21 @@ case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:11175: result: none needed" >&5 + echo "$as_me:11354: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:11178: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:11357: 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:11183: checking for an ANSI C-conforming const" >&5 +echo "$as_me:11362: 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 11189 "configure" +#line 11368 "configure" #include "confdefs.h" int @@ -11244,16 +11423,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11247: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11426: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11250: \$? = $ac_status" >&5 + echo "$as_me:11429: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11253: \"$ac_try\"") >&5 + { (eval echo "$as_me:11432: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11256: \$? = $ac_status" >&5 + echo "$as_me:11435: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else @@ -11263,7 +11442,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:11266: result: $ac_cv_c_const" >&5 +echo "$as_me:11445: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then @@ -11273,7 +11452,7 @@ fi -echo "$as_me:11276: checking for inline" >&5 +echo "$as_me:11455: 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 @@ -11281,7 +11460,7 @@ ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF -#line 11284 "configure" +#line 11463 "configure" #include "confdefs.h" #ifndef __cplusplus static $ac_kw int static_foo () {return 0; } @@ -11290,16 +11469,16 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11293: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11472: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11296: \$? = $ac_status" >&5 + echo "$as_me:11475: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11299: \"$ac_try\"") >&5 + { (eval echo "$as_me:11478: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11302: \$? = $ac_status" >&5 + echo "$as_me:11481: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else @@ -11310,7 +11489,7 @@ done fi -echo "$as_me:11313: result: $ac_cv_c_inline" >&5 +echo "$as_me:11492: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; @@ -11327,16 +11506,197 @@ NCURSES_INLINE= if test "$ac_cv_c_inline" != no ; then - cat >>confdefs.h <<\EOF -#define CC_HAS_INLINE_FUNCS 1 -EOF + NCURSES_INLINE=inline + if test "$INTEL_COMPILER" = yes + then + : + elif test "$GCC" = yes + then + echo "$as_me:11515: checking if gcc supports options to tune inlining" >&5 +echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6 +if test "${cf_cv_gcc_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cf_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS --param max-inline-insns-single=1200" + cat >conftest.$ac_ext <<_ACEOF +#line 11524 "configure" +#include "confdefs.h" +inline int foo(void) { return 1; } +int +main () +{ +${cf_cv_main_return:-return} foo() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11539: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11542: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11545: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cf_cv_gcc_inline=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cf_cv_gcc_inline=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + CFLAGS=$cf_save_CFLAGS + +fi +echo "$as_me:11557: result: $cf_cv_gcc_inline" >&5 +echo "${ECHO_T}$cf_cv_gcc_inline" >&6 + if test "$cf_cv_gcc_inline" = yes ; then + +cf_fix_cppflags=no +cf_new_cflags= +cf_new_cppflags= +cf_new_extra_cppflags= + +for cf_add_cflags in --param max-inline-insns-single=1200 +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 + ;; + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" + ;; + esac + ;; + *) + cf_new_cflags="$cf_new_cflags $cf_add_cflags" + ;; + esac + ;; +yes) + cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" - NCURSES_INLINE=inline + 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 + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + + CPPFLAGS="$cf_new_cppflags $CPPFLAGS" +fi + +if test -n "$cf_new_extra_cppflags" ; then + + EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" +fi + + fi + fi +fi + +echo "$as_me:11633: checking for signal global datatype" >&5 +echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 +if test "${cf_cv_sig_atomic_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + for cf_type in \ + "volatile sig_atomic_t" \ + "sig_atomic_t" \ + "int" + do + cat >conftest.$ac_ext <<_ACEOF +#line 11645 "configure" +#include "confdefs.h" + +#include +#include +#include + +extern $cf_type x; +$cf_type x; +static void handler(int sig) +{ + x = 5; +} +int +main () +{ +signal(SIGINT, handler); + x = 1 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11668: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11671: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11674: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11677: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cf_cv_sig_atomic_t=$cf_type +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cf_cv_sig_atomic_t=no fi +rm -f conftest.$ac_objext conftest.$ac_ext + test "$cf_cv_sig_atomic_t" != no && break + done + +fi + +echo "$as_me:11691: result: $cf_cv_sig_atomic_t" >&5 +echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 +test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <&5 +echo "$as_me:11699: 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 @@ -11346,7 +11706,7 @@ cf_cv_typeof_chtype=long else cat >conftest.$ac_ext <<_ACEOF -#line 11349 "configure" +#line 11709 "configure" #include "confdefs.h" #define WANT_BITS 31 @@ -11381,15 +11741,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:11384: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11744: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11387: \$? = $ac_status" >&5 + echo "$as_me:11747: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:11389: \"$ac_try\"") >&5 + { (eval echo "$as_me:11749: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11392: \$? = $ac_status" >&5 + echo "$as_me:11752: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_typeof_chtype=`cat cf_test.out` else @@ -11404,7 +11764,7 @@ fi -echo "$as_me:11407: result: $cf_cv_typeof_chtype" >&5 +echo "$as_me:11767: result: $cf_cv_typeof_chtype" >&5 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6 cat >>confdefs.h <&5 +echo "$as_me:11779: 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 11425 "configure" +#line 11786 "configure" #include "confdefs.h" int @@ -11434,16 +11795,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11437: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11798: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11440: \$? = $ac_status" >&5 + echo "$as_me:11801: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11443: \"$ac_try\"") >&5 + { (eval echo "$as_me:11804: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11446: \$? = $ac_status" >&5 + echo "$as_me:11807: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_unsigned_literals=yes else @@ -11455,29 +11816,30 @@ fi -echo "$as_me:11458: result: $cf_cv_unsigned_literals" >&5 +echo "$as_me:11819: result: $cf_cv_unsigned_literals" >&5 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6 cf_cv_1UL="1" -test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U" -test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L" +test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U" +test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L" if test $NCURSES_MMASK_T = auto ; then cf_cv_typeof_mmask_t=long else cf_cv_typeof_mmask_t=$NCURSES_MMASK_T fi +test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t="" ### Checks for external-data -echo "$as_me:11473: checking if external errno is declared" >&5 +echo "$as_me:11835: 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 11480 "configure" +#line 11842 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -11495,16 +11857,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11498: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11501: \$? = $ac_status" >&5 + echo "$as_me:11863: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11504: \"$ac_try\"") >&5 + { (eval echo "$as_me:11866: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11507: \$? = $ac_status" >&5 + echo "$as_me:11869: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_dcl_errno=yes else @@ -11515,7 +11877,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:11518: result: $cf_cv_dcl_errno" >&5 +echo "$as_me:11880: result: $cf_cv_dcl_errno" >&5 echo "${ECHO_T}$cf_cv_dcl_errno" >&6 if test "$cf_cv_dcl_errno" = no ; then @@ -11530,14 +11892,14 @@ # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:11533: checking if external errno exists" >&5 +echo "$as_me:11895: 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 11540 "configure" +#line 11902 "configure" #include "confdefs.h" #undef errno @@ -11552,16 +11914,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11555: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11917: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11558: \$? = $ac_status" >&5 + echo "$as_me:11920: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11561: \"$ac_try\"") >&5 + { (eval echo "$as_me:11923: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11564: \$? = $ac_status" >&5 + echo "$as_me:11926: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_errno=yes else @@ -11572,7 +11934,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11575: result: $cf_cv_have_errno" >&5 +echo "$as_me:11937: result: $cf_cv_have_errno" >&5 echo "${ECHO_T}$cf_cv_have_errno" >&6 if test "$cf_cv_have_errno" = yes ; then @@ -11585,7 +11947,7 @@ fi -echo "$as_me:11588: checking if data-only library module links" >&5 +echo "$as_me:11950: 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 @@ -11593,20 +11955,20 @@ rm -f conftest.a cat >conftest.$ac_ext <&5 + if { (eval echo "$as_me:11961: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11602: \$? = $ac_status" >&5 + echo "$as_me:11964: \$? = $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 <&5 + if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11625: \$? = $ac_status" >&5 + echo "$as_me:11987: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.o func.o && \ ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null @@ -11635,7 +11997,7 @@ cf_cv_link_dataonly=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 11638 "configure" +#line 12000 "configure" #include "confdefs.h" int main() @@ -11646,15 +12008,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:11649: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12011: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11652: \$? = $ac_status" >&5 + echo "$as_me:12014: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:11654: \"$ac_try\"") >&5 + { (eval echo "$as_me:12016: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11657: \$? = $ac_status" >&5 + echo "$as_me:12019: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_link_dataonly=yes else @@ -11669,7 +12031,7 @@ fi -echo "$as_me:11672: result: $cf_cv_link_dataonly" >&5 +echo "$as_me:12034: result: $cf_cv_link_dataonly" >&5 echo "${ECHO_T}$cf_cv_link_dataonly" >&6 if test "$cf_cv_link_dataonly" = no ; then @@ -11704,13 +12066,13 @@ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:11707: checking for $ac_func" >&5 +echo "$as_me:12069: 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 11713 "configure" +#line 12075 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -11741,16 +12103,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11744: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12106: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11747: \$? = $ac_status" >&5 + echo "$as_me:12109: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11750: \"$ac_try\"") >&5 + { (eval echo "$as_me:12112: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11753: \$? = $ac_status" >&5 + echo "$as_me:12115: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -11760,7 +12122,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11763: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:12125: 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 <&5 +echo "$as_me:12137: 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 11782 "configure" +#line 12144 "configure" #include "confdefs.h" #include @@ -11799,16 +12161,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11802: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12164: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11805: \$? = $ac_status" >&5 + echo "$as_me:12167: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11808: \"$ac_try\"") >&5 + { (eval echo "$as_me:12170: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11811: \$? = $ac_status" >&5 + echo "$as_me:12173: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cgetent=yes else @@ -11820,7 +12182,7 @@ fi -echo "$as_me:11823: result: $cf_cv_cgetent" >&5 +echo "$as_me:12185: 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 @@ -11828,14 +12190,14 @@ fi -echo "$as_me:11831: checking for isascii" >&5 +echo "$as_me:12193: 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 11838 "configure" +#line 12200 "configure" #include "confdefs.h" #include int @@ -11847,16 +12209,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11850: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12212: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11853: \$? = $ac_status" >&5 + echo "$as_me:12215: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11856: \"$ac_try\"") >&5 + { (eval echo "$as_me:12218: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11859: \$? = $ac_status" >&5 + echo "$as_me:12221: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_isascii=yes else @@ -11867,17 +12229,17 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11870: result: $cf_cv_have_isascii" >&5 +echo "$as_me:12232: 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:11877: checking whether sigaction needs _POSIX_SOURCE" >&5 +echo "$as_me:12239: 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 11880 "configure" +#line 12242 "configure" #include "confdefs.h" #include @@ -11891,16 +12253,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11894: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12256: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11897: \$? = $ac_status" >&5 + echo "$as_me:12259: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11900: \"$ac_try\"") >&5 + { (eval echo "$as_me:12262: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11903: \$? = $ac_status" >&5 + echo "$as_me:12265: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sigact_bad=no else @@ -11908,7 +12270,7 @@ cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 11911 "configure" +#line 12273 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -11923,16 +12285,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12288: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11929: \$? = $ac_status" >&5 + echo "$as_me:12291: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11932: \"$ac_try\"") >&5 + { (eval echo "$as_me:12294: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11935: \$? = $ac_status" >&5 + echo "$as_me:12297: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sigact_bad=yes cat >>confdefs.h <<\EOF @@ -11947,11 +12309,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:11950: result: $sigact_bad" >&5 +echo "$as_me:12312: result: $sigact_bad" >&5 echo "${ECHO_T}$sigact_bad" >&6 fi -echo "$as_me:11954: checking if nanosleep really works" >&5 +echo "$as_me:12316: checking if nanosleep really works" >&5 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6 if test "${cf_cv_func_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11961,7 +12323,7 @@ cf_cv_func_nanosleep=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 11964 "configure" +#line 12326 "configure" #include "confdefs.h" #include @@ -11986,15 +12348,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:11989: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12351: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11992: \$? = $ac_status" >&5 + echo "$as_me:12354: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:11994: \"$ac_try\"") >&5 + { (eval echo "$as_me:12356: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11997: \$? = $ac_status" >&5 + echo "$as_me:12359: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_nanosleep=yes else @@ -12006,7 +12368,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:12009: result: $cf_cv_func_nanosleep" >&5 +echo "$as_me:12371: result: $cf_cv_func_nanosleep" >&5 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF @@ -12020,23 +12382,23 @@ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:12023: checking for $ac_header" >&5 +echo "$as_me:12385: 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 12029 "configure" +#line 12391 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:12033: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:12395: \"$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:12039: \$? = $ac_status" >&5 + echo "$as_me:12401: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -12055,7 +12417,7 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:12058: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:12420: 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 <&5 +echo "$as_me:12435: 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 12079 "configure" +#line 12441 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:12083: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:12445: \"$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:12089: \$? = $ac_status" >&5 + echo "$as_me:12451: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -12105,7 +12467,7 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:12108: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:12470: 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 <&5 + echo "$as_me:12488: 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 12129 "configure" +#line 12491 "configure" #include "confdefs.h" #include int @@ -12138,16 +12500,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12141: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12503: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12144: \$? = $ac_status" >&5 + echo "$as_me:12506: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12147: \"$ac_try\"") >&5 + { (eval echo "$as_me:12509: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12150: \$? = $ac_status" >&5 + echo "$as_me:12512: \$? = $ac_status" >&5 (exit $ac_status); }; }; then termios_bad=no else @@ -12155,7 +12517,7 @@ cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12158 "configure" +#line 12520 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -12169,16 +12531,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12172: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12534: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12175: \$? = $ac_status" >&5 + echo "$as_me:12537: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12178: \"$ac_try\"") >&5 + { (eval echo "$as_me:12540: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12181: \$? = $ac_status" >&5 + echo "$as_me:12543: \$? = $ac_status" >&5 (exit $ac_status); }; }; then termios_bad=unknown else @@ -12193,19 +12555,19 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext - echo "$as_me:12196: result: $termios_bad" >&5 + echo "$as_me:12558: result: $termios_bad" >&5 echo "${ECHO_T}$termios_bad" >&6 fi fi -echo "$as_me:12201: checking for tcgetattr" >&5 +echo "$as_me:12563: 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 12208 "configure" +#line 12570 "configure" #include "confdefs.h" #include @@ -12233,16 +12595,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12236: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12598: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12239: \$? = $ac_status" >&5 + echo "$as_me:12601: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12242: \"$ac_try\"") >&5 + { (eval echo "$as_me:12604: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12245: \$? = $ac_status" >&5 + echo "$as_me:12607: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_tcgetattr=yes else @@ -12252,20 +12614,20 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12255: result: $cf_cv_have_tcgetattr" >&5 +echo "$as_me:12617: 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:12261: checking for vsscanf function or workaround" >&5 +echo "$as_me:12623: 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 12268 "configure" +#line 12630 "configure" #include "confdefs.h" #include @@ -12281,16 +12643,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12284: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12646: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12287: \$? = $ac_status" >&5 + echo "$as_me:12649: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12290: \"$ac_try\"") >&5 + { (eval echo "$as_me:12652: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12293: \$? = $ac_status" >&5 + echo "$as_me:12655: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_vsscanf=vsscanf else @@ -12298,7 +12660,7 @@ cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12301 "configure" +#line 12663 "configure" #include "confdefs.h" #include @@ -12320,16 +12682,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12323: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12685: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12326: \$? = $ac_status" >&5 + echo "$as_me:12688: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12329: \"$ac_try\"") >&5 + { (eval echo "$as_me:12691: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12332: \$? = $ac_status" >&5 + echo "$as_me:12694: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_vsscanf=vfscanf else @@ -12337,7 +12699,7 @@ cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12340 "configure" +#line 12702 "configure" #include "confdefs.h" #include @@ -12359,16 +12721,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12362: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12724: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12365: \$? = $ac_status" >&5 + echo "$as_me:12727: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12368: \"$ac_try\"") >&5 + { (eval echo "$as_me:12730: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12371: \$? = $ac_status" >&5 + echo "$as_me:12733: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_vsscanf=_doscan else @@ -12383,7 +12745,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12386: result: $cf_cv_func_vsscanf" >&5 +echo "$as_me:12748: result: $cf_cv_func_vsscanf" >&5 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6 case $cf_cv_func_vsscanf in #(vi @@ -12401,7 +12763,7 @@ ;; esac -echo "$as_me:12404: checking for working mkstemp" >&5 +echo "$as_me:12766: 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 @@ -12409,13 +12771,13 @@ rm -f conftest* if test "$cross_compiling" = yes; then - echo "$as_me:12412: checking for mkstemp" >&5 + echo "$as_me:12774: 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 12418 "configure" +#line 12780 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp (); below. */ @@ -12446,16 +12808,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12449: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12811: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12452: \$? = $ac_status" >&5 + echo "$as_me:12814: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12455: \"$ac_try\"") >&5 + { (eval echo "$as_me:12817: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12458: \$? = $ac_status" >&5 + echo "$as_me:12820: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mkstemp=yes else @@ -12465,12 +12827,12 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12468: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:12830: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12473 "configure" +#line 12835 "configure" #include "confdefs.h" #include @@ -12508,15 +12870,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:12511: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12873: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12514: \$? = $ac_status" >&5 + echo "$as_me:12876: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:12516: \"$ac_try\"") >&5 + { (eval echo "$as_me:12878: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12519: \$? = $ac_status" >&5 + echo "$as_me:12881: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_mkstemp=yes @@ -12531,7 +12893,7 @@ fi fi -echo "$as_me:12534: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:12896: 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 @@ -12549,21 +12911,21 @@ fi if test "$cross_compiling" = yes ; then - { echo "$as_me:12552: WARNING: cross compiling: assume setvbuf params not reversed" >&5 + { echo "$as_me:12914: 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:12555: checking whether setvbuf arguments are reversed" >&5 + echo "$as_me:12917: 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:12561: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:12923: 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 12566 "configure" +#line 12928 "configure" #include "confdefs.h" #include /* If setvbuf has the reversed format, exit 0. */ @@ -12580,15 +12942,15 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:12583: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12945: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12586: \$? = $ac_status" >&5 + echo "$as_me:12948: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:12588: \"$ac_try\"") >&5 + { (eval echo "$as_me:12950: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12591: \$? = $ac_status" >&5 + echo "$as_me:12953: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_setvbuf_reversed=yes else @@ -12601,7 +12963,7 @@ fi rm -f core core.* *.core fi -echo "$as_me:12604: result: $ac_cv_func_setvbuf_reversed" >&5 +echo "$as_me:12966: 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 @@ -12612,13 +12974,13 @@ fi fi -echo "$as_me:12615: checking return type of signal handlers" >&5 +echo "$as_me:12977: 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 12621 "configure" +#line 12983 "configure" #include "confdefs.h" #include #include @@ -12640,16 +13002,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12643: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13005: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12646: \$? = $ac_status" >&5 + echo "$as_me:13008: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12649: \"$ac_try\"") >&5 + { (eval echo "$as_me:13011: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12652: \$? = $ac_status" >&5 + echo "$as_me:13014: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else @@ -12659,21 +13021,21 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:12662: result: $ac_cv_type_signal" >&5 +echo "$as_me:13024: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <&5 +echo "$as_me:13031: 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 12676 "configure" +#line 13038 "configure" #include "confdefs.h" #include @@ -12686,16 +13048,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12689: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13051: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12692: \$? = $ac_status" >&5 + echo "$as_me:13054: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12695: \"$ac_try\"") >&5 + { (eval echo "$as_me:13057: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12698: \$? = $ac_status" >&5 + echo "$as_me:13060: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_sigaction=yes else @@ -12706,13 +13068,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:12709: result: $cf_cv_type_sigaction" >&5 +echo "$as_me:13071: 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:12715: checking declaration of size-change" >&5 +echo "$as_me:13077: 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 @@ -12727,7 +13089,7 @@ CPPFLAGS="$cf_save_CPPFLAGS" test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts" cat >conftest.$ac_ext <<_ACEOF -#line 12730 "configure" +#line 13092 "configure" #include "confdefs.h" #include #ifdef HAVE_TERMIOS_H @@ -12771,16 +13133,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13136: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12777: \$? = $ac_status" >&5 + echo "$as_me:13139: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12780: \"$ac_try\"") >&5 + { (eval echo "$as_me:13142: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12783: \$? = $ac_status" >&5 + echo "$as_me:13145: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_sizechange=yes else @@ -12799,7 +13161,7 @@ done fi -echo "$as_me:12802: result: $cf_cv_sizechange" >&5 +echo "$as_me:13164: result: $cf_cv_sizechange" >&5 echo "${ECHO_T}$cf_cv_sizechange" >&6 if test "$cf_cv_sizechange" != no ; then cat >>confdefs.h <<\EOF @@ -12816,13 +13178,13 @@ esac fi -echo "$as_me:12819: checking for memmove" >&5 +echo "$as_me:13181: 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 12825 "configure" +#line 13187 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char memmove (); below. */ @@ -12853,16 +13215,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12856: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13218: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12859: \$? = $ac_status" >&5 + echo "$as_me:13221: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12862: \"$ac_try\"") >&5 + { (eval echo "$as_me:13224: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12865: \$? = $ac_status" >&5 + echo "$as_me:13227: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memmove=yes else @@ -12872,19 +13234,19 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12875: result: $ac_cv_func_memmove" >&5 +echo "$as_me:13237: 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:12881: checking for bcopy" >&5 +echo "$as_me:13243: 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 12887 "configure" +#line 13249 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bcopy (); below. */ @@ -12915,16 +13277,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12918: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13280: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12921: \$? = $ac_status" >&5 + echo "$as_me:13283: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12924: \"$ac_try\"") >&5 + { (eval echo "$as_me:13286: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12927: \$? = $ac_status" >&5 + echo "$as_me:13289: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_bcopy=yes else @@ -12934,11 +13296,11 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12937: result: $ac_cv_func_bcopy" >&5 +echo "$as_me:13299: 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:12941: checking if bcopy does overlapping moves" >&5 + echo "$as_me:13303: 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 @@ -12948,7 +13310,7 @@ cf_cv_good_bcopy=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 12951 "configure" +#line 13313 "configure" #include "confdefs.h" int main() { @@ -12962,15 +13324,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:12965: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13327: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12968: \$? = $ac_status" >&5 + echo "$as_me:13330: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:12970: \"$ac_try\"") >&5 + { (eval echo "$as_me:13332: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12973: \$? = $ac_status" >&5 + echo "$as_me:13335: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_good_bcopy=yes else @@ -12983,7 +13345,7 @@ fi fi -echo "$as_me:12986: result: $cf_cv_good_bcopy" >&5 +echo "$as_me:13348: result: $cf_cv_good_bcopy" >&5 echo "${ECHO_T}$cf_cv_good_bcopy" >&6 else @@ -13004,7 +13366,7 @@ fi -echo "$as_me:13007: checking if poll really works" >&5 +echo "$as_me:13369: 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 @@ -13014,7 +13376,7 @@ cf_cv_working_poll=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 13017 "configure" +#line 13379 "configure" #include "confdefs.h" #include @@ -13035,15 +13397,15 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:13038: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13400: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13041: \$? = $ac_status" >&5 + echo "$as_me:13403: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:13043: \"$ac_try\"") >&5 + { (eval echo "$as_me:13405: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13046: \$? = $ac_status" >&5 + echo "$as_me:13408: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_working_poll=yes else @@ -13055,7 +13417,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:13058: result: $cf_cv_working_poll" >&5 +echo "$as_me:13420: 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 @@ -13066,23 +13428,132 @@ #define USE_HASHED_DB 1 EOF -echo "$as_me:13069: checking for db.h" >&5 +case $with_hashed_db in #(vi +yes|*able*) #(vi + ;; +*) + if test -d "$with_hashed_db" ; then + +if test -n "$with_hashed_db/include" ; then + for cf_add_incdir in $with_hashed_db/include + do + while test $cf_add_incdir != /usr/include + do + if test -d $cf_add_incdir + then + cf_have_incdir=no + if test -n "$CFLAGS$CPPFLAGS" ; then + # a loop is needed to ensure we can add subdirs of existing dirs + for cf_test_incdir in $CFLAGS $CPPFLAGS ; do + if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then + cf_have_incdir=yes; break + fi + done + fi + + if test "$cf_have_incdir" = no ; then + if test "$cf_add_incdir" = /usr/local/include ; then + if test "$GCC" = yes + then + cf_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + cat >conftest.$ac_ext <<_ACEOF +#line 13461 "configure" +#include "confdefs.h" +#include +int +main () +{ +printf("Hello") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:13473: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:13476: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:13479: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13482: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cf_have_incdir=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext + CPPFLAGS=$cf_save_CPPFLAGS + fi + fi + fi + + if test "$cf_have_incdir" = no ; then + echo "$as_me:13497: result: adding $cf_add_incdir to include-path" >&5 +echo "${ECHO_T}adding $cf_add_incdir to include-path" >&6 + CPPFLAGS="-I$cf_add_incdir $CPPFLAGS" + + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + else + break + fi + fi + done + done +fi + +if test -n "$with_hashed_db/lib" ; then + for cf_add_libdir in $with_hashed_db/lib + do + if test $cf_add_libdir = /usr/lib ; then + : + elif test -d $cf_add_libdir + then + cf_have_libdir=no + if test -n "$LDFLAGS$LIBS" ; then + # a loop is needed to ensure we can add subdirs of existing dirs + for cf_test_libdir in $LDFLAGS $LIBS ; do + if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then + cf_have_libdir=yes; break + fi + done + fi + if test "$cf_have_libdir" = no ; then + echo "$as_me:13529: result: adding $cf_add_libdir to library-path" >&5 +echo "${ECHO_T}adding $cf_add_libdir to library-path" >&6 + LDFLAGS="-L$cf_add_libdir $LDFLAGS" + fi + fi + done +fi + + fi +esac + +echo "$as_me:13540: checking for db.h" >&5 echo $ECHO_N "checking for db.h... $ECHO_C" >&6 if test "${ac_cv_header_db_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 13075 "configure" +#line 13546 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13079: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13550: \"$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:13085: \$? = $ac_status" >&5 + echo "$as_me:13556: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -13101,11 +13572,11 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:13104: result: $ac_cv_header_db_h" >&5 +echo "$as_me:13575: result: $ac_cv_header_db_h" >&5 echo "${ECHO_T}$ac_cv_header_db_h" >&6 if test $ac_cv_header_db_h = yes; then -echo "$as_me:13108: checking for version of db" >&5 +echo "$as_me:13579: checking for version of db" >&5 echo $ECHO_N "checking for version of db... $ECHO_C" >&6 if test "${cf_cv_hashed_db_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13113,13 +13584,13 @@ cf_cv_hashed_db_version=unknown -for cf_db_version in 1 2 3 4 +for cf_db_version in 1 2 3 4 5 do -echo "(line 13119) testing checking for db version $cf_db_version ..." 1>&5 +echo "${as_me-configure}:13590: testing checking for db version $cf_db_version ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 13122 "configure" +#line 13593 "configure" #include "confdefs.h" $ac_includes_default @@ -13149,16 +13620,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13152: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13623: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13155: \$? = $ac_status" >&5 + echo "$as_me:13626: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13158: \"$ac_try\"") >&5 + { (eval echo "$as_me:13629: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13161: \$? = $ac_status" >&5 + echo "$as_me:13632: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_hashed_db_version=$cf_db_version @@ -13172,33 +13643,33 @@ done fi -echo "$as_me:13175: result: $cf_cv_hashed_db_version" >&5 +echo "$as_me:13646: result: $cf_cv_hashed_db_version" >&5 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6 if test "$cf_cv_hashed_db_version" = unknown ; then - { { echo "$as_me:13179: error: Cannot determine version of db" >&5 + { { echo "$as_me:13650: error: Cannot determine version of db" >&5 echo "$as_me: error: Cannot determine version of db" >&2;} { (exit 1); exit 1; }; } else -echo "$as_me:13184: checking for db libraries" >&5 +echo "$as_me:13655: checking for db libraries" >&5 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6 if test "${cf_cv_hashed_db_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_hashed_db_libs=unknown -for cf_db_libs in db$cf_cv_hashed_db_version db '' +for cf_db_libs in db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db '' do cf_save_libs="$LIBS" if test -n "$cf_db_libs"; then LIBS="-l$cf_db_libs $LIBS" fi -echo "(line 13198) testing checking for library "$cf_db_libs" ..." 1>&5 +echo "${as_me-configure}:13669: testing checking for library "$cf_db_libs" ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 13201 "configure" +#line 13672 "configure" #include "confdefs.h" $ac_includes_default @@ -13253,16 +13724,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13256: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13727: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13259: \$? = $ac_status" >&5 + echo "$as_me:13730: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13262: \"$ac_try\"") >&5 + { (eval echo "$as_me:13733: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13265: \$? = $ac_status" >&5 + echo "$as_me:13736: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if test -n "$cf_db_libs" ; then @@ -13282,11 +13753,11 @@ done fi -echo "$as_me:13285: result: $cf_cv_hashed_db_libs" >&5 +echo "$as_me:13756: result: $cf_cv_hashed_db_libs" >&5 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6 if test "$cf_cv_hashed_db_libs" = unknown ; then - { { echo "$as_me:13289: error: Cannot determine library for db" >&5 + { { echo "$as_me:13760: error: Cannot determine library for db" >&5 echo "$as_me: error: Cannot determine library for db" >&2;} { (exit 1); exit 1; }; } elif test "$cf_cv_hashed_db_libs" != default ; then @@ -13296,7 +13767,7 @@ else - { { echo "$as_me:13299: error: Cannot find db.h" >&5 + { { echo "$as_me:13770: error: Cannot find db.h" >&5 echo "$as_me: error: Cannot find db.h" >&2;} { (exit 1); exit 1; }; } @@ -13311,7 +13782,7 @@ # Just in case, check if the C compiler has a bool type. -echo "$as_me:13314: checking if we should include stdbool.h" >&5 +echo "$as_me:13785: 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 @@ -13319,7 +13790,7 @@ else cat >conftest.$ac_ext <<_ACEOF -#line 13322 "configure" +#line 13793 "configure" #include "confdefs.h" int @@ -13331,23 +13802,23 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13334: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13805: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13337: \$? = $ac_status" >&5 + echo "$as_me:13808: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13340: \"$ac_try\"") >&5 + { (eval echo "$as_me:13811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13343: \$? = $ac_status" >&5 + echo "$as_me:13814: \$? = $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 13350 "configure" +#line 13821 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -13363,16 +13834,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13837: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13369: \$? = $ac_status" >&5 + echo "$as_me:13840: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13372: \"$ac_try\"") >&5 + { (eval echo "$as_me:13843: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13375: \$? = $ac_status" >&5 + echo "$as_me:13846: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=1 else @@ -13386,13 +13857,13 @@ fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:13389: result: yes" >&5 +then echo "$as_me:13860: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:13391: result: no" >&5 +else echo "$as_me:13862: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:13395: checking for builtin bool type" >&5 +echo "$as_me:13866: 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 @@ -13400,7 +13871,7 @@ else cat >conftest.$ac_ext <<_ACEOF -#line 13403 "configure" +#line 13874 "configure" #include "confdefs.h" #include @@ -13415,16 +13886,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13418: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13421: \$? = $ac_status" >&5 + echo "$as_me:13892: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13424: \"$ac_try\"") >&5 + { (eval echo "$as_me:13895: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13427: \$? = $ac_status" >&5 + echo "$as_me:13898: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cc_bool_type=1 else @@ -13437,9 +13908,9 @@ fi if test "$cf_cv_cc_bool_type" = 1 -then echo "$as_me:13440: result: yes" >&5 +then echo "$as_me:13911: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:13442: result: no" >&5 +else echo "$as_me:13913: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -13461,7 +13932,7 @@ cf_stdcpp_libname=stdc++ ;; esac -echo "$as_me:13464: checking for library $cf_stdcpp_libname" >&5 +echo "$as_me:13935: 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 @@ -13470,7 +13941,7 @@ cf_save="$LIBS" LIBS="$LIBS -l$cf_stdcpp_libname" cat >conftest.$ac_ext <<_ACEOF -#line 13473 "configure" +#line 13944 "configure" #include "confdefs.h" #include @@ -13486,16 +13957,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13489: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13960: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13492: \$? = $ac_status" >&5 + echo "$as_me:13963: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13495: \"$ac_try\"") >&5 + { (eval echo "$as_me:13966: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13498: \$? = $ac_status" >&5 + echo "$as_me:13969: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_libstdcpp=yes else @@ -13507,12 +13978,12 @@ LIBS="$cf_save" fi -echo "$as_me:13510: result: $cf_cv_libstdcpp" >&5 +echo "$as_me:13981: 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:13515: checking whether $CXX understands -c and -o together" >&5 + echo "$as_me:13986: 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 @@ -13528,15 +13999,15 @@ # 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:13531: \"$ac_try\"") >&5 +if { (eval echo "$as_me:14002: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13534: \$? = $ac_status" >&5 + echo "$as_me:14005: \$? = $ac_status" >&5 (exit $ac_status); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:13536: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:14007: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13539: \$? = $ac_status" >&5 + echo "$as_me:14010: \$? = $ac_status" >&5 (exit $ac_status); }; then eval cf_cv_prog_CXX_c_o=yes @@ -13547,10 +14018,10 @@ fi if test $cf_cv_prog_CXX_c_o = yes; then - echo "$as_me:13550: result: yes" >&5 + echo "$as_me:14021: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:13553: result: no" >&5 + echo "$as_me:14024: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -13570,12 +14041,12 @@ ;; esac if test "$GXX" = yes; then - echo "$as_me:13573: checking for lib$cf_gpp_libname" >&5 + echo "$as_me:14044: 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 13578 "configure" +#line 14049 "configure" #include "confdefs.h" #include <$cf_gpp_libname/builtin.h> @@ -13589,16 +14060,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13592: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14063: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13595: \$? = $ac_status" >&5 + echo "$as_me:14066: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13598: \"$ac_try\"") >&5 + { (eval echo "$as_me:14069: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13601: \$? = $ac_status" >&5 + echo "$as_me:14072: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" @@ -13617,7 +14088,7 @@ echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 13620 "configure" +#line 14091 "configure" #include "confdefs.h" #include @@ -13631,16 +14102,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13634: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14105: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13637: \$? = $ac_status" >&5 + echo "$as_me:14108: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13640: \"$ac_try\"") >&5 + { (eval echo "$as_me:14111: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13643: \$? = $ac_status" >&5 + echo "$as_me:14114: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" @@ -13657,7 +14128,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save" - echo "$as_me:13660: result: $cf_cxx_library" >&5 + echo "$as_me:14131: result: $cf_cxx_library" >&5 echo "${ECHO_T}$cf_cxx_library" >&6 fi @@ -13673,7 +14144,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return -echo "$as_me:13676: checking how to run the C++ preprocessor" >&5 +echo "$as_me:14147: 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 @@ -13690,18 +14161,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 13693 "configure" +#line 14164 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:13698: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14169: \"$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:13704: \$? = $ac_status" >&5 + echo "$as_me:14175: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13724,17 +14195,17 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 13727 "configure" +#line 14198 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13731: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14202: \"$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:13737: \$? = $ac_status" >&5 + echo "$as_me:14208: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13771,7 +14242,7 @@ else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:13774: result: $CXXCPP" >&5 +echo "$as_me:14245: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes @@ -13781,18 +14252,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 13784 "configure" +#line 14255 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:13789: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14260: \"$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:13795: \$? = $ac_status" >&5 + echo "$as_me:14266: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13815,17 +14286,17 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 13818 "configure" +#line 14289 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13822: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14293: \"$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:13828: \$? = $ac_status" >&5 + echo "$as_me:14299: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13853,7 +14324,7 @@ if $ac_preproc_ok; then : else - { { echo "$as_me:13856: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 + { { echo "$as_me:14327: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -13865,26 +14336,26 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return -for ac_header in typeinfo +for ac_header in iostream typeinfo do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:13871: checking for $ac_header" >&5 +echo "$as_me:14342: 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 13877 "configure" +#line 14348 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:13881: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14352: \"$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:13887: \$? = $ac_status" >&5 + echo "$as_me:14358: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13903,7 +14374,7 @@ fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:13906: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:14377: 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 <&5 +echo "$as_me:14387: 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 @@ -13921,7 +14392,7 @@ else cat >conftest.$ac_ext <<_ACEOF -#line 13924 "configure" +#line 14395 "configure" #include "confdefs.h" int @@ -13933,23 +14404,23 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13936: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14407: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13939: \$? = $ac_status" >&5 + echo "$as_me:14410: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13942: \"$ac_try\"") >&5 + { (eval echo "$as_me:14413: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13945: \$? = $ac_status" >&5 + echo "$as_me:14416: \$? = $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 13952 "configure" +#line 14423 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -13965,16 +14436,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14439: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13971: \$? = $ac_status" >&5 + echo "$as_me:14442: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13974: \"$ac_try\"") >&5 + { (eval echo "$as_me:14445: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13977: \$? = $ac_status" >&5 + echo "$as_me:14448: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=1 else @@ -13988,13 +14459,13 @@ fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:13991: result: yes" >&5 +then echo "$as_me:14462: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:13993: result: no" >&5 +else echo "$as_me:14464: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:13997: checking for builtin bool type" >&5 +echo "$as_me:14468: 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 @@ -14002,7 +14473,7 @@ else cat >conftest.$ac_ext <<_ACEOF -#line 14005 "configure" +#line 14476 "configure" #include "confdefs.h" #include @@ -14017,16 +14488,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14020: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14491: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14023: \$? = $ac_status" >&5 + echo "$as_me:14494: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14026: \"$ac_try\"") >&5 + { (eval echo "$as_me:14497: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14029: \$? = $ac_status" >&5 + echo "$as_me:14500: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_builtin_bool=1 else @@ -14039,13 +14510,13 @@ fi if test "$cf_cv_builtin_bool" = 1 -then echo "$as_me:14042: result: yes" >&5 +then echo "$as_me:14513: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14044: result: no" >&5 +else echo "$as_me:14515: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:14048: checking for size of bool" >&5 +echo "$as_me:14519: 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 @@ -14056,7 +14527,7 @@ cf_cv_type_of_bool=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14059 "configure" +#line 14530 "configure" #include "confdefs.h" #include @@ -14098,15 +14569,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14101: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14572: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14104: \$? = $ac_status" >&5 + echo "$as_me:14575: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14106: \"$ac_try\"") >&5 + { (eval echo "$as_me:14577: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14109: \$? = $ac_status" >&5 + echo "$as_me:14580: \$? = $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 @@ -14124,18 +14595,18 @@ fi rm -f cf_test.out -echo "$as_me:14127: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:14598: 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:14133: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:14604: 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:14138: checking for special defines needed for etip.h" >&5 +echo "$as_me:14609: 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" @@ -14147,7 +14618,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 14150 "configure" +#line 14621 "configure" #include "confdefs.h" #include @@ -14161,16 +14632,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14635: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14167: \$? = $ac_status" >&5 + echo "$as_me:14638: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14170: \"$ac_try\"") >&5 + { (eval echo "$as_me:14641: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14173: \$? = $ac_status" >&5 + echo "$as_me:14644: \$? = $ac_status" >&5 (exit $ac_status); }; }; then test -n "$cf_math" && cat >>confdefs.h <&5 +echo "$as_me:14665: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 CXXFLAGS="$cf_save_CXXFLAGS" if test -n "$CXX"; then -echo "$as_me:14199: checking if $CXX accepts parameter initialization" >&5 +echo "$as_me:14670: 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 @@ -14213,7 +14684,7 @@ cf_cv_cpp_param_init=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14216 "configure" +#line 14687 "configure" #include "confdefs.h" class TEST { @@ -14232,15 +14703,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14235: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14706: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14238: \$? = $ac_status" >&5 + echo "$as_me:14709: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14240: \"$ac_try\"") >&5 + { (eval echo "$as_me:14711: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14243: \$? = $ac_status" >&5 + echo "$as_me:14714: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cpp_param_init=yes else @@ -14259,7 +14730,7 @@ ac_main_return=return fi -echo "$as_me:14262: result: $cf_cv_cpp_param_init" >&5 +echo "$as_me:14733: 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 @@ -14268,7 +14739,7 @@ if test -n "$CXX"; then -echo "$as_me:14271: checking if $CXX accepts static_cast" >&5 +echo "$as_me:14742: checking if $CXX accepts static_cast" >&5 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6 if test "${cf_cv_cpp_static_cast+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14282,7 +14753,7 @@ ac_main_return=return cat >conftest.$ac_ext <<_ACEOF -#line 14285 "configure" +#line 14756 "configure" #include "confdefs.h" class NCursesPanel @@ -14326,16 +14797,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14800: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14332: \$? = $ac_status" >&5 + echo "$as_me:14803: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14335: \"$ac_try\"") >&5 + { (eval echo "$as_me:14806: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14338: \$? = $ac_status" >&5 + echo "$as_me:14809: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cpp_static_cast=yes else @@ -14353,7 +14824,7 @@ ac_main_return=return fi -echo "$as_me:14356: result: $cf_cv_cpp_static_cast" >&5 +echo "$as_me:14827: result: $cf_cv_cpp_static_cast" >&5 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6 fi @@ -14362,189 +14833,6 @@ #define CPP_HAS_STATIC_CAST 1 EOF -if test -n "$CXX"; 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 -ac_main_return=return - -for ac_header in strstream.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:14377: 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 14383 "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:14387: \"$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:14393: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:14412: 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 <&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 -else - - for cf_vscan_func in strstream strstream_cast stdio - do - case $cf_vscan_func in #(vi - stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi - strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;; - strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;; - esac - cat >conftest.$ac_ext <<_ACEOF -#line 14436 "configure" -#include "confdefs.h" - -#include -#include -#define $cf_vscan_defs 1 -#if defined(USE_STDIO_VSCAN) -#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN) -#include -#endif - -int scanw(const char* fmt, ...) -{ - int result = -1; - char buf[BUFSIZ]; - - va_list args; - va_start(args, fmt); -#if defined(USE_STDIO_VSCAN) - if (::vsscanf(buf, fmt, args) != -1) - result = 0; -#elif defined(USE_STRSTREAM_VSCAN) - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, args) != -1) - result = 0; -#elif defined(USE_STRSTREAM_VSCAN_CAST) - strstreambuf ss(buf, sizeof(buf)); - if (ss.vscan(fmt, (_IO_va_list)args) != -1) - result = 0; -#else -#error case $cf_vscan_func failed -#endif - va_end(args); - return result; -} - -int -main () -{ -int tmp, foo = scanw("%d", &tmp) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:14481: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:14484: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:14487: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:14490: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_cpp_vscan_func=$cf_vscan_func; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -cf_cv_cpp_vscan_func=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - test "$cf_cv_cpp_vscan_func" != no && break - done - -fi -echo "$as_me:14503: result: $cf_cv_cpp_vscan_func" >&5 -echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6 - -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 -ac_main_return=return - -fi - -case $cf_cv_cpp_vscan_func in #(vi -stdio) #(vi - cat >>confdefs.h <<\EOF -#define CPP_HAS_VSCAN_FUNC 1 -EOF - - cat >>confdefs.h <<\EOF -#define USE_STDIO_VSCAN 1 -EOF - - ;; -strstream) - cat >>confdefs.h <<\EOF -#define CPP_HAS_VSCAN_FUNC 1 -EOF - - cat >>confdefs.h <<\EOF -#define USE_STRSTREAM_VSCAN 1 -EOF - - ;; -strstream_cast) - cat >>confdefs.h <<\EOF -#define CPP_HAS_VSCAN_FUNC 1 -EOF - - cat >>confdefs.h <<\EOF -#define USE_STRSTREAM_VSCAN_CAST 1 -EOF - - ;; -esac - CXX_AR='$(AR)' CXX_AR_OPTS='$(AR_OPTS)' case $cf_cv_system_name in #(vi @@ -14584,7 +14872,7 @@ else if test "$cf_cv_header_stdbool_h" = 1 ; then -echo "$as_me:14587: checking for size of bool" >&5 +echo "$as_me:14875: 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 @@ -14595,7 +14883,7 @@ cf_cv_type_of_bool=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14598 "configure" +#line 14886 "configure" #include "confdefs.h" #include @@ -14637,15 +14925,15 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14640: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14928: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14643: \$? = $ac_status" >&5 + echo "$as_me:14931: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14645: \"$ac_try\"") >&5 + { (eval echo "$as_me:14933: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14648: \$? = $ac_status" >&5 + echo "$as_me:14936: \$? = $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 @@ -14663,25 +14951,25 @@ fi rm -f cf_test.out -echo "$as_me:14666: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:14954: 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:14672: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:14960: 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:14678: checking for fallback type of bool" >&5 + echo "$as_me:14966: 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:14684: result: $cf_cv_type_of_bool" >&5 + echo "$as_me:14972: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 fi fi @@ -14707,11 +14995,20 @@ fi if test -f "${srcdir}/Ada95/Makefile.in" ; then + +if test "$cf_with_ada" != "no" ; then + if test "$with_libtool" != "no"; then + { echo "$as_me:15001: WARNING: libtool does not support Ada - disabling feature" >&5 +echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;} + cf_with_ada=no + fi +fi + if test "$cf_with_ada" != "no" ; then 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:14714: checking for $ac_word" >&5 +echo "$as_me:15011: 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 @@ -14726,7 +15023,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_gnat_exists="yes" -echo "$as_me:14729: found $ac_dir/$ac_word" >&5 +echo "$as_me:15026: found $ac_dir/$ac_word" >&5 break done @@ -14735,10 +15032,10 @@ fi gnat_exists=$ac_cv_prog_gnat_exists if test -n "$gnat_exists"; then - echo "$as_me:14738: result: $gnat_exists" >&5 + echo "$as_me:15035: result: $gnat_exists" >&5 echo "${ECHO_T}$gnat_exists" >&6 else - echo "$as_me:14741: result: no" >&5 + echo "$as_me:15038: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -14746,11 +15043,11 @@ cf_ada_make= else -echo "$as_me:14749: checking for gnat version" >&5 +echo "$as_me:15046: 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:14753: result: $cf_gnat_version" >&5 +echo "$as_me:15050: result: $cf_gnat_version" >&5 echo "${ECHO_T}$cf_gnat_version" >&6 case $cf_gnat_version in @@ -14773,7 +15070,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:14776: checking for $ac_word" >&5 +echo "$as_me:15073: 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 @@ -14788,7 +15085,7 @@ test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_M4_exists="yes" -echo "$as_me:14791: found $ac_dir/$ac_word" >&5 +echo "$as_me:15088: found $ac_dir/$ac_word" >&5 break done @@ -14797,10 +15094,10 @@ fi M4_exists=$ac_cv_prog_M4_exists if test -n "$M4_exists"; then - echo "$as_me:14800: result: $M4_exists" >&5 + echo "$as_me:15097: result: $M4_exists" >&5 echo "${ECHO_T}$M4_exists" >&6 else - echo "$as_me:14803: result: no" >&5 + echo "$as_me:15100: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -14809,7 +15106,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:14812: checking if GNAT works" >&5 + echo "$as_me:15109: checking if GNAT works" >&5 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 rm -f conftest* @@ -14837,14 +15134,14 @@ fi rm -f conftest* - echo "$as_me:14840: result: $cf_cv_prog_gnat_correct" >&5 + echo "$as_me:15137: 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:14847: checking if GNAT pragma Unreferenced works" >&5 + echo "$as_me:15144: checking if GNAT pragma Unreferenced works" >&5 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6 rm -f conftest* @@ -14871,7 +15168,7 @@ fi rm -f conftest* - echo "$as_me:14874: result: $cf_cv_pragma_unreferenced" >&5 + echo "$as_me:15171: 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). @@ -14897,7 +15194,8 @@ else withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}" -fi; +fi; if test -n "$prefix/lib/ada/adainclude" ; then + if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else @@ -14923,12 +15221,13 @@ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:14926: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:15224: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; esac +fi ADA_INCLUDE="$withval" # Check whether --with-ada-objects or --without-ada-objects was given. @@ -14937,7 +15236,8 @@ else withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}" -fi; +fi; if test -n "$prefix/lib/ada/adalib" ; then + if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else @@ -14963,34 +15263,57 @@ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:14966: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:15266: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; esac +fi ADA_OBJECTS="$withval" fi fi +else + cf_with_ada=no fi -### 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:14980: checking for library subsets" >&5 +### Construct the ncurses library-subsets, if any, from this set of keywords: +### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar +### +### ticlib modules may be a separate library, otherwise contained in termlib. +### termlib modules may be a separate library, otherwise contained in ncurses. +### +### The of "+" or " " between the tokens controls the way the script +### chooses to split module lists into libraries. +### +### (see CF_LIB_RULES). +echo "$as_me:15291: checking for library subsets" >&5 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6 +LIB_SUBSETS= + +if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then + LIB_SUBSETS="${LIB_SUBSETS}ticlib" + if test "$with_ticlib" != no ; then + LIB_SUBSETS="${LIB_SUBSETS} " + else + LIB_SUBSETS="${LIB_SUBSETS}+" + fi +fi + +LIB_SUBSETS="${LIB_SUBSETS}termlib" +test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo" if test "$with_termlib" != no ; then - LIB_SUBSETS="termlib" - test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo" LIB_SUBSETS="${LIB_SUBSETS} " else - LIB_SUBSETS="termlib+" - test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+" + LIB_SUBSETS="${LIB_SUBSETS}+" fi + 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:14993: result: $LIB_SUBSETS" >&5 + +echo "$as_me:15316: result: $LIB_SUBSETS" >&5 echo "${ECHO_T}$LIB_SUBSETS" >&6 ### Construct the list of include-directories to be generated @@ -15028,7 +15351,7 @@ fi ### Build up pieces for makefile rules -echo "$as_me:15031: checking default library suffix" >&5 +echo "$as_me:15354: checking default library suffix" >&5 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15039,10 +15362,10 @@ shared) DFT_ARG_SUFFIX='' ;; esac test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" -echo "$as_me:15042: result: $DFT_ARG_SUFFIX" >&5 +echo "$as_me:15365: result: $DFT_ARG_SUFFIX" >&5 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 -echo "$as_me:15045: checking default library-dependency suffix" >&5 +echo "$as_me:15368: checking default library-dependency suffix" >&5 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15064,17 +15387,19 @@ esac esac test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}" +DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX if test $DFT_LWR_MODEL = shared ; then case $cf_cv_system_name in #(vi cygwin*) DFT_DEP_SUFFIX=".dll.a" + DFT_LIB_SUFFIX=".dll" ;; esac fi -echo "$as_me:15074: result: $DFT_DEP_SUFFIX" >&5 +echo "$as_me:15399: result: $DFT_DEP_SUFFIX" >&5 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 -echo "$as_me:15077: checking default object directory" >&5 +echo "$as_me:15402: checking default object directory" >&5 echo $ECHO_N "checking default object directory... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15090,12 +15415,12 @@ DFT_OBJ_SUBDIR='obj_s' ;; esac esac -echo "$as_me:15093: result: $DFT_OBJ_SUBDIR" >&5 +echo "$as_me:15418: 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:15098: checking c++ library-dependency suffix" >&5 +echo "$as_me:15423: 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 @@ -15121,21 +15446,60 @@ esac test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}" fi -echo "$as_me:15124: result: $CXX_LIB_SUFFIX" >&5 +echo "$as_me:15449: result: $CXX_LIB_SUFFIX" >&5 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6 fi +# do not want -ldl in build except as needed for -lncurses dependency +if test "$with_dlsym" = yes ; then +if test $DFT_LWR_MODEL = shared || \ + test $DFT_LWR_MODEL = libtool ; then + +# remove dl library from $LIBS +LIBS=`echo "$LIBS" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'` + +fi +fi ### Set up low-level terminfo dependencies for makefiles. -TINFO_LIST="$SHLIB_LIST" + +# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but +# do not need libdl +TICS_LIST= +if test "$with_dlsym" = yes ; then + +# remove dl library from $SHLIB_LIST +TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'` + +fi + +if test "$with_ticlib" != no ; then + + if test "$with_ticlib" != yes ; then + TICS_NAME=$with_ticlib + TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" + TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" + TICS_LIB_SUFFIX="${with_ticlib}" + else + TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}" + TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}" + TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}" + fi + TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}" +else + TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}" +fi + if test "$with_termlib" != no ; then if test "$with_termlib" != yes ; then TINFO_NAME=$with_termlib + TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" 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_SUFFIX=${DFT_LIB_SUFFIX} TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}" TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}" TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}" @@ -15150,22 +15514,81 @@ else TEST_ARGS="-l${TINFO_ARG_SUFFIX}" TEST_ARG2="-l${TINFO_ARG_SUFFIX}" + TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}" TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS" SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}" fi else + # the next lines are needed for linking libtic over libncurses + TINFO_NAME=${LIB_NAME} + TINFO_SUFFIX=${DFT_LIB_SUFFIX} + TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX} + TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}" + TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}" fi +if test "$DFT_LWR_MODEL" = shared ; then + case $cf_cv_system_name in #(vi + cygwin*) + # "lib" files have ".dll.a" suffix, "cyg" files have ".dll" + TINFO_SUFFIX=.dll + ;; + esac +fi + +if test "$with_dlsym" = yes ; then + +# remove dl library from $TICS_LIST +TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'` + +fi + # needed for Ada95 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'` -echo "$as_me:15163: checking where we will install curses.h" >&5 +case $DFT_LWR_MODEL in +normal|debug|profile) + +if test "$GCC" = yes ; then + LDFLAGS_STATIC=-static + LDFLAGS_SHARED=-dynamic +else + case $cf_cv_system_name in #( + aix[45]*) #( from ld manpage + LDFLAGS_STATIC=-bstatic + LDFLAGS_SHARED=-bdynamic + ;; + hpux*) #( from ld manpage for hpux10.20, hpux11.11 + # We could also use just "archive" and "shared". + LDFLAGS_STATIC=-Wl,-a,archive_shared + LDFLAGS_SHARED=-Wl,-a,shared_archive + ;; + irix*) #( from ld manpage IRIX64 + LDFLAGS_STATIC=-Bstatic + LDFLAGS_SHARED=-Bdynamic + ;; + osf[45]*) #( from ld manpage osf4.0d, osf5.1 + # alternative "-oldstyle_liblookup" (not in cc manpage) + LDFLAGS_STATIC=-noso + LDFLAGS_SHARED=-so_archive + ;; + solaris2*) + LDFLAGS_STATIC=-Bstatic + LDFLAGS_SHARED=-Bdynamic + ;; + esac +fi + + ;; +esac + +echo "$as_me:15586: 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:15168: result: $includedir" >&5 +echo "$as_me:15591: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -15173,11 +15596,14 @@ if test "$with_overwrite" != no ; then if test "$NCURSES_LIBUTF8" = 1 ; then NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' - { echo "$as_me:15176: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:15599: 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 +# used to separate tack out of the tree +NCURSES_TREE= + ### predefined stuff for the test programs cat >>confdefs.h <<\EOF #define HAVE_SLK_COLOR 1 @@ -15186,7 +15612,7 @@ ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:15189: checking for src modules" >&5 +echo "$as_me:15615: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -15249,7 +15675,7 @@ fi fi done -echo "$as_me:15252: result: $cf_cv_src_modules" >&5 +echo "$as_me:15678: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -15284,6 +15710,10 @@ fi +if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then + SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config" +fi + DIRS_TO_MAKE="lib" for cf_item in $cf_list_models do @@ -15391,6 +15821,79 @@ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi +### If we're building with rpath, try to link non-standard libs that way too. +if test "$DFT_LWR_MODEL" = "shared"; then + +echo "$as_me:15827: checking for updated LDFLAGS" >&5 +echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6 +if test -n "$LDFLAGS" ; then +echo "$as_me:15830: result: maybe" >&5 +echo "${ECHO_T}maybe" >&6 +test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6 + +echo "${as_me-configure}:15834: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 + +test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 + +echo "${as_me-configure}:15838: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 + +case "$EXTRA_LDFLAGS" in #(vi +-Wl,-rpath,*) #(vi + cf_rpath_hack="-Wl,-rpath," + ;; +-R\ *) + cf_rpath_hack="-R " + ;; +-R*) + cf_rpath_hack="-R" + ;; +*) + cf_rpath_hack= + ;; +esac +if test -n "$cf_rpath_hack" ; then + cf_rpath_dst= + for cf_rpath_src in $LDFLAGS + do + test -n "$verbose" && echo " Filtering $cf_rpath_src" 1>&6 + +echo "${as_me-configure}:15860: testing Filtering $cf_rpath_src ..." 1>&5 + + case $cf_rpath_src in #(vi + -L*) #(vi + if test "$cf_rpath_hack" = "-R " ; then + cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'` + else + cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%` + fi + test -n "$verbose" && echo " ...Filter $cf_rpath_tmp" 1>&6 + +echo "${as_me-configure}:15871: testing ...Filter $cf_rpath_tmp ..." 1>&5 + + EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" + ;; + *) + cf_rpath_dst="$cf_rpath_dst $cf_rpath_src" + ;; + esac + done + LDFLAGS=$cf_rpath_dst + test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6 + +echo "${as_me-configure}:15883: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 + + test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 + +echo "${as_me-configure}:15887: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 + +fi +else +echo "$as_me:15891: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi + ### Define substitutions for header files to avoid name-pollution if test "$cf_cv_have_tcgetattr" = yes ; then @@ -15495,7 +15998,7 @@ : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:15498: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:16001: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -15671,7 +16174,7 @@ echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:15674: error: ambiguous option: $1 + { { echo "$as_me:16177: 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;} @@ -15690,7 +16193,7 @@ ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:15693: error: unrecognized option: $1 + -*) { { echo "$as_me:16196: 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;} @@ -15747,13 +16250,19 @@ TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" TINFO_NAME="$TINFO_NAME" +TINFO_SUFFIX="$TINFO_SUFFIX" +TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX" +TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX" +TICS_NAME="$TICS_NAME" WITH_CURSES_H="$with_curses_h" WITH_ECHO="$with_echo" WITH_OVERWRITE="$with_overwrite" cf_LIST_MODELS="$cf_list_models" cf_cv_abi_version="$cf_cv_abi_version" +cf_cv_do_relink="$cf_cv_do_relink" cf_cv_do_symlinks="$cf_cv_do_symlinks" cf_cv_enable_lp64="$cf_cv_enable_lp64" +cf_cv_enable_opaque="$cf_cv_enable_opaque" 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" @@ -15780,7 +16289,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:15783: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:16292: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -15928,6 +16437,7 @@ s,@cf_list_models@,$cf_list_models,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t +s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t s,@LIB_CREATE@,$LIB_CREATE,;t t s,@LIB_OBJECT@,$LIB_OBJECT,;t t s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t @@ -15939,6 +16449,7 @@ s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t +s,@TICS_NAME@,$TICS_NAME,;t t s,@TINFO_NAME@,$TINFO_NAME,;t t s,@LIB_NAME@,$LIB_NAME,;t t s,@LIB_PREFIX@,$LIB_PREFIX,;t t @@ -15961,6 +16472,7 @@ s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t s,@TERMINFO@,$TERMINFO,;t t s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t +s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t s,@TERMPATH@,$TERMPATH,;t t s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t @@ -15983,6 +16495,10 @@ 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,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t +s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t +s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t +s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t s,@ECHO_LINK@,$ECHO_LINK,;t t s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t @@ -16015,14 +16531,22 @@ 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,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t +s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t +s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t +s,@TICS_ARGS@,$TICS_ARGS,;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,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t +s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t +s,@TICS_LIST@,$TICS_LIST,;t t s,@TINFO_LIST@,$TINFO_LIST,;t t s,@SHLIB_LIST@,$SHLIB_LIST,;t t +s,@NCURSES_TREE@,$NCURSES_TREE,;t t s,@TEST_ARGS@,$TEST_ARGS,;t t s,@TEST_DEPS@,$TEST_DEPS,;t t s,@TEST_ARG2@,$TEST_ARG2,;t t @@ -16146,7 +16670,7 @@ esac if test x"$ac_file" != x-; then - { echo "$as_me:16149: creating $ac_file" >&5 + { echo "$as_me:16673: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -16164,7 +16688,7 @@ -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:16167: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16691: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16177,7 +16701,7 @@ echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16180: error: cannot find input file: $f" >&5 + { { echo "$as_me:16704: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16243,7 +16767,7 @@ * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:16246: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:16770: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -16254,7 +16778,7 @@ -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:16257: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16781: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16267,7 +16791,7 @@ echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16270: error: cannot find input file: $f" >&5 + { { echo "$as_me:16794: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16325,7 +16849,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:16328: $ac_file is unchanged" >&5 + { echo "$as_me:16852: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -16400,7 +16924,6 @@ continue elif test -f $srcdir/$cf_dir/modules; then - IMPORT_LIB= SHARED_LIB= LIBS_TO_MAKE= for cf_item in $cf_LIST_MODELS @@ -16467,9 +16990,7 @@ # use autodetected ${cf_prefix} for import lib and static lib, but # use 'cyg' prefix for shared lib. if test $cf_cv_shlib_version = cygdll ; then - SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll" - IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a" - LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}" + LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll" continue fi fi @@ -16478,17 +16999,34 @@ if test $cf_dir = ncurses ; then 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}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g` - LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE" - fi + cf_r_parts="$cf_subsets" + + while test -n "$cf_r_parts" + do + cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'` + cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'` + if test "$cf_l_parts" != "$cf_r_parts" ; then + case $cf_l_parts in #(vi + *termlib*) #(vi + cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g` + ;; + *ticlib*) + cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g` + ;; + *) + break + ;; + esac + LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE" + else + break + fi + done else cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'` fi sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \ - -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \ -e "s%@SHARED_LIB@%$SHARED_LIB%" \ $cf_dir/Makefile >$cf_dir/Makefile.out mv $cf_dir/Makefile.out $cf_dir/Makefile @@ -16546,13 +17084,20 @@ case $cf_subset in *base*) ;; - termlib*) + *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 - ;; + ;; + ticlib*) + cf_libname=$TICS_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 @@ -16593,8 +17138,11 @@ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ + TermlibRoot=$TINFO_NAME \ + TermlibSuffix=$TINFO_SUFFIX \ ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ + ReLink=${cf_cv_do_relink-no} \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ @@ -16681,8 +17229,8 @@ cat >> Makefile <>$cf_dir/Makefile <>$cf_dir/Makefile - j=$i - done - - echo " $j" >>$cf_dir/Makefile - - for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` - do - echo " @ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile - test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h && \${LN_S} curses.h ncurses.h)" >>$cf_dir/Makefile - done - - cat >>$cf_dir/Makefile <>$cf_dir/Makefile - test $i = curses.h && echo " -@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile - done + $AWK -f $srcdir/mk-hdr.awk \ + subset="$LIB_SUBSETS" \ + compat="$WITH_CURSES_H" \ + $srcdir/$cf_dir/headers >>$cf_dir/Makefile fi if test -f $srcdir/$cf_dir/modules; then diff -Naur ncurses-5.6.orig/configure.in ncurses-5.6/configure.in --- ncurses-5.6.orig/configure.in 2006-12-16 20:26:06.000000000 -0500 +++ ncurses-5.6/configure.in 2007-12-21 00:02:35.000000000 -0500 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2006,2007 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.383 2006/12/17 01:26:06 tom Exp $ +dnl $Id: configure.in,v 1.429 2007/11/24 22:42:43 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.383 $) +AC_REVISION($Revision: 1.429 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -150,13 +150,28 @@ CF_PROG_LINT AC_PROG_LN_S +AC_SYS_LONG_FILE_NAMES + +AC_MSG_CHECKING(if we should assume mixed-case filenames) +AC_ARG_ENABLE(mixed-case, + [ --enable-mixed-case tic should assume mixed-case filenames], + [enable_mixedcase=$enableval], + [enable_mixedcase=auto]) +AC_MSG_RESULT($enable_mixedcase) +if test "$enable_mixedcase" = "auto" ; then + CF_MIXEDCASE_FILENAMES +else + cf_cv_mixedcase=$enable_mixedcase + if test "$enable_mixedcase" = "yes" ; then + AC_DEFINE(MIXEDCASE_FILENAMES) + fi +fi + +# do this after mixed-case option (tags/TAGS is not as important as tic). AC_PROG_MAKE_SET CF_MAKE_TAGS CF_MAKEFLAGS -AC_SYS_LONG_FILE_NAMES -CF_MIXEDCASE_FILENAMES - dnl These are standard among *NIX systems, but not when cross-compiling AC_CHECK_TOOL(RANLIB, ranlib, ':') AC_CHECK_TOOL(LD, ld, ld) @@ -255,6 +270,9 @@ AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal") AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL") +TICS_NAME=tic +AC_SUBST(TICS_NAME) + TINFO_NAME=tinfo AC_SUBST(TINFO_NAME) @@ -280,6 +298,13 @@ [with_termlib=no]) AC_MSG_RESULT($with_termlib) +AC_MSG_CHECKING(if you want to build a separate tic library) +AC_ARG_WITH(ticlib, + [ --with-ticlib generate separate tic library], + [with_ticlib=$withval], + [with_ticlib=no]) +AC_MSG_RESULT($with_ticlib) + ### Checks for special libraries, must be done up-front. SHLIB_LIST="" CF_WITH_GPM @@ -304,9 +329,7 @@ SHLIB_LIST="-lgpm $SHLIB_LIST" fi AC_DEFINE(HAVE_LIBGPM) - AC_CHECK_LIB(gpm,Gpm_Wgetch,[ - AC_MSG_WARN(GPM library is already linked with curses - read the FAQ) - ]) + CF_CHECK_GPM_WGETCH fi CF_WITH_SYSMOUSE @@ -336,12 +359,22 @@ AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg) AC_MSG_RESULT($LD_MODEL) +case $DFT_LWR_MODEL in +shared) AC_MSG_CHECKING(if rpath option should be used) AC_ARG_ENABLE(rpath, [ --enable-rpath use rpath option when generating shared libraries], [cf_cv_ld_rpath=$enableval], [cf_cv_ld_rpath=no]) AC_MSG_RESULT($cf_cv_ld_rpath) +AC_MSG_CHECKING(if shared libraries should be relinked during install) +AC_ARG_ENABLE(relink, +[ --disable-relink relink shared libraries during install], +[cf_cv_do_relink=$enableval], +[cf_cv_do_relink=yes]) +AC_MSG_RESULT($cf_cv_do_relink) + ;; +esac CF_SHARED_OPTS if test "$CC_SHARED_OPTS" = "unknown"; then @@ -470,6 +503,19 @@ AC_MSG_RESULT($with_big_core) test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE) +### ISO C only guarantees 512-char strings, we have tables which load faster +### when constructed using "big" strings. +AC_MSG_CHECKING(if big-strings option selected) +AC_ARG_ENABLE(big-strings, + [ --disable-big-strings assume compiler has only standard-size strings], + [with_big_strings=no], + [with_big_strings=yes]) +AC_MSG_RESULT($with_big_strings) + +USE_BIG_STRINGS=0 +test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1 +AC_SUBST(USE_BIG_STRINGS) + ### use option --enable-termcap to compile in the termcap fallback support AC_MSG_CHECKING(if you want termcap-fallback support) AC_ARG_ENABLE(termcap, @@ -487,6 +533,10 @@ AC_DEFINE(PURE_TERMINFO) else +if test "$with_ticlib" != no ; then + AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined) +fi + AC_DEFINE(USE_TERMCAP) AC_MSG_CHECKING(for list of termcap files) CF_WITH_PATHLIST(termpath, @@ -683,7 +733,7 @@ CF_LARGEFILE -### use option --disable-tparm-varargs to make tparm() conform to X/Open +### use option --disable-tparm-varargs to make tparm() conform to X/Open AC_MSG_CHECKING(if you want tparm not to use X/Open fixed-parameter list) AC_ARG_ENABLE(tparm-varargs, [ --disable-tparm-varargs compile tparm() without varargs interface], @@ -802,7 +852,7 @@ fi AC_MSG_CHECKING(if you want to use signed Boolean array in term.h) AC_ARG_ENABLE(signed-char, - [ --enable-signed-char compile with SIGWINCH handler], + [ --enable-signed-char compile using signed Boolean's in term.h], [with_signed_char=$enableval], [with_signed_char=no]) AC_MSG_RESULT($with_signed_char) @@ -895,7 +945,7 @@ 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) + AC_MSG_ERROR(This option applies only to wide-character library) else # cannot be ABI 5 since it changes sizeof(cchar_t) CF_NCURSES_ABI_6 @@ -919,6 +969,33 @@ fi AC_SUBST(NCURSES_MOUSE_VERSION) +# Reentrant code has to be opaque; there's little advantage to making ncurses +# opaque outside of that, so there is no --enable-opaque option. +AC_MSG_CHECKING(if you want experimental reentrant code) +AC_ARG_ENABLE(reentrant, + [ --enable-reentrant compile with experimental reentrant code], + [with_reentrant=$enableval], + [with_reentrant=no]) +AC_MSG_RESULT($with_reentrant) +if test "$with_reentrant" = yes ; then + cf_cv_enable_reentrant=1 + cf_cv_enable_opaque="NCURSES_INTERNALS" + NCURSES_OPAQUE=1 + NCURSES_SIZE_T=int + LIB_SUFFIX="t${LIB_SUFFIX}" + AC_DEFINE(USE_REENTRANT) + CF_NCURSES_ABI_6 +else + cf_cv_enable_reentrant=0 + cf_cv_enable_opaque="NCURSES_OPAQUE" + NCURSES_OPAQUE=0 + NCURSES_SIZE_T=short +fi +AC_SUBST(cf_cv_enable_reentrant) +AC_SUBST(cf_cv_enable_opaque) +AC_SUBST(NCURSES_OPAQUE) +AC_SUBST(NCURSES_SIZE_T) + AC_MSG_CHECKING(if you want experimental safe-sprintf code) AC_ARG_ENABLE(safe-sprintf, [ --enable-safe-sprintf compile with experimental safe-sprintf code], @@ -961,6 +1038,7 @@ else ECHO_LINK='@ echo linking $@ ... ;' test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent" + test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent" fi AC_MSG_RESULT($with_echo) AC_SUBST(ECHO_LINK) @@ -972,9 +1050,9 @@ [with_warnings=$enableval]) AC_MSG_RESULT($with_warnings) -if test -n "$with_warnings"; then +if test "x$with_warnings" = "xyes"; then ADAFLAGS="$ADAFLAGS -gnatg" - CF_GCC_WARNINGS + CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum) if test "$cf_with_cxx" = yes ; then CF_GXX_WARNINGS(Wno-unused) fi @@ -1088,26 +1166,21 @@ ### checks for compiler characteristics AC_LANG_C AC_C_CONST -AC_C_INLINE - -NCURSES_INLINE= -if test "$ac_cv_c_inline" != no ; then - AC_DEFINE(CC_HAS_INLINE_FUNCS) - NCURSES_INLINE=inline -fi -AC_SUBST(NCURSES_INLINE) +CF_C_INLINE(NCURSES_INLINE,1200) +CF_SIG_ATOMIC_T if test $NCURSES_CHTYPE = auto ; then CF_TYPEOF_CHTYPE else cf_cv_typeof_chtype=$NCURSES_CHTYPE fi +test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype="" AC_SUBST(cf_cv_typeof_chtype) CF_UNSIGNED_LITERALS cf_cv_1UL="1" -test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U" -test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L" +test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U" +test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L" AC_SUBST(cf_cv_1UL) if test $NCURSES_MMASK_T = auto ; then @@ -1115,6 +1188,7 @@ else cf_cv_typeof_mmask_t=$NCURSES_MMASK_T fi +test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t="" AC_SUBST(cf_cv_typeof_mmask_t) ### Checks for external-data @@ -1170,7 +1244,7 @@ if test "$with_hashed_db" != no ; then AC_DEFINE(USE_HASHED_DB) - CF_HASHED_DB + CF_HASHED_DB($with_hashed_db) fi dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS @@ -1200,14 +1274,13 @@ ;; esac - AC_CHECK_HEADERS(typeinfo) + AC_CHECK_HEADERS(iostream typeinfo) CF_BOOL_DECL CF_BOOL_SIZE CF_ETIP_DEFINES CF_CPP_PARAM_INIT CF_CPP_STATIC_CAST - CF_CPP_VSCAN_FUNC CXX_AR='$(AR)' CXX_AR_OPTS='$(AR_OPTS)' @@ -1284,9 +1357,22 @@ CF_HELP_MESSAGE(Ada95 Binding Options:) +dnl If the Ada95 source-tree is present, add that to the build unless it will +dnl not work, or was not requested. +if test -f "${srcdir}/Ada95/Makefile.in" ; then + +dnl libtool does not know anything about GNAT, though a change made in 1998 +dnl provided for it "someday". Disable the ada subtree if we are using +dnl libtool -TD 20070714 +if test "$cf_with_ada" != "no" ; then + if test "$with_libtool" != "no"; then + AC_MSG_WARN(libtool does not support Ada - disabling feature) + cf_with_ada=no + fi +fi + dnl Check for availability of GNU Ada Translator (GNAT). dnl At the moment we support no other Ada95 compiler. -if test -f "${srcdir}/Ada95/Makefile.in" ; then if test "$cf_with_ada" != "no" ; then cf_ada_make=gnatmake AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no) @@ -1369,22 +1455,44 @@ fi fi +else + cf_with_ada=no fi -### Construct the library-subsets, if any, from this set of keywords: -### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES). +### Construct the ncurses library-subsets, if any, from this set of keywords: +### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar +### +### ticlib modules may be a separate library, otherwise contained in termlib. +### termlib modules may be a separate library, otherwise contained in ncurses. +### +### The of "+" or " " between the tokens controls the way the script +### chooses to split module lists into libraries. +### +### (see CF_LIB_RULES). AC_MSG_CHECKING(for library subsets) +LIB_SUBSETS= + +if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then + LIB_SUBSETS="${LIB_SUBSETS}ticlib" + if test "$with_ticlib" != no ; then + LIB_SUBSETS="${LIB_SUBSETS} " + else + LIB_SUBSETS="${LIB_SUBSETS}+" + fi +fi + +LIB_SUBSETS="${LIB_SUBSETS}termlib" +test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo" if test "$with_termlib" != no ; then - LIB_SUBSETS="termlib" - test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo" LIB_SUBSETS="${LIB_SUBSETS} " else - LIB_SUBSETS="termlib+" - test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+" + LIB_SUBSETS="${LIB_SUBSETS}+" fi + 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" + AC_MSG_RESULT($LIB_SUBSETS) ### Construct the list of include-directories to be generated @@ -1399,10 +1507,12 @@ AC_MSG_CHECKING(default library-dependency suffix) CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl +DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX if test $DFT_LWR_MODEL = shared ; then case $cf_cv_system_name in #(vi cygwin*) DFT_DEP_SUFFIX=".dll.a" + DFT_LIB_SUFFIX=".dll" ;; esac fi @@ -1426,16 +1536,53 @@ AC_SUBST(CXX_LIB_SUFFIX) fi +# do not want -ldl in build except as needed for -lncurses dependency +if test "$with_dlsym" = yes ; then +if test $DFT_LWR_MODEL = shared || \ + test $DFT_LWR_MODEL = libtool ; then + CF_REMOVE_LIB(LIBS,$LIBS,dl) +fi +fi ### Set up low-level terminfo dependencies for makefiles. -TINFO_LIST="$SHLIB_LIST" + +# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but +# do not need libdl +TICS_LIST= +if test "$with_dlsym" = yes ; then + CF_REMOVE_LIB(TINFO_LIST,$SHLIB_LIST,dl) +fi + +if test "$with_ticlib" != no ; then + + if test "$with_ticlib" != yes ; then + TICS_NAME=$with_ticlib + TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" + TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" + TICS_LIB_SUFFIX="${with_ticlib}" + else + TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}" + TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}" + TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}" + fi + TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}" +else + TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}" +fi +AC_SUBST(TICS_ARG_SUFFIX) +AC_SUBST(TICS_DEP_SUFFIX) +AC_SUBST(TICS_LIB_SUFFIX) +AC_SUBST(TICS_ARGS) + if test "$with_termlib" != no ; then if test "$with_termlib" != yes ; then TINFO_NAME=$with_termlib + TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" 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_SUFFIX=${DFT_LIB_SUFFIX} TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}" TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}" TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}" @@ -1450,21 +1597,48 @@ else TEST_ARGS="-l${TINFO_ARG_SUFFIX}" TEST_ARG2="-l${TINFO_ARG_SUFFIX}" + TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}" TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS" SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}" fi else + # the next lines are needed for linking libtic over libncurses + TINFO_NAME=${LIB_NAME} + TINFO_SUFFIX=${DFT_LIB_SUFFIX} + TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX} + TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}" + TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}" fi + +if test "$DFT_LWR_MODEL" = shared ; then + case $cf_cv_system_name in #(vi + cygwin*) + # "lib" files have ".dll.a" suffix, "cyg" files have ".dll" + TINFO_SUFFIX=.dll + ;; + esac +fi + AC_SUBST(TINFO_ARG_SUFFIX) AC_SUBST(TINFO_DEP_SUFFIX) AC_SUBST(TINFO_LIB_SUFFIX) AC_SUBST(TINFO_ARGS) +if test "$with_dlsym" = yes ; then + CF_REMOVE_LIB(TICS_LIST,$TICS_LIST,dl) +fi + # needed for Ada95 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'` AC_SUBST(TINFO_ARGS2) +case $DFT_LWR_MODEL in +normal|debug|profile) + CF_LDFLAGS_STATIC + ;; +esac + AC_MSG_CHECKING(where we will install curses.h) test "$with_overwrite" = no && \ test "x$includedir" = 'x${prefix}/include' && \ @@ -1481,9 +1655,14 @@ fi AC_SUBST(WITH_OVERWRITE) +AC_SUBST(TICS_LIST) AC_SUBST(TINFO_LIST) AC_SUBST(SHLIB_LIST) +# used to separate tack out of the tree +NCURSES_TREE= +AC_SUBST(NCURSES_TREE) + ### predefined stuff for the test programs AC_DEFINE(HAVE_SLK_COLOR) @@ -1491,6 +1670,11 @@ ### with the appropriate compile-rules. CF_SRC_MODULES($modules_to_build) + +if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then + SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config" +fi + CF_DIRS_TO_MAKE AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP') @@ -1500,6 +1684,11 @@ ### Now that we're done running tests, add the compiler-warnings, if any CF_ADD_CFLAGS($EXTRA_CFLAGS) +### If we're building with rpath, try to link non-standard libs that way too. +if test "$DFT_LWR_MODEL" = "shared"; then + CF_RPATH_HACK +fi + ### Define substitutions for header files to avoid name-pollution CF_SUBST_IF(["$cf_cv_have_tcgetattr" = yes], HAVE_TCGETATTR, 1, 0) CF_SUBST_IF(["$ac_cv_header_termio_h" = yes], HAVE_TERMIO_H, 1, 0) @@ -1540,13 +1729,19 @@ TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" TINFO_NAME="$TINFO_NAME" +TINFO_SUFFIX="$TINFO_SUFFIX" +TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX" +TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX" +TICS_NAME="$TICS_NAME" WITH_CURSES_H="$with_curses_h" WITH_ECHO="$with_echo" WITH_OVERWRITE="$with_overwrite" cf_LIST_MODELS="$cf_list_models" cf_cv_abi_version="$cf_cv_abi_version" +cf_cv_do_relink="$cf_cv_do_relink" cf_cv_do_symlinks="$cf_cv_do_symlinks" cf_cv_enable_lp64="$cf_cv_enable_lp64" +cf_cv_enable_opaque="$cf_cv_enable_opaque" 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" diff -Naur ncurses-5.6.orig/dist.mk ncurses-5.6/dist.mk --- ncurses-5.6.orig/dist.mk 2006-12-17 14:58:35.000000000 -0500 +++ ncurses-5.6/dist.mk 2007-12-21 00:02:36.000000000 -0500 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. # +# Copyright (c) 1998-2006,2007 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"), # @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.567 2006/12/17 19:58:35 tom Exp $ +# $Id: dist.mk,v 1.619 2007/12/15 22:01:55 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 6 -NCURSES_PATCH = 20061217 +NCURSES_PATCH = 20071215 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) @@ -106,6 +106,7 @@ fi ;\ done # change some things to make weblint happy: + @cat man_alias.sed >> subst.tmp @echo 's///g' >> subst.tmp @echo 's/<\/B>/<\/STRONG>/g' >> subst.tmp @echo 's///g' >> subst.tmp diff -Naur ncurses-5.6.orig/doc/hackguide.doc ncurses-5.6/doc/hackguide.doc --- ncurses-5.6.orig/doc/hackguide.doc 2005-12-24 10:44:52.000000000 -0500 +++ ncurses-5.6/doc/hackguide.doc 2007-12-21 00:02:35.000000000 -0500 @@ -261,7 +261,7 @@ lib_tracedmp.c lib_tracemse.c trace_buf.c It is rather unlikely you will ever need to change these, unless you - want to introduce a new debug trace level for some reasoon. + want to introduce a new debug trace level for some reason. There is another group of files that do direct I/O via tputs(), computations on the terminal capabilities, or queries to the OS diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/A.htm ncurses-5.6/doc/html/ada/funcs/A.htm --- ncurses-5.6.orig/doc/html/ada/funcs/A.htm 2005-05-14 13:34:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/A.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,6 +4,21 @@

Functions - A

[index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/B.htm ncurses-5.6/doc/html/ada/funcs/B.htm --- ncurses-5.6.orig/doc/html/ada/funcs/B.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/B.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,8 +4,18 @@

Functions - B

[index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/C.htm ncurses-5.6/doc/html/ada/funcs/C.htm --- ncurses-5.6.orig/doc/html/ada/funcs/C.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/C.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,24 +4,53 @@

Functions - C

[index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/D.htm ncurses-5.6/doc/html/ada/funcs/D.htm --- ncurses-5.6.orig/doc/html/ada/funcs/D.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/D.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,19 +4,44 @@

Functions - D

[index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/E.htm ncurses-5.6/doc/html/ada/funcs/E.htm --- ncurses-5.6.orig/doc/html/ada/funcs/E.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/E.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,7 +4,15 @@

Functions - E

[index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/F.htm ncurses-5.6/doc/html/ada/funcs/F.htm --- ncurses-5.6.orig/doc/html/ada/funcs/F.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/F.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,10 +4,13 @@

Functions - F

[index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/G.htm ncurses-5.6/doc/html/ada/funcs/G.htm --- ncurses-5.6.orig/doc/html/ada/funcs/G.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/G.htm 2007-12-21 00:02:35.000000000 -0500 @@ -8,26 +8,89 @@
  • Generic_Field_Check
  • Generic_Next
  • Generic_Prev +
  • Get - terminal_interface-curses.ads:1463 +
  • Get - terminal_interface-curses.ads:1474 +
  • GetBegX +
  • GetBegY +
  • GetCurX +
  • GetCurY +
  • GetMaxX +
  • GetMaxY
  • Getmouse +
  • GetParX +
  • GetParY
  • getwin
  • Get_Arg +
  • Get_Background +
  • Get_Buffer - terminal_interface-curses-forms.ads:362 +
  • Get_Buffer - terminal_interface-curses-forms.ads:368 +
  • Get_Character_Attribute - terminal_interface-curses.ads:826 +
  • Get_Character_Attribute - terminal_interface-curses.ads:832 +
  • Get_Cursor_Position
  • Get_Entry +
  • Get_Event
  • Get_Fieldindex
  • Get_Fieldtype +
  • Get_Field_Init_Hook +
  • Get_Field_Term_Hook
  • Get_Flag - terminal_interface-curses-termcap.ads:63
  • Get_Flag - terminal_interface-curses-terminfo.ads:64 -
  • Get_Flag - terminal_interface-curses.adb:93 +
  • Get_Form_Init_Hook +
  • Get_Form_Term_Hook +
  • Get_Index - terminal_interface-curses-forms.ads:745 +
  • Get_Index - terminal_interface-curses-menus.ads:310
  • Get_Itemindex +
  • Get_Item_Init_Hook +
  • Get_Item_Term_Hook +
  • Get_Justification +
  • Get_KeyPad_Mode +
  • Get_Keystroke +
  • Get_Menu_Init_Hook
  • Get_Menu_Mark - terminal_interface-curses-menus.adb:532
  • Get_Menu_Mark - terminal_interface-curses-menus.adb:540 +
  • Get_Menu_Term_Hook +
  • Get_Mouse
  • Get_Number - terminal_interface-curses-termcap.ads:67
  • Get_Number - terminal_interface-curses-terminfo.ads:68 +
  • Get_Options - terminal_interface-curses-forms.ads:411 +
  • Get_Options - terminal_interface-curses-forms.ads:416 +
  • Get_Options - terminal_interface-curses-forms.ads:658 +
  • Get_Options - terminal_interface-curses-forms.ads:663 +
  • Get_Options - terminal_interface-curses-menus.ads:251 +
  • Get_Options - terminal_interface-curses-menus.ads:256 +
  • Get_Options - terminal_interface-curses-menus.ads:347 +
  • Get_Options - terminal_interface-curses-menus.ads:352 +
  • Get_Origin_Relative_To_Parent
  • Get_Page
  • Get_Pattern +
  • Get_Size +
  • Get_Soft_Label_Key - terminal_interface-curses.ads:1522 +
  • Get_Soft_Label_Key - terminal_interface-curses.ads:1527 +
  • Get_Soft_Label_Key_Attributes - terminal_interface-curses.ads:1563 +
  • Get_Soft_Label_Key_Attributes - terminal_interface-curses.ads:1567
  • Get_Spacing
  • Get_String - terminal_interface-curses-termcap.ads:73
  • Get_String - terminal_interface-curses-termcap.ads:76
  • Get_String - terminal_interface-curses-terminfo.ads:57 +
  • Get_Sub_Window - terminal_interface-curses-forms.ads:522 +
  • Get_Sub_Window - terminal_interface-curses-menus.ads:378 +
  • Get_Type +
  • Get_User_Data - terminal_interface-curses-forms-field_user_data.ads:59 +
  • Get_User_Data - terminal_interface-curses-forms-field_user_data.ads:64 +
  • Get_User_Data - terminal_interface-curses-forms-form_user_data.ads:59 +
  • Get_User_Data - terminal_interface-curses-forms-form_user_data.ads:64 +
  • Get_User_Data - terminal_interface-curses-menus-item_user_data.ads:64 +
  • Get_User_Data - terminal_interface-curses-menus-item_user_data.ads:69 +
  • Get_User_Data - terminal_interface-curses-menus-menu_user_data.ads:59 +
  • Get_User_Data - terminal_interface-curses-menus-menu_user_data.ads:64 +
  • Get_User_Data - terminal_interface-curses-panels-user_data.ads:59 +
  • Get_User_Data - terminal_interface-curses-panels-user_data.ads:64 +
  • Get_Window - terminal_interface-curses-forms.ads:511 +
  • Get_Window - terminal_interface-curses-menus.ads:367 +
  • Get_Window - terminal_interface-curses-panels.ads:102
  • Get_Window - terminal_interface-curses-putwin.ads:48
  • Get_Window - terminal_interface-curses-text_io.ads:62 +
  • Get_Window_Position +
  • Grey - terminal_interface-curses-menus.ads:471 +
  • Grey - terminal_interface-curses-menus.ads:476 diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/H.htm ncurses-5.6/doc/html/ada/funcs/H.htm --- ncurses-5.6.orig/doc/html/ada/funcs/H.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/H.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,11 +4,19 @@

    Functions - H

    [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/I.htm ncurses-5.6/doc/html/ada/funcs/I.htm --- ncurses-5.6.orig/doc/html/ada/funcs/I.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/I.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,19 +4,42 @@

    Functions - I

    [index]
      -
    • IDC_Ok -
    • IDL_Ok -
    • Immedok -
    • Initcolor -
    • Initpair -
    • Initscr -
    • Intrflush -
    • Isendwin +
    • IDC_Ok +
    • IDL_Ok +
    • Immediate_Update_Mode +
    • Immedok +
    • Info +
    • Initcolor +
    • Initpair +
    • Initscr +
    • Init_Color +
    • Init_Pair +
    • Init_Screen +
    • Init_Soft_Label_Keys +
    • Init_Windows +
    • Insert - terminal_interface-curses.ads:1371 +
    • Insert - terminal_interface-curses.ads:1377 +
    • Insert - terminal_interface-curses.ads:1389 +
    • Insert - terminal_interface-curses.ads:1398 +
    • Insert_Delete_Lines +
    • Insert_Line +
    • Intrflush +
    • Isendwin +
    • Is_End_Window +
    • Is_Function_Key +
    • Is_Hidden +
    • Is_Keypad
    • Is_MinusOne_Pointer
    • Is_New +
    • Is_New_Page +
    • Is_Scroll_Ok +
    • Is_Touched - terminal_interface-curses.ads:1160 +
    • Is_Touched - terminal_interface-curses.ads:1165
    • Itemname - terminal_interface-curses-menus.adb:128
    • Itemname - terminal_interface-curses-menus.adb:253
    • Itemname - terminal_interface-curses-menus.adb:261 +
    • Items +
    • Item_Count
    • Item_Init
    • Item_Opts
    • Item_Opts_Off diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/K.htm ncurses-5.6/doc/html/ada/funcs/K.htm --- ncurses-5.6.orig/doc/html/ada/funcs/K.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/K.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,8 +4,11 @@

      Functions - K

      [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/L.htm ncurses-5.6/doc/html/ada/funcs/L.htm --- ncurses-5.6.orig/doc/html/ada/funcs/L.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/L.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,12 +4,17 @@

      Functions - L

      [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/M.htm ncurses-5.6/doc/html/ada/funcs/M.htm --- ncurses-5.6.orig/doc/html/ada/funcs/M.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/M.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,6 +4,9 @@

      Functions - M

      [index]
        +
      • Make_Arg +
      • Mark - terminal_interface-curses-menus.ads:409 +
      • Mark - terminal_interface-curses-menus.ads:413
      • Menu_Back - terminal_interface-curses-menus.adb:608
      • Menu_Back - terminal_interface-curses-menus.adb:618
      • Menu_Fmt @@ -20,19 +23,25 @@
      • Menu_Term
      • Menu_Userptr
      • Menu_Win -
      • Meta +
      • Meta
      • MMask
      • Mouseinterval
      • Mouse_Avail +
      • Mouse_Interval +
      • Move - terminal_interface-curses-forms.ads:612 +
      • Move - terminal_interface-curses-panels.ads:117
      • Move - terminal_interface-curses-forms.adb:786
      • Move - terminal_interface-curses-panels.adb:132 -
      • Mvderwin -
      • mvwaddch -
      • Mvwdelch -
      • Mvwin -
      • Mvwinch -
      • Mvwinsch -
      • Mvwinsnstr +
      • Move_Cursor +
      • Move_Derived_Window +
      • Move_Window +
      • Mvderwin +
      • mvwaddch +
      • Mvwdelch +
      • Mvwin +
      • Mvwinch +
      • Mvwinsch +
      • Mvwinsnstr
      • M_Post - terminal_interface-curses-forms.adb:916
      • M_Post - terminal_interface-curses-menus.adb:354
      • M_Scale - terminal_interface-curses-forms.adb:643 diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/N.htm ncurses-5.6/doc/html/ada/funcs/N.htm --- ncurses-5.6.orig/doc/html/ada/funcs/N.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/N.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,24 +4,32 @@

        Functions - N

        [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/O.htm ncurses-5.6/doc/html/ada/funcs/O.htm --- ncurses-5.6.orig/doc/html/ada/funcs/O.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/O.htm 2007-12-21 00:02:35.000000000 -0500 @@ -5,6 +5,8 @@ [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/P.htm ncurses-5.6/doc/html/ada/funcs/P.htm --- ncurses-5.6.orig/doc/html/ada/funcs/P.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/P.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,17 +4,33 @@

        Functions - P

        [index]
          +
        • Pad_Character - terminal_interface-curses-forms.ads:472 +
        • Pad_Character - terminal_interface-curses-menus.ads:490 +
        • Page
        • Page_Length - terminal_interface-curses-text_io.ads:80
        • Page_Length - terminal_interface-curses-text_io.ads:81 -
        • Paircontent +
        • Paircontent +
        • Pair_Content
        • Panel_Hidden
        • Panel_Userptr
        • Panel_Win -
        • Pechochar -
        • Pnoutrefresh +
        • Pattern +
        • Pechochar +
        • Peek - terminal_interface-curses.ads:1352 +
        • Peek - terminal_interface-curses.ads:1358 +
        • Peek - terminal_interface-curses.ads:1414 +
        • Peek - terminal_interface-curses.ads:1423 +
        • Peek - terminal_interface-curses.ads:1438 +
        • Peek - terminal_interface-curses.ads:1447 +
        • Pnoutrefresh +
        • Position_Cursor - terminal_interface-curses-forms.ads:683 +
        • Position_Cursor - terminal_interface-curses-menus.ads:394 +
        • Post - terminal_interface-curses-forms.ads:672 +
        • Post - terminal_interface-curses-menus.ads:322
        • Pos_Form_Cursor
        • Pos_Menu_Cursor -
        • Prefresh +
        • Prefresh +
        • Prev_Router
        • Put - terminal_interface-curses-text_io-complex_io.ads:54
        • Put - terminal_interface-curses-text_io-complex_io.ads:61
        • Put - terminal_interface-curses-text_io-decimal_io.ads:50 diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/Q.htm ncurses-5.6/doc/html/ada/funcs/Q.htm --- ncurses-5.6.orig/doc/html/ada/funcs/Q.htm 2005-05-14 13:34:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/Q.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,5 +4,5 @@

          Functions - Q

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/R.htm ncurses-5.6/doc/html/ada/funcs/R.htm --- ncurses-5.6.orig/doc/html/ada/funcs/R.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/R.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,14 +4,36 @@

          Functions - R

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/S.htm ncurses-5.6/doc/html/ada/funcs/S.htm --- ncurses-5.6.orig/doc/html/ada/funcs/S.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/S.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,24 +4,51 @@

          Functions - S

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/T.htm ncurses-5.6/doc/html/ada/funcs/T.htm --- ncurses-5.6.orig/doc/html/ada/funcs/T.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/T.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,9 +4,12 @@

          Functions - T

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/U.htm ncurses-5.6/doc/html/ada/funcs/U.htm --- ncurses-5.6.orig/doc/html/ada/funcs/U.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/U.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,9 +4,20 @@

          Functions - U

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/V.htm ncurses-5.6/doc/html/ada/funcs/V.htm --- ncurses-5.6.orig/doc/html/ada/funcs/V.htm 2005-05-14 13:34:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/V.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,5 +4,8 @@

          Functions - V

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/funcs/W.htm ncurses-5.6/doc/html/ada/funcs/W.htm --- ncurses-5.6.orig/doc/html/ada/funcs/W.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/funcs/W.htm 2007-12-21 00:02:35.000000000 -0500 @@ -4,50 +4,50 @@

          Functions - W

          [index] diff -Naur ncurses-5.6.orig/doc/html/ada/table.html ncurses-5.6/doc/html/ada/table.html --- ncurses-5.6.orig/doc/html/ada/table.html 2000-12-02 18:38:22.000000000 -0500 +++ ncurses-5.6/doc/html/ada/table.html 2007-12-21 00:02:35.000000000 -0500 @@ -10,36 +10,38 @@ + - - - + + + - - - - - - + + + + + + - - + + + - - + + - - - - + + + + - + - - - + + + @@ -59,8 +61,8 @@ - - + + @@ -77,28 +79,28 @@ - - + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -112,30 +114,30 @@ - - - - - + + + + + - - - + + + - - + + - - + + - + @@ -144,25 +146,25 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -173,14 +175,14 @@ - - - - - - - - + + + + + + + + @@ -188,28 +190,28 @@ - - + + - - - - + + + + - - - - + + + + - - - - - + + + + + @@ -238,15 +240,15 @@ - - + + - + - + @@ -257,83 +259,83 @@ - - - - - - - + + + + + + - - - - - - - + + + + + + + + - - - - - + + + + + - - + + - - + + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
          C nameAda nameman page
          _nc_freeall()Curses_Free_Allcurs_trace.3x
          _tracef()Trace_Putcurs_trace.3x
          assume_default_colors()Assume_Default_Colorsdft_fgbg.3x
          baudrate()Baudratecurs_termattrs.3x
          beep()Beepcurs_beep.3x
          assume_default_colors()Assume_Default_Colorsdefault_colors.3x
          baudrate()Baudratecurs_termattrs.3x
          beep()Beepcurs_beep.3x
          bottom_panel()Bottompanel.3x
          box()Boxcurs_border.3x
          can_change_color()Can_Change_Colorcurs_color.3x
          cbreak()Set_Cbreak_Modecurs_inopts.3x
          clearok()Clear_On_Next_Updatecurs_outopts.3x
          color_content()Color_Contentcurs_color.3x
          copywin()Copycurs_overlay.3x
          box()Boxcurs_border.3x
          can_change_color()Can_Change_Colorcurs_color.3x
          cbreak()Set_Cbreak_Modecurs_inopts.3x
          clearok()Clear_On_Next_Updatecurs_outopts.3x
          color_content()Color_Contentcurs_color.3x
          copywin()Copycurs_overlay.3x
          current_field()Currentform_page.3x
          current_item()Currentmitem_current.3x
          curs_set()Set_Cursor_Visibilitycurs_kernel.3x
          curses_version()Curses_Versioncurs_extend.3x
          curs_set()Set_Cursor_Visibilitycurs_kernel.3x
          curscrCurrent_Windowcurs_initscr.3x
          curses_version()Curses_Versioncurs_extend.3x
          data_ahead()Data_Aheadform_data.3x
          data_behind()Data_Behindform_data.3x
          def_prog_mode()Save_Curses_Modecurs_kernel.3x
          define_key()Define_Keydefine_key.3x
          def_prog_mode()Save_Curses_Modecurs_kernel.3x
          define_key()Define_Keydefine_key.3x
          del_panel()Deletepanel.3x
          delay_output()Delay_Outputcurs_util.3x
          delwin()Deletecurs_window.3x
          derwin()Derived_Windowcurs_window.3x
          doupdate()Update_Screencurs_refresh.3x
          delay_output()Delay_Outputcurs_util.3x
          delwin()Deletecurs_window.3x
          derwin()Derived_Windowcurs_window.3x
          doupdate()Update_Screencurs_refresh.3x
          dup_field()Duplicateform_field_new.3x
          dupwin()Duplicatecurs_window.3x
          dupwin()Duplicatecurs_window.3x
          dynamic_field_info()Dynamic_Infoform_field_info.3x
          echo()Set_Echo_Modecurs_inopts.3x
          endwin()End_Windowscurs_initscr.3x
          erasechar()Erase_Charactercurs_termattrs.3x
          echo()Set_Echo_Modecurs_inopts.3x
          endwin()End_Windowscurs_initscr.3x
          erasechar()Erase_Charactercurs_termattrs.3x
          field_back()Backgroundform_field_attributes.3x
          field_back()Backgroundform_field_attributes.3x
          field_buffer()Get_Bufferform_field_buffer.3x
          field_type()Get_Typeform_field_validation.3x
          field_userptrGet_User_Dataform_field_userptr.3x
          field_userptrGet_User_Dataform_field_userptr.3x
          flash()Flash_Screencurs_beep.3x
          flushinp()Flush_Inputcurs_util.3x
          flash()Flash_Screencurs_beep.3x
          flushinp()Flush_Inputcurs_util.3x
          form_driver()Driverform_driver.3x
          form_fields()Fieldsform_field.3x
          form_init()Get_Form_Init_Hookform_hook.3x
          free_form()Deleteform_new.3x
          free_item()Deletemitem_new.3x
          free_menu()Deletemenu_new.3x
          getbegyx()Get_Window_Positioncurs_getyx.3x
          getmaxyx()Get_Sizecurs_getyx.3x
          getbegyx()Get_Window_Positioncurs_getyx.3x
          getmaxyx()Get_Sizecurs_getyx.3x
          getmouse()Get_Mousecurs_mouse.3x
          getparyx()Get_Origin_Relative_To_Parentcurs_getyx.3x
          getyx()Get_Cursor_Positioncurs_getyx.3x
          halfdelay()Half_Delaycurs_inopts.3x
          has_colors()Has_Colorscurs_color.3x
          has_ic()Has_Insert_Charactercurs_termattrs.3x
          has_il()Has_Insert_Linecurs_termattrs.3x
          has_key()Has_Keycurs_getch.3x
          getparyx()Get_Origin_Relative_To_Parentcurs_getyx.3x
          getyx()Get_Cursor_Positioncurs_getyx.3x
          halfdelay()Half_Delaycurs_inopts.3x
          has_colors()Has_Colorscurs_color.3x
          has_ic()Has_Insert_Charactercurs_termattrs.3x
          has_il()Has_Insert_Linecurs_termattrs.3x
          has_key()Has_Keycurs_getch.3x
          hide_panel()Hidepanel.3x
          idcok()Use_Insert_Delete_Charactercurs_outopts.3x
          idlok()Use_Insert_Delete_Linecurs_outopts.3x
          immedok()Immediate_Update_Modecurs_outopts.3x
          init_color()Init_Colorcurs_color.3x
          init_pair()Init_Paircurs_color.3x
          initscr()Init_Screencurs_initscr.3x
          initscr()Init_Windowscurs_initscr.3x
          intrflush()Set_Flush_On_Interrupt_Modecurs_inopts.3x
          is_linetouched()Is_Touchedcurs_touch.3x
          is_wintouched()Is_Touchedcurs_touch.3x
          isendwin()Is_End_Windowcurs_initscr.3x
          idcok()Use_Insert_Delete_Charactercurs_outopts.3x
          idlok()Use_Insert_Delete_Linecurs_outopts.3x
          immedok()Immediate_Update_Modecurs_outopts.3x
          init_color()Init_Colorcurs_color.3x
          init_pair()Init_Paircurs_color.3x
          initscr()Init_Screencurs_initscr.3x
          initscr()Init_Windowscurs_initscr.3x
          intrflush()Set_Flush_On_Interrupt_Modecurs_inopts.3x
          is_linetouched()Is_Touchedcurs_touch.3x
          is_wintouched()Is_Touchedcurs_touch.3x
          isendwin()Is_End_Windowcurs_initscr.3x
          item_count()Item_Countmenu_items.3x
          item_description();Descriptionmitem_name.3x
          item_index()Get_Indexmitem_current.3x
          item_userptrGet_User_Datamitem_userptr.3x
          item_value()Valuemitem_value.3x
          item_visible()Visiblemitem_visible.3x
          keyname()Key_Namecurs_util.3x
          keyname()Key_Namecurs_util.3x
          keyok()Enable_Keykeyok.3x
          keypad()Set_KeyPad_Modecurs_inopts.3x
          killchar()Kill_Charactercurs_termattrs.3x
          leaveok()Leave_Cursor_After_Updatecurs_outopts.3x
          keyname()Key_Namecurs_util.3x
          keyok()Enable_Keykeyok.3x
          keypad()Set_KeyPad_Modecurs_inopts.3x
          killchar()Kill_Charactercurs_termattrs.3x
          leaveok()Leave_Cursor_After_Updatecurs_outopts.3x
          link_field()Linkform_field_new.3x
          longname()Long_Namecurs_termattrs.3x
          longname()Long_Namecurs_termattrs.3x
          menu_back()Backgroundmenu_attribs.3x
          menu_back()Backgroundmenu_attribs.3x
          longname()Long_Namecurs_termattrs.3x
          menu_back()Backgroundmenu_attributes.3x
          menu_back()Backgroundmenu_attributes.3x
          menu_driver()Drivermenu_driver.3x
          menu_fore()Foregroundmenu_attribs.3x
          menu_fore()Foregroundmenu_attribs.3x
          menu_fore()Foregroundmenu_attributes.3x
          menu_fore()Foregroundmenu_attributes.3x
          menu_format()Formatmenu_format.3x
          menu_grey()Greymenu_attribs.3x
          menu_grey()Greymenu_attribs.3x
          menu_grey()Greymenu_attributes.3x
          menu_grey()Greymenu_attributes.3x
          menu_init()Get_Menu_Init_Hookmenu_hook.3x
          menu_items()Itemsmenu_items.3x
          menu_mark()Markmenu_mark.3x
          menu_opts()Get_Optionsmenu_opts.3x
          menu_opts()Get_Optionsmenu_opts.3x
          menu_opts_on()Switch_Optionsmenu_opts.3x
          menu_pad()Pad_Charactermenu_attribs.3x
          menu_pad()Pad_Charactermenu_attributes.3x
          menu_pattern()Patternmenu_pattern.3x
          menu_requestname.3xmenu_driver.3x
          menu_spacing()Spacingmenu_spacing.3x
          menu_userptrGet_User_Datamenu_userptr.3x
          menu_userptrGet_User_Datamenu_userptr.3x
          menu_win()Get_Windowmenu_win.3x
          meta()Set_Meta_Modecurs_inopts.3x
          meta()Set_Meta_Modecurs_inopts.3x
          mouseinterval()Mouse_Intervalcurs_mouse.3x
          mousemask()Start_Mousecurs_mouse.3x
          move_field()Moveform_field.3x
          move_panel()Movepanel.3x
          mvderwin()Move_Derived_Windowcurs_window.3x
          mvwaddch()Addcurs_addch.3x
          mvwaddchnstr()Addcurs_addchstr.3x
          mvwaddnstr()Addcurs_addstr.3x
          mvwchgat()Change_Attributescurs_attr.3x
          mvwdelch()Delete_Charactercurs_delch.3x
          mvwgetnstr()Getcurs_getstr.3x
          mvwin()Move_Windowcurs_window.3x
          mvwinch()Peekcurs_inch.3x
          mvwinchnstr()Peekcurs_inchstr.3x
          mvwinnstr()Peekcurs_instr.3x
          mvwinsch()Insertcurs_insch.3x
          mvwinsnstr()Insertcurs_insstr.3x
          napms()Nap_Milli_Secondscurs_kernel.3x
          mvderwin()Move_Derived_Windowcurs_window.3x
          mvwaddch()Addcurs_addch.3x
          mvwaddchnstr()Addcurs_addchstr.3x
          mvwaddnstr()Addcurs_addstr.3x
          mvwchgat()Change_Attributescurs_attr.3x
          mvwdelch()Delete_Charactercurs_delch.3x
          mvwgetnstr()Getcurs_getstr.3x
          mvwin()Move_Windowcurs_window.3x
          mvwinch()Peekcurs_inch.3x
          mvwinchnstr()Peekcurs_inchstr.3x
          mvwinnstr()Peekcurs_instr.3x
          mvwinsch()Insertcurs_insch.3x
          mvwinsnstr()Insertcurs_insstr.3x
          napms()Nap_Milli_Secondscurs_kernel.3x
          new_field()Createform_field_new.3x
          new_field()New_Fieldform_field_new.3x
          new_form()Createform_new.3x
          new_page()Is_New_Pageform_new_page.3x
          new_panel()Createpanel.3x
          new_panel()New_Panelpanel.3x
          newpad()New_Padcurs_pad.3x
          newwin()Createcurs_window.3x
          nl()Set_NL_Modecurs_outopts.3x
          nodelay()Set_NoDelay_Modecurs_inopts.3x
          notimeout()Set_Escape_Time_Modecurs_inopts.3x
          overlay()Overlaycurs_overlay.3x
          overwrite()Overwritecurs_overlay.3x
          pair_content()Pair_Contentcurs_color.3x
          newpad()New_Padcurs_pad.3x
          newwin()Createcurs_window.3x
          nl()Set_NL_Modecurs_outopts.3x
          nodelay()Set_NoDelay_Modecurs_inopts.3x
          notimeout()Set_Escape_Time_Modecurs_inopts.3x
          overlay()Overlaycurs_overlay.3x
          overwrite()Overwritecurs_overlay.3x
          pair_content()Pair_Contentcurs_color.3x
          panel_above()Abovepanel.3x
          panel_below()Belowpanel.3x
          panel_hidden()Is_Hiddenpanel.3x
          panel_userptrGet_User_Datapanel.3x
          panel_window()Get_Windowpanel.3x
          panel_window()Panel_Windowpanel.3x
          pechochar()Add_Character_To_Pad_And_Echo_Itcurs_pad.3x
          pnoutrefresh()Refresh_Without_Updatecurs_pad.3x
          pechochar()Add_Character_To_Pad_And_Echo_Itcurs_pad.3x
          pnoutrefresh()Refresh_Without_Updatecurs_pad.3x
          pos_form_cursor()Position_Cursorform_cursor.3x
          pos_menu_cursor()Position_Cursormenu_cursor.3x
          post_form()Postform_post.3x
          post_menu()Postmenu_post.3x
          prefresh()Refreshcurs_pad.3x
          qiflush()Set_Queue_Interrupt_Modecurs_inopts.3x
          raw()Set_Raw_Modecurs_inopts.3x
          redrawwin()Redrawcurs_refresh.3x
          prefresh()Refreshcurs_pad.3x
          qiflush()Set_Queue_Interrupt_Modecurs_inopts.3x
          raw()Set_Raw_Modecurs_inopts.3x
          redrawwin()Redrawcurs_refresh.3x
          replace_panel()Replacepanel.3x
          reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
          resetty();Reset_Terminal_Statecurs_kernel.3x
          ripoffline()Rip_Off_Linescurs_kernel.3x
          savetty()Save_Terminal_Statecurs_kernel.3x
          reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
          resetty();Reset_Terminal_Statecurs_kernel.3x
          ripoffline()Rip_Off_Linescurs_kernel.3x
          savetty()Save_Terminal_Statecurs_kernel.3x
          scale_form()Scaleform_win.3x
          scale_menu()Scalemenu_win.3x
          scr_dump()Screen_Dump_To_Filecurs_scr_dump.3x
          scr_init()Screen_Init_From_Filecurs_scr_dump.3x
          scr_restore()Screen_Restore_From_Filecurs_scr_dump.3x
          scr_set()Screen_Set_Filecurs_scr_dump.3x
          scrollok()Allow_Scrollingcurs_outopts.3x
          scr_dump()Screen_Dump_To_Filecurs_scr_dump.3x
          scr_init()Screen_Init_From_Filecurs_scr_dump.3x
          scr_restore()Screen_Restore_From_Filecurs_scr_dump.3x
          scr_set()Screen_Set_Filecurs_scr_dump.3x
          scrollok()Allow_Scrollingcurs_outopts.3x
          set_current_field()Set_Currentform_page.3x
          set_current_item()Set_Currentmitem_current.3x
          set_field_back()Set_Backgroundform_field_attributes.3x
          set_item_term()Set_Item_Term_Hookmenu_hook.3x
          set_item_userptrSet_User_Datamitem_userptr.3x
          set_item_value()Set_Valuemitem_value.3x
          set_menu_back()Set_Backgroundmenu_attribs.3x
          set_menu_fore()Set_Foregroundmenu_attribs.3x
          set_menu_back()Set_Backgroundmenu_attributes.3x
          set_menu_fore()Set_Foregroundmenu_attributes.3x
          set_menu_format()Set_Formatmenu_format.3x
          set_menu_grey()Set_Greymenu_attribs.3x
          set_menu_grey()Set_Greymenu_attributes.3x
          set_menu_init()Set_Menu_Init_Hookmenu_hook.3x
          set_menu_items()Redefinemenu_items.3x
          set_menu_mark()Set_Markmenu_mark.3x
          set_menu_opts()Set_Optionsmenu_opts.3x
          set_menu_pad()Set_Pad_Charactermenu_attribs.3x
          set_menu_pad()Set_Pad_Charactermenu_attributes.3x
          set_menu_pattern()Set_Patternmenu_pattern.3x
          set_menu_spacing()Set_Spacingmenu_spacing.3x
          set_menu_sub()Set_Sub_Windowmenu_win.3x
          set_panel_userptrSet_User_Datapanel.3x
          set_top_row()Set_Top_Rowmitem_current.3x
          show_panel()Showpanel.3x
          slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
          slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
          slk_attron()Switch_Soft_Label_Key_Attributescurs_slk.3x
          slk_attrset()Set_Soft_Label_Key_Attributescurs_slk.3x
          slk_clear()Clear_Soft_Label_Keyscurs_slk.3x
          slk_color()Set_Soft_Label_Key_Colorcurs_slk.3x
          slk_init()Init_Soft_Label_Keyscurs_slk.3x
          slk_label()Get_Soft_Label_Keycurs_slk.3x
          slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
          slk_attron()Switch_Soft_Label_Key_Attributescurs_slk.3x
          slk_attrset()Set_Soft_Label_Key_Attributescurs_slk.3x
          slk_clear()Clear_Soft_Label_Keyscurs_slk.3x
          slk_color()Set_Soft_Label_Key_Colorcurs_slk.3x
          slk_init()Init_Soft_Label_Keyscurs_slk.3x
          slk_label()Get_Soft_Label_Keycurs_slk.3x
          slk_noutrefresh()Refresh_Soft_Label_Keys_Without_Updatecurs_slk.3x
          slk_refresh()Refresh_Soft_Label_Keycurs_slk.3x
          slk_restore()Restore_Soft_Label_Keyscurs_slk.3x
          slk_set()Set_Soft_Label_Keycurs_slk.3x
          slk_touch()Touch_Soft_Label_Keyscurs_slk.3x
          standout()Standoutcurs_attr.3x
          start_color()Start_Colorcurs_color.3x
          slk_label()Get_Soft_Label_Keycurs_slk.3x
          slk_noutrefresh()Refresh_Soft_Label_Keys_Without_Updatecurs_slk.3x
          slk_refresh()Refresh_Soft_Label_Keycurs_slk.3x
          slk_restore()Restore_Soft_Label_Keyscurs_slk.3x
          slk_set()Set_Soft_Label_Keycurs_slk.3x
          slk_touch()Touch_Soft_Label_Keyscurs_slk.3x
          standout()Standoutcurs_attr.3x
          start_color()Start_Colorcurs_color.3x
          stdscrStandard_Windowcurs_initscr.3x
          subpad()Sub_Padcurs_pad.3x
          subwin()Sub_Windowcurs_window.3x
          syncok()Set_Synch_Modecurs_window.3x
          termattrs()Supported_Attributescurs_termattrs.3x
          termname()Terminal_Namecurs_termattrs.3x
          subpad()Sub_Padcurs_pad.3x
          subwin()Sub_Windowcurs_window.3x
          syncok()Set_Synch_Modecurs_window.3x
          termattrs()Supported_Attributescurs_termattrs.3x
          termname()Terminal_Namecurs_termattrs.3x
          termname()Terminal_Namecurs_termattrs.3x
          top_panel()Toppanel.3x
          top_row()Top_Rowmitem_current.3x
          touchline()Touchcurs_touch.3x
          touchwin()Touchcurs_touch.3x
          touchline()Touchcurs_touch.3x
          touchwin()Touchcurs_touch.3x
          trace()Trace_oncurs_trace.3x
          unctrl()Un_Controlcurs_util.3x
          unctrl()Un_Controlcurs_util.3x
          ungetch()Undo_Keystrokecurs_getch.3x
          unctrl()Un_Controlcurs_util.3x
          ungetch()Undo_Keystrokecurs_getch.3x
          ungetmouse()Unget_Mousecurs_mouse.3x
          untouchwin()Untouchcurs_touch.3x
          untouchwin()Untouchcurs_touch.3x
          update_panels()Update_Panelspanel.3x
          use_default_colors()Use_Default_Colorsdft_fgbg.3x
          use_extended_names()Use_Extended_Namescurs_extend.3x
          waddch()Addcurs_addch.3x
          waddchnstr()Addcurs_addchstr.3x
          waddnstr()Addcurs_addstr.3x
          wattr_get()Get_Character_Attributescurs_attr.3x
          wattr_get()Get_Character_Attributecurs_attr.3x
          wattron()Switch_Character_Attributecurs_attr.3x
          wattrset()Set_Character_Attributescurs_attr.3x
          wbkgd()Change_Backgroundcurs_bkgd.3x
          wbkgdget()Get_Backgroundcurs_bkgd.3x
          wbkgdset()Set_Backgroundcurs_bkgd.3x
          wborder()Bordercurs_border.3x
          wchgat()Change_Attributescurs_attr.3x
          wclear()Clearcurs_clear.3x
          wclrtobot()Clear_To_End_Of_Screencurs_clear.3x
          wclrtoeol()Clear_To_End_Of_Linecurs_clear.3x
          wcolor_set()Set_Colorcurs_attr.3x
          wdelch()Delete_Charactercurs_delch.3x
          wdeleteln()Delete_Linecurs_deleteln.3x
          wechochar()Add_With_Immediate_Echocurs_addch.3x
          use_default_colors()Use_Default_Colorsdefault_colors.3x
          use_extended_names()Use_Extended_Namescurs_extend.3x
          waddch()Addcurs_addch.3x
          waddchnstr()Addcurs_addchstr.3x
          waddnstr()Addcurs_addstr.3x
          wattr_get()Get_Character_Attributescurs_attr.3x
          wattr_get()Get_Character_Attributecurs_attr.3x
          wattron()Switch_Character_Attributecurs_attr.3x
          wattrset()Set_Character_Attributescurs_attr.3x
          wbkgd()Change_Backgroundcurs_bkgd.3x
          wbkgdget()Get_Backgroundcurs_bkgd.3x
          wbkgdset()Set_Backgroundcurs_bkgd.3x
          wborder()Bordercurs_border.3x
          wchgat()Change_Attributescurs_attr.3x
          wclear()Clearcurs_clear.3x
          wclrtobot()Clear_To_End_Of_Screencurs_clear.3x
          wclrtoeol()Clear_To_End_Of_Linecurs_clear.3x
          wcolor_set()Set_Colorcurs_attr.3x
          wdelch()Delete_Charactercurs_delch.3x
          wdeleteln()Delete_Linecurs_deleteln.3x
          wechochar()Add_With_Immediate_Echocurs_addch.3x
          wenclose()Enclosed_In_Windowcurs_mouse.3x
          werase()Erasecurs_clear.3x
          wgetch()Get_Keystrokecurs_getch.3x
          wgetnstr()Getcurs_getstr.3x
          whline()Horizontal_Linecurs_border.3x
          winch()Peekcurs_inch.3x
          winchnstr()Peekcurs_inchstr.3x
          winnstr()Peekcurs_instr.3x
          winsch()Insertcurs_insch.3x
          winsdelln()Insert_Delete_Linescurs_deleteln.3x
          winsertln()Insert_Linecurs_deleteln.3x
          winsnstr()Insertcurs_insstr.3x
          wmove()Move_Cursorcurs_move.3x
          wnoutrefresh()Refresh_Without_Updatecurs_refresh.3x
          wredrawln()Redrawcurs_refresh.3x
          wrefresh()Refreshcurs_refresh.3x
          wresize()Resizewresize.3x
          wscrl()Scrollcurs_scroll.3x
          wsetscrreg()Set_Scroll_Regioncurs_outopts.3x
          wsyncdown()Synchronize_Downwardscurs_window.3x
          wsyncup()Synchronize_Upwardscurs_window.3x
          wtimeout()Set_Timeout_Modecurs_inopts.3x
          wtouchln()Change_Line_Statuscurs_touch.3x
          wvline()Vertical_Linecurs_border.3x
          werase()Erasecurs_clear.3x
          wgetch()Get_Keystrokecurs_getch.3x
          wgetnstr()Getcurs_getstr.3x
          whline()Horizontal_Linecurs_border.3x
          winch()Peekcurs_inch.3x
          winchnstr()Peekcurs_inchstr.3x
          winnstr()Peekcurs_instr.3x
          winsch()Insertcurs_insch.3x
          winsdelln()Insert_Delete_Linescurs_deleteln.3x
          winsertln()Insert_Linecurs_deleteln.3x
          winsnstr()Insertcurs_insstr.3x
          wmove()Move_Cursorcurs_move.3x
          wnoutrefresh()Refresh_Without_Updatecurs_refresh.3x
          wredrawln()Redrawcurs_refresh.3x
          wrefresh()Refreshcurs_refresh.3x
          wresize()Resizewresize.3x
          wscrl()Scrollcurs_scroll.3x
          wsetscrreg()Set_Scroll_Regioncurs_outopts.3x
          wsyncdown()Synchronize_Downwardscurs_window.3x
          wsyncup()Synchronize_Upwardscurs_window.3x
          wtimeout()Set_Timeout_Modecurs_inopts.3x
          wtouchln()Change_Line_Statuscurs_touch.3x
          wvline()Vertical_Linecurs_border.3x
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-aux__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-aux__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-aux__ads.htm 2006-09-23 16:31:30.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-aux__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-aux.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -48,84 +47,84 @@
           --  This module is generated. Please don't change it manually!
           --  Run the generator instead.
           --  |
          -with System;
          +with System;
           with Interfaces.C;
          -with Interfaces.C.Strings; use Interfaces.C.Strings;
          -with Unchecked_Conversion;
          +with Interfaces.C.Strings; use Interfaces.C.Strings;
          +with Unchecked_Conversion;
           
          -package Terminal_Interface.Curses.Aux is
          -   pragma Preelaborate (Terminal_Interface.Curses.Aux);
          +package Terminal_Interface.Curses.Aux is
          +   pragma Preelaborate (Terminal_Interface.Curses.Aux);
           
          -   use type Interfaces.C.int;
          +   use type Interfaces.C.int;
           
          -   subtype C_Int      is Interfaces.C.int;
          -   subtype C_Short    is Interfaces.C.short;
          -   subtype C_Long_Int is Interfaces.C.long;
          -   subtype C_Size_T   is Interfaces.C.size_t;
          -   subtype C_UInt     is Interfaces.C.unsigned;
          -   subtype C_ULong    is Interfaces.C.unsigned_long;
          -   subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr;
          -   type    C_Void_Ptr is new System.Address;
          -   type    C_Chtype   is new C_ULong;
          -   type    C_AttrType is new C_ULong;
          +   subtype C_Int      is Interfaces.C.int;
          +   subtype C_Short    is Interfaces.C.short;
          +   subtype C_Long_Int is Interfaces.C.long;
          +   subtype C_Size_T   is Interfaces.C.size_t;
          +   subtype C_UInt     is Interfaces.C.unsigned;
          +   subtype C_ULong    is Interfaces.C.unsigned_long;
          +   subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr;
          +   type    C_Void_Ptr is new System.Address;
          +   type    C_Chtype   is new C_ULong;
          +   type    C_AttrType is new C_ULong;
           
              --  This is how those constants are defined in ncurses. I see them also
              --  exactly like this in all ETI implementations I ever tested. So it
              --  could be that this is quite general, but please check with your curses.
              --  This is critical, because curses sometime mixes boolean returns with
              --  returning an error status.
          -   Curses_Ok    : constant C_Int := 0;
          -   Curses_Err   : constant C_Int := -1;
          +   Curses_Ok    : constant C_Int := 0;
          +   Curses_Err   : constant C_Int := -1;
           
          -   Curses_True  : constant C_Int := 1;
          -   Curses_False : constant C_Int := 0;
          +   Curses_True  : constant C_Int := 1;
          +   Curses_False : constant C_Int := 0;
           
              --  Eti_Error: type for error codes returned by the menu and form subsystem
          -   subtype Eti_Error is C_Int range -14 .. 0;
          +   subtype Eti_Error is C_Int range -14 .. 0;
           
          -   E_Ok               : constant Eti_Error := 0;
          -   E_System_Error     : constant Eti_Error := -1;
          -   E_Bad_Argument     : constant Eti_Error := -2;
          -   E_Posted           : constant Eti_Error := -3;
          -   E_Connected        : constant Eti_Error := -4;
          -   E_Bad_State        : constant Eti_Error := -5;
          -   E_No_Room          : constant Eti_Error := -6;
          -   E_Not_Posted       : constant Eti_Error := -7;
          -   E_Unknown_Command  : constant Eti_Error := -8;
          -   E_No_Match         : constant Eti_Error := -9;
          -   E_Not_Selectable   : constant Eti_Error := -10;
          -   E_Not_Connected    : constant Eti_Error := -11;
          -   E_Request_Denied   : constant Eti_Error := -12;
          -   E_Invalid_Field    : constant Eti_Error := -13;
          -   E_Current          : constant Eti_Error := -14;
          +   E_Ok               : constant Eti_Error := 0;
          +   E_System_Error     : constant Eti_Error := -1;
          +   E_Bad_Argument     : constant Eti_Error := -2;
          +   E_Posted           : constant Eti_Error := -3;
          +   E_Connected        : constant Eti_Error := -4;
          +   E_Bad_State        : constant Eti_Error := -5;
          +   E_No_Room          : constant Eti_Error := -6;
          +   E_Not_Posted       : constant Eti_Error := -7;
          +   E_Unknown_Command  : constant Eti_Error := -8;
          +   E_No_Match         : constant Eti_Error := -9;
          +   E_Not_Selectable   : constant Eti_Error := -10;
          +   E_Not_Connected    : constant Eti_Error := -11;
          +   E_Request_Denied   : constant Eti_Error := -12;
          +   E_Invalid_Field    : constant Eti_Error := -13;
          +   E_Current          : constant Eti_Error := -14;
           
          -   procedure Eti_Exception (Code : Eti_Error);
          +   procedure Eti_Exception (Code : Eti_Error);
              --  Dispatch the error code and raise the appropriate exception
              --
              --
              --  Some helpers
              function Chtype_To_AttrChar is new
          -     Unchecked_Conversion (Source => C_Chtype,
          -                           Target => Attributed_Character);
          +     Unchecked_Conversion (Source => C_Chtype,
          +                           Target => Attributed_Character);
              function AttrChar_To_Chtype is new
          -     Unchecked_Conversion (Source => Attributed_Character,
          -                           Target => C_Chtype);
          +     Unchecked_Conversion (Source => Attributed_Character,
          +                           Target => C_Chtype);
           
              function AttrChar_To_AttrType is new
          -     Unchecked_Conversion (Source => Attributed_Character,
          -                           Target => C_AttrType);
          +     Unchecked_Conversion (Source => Attributed_Character,
          +                           Target => C_AttrType);
           
              function AttrType_To_AttrChar is new
          -     Unchecked_Conversion (Source => C_AttrType,
          -                           Target => Attributed_Character);
          +     Unchecked_Conversion (Source => C_AttrType,
          +                           Target => Attributed_Character);
           
          -   procedure Fill_String (Cp  : in  chars_ptr;
          -                          Str : out String);
          +   procedure Fill_String (Cp  : in  chars_ptr;
          +                          Str : out String);
              --  Fill the Str parameter with the string denoted by the chars_ptr
              --  C-Style string.
           
          -   function Fill_String (Cp : chars_ptr) return String;
          +   function Fill_String (Cp : chars_ptr) return String;
              --  Same but as function.
           
          -end Terminal_Interface.Curses.Aux;
          +end Terminal_Interface.Curses.Aux;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-forms-field_types.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -44,18 +43,18 @@
           --  @Revision: 1.14 @
           --  Binding Version 01.00
           ------------------------------------------------------------------------------
          -with Interfaces.C;
          +with Interfaces.C;
           
          -package Terminal_Interface.Curses.Forms.Field_Types is
          -   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types);
          -   use type Interfaces.C.int;
          -   subtype C_Int is Interfaces.C.int;
          +package Terminal_Interface.Curses.Forms.Field_Types is
          +   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types);
          +   use type Interfaces.C.int;
          +   subtype C_Int is Interfaces.C.int;
           
              --  |=====================================================================
              --  | Man page form_fieldtype.3x
              --  |=====================================================================
           
          -   type Field_Type is abstract tagged null record;
          +   type Field_Type is abstract tagged null record;
              --  Abstract base type for all field types. A concrete field type
              --  is an extension that adds some data elements describing formats or
              --  boundary values for the type and validation routines.
          @@ -66,11 +65,11 @@
              --  how to create you own child packages for low-level field types that
              --  you may have already written in C.
           
          -   type Field_Type_Access is access all Field_Type'Class;
          +   type Field_Type_Access is access all Field_Type'Class;
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Set_Field_Type (Fld      : in Field;
          -                             Fld_Type : in Field_Type) is abstract;
          +   procedure Set_Field_Type (Fld      : in Field;
          +                             Fld_Type : in Field_Type) is abstract;
              --  AKA: set_field_type()
              --  But: we hide the vararg mechanism of the C interface. You always
              --       have to pass a single Field_Type parameter.
          @@ -82,7 +81,7 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_2"#2|
          -   function Get_Type (Fld : in Field) return Field_Type_Access;
          +   function Get_Type (Fld : in Field) return Field_Type_Access;
              --  AKA: field_type()
              --  AKA: field_arg()
              --  In Ada95 we can combine these. If you try to retrieve the field type
          @@ -95,68 +94,68 @@
              --  | Most of this is used by the implementations of the child packages.
              --  |
           private
          -   type Makearg_Function is access
          -     function (Args : System.Address) return System.Address;
          -   pragma Convention (C, Makearg_Function);
          -
          -   type Copyarg_Function is access
          -     function (Usr : System.Address) return System.Address;
          -   pragma Convention (C, Copyarg_Function);
          -
          -   type Freearg_Function is access
          -     procedure (Usr : System.Address);
          -   pragma Convention (C, Freearg_Function);
          -
          -   type Field_Check_Function is access
          -     function (Fld : Field; Usr : System.Address) return C_Int;
          -   pragma Convention (C, Field_Check_Function);
          -
          -   type Char_Check_Function is access
          -     function (Ch : C_Int; Usr : System.Address) return C_Int;
          -   pragma Convention (C, Char_Check_Function);
          -
          -   type Choice_Function is access
          -     function (Fld : Field; Usr : System.Address) return C_Int;
          -   pragma Convention (C, Choice_Function);
          +   type Makearg_Function is access
          +     function (Args : System.Address) return System.Address;
          +   pragma Convention (C, Makearg_Function);
          +
          +   type Copyarg_Function is access
          +     function (Usr : System.Address) return System.Address;
          +   pragma Convention (C, Copyarg_Function);
          +
          +   type Freearg_Function is access
          +     procedure (Usr : System.Address);
          +   pragma Convention (C, Freearg_Function);
          +
          +   type Field_Check_Function is access
          +     function (Fld : Field; Usr : System.Address) return C_Int;
          +   pragma Convention (C, Field_Check_Function);
          +
          +   type Char_Check_Function is access
          +     function (Ch : C_Int; Usr : System.Address) return C_Int;
          +   pragma Convention (C, Char_Check_Function);
          +
          +   type Choice_Function is access
          +     function (Fld : Field; Usr : System.Address) return C_Int;
          +   pragma Convention (C, Choice_Function);
           
              --  +----------------------------------------------------------------------
              --  | This must be in sync with the FIELDTYPE structure in form.h
              --  |
          -   type Low_Level_Field_Type is
          +   type Low_Level_Field_Type is
                 record
          -         Status :              Interfaces.C.short;
          -         Ref_Count :           Interfaces.C.long;
          -         Left, Right :         System.Address;
          -         Makearg :             Makearg_Function;
          -         Copyarg :             Copyarg_Function;
          -         Freearg :             Freearg_Function;
          -         Fcheck :              Field_Check_Function;
          -         Ccheck :              Char_Check_Function;
          -         Next, Prev :          Choice_Function;
          +         Status :              Interfaces.C.short;
          +         Ref_Count :           Interfaces.C.long;
          +         Left, Right :         System.Address;
          +         Makearg :             Makearg_Function;
          +         Copyarg :             Copyarg_Function;
          +         Freearg :             Freearg_Function;
          +         Fcheck :              Field_Check_Function;
          +         Ccheck :              Char_Check_Function;
          +         Next, Prev :          Choice_Function;
                 end record;
          -   pragma Convention (C, Low_Level_Field_Type);
          -   type C_Field_Type is access all Low_Level_Field_Type;
          +   pragma Convention (C, Low_Level_Field_Type);
          +   type C_Field_Type is access all Low_Level_Field_Type;
           
          -   Null_Field_Type   : constant C_Field_Type := null;
          +   Null_Field_Type   : constant C_Field_Type := null;
           
              --  +----------------------------------------------------------------------
              --  | This four low-level fieldtypes are the ones associated with
              --  | fieldtypes handled by this binding. Any other low-level fieldtype
              --  | will result in a Form_Exception is function Get_Type.
              --  |
          -   M_Generic_Type   : C_Field_Type := null;
          -   M_Generic_Choice : C_Field_Type := null;
          -   M_Builtin_Router : C_Field_Type := null;
          -   M_Choice_Router  : C_Field_Type := null;
          +   M_Generic_Type   : C_Field_Type := null;
          +   M_Generic_Choice : C_Field_Type := null;
          +   M_Builtin_Router : C_Field_Type := null;
          +   M_Choice_Router  : C_Field_Type := null;
           
              --  Two wrapper functions to access those low-level fieldtypes defined
              --  in this package.
          -   function C_Builtin_Router return C_Field_Type;
          -   function C_Choice_Router  return C_Field_Type;
          +   function C_Builtin_Router return C_Field_Type;
          +   function C_Choice_Router  return C_Field_Type;
           
          -   procedure Wrap_Builtin (Fld : Field;
          -                           Typ : Field_Type'Class;
          -                           Cft : C_Field_Type := C_Builtin_Router);
          +   procedure Wrap_Builtin (Fld : Field;
          +                           Typ : Field_Type'Class;
          +                           Cft : C_Field_Type := C_Builtin_Router);
              --  This procedure has to be called by the Set_Field_Type implementation
              --  for builtin low-level fieldtypes to replace it by an Ada95
              --  conformant Field_Type object.
          @@ -165,48 +164,48 @@
              --  low-level fieldtypes witch choice functions (like TYP_ENUM).
              --  Any other value will raise a Form_Exception.
           
          -   function Make_Arg (Args : System.Address) return System.Address;
          -   pragma Convention (C, Make_Arg);
          +   function Make_Arg (Args : System.Address) return System.Address;
          +   pragma Convention (C, Make_Arg);
              --  This is the Makearg_Function for the internal low-level types
              --  introduced by this binding.
           
          -   function Copy_Arg (Usr : System.Address) return System.Address;
          -   pragma Convention (C, Copy_Arg);
          +   function Copy_Arg (Usr : System.Address) return System.Address;
          +   pragma Convention (C, Copy_Arg);
              --  This is the Copyarg_Function for the internal low-level types
              --  introduced by this binding.
           
          -   procedure Free_Arg (Usr : System.Address);
          -   pragma Convention (C, Free_Arg);
          +   procedure Free_Arg (Usr : System.Address);
          +   pragma Convention (C, Free_Arg);
              --  This is the Freearg_Function for the internal low-level types
              --  introduced by this binding.
           
          -   function Field_Check_Router (Fld : Field;
          -                                Usr : System.Address) return C_Int;
          -   pragma Convention (C, Field_Check_Router);
          +   function Field_Check_Router (Fld : Field;
          +                                Usr : System.Address) return C_Int;
          +   pragma Convention (C, Field_Check_Router);
              --  This is the Field_Check_Function for the internal low-level types
              --  introduced to wrap the low-level types by a Field_Type derived
              --  type. It routes the call to the corresponding low-level validation
              --  function.
           
          -   function Char_Check_Router (Ch : C_Int;
          -                               Usr : System.Address) return C_Int;
          -   pragma Convention (C, Char_Check_Router);
          +   function Char_Check_Router (Ch : C_Int;
          +                               Usr : System.Address) return C_Int;
          +   pragma Convention (C, Char_Check_Router);
              --  This is the Char_Check_Function for the internal low-level types
              --  introduced to wrap the low-level types by a Field_Type derived
              --  type. It routes the call to the corresponding low-level validation
              --  function.
           
          -   function Next_Router (Fld : Field;
          -                         Usr : System.Address) return C_Int;
          -   pragma Convention (C, Next_Router);
          +   function Next_Router (Fld : Field;
          +                         Usr : System.Address) return C_Int;
          +   pragma Convention (C, Next_Router);
              --  This is the Choice_Function for the internal low-level types
              --  introduced to wrap the low-level types by a Field_Type derived
              --  type. It routes the call to the corresponding low-level next_choice
              --  function.
           
          -   function Prev_Router (Fld : Field;
          -                         Usr : System.Address) return C_Int;
          -   pragma Convention (C, Prev_Router);
          +   function Prev_Router (Fld : Field;
          +                         Usr : System.Address) return C_Int;
          +   pragma Convention (C, Prev_Router);
              --  This is the Choice_Function for the internal low-level types
              --  introduced to wrap the low-level types by a Field_Type derived
              --  type. It routes the call to the corresponding low-level prev_choice
          @@ -214,33 +213,33 @@
           
              --  This is the Argument structure maintained by all low-level field types
              --  introduced by this binding.
          -   type Argument is record
          -      Typ : Field_Type_Access;   --  the Field_Type creating this record
          -      Usr : System.Address;      --  original arg for builtin low-level types
          -      Cft : C_Field_Type;        --  the original low-level type
          +   type Argument is record
          +      Typ : Field_Type_Access;   --  the Field_Type creating this record
          +      Usr : System.Address;      --  original arg for builtin low-level types
          +      Cft : C_Field_Type;        --  the original low-level type
              end record;
          -   type Argument_Access is access all Argument;
          +   type Argument_Access is access all Argument;
           
              --  +----------------------------------------------------------------------
              --  |
              --  | Some Imports of libform routines to deal with low-level fieldtypes.
              --  |
          -   function New_Fieldtype (Fcheck : Field_Check_Function;
          -                           Ccheck : Char_Check_Function)
          -     return C_Field_Type;
          +   function New_Fieldtype (Fcheck : Field_Check_Function;
          +                           Ccheck : Char_Check_Function)
          +     return C_Field_Type;
              pragma Import (C, New_Fieldtype, "new_fieldtype");
           
          -   function Set_Fieldtype_Arg (Cft : C_Field_Type;
          -                               Mak : Makearg_Function := Make_Arg'Access;
          -                               Cop : Copyarg_Function := Copy_Arg'Access;
          -                               Fre : Freearg_Function := Free_Arg'Access)
          -     return C_Int;
          +   function Set_Fieldtype_Arg (Cft : C_Field_Type;
          +                               Mak : Makearg_Function := Make_Arg'Access;
          +                               Cop : Copyarg_Function := Copy_Arg'Access;
          +                               Fre : Freearg_Function := Free_Arg'Access)
          +     return C_Int;
              pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
           
          -   function Set_Fieldtype_Choice (Cft : C_Field_Type;
          -                                  Next, Prev : Choice_Function)
          -     return C_Int;
          +   function Set_Fieldtype_Choice (Cft : C_Field_Type;
          +                                  Next, Prev : Choice_Function)
          +     return C_Int;
              pragma Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
           
          -end Terminal_Interface.Curses.Forms.Field_Types;
          +end Terminal_Interface.Curses.Forms.Field_Types;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-forms-field_user_data.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -46,31 +45,31 @@
           ------------------------------------------------------------------------------
           
           generic
          -   type User is limited private;
          -   type User_Access is access User;
          -package Terminal_Interface.Curses.Forms.Field_User_Data is
          -   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_User_Data);
          +   type User is limited private;
          +   type User_Access is access User;
          +package Terminal_Interface.Curses.Forms.Field_User_Data is
          +   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_User_Data);
           
              --  |=====================================================================
              --  | Man page form_field_userptr.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Set_User_Data (Fld  : in Field;
          -                            Data : in User_Access);
          +   procedure Set_User_Data (Fld  : in Field;
          +                            Data : in User_Access);
              --  AKA: set_field_userptr
          -   pragma Inline (Set_User_Data);
          +   pragma Inline (Set_User_Data);
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Get_User_Data (Fld  : in  Field;
          -                            Data : out User_Access);
          +   procedure Get_User_Data (Fld  : in  Field;
          +                            Data : out User_Access);
              --  AKA: field_userptr
           
              --  #1A NAME="AFU_3"#2|
          -   function Get_User_Data (Fld  : in  Field) return User_Access;
          +   function Get_User_Data (Fld  : in  Field) return User_Access;
              --  AKA: field_userptr
              --  Sama as function
              pragma Inline (Get_User_Data);
           
          -end Terminal_Interface.Curses.Forms.Field_User_Data;
          +end Terminal_Interface.Curses.Forms.Field_User_Data;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-forms-form_user_data.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -46,31 +45,31 @@
           ------------------------------------------------------------------------------
           
           generic
          -   type User is limited private;
          -   type User_Access is access User;
          -package Terminal_Interface.Curses.Forms.Form_User_Data is
          -   pragma Preelaborate (Terminal_Interface.Curses.Forms.Form_User_Data);
          +   type User is limited private;
          +   type User_Access is access User;
          +package Terminal_Interface.Curses.Forms.Form_User_Data is
          +   pragma Preelaborate (Terminal_Interface.Curses.Forms.Form_User_Data);
           
              --  |=====================================================================
              --  | Man page form_userptr.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Set_User_Data (Frm  : in Form;
          -                            Data : in User_Access);
          +   procedure Set_User_Data (Frm  : in Form;
          +                            Data : in User_Access);
              --  AKA: set_form_userptr
          -   pragma Inline (Set_User_Data);
          +   pragma Inline (Set_User_Data);
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Get_User_Data (Frm  : in  Form;
          -                            Data : out User_Access);
          +   procedure Get_User_Data (Frm  : in  Form;
          +                            Data : out User_Access);
              --  AKA: form_userptr
           
              --  #1A NAME="AFU_3"#2|
          -   function Get_User_Data (Frm  : in  Form) return User_Access;
          +   function Get_User_Data (Frm  : in  Form) return User_Access;
              --  AKA: form_userptr
              --  Same as function
              pragma Inline (Get_User_Data);
           
          -end Terminal_Interface.Curses.Forms.Form_User_Data;
          +end Terminal_Interface.Curses.Forms.Form_User_Data;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-forms__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-forms__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-forms__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-forms.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -52,41 +51,41 @@
           with System;
           with Ada.Characters.Latin_1;
           
          -package Terminal_Interface.Curses.Forms is
          -   pragma Preelaborate (Terminal_Interface.Curses.Forms);
          +package Terminal_Interface.Curses.Forms is
          +   pragma Preelaborate (Terminal_Interface.Curses.Forms);
              pragma Linker_Options ("-lform");
              pragma Linker_Options ("-lncurses");
           
              Space : Character renames Ada.Characters.Latin_1.Space;
           
          -   type Field        is private;
          -   type Form         is private;
          +   type Field        is private;
          +   type Form         is private;
           
          -   Null_Field        : constant Field;
          -   Null_Form         : constant Form;
          +   Null_Field        : constant Field;
          +   Null_Form         : constant Form;
           
          -   type Field_Justification is (None,
          -                                Left,
          -                                Center,
          -                                Right);
          +   type Field_Justification is (None,
          +                                Left,
          +                                Center,
          +                                Right);
           
              pragma Warnings (Off);
          -   type Field_Option_Set is
          +   type Field_Option_Set is
                 record
          -         Visible     : Boolean;
          -         Active      : Boolean;
          -         Public      : Boolean;
          -         Edit        : Boolean;
          -         Wrap        : Boolean;
          -         Blank       : Boolean;
          -         Auto_Skip   : Boolean;
          -         Null_Ok     : Boolean;
          -         Pass_Ok     : Boolean;
          -         Static      : Boolean;
          +         Visible     : Boolean;
          +         Active      : Boolean;
          +         Public      : Boolean;
          +         Edit        : Boolean;
          +         Wrap        : Boolean;
          +         Blank       : Boolean;
          +         Auto_Skip   : Boolean;
          +         Null_Ok     : Boolean;
          +         Pass_Ok     : Boolean;
          +         Static      : Boolean;
                 end record;
          -   pragma Convention (C, Field_Option_Set);
          +   pragma Convention (C, Field_Option_Set);
           
          -   for Field_Option_Set use
          +   for Field_Option_Set use
                 record
                    Visible     at 0 range  0 ..  0;
                    Active      at 0 range  1 ..  1;
          @@ -99,328 +98,328 @@
                    Pass_Ok     at 0 range  8 ..  8;
                    Static      at 0 range  9 ..  9;
                 end record;
          -   for Field_Option_Set'Size use 32;
          +   for Field_Option_Set'Size use 32;
              --  Please note: this rep. clause is generated and may be
              --               different on your system.Dnl
           
              pragma Warnings (On);
           
          -   function Default_Field_Options return Field_Option_Set;
          +   function Default_Field_Options return Field_Option_Set;
              --  The initial defaults for the field options.
          -   pragma Inline (Default_Field_Options);
          +   pragma Inline (Default_Field_Options);
           
              pragma Warnings (Off);
          -   type Form_Option_Set is
          +   type Form_Option_Set is
                 record
          -         NL_Overload : Boolean;
          -         BS_Overload : Boolean;
          +         NL_Overload : Boolean;
          +         BS_Overload : Boolean;
                 end record;
          -   pragma Convention (C, Form_Option_Set);
          +   pragma Convention (C, Form_Option_Set);
           
          -   for Form_Option_Set use
          +   for Form_Option_Set use
                 record
                    NL_Overload at 0 range  0 ..  0;
                    BS_Overload at 0 range  1 ..  1;
                 end record;
          -   for Form_Option_Set'Size use 32;
          +   for Form_Option_Set'Size use 32;
              --  Please note: this rep. clause is generated and may be
              --               different on your system.Dnl
           
              pragma Warnings (On);
           
          -   function Default_Form_Options return Form_Option_Set;
          +   function Default_Form_Options return Form_Option_Set;
              --  The initial defaults for the form options.
          -   pragma Inline (Default_Form_Options);
          +   pragma Inline (Default_Form_Options);
           
          -   type Buffer_Number is new Natural;
          +   type Buffer_Number is new Natural;
           
          -   type Field_Array is array (Positive range <>) of aliased Field;
          -   pragma Convention (C, Field_Array);
          +   type Field_Array is array (Positive range <>) of aliased Field;
          +   pragma Convention (C, Field_Array);
           
          -   type Field_Array_Access is access Field_Array;
          +   type Field_Array_Access is access Field_Array;
           
          -   procedure Free (FA          : in out Field_Array_Access;
          -                   Free_Fields : in Boolean := False);
          +   procedure Free (FA          : in out Field_Array_Access;
          +                   Free_Fields : in Boolean := False);
              --  Release the memory for an allocated field array
              --  If Free_Fields is True, call Delete() for all the fields in
              --  the array.
           
          -   subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57);
          +   subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57);
           
              --  The prefix F_ stands for "Form Request"
          -   F_Next_Page                : constant Form_Request_Code := Key_Max + 1;
          -   F_Previous_Page            : constant Form_Request_Code := Key_Max + 2;
          -   F_First_Page               : constant Form_Request_Code := Key_Max + 3;
          -   F_Last_Page                : constant Form_Request_Code := Key_Max + 4;
          -
          -   F_Next_Field               : constant Form_Request_Code := Key_Max + 5;
          -   F_Previous_Field           : constant Form_Request_Code := Key_Max + 6;
          -   F_First_Field              : constant Form_Request_Code := Key_Max + 7;
          -   F_Last_Field               : constant Form_Request_Code := Key_Max + 8;
          -   F_Sorted_Next_Field        : constant Form_Request_Code := Key_Max + 9;
          -   F_Sorted_Previous_Field    : constant Form_Request_Code := Key_Max + 10;
          -   F_Sorted_First_Field       : constant Form_Request_Code := Key_Max + 11;
          -   F_Sorted_Last_Field        : constant Form_Request_Code := Key_Max + 12;
          -   F_Left_Field               : constant Form_Request_Code := Key_Max + 13;
          -   F_Right_Field              : constant Form_Request_Code := Key_Max + 14;
          -   F_Up_Field                 : constant Form_Request_Code := Key_Max + 15;
          -   F_Down_Field               : constant Form_Request_Code := Key_Max + 16;
          -
          -   F_Next_Char                : constant Form_Request_Code := Key_Max + 17;
          -   F_Previous_Char            : constant Form_Request_Code := Key_Max + 18;
          -   F_Next_Line                : constant Form_Request_Code := Key_Max + 19;
          -   F_Previous_Line            : constant Form_Request_Code := Key_Max + 20;
          -   F_Next_Word                : constant Form_Request_Code := Key_Max + 21;
          -   F_Previous_Word            : constant Form_Request_Code := Key_Max + 22;
          -   F_Begin_Field              : constant Form_Request_Code := Key_Max + 23;
          -   F_End_Field                : constant Form_Request_Code := Key_Max + 24;
          -   F_Begin_Line               : constant Form_Request_Code := Key_Max + 25;
          -   F_End_Line                 : constant Form_Request_Code := Key_Max + 26;
          -   F_Left_Char                : constant Form_Request_Code := Key_Max + 27;
          -   F_Right_Char               : constant Form_Request_Code := Key_Max + 28;
          -   F_Up_Char                  : constant Form_Request_Code := Key_Max + 29;
          -   F_Down_Char                : constant Form_Request_Code := Key_Max + 30;
          -
          -   F_New_Line                 : constant Form_Request_Code := Key_Max + 31;
          -   F_Insert_Char              : constant Form_Request_Code := Key_Max + 32;
          -   F_Insert_Line              : constant Form_Request_Code := Key_Max + 33;
          -   F_Delete_Char              : constant Form_Request_Code := Key_Max + 34;
          -   F_Delete_Previous          : constant Form_Request_Code := Key_Max + 35;
          -   F_Delete_Line              : constant Form_Request_Code := Key_Max + 36;
          -   F_Delete_Word              : constant Form_Request_Code := Key_Max + 37;
          -   F_Clear_EOL                : constant Form_Request_Code := Key_Max + 38;
          -   F_Clear_EOF                : constant Form_Request_Code := Key_Max + 39;
          -   F_Clear_Field              : constant Form_Request_Code := Key_Max + 40;
          -   F_Overlay_Mode             : constant Form_Request_Code := Key_Max + 41;
          -   F_Insert_Mode              : constant Form_Request_Code := Key_Max + 42;
          +   F_Next_Page                : constant Form_Request_Code := Key_Max + 1;
          +   F_Previous_Page            : constant Form_Request_Code := Key_Max + 2;
          +   F_First_Page               : constant Form_Request_Code := Key_Max + 3;
          +   F_Last_Page                : constant Form_Request_Code := Key_Max + 4;
          +
          +   F_Next_Field               : constant Form_Request_Code := Key_Max + 5;
          +   F_Previous_Field           : constant Form_Request_Code := Key_Max + 6;
          +   F_First_Field              : constant Form_Request_Code := Key_Max + 7;
          +   F_Last_Field               : constant Form_Request_Code := Key_Max + 8;
          +   F_Sorted_Next_Field        : constant Form_Request_Code := Key_Max + 9;
          +   F_Sorted_Previous_Field    : constant Form_Request_Code := Key_Max + 10;
          +   F_Sorted_First_Field       : constant Form_Request_Code := Key_Max + 11;
          +   F_Sorted_Last_Field        : constant Form_Request_Code := Key_Max + 12;
          +   F_Left_Field               : constant Form_Request_Code := Key_Max + 13;
          +   F_Right_Field              : constant Form_Request_Code := Key_Max + 14;
          +   F_Up_Field                 : constant Form_Request_Code := Key_Max + 15;
          +   F_Down_Field               : constant Form_Request_Code := Key_Max + 16;
          +
          +   F_Next_Char                : constant Form_Request_Code := Key_Max + 17;
          +   F_Previous_Char            : constant Form_Request_Code := Key_Max + 18;
          +   F_Next_Line                : constant Form_Request_Code := Key_Max + 19;
          +   F_Previous_Line            : constant Form_Request_Code := Key_Max + 20;
          +   F_Next_Word                : constant Form_Request_Code := Key_Max + 21;
          +   F_Previous_Word            : constant Form_Request_Code := Key_Max + 22;
          +   F_Begin_Field              : constant Form_Request_Code := Key_Max + 23;
          +   F_End_Field                : constant Form_Request_Code := Key_Max + 24;
          +   F_Begin_Line               : constant Form_Request_Code := Key_Max + 25;
          +   F_End_Line                 : constant Form_Request_Code := Key_Max + 26;
          +   F_Left_Char                : constant Form_Request_Code := Key_Max + 27;
          +   F_Right_Char               : constant Form_Request_Code := Key_Max + 28;
          +   F_Up_Char                  : constant Form_Request_Code := Key_Max + 29;
          +   F_Down_Char                : constant Form_Request_Code := Key_Max + 30;
          +
          +   F_New_Line                 : constant Form_Request_Code := Key_Max + 31;
          +   F_Insert_Char              : constant Form_Request_Code := Key_Max + 32;
          +   F_Insert_Line              : constant Form_Request_Code := Key_Max + 33;
          +   F_Delete_Char              : constant Form_Request_Code := Key_Max + 34;
          +   F_Delete_Previous          : constant Form_Request_Code := Key_Max + 35;
          +   F_Delete_Line              : constant Form_Request_Code := Key_Max + 36;
          +   F_Delete_Word              : constant Form_Request_Code := Key_Max + 37;
          +   F_Clear_EOL                : constant Form_Request_Code := Key_Max + 38;
          +   F_Clear_EOF                : constant Form_Request_Code := Key_Max + 39;
          +   F_Clear_Field              : constant Form_Request_Code := Key_Max + 40;
          +   F_Overlay_Mode             : constant Form_Request_Code := Key_Max + 41;
          +   F_Insert_Mode              : constant Form_Request_Code := Key_Max + 42;
           
              --  Vertical Scrolling
          -   F_ScrollForward_Line       : constant Form_Request_Code := Key_Max + 43;
          -   F_ScrollBackward_Line      : constant Form_Request_Code := Key_Max + 44;
          -   F_ScrollForward_Page       : constant Form_Request_Code := Key_Max + 45;
          -   F_ScrollBackward_Page      : constant Form_Request_Code := Key_Max + 46;
          -   F_ScrollForward_HalfPage   : constant Form_Request_Code := Key_Max + 47;
          -   F_ScrollBackward_HalfPage  : constant Form_Request_Code := Key_Max + 48;
          +   F_ScrollForward_Line       : constant Form_Request_Code := Key_Max + 43;
          +   F_ScrollBackward_Line      : constant Form_Request_Code := Key_Max + 44;
          +   F_ScrollForward_Page       : constant Form_Request_Code := Key_Max + 45;
          +   F_ScrollBackward_Page      : constant Form_Request_Code := Key_Max + 46;
          +   F_ScrollForward_HalfPage   : constant Form_Request_Code := Key_Max + 47;
          +   F_ScrollBackward_HalfPage  : constant Form_Request_Code := Key_Max + 48;
           
              --  Horizontal Scrolling
          -   F_HScrollForward_Char      : constant Form_Request_Code := Key_Max + 49;
          -   F_HScrollBackward_Char     : constant Form_Request_Code := Key_Max + 50;
          -   F_HScrollForward_Line      : constant Form_Request_Code := Key_Max + 51;
          -   F_HScrollBackward_Line     : constant Form_Request_Code := Key_Max + 52;
          -   F_HScrollForward_HalfLine  : constant Form_Request_Code := Key_Max + 53;
          -   F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54;
          -
          -   F_Validate_Field           : constant Form_Request_Code := Key_Max + 55;
          -   F_Next_Choice              : constant Form_Request_Code := Key_Max + 56;
          -   F_Previous_Choice          : constant Form_Request_Code := Key_Max + 57;
          +   F_HScrollForward_Char      : constant Form_Request_Code := Key_Max + 49;
          +   F_HScrollBackward_Char     : constant Form_Request_Code := Key_Max + 50;
          +   F_HScrollForward_Line      : constant Form_Request_Code := Key_Max + 51;
          +   F_HScrollBackward_Line     : constant Form_Request_Code := Key_Max + 52;
          +   F_HScrollForward_HalfLine  : constant Form_Request_Code := Key_Max + 53;
          +   F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54;
          +
          +   F_Validate_Field           : constant Form_Request_Code := Key_Max + 55;
          +   F_Next_Choice              : constant Form_Request_Code := Key_Max + 56;
          +   F_Previous_Choice          : constant Form_Request_Code := Key_Max + 57;
           
              --  For those who like the old 'C' style request names
          -   REQ_NEXT_PAGE    : Form_Request_Code renames F_Next_Page;
          -   REQ_PREV_PAGE    : Form_Request_Code renames F_Previous_Page;
          -   REQ_FIRST_PAGE   : Form_Request_Code renames F_First_Page;
          -   REQ_LAST_PAGE    : Form_Request_Code renames F_Last_Page;
          -
          -   REQ_NEXT_FIELD   : Form_Request_Code renames F_Next_Field;
          -   REQ_PREV_FIELD   : Form_Request_Code renames F_Previous_Field;
          -   REQ_FIRST_FIELD  : Form_Request_Code renames F_First_Field;
          -   REQ_LAST_FIELD   : Form_Request_Code renames F_Last_Field;
          -   REQ_SNEXT_FIELD  : Form_Request_Code renames F_Sorted_Next_Field;
          -   REQ_SPREV_FIELD  : Form_Request_Code renames F_Sorted_Previous_Field;
          -   REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field;
          -   REQ_SLAST_FIELD  : Form_Request_Code renames F_Sorted_Last_Field;
          -   REQ_LEFT_FIELD   : Form_Request_Code renames F_Left_Field;
          -   REQ_RIGHT_FIELD  : Form_Request_Code renames F_Right_Field;
          -   REQ_UP_FIELD     : Form_Request_Code renames F_Up_Field;
          -   REQ_DOWN_FIELD   : Form_Request_Code renames F_Down_Field;
          -
          -   REQ_NEXT_CHAR    : Form_Request_Code renames F_Next_Char;
          -   REQ_PREV_CHAR    : Form_Request_Code renames F_Previous_Char;
          -   REQ_NEXT_LINE    : Form_Request_Code renames F_Next_Line;
          -   REQ_PREV_LINE    : Form_Request_Code renames F_Previous_Line;
          -   REQ_NEXT_WORD    : Form_Request_Code renames F_Next_Word;
          -   REQ_PREV_WORD    : Form_Request_Code renames F_Previous_Word;
          -   REQ_BEG_FIELD    : Form_Request_Code renames F_Begin_Field;
          -   REQ_END_FIELD    : Form_Request_Code renames F_End_Field;
          -   REQ_BEG_LINE     : Form_Request_Code renames F_Begin_Line;
          -   REQ_END_LINE     : Form_Request_Code renames F_End_Line;
          -   REQ_LEFT_CHAR    : Form_Request_Code renames F_Left_Char;
          -   REQ_RIGHT_CHAR   : Form_Request_Code renames F_Right_Char;
          -   REQ_UP_CHAR      : Form_Request_Code renames F_Up_Char;
          -   REQ_DOWN_CHAR    : Form_Request_Code renames F_Down_Char;
          -
          -   REQ_NEW_LINE     : Form_Request_Code renames F_New_Line;
          -   REQ_INS_CHAR     : Form_Request_Code renames F_Insert_Char;
          -   REQ_INS_LINE     : Form_Request_Code renames F_Insert_Line;
          -   REQ_DEL_CHAR     : Form_Request_Code renames F_Delete_Char;
          -   REQ_DEL_PREV     : Form_Request_Code renames F_Delete_Previous;
          -   REQ_DEL_LINE     : Form_Request_Code renames F_Delete_Line;
          -   REQ_DEL_WORD     : Form_Request_Code renames F_Delete_Word;
          -   REQ_CLR_EOL      : Form_Request_Code renames F_Clear_EOL;
          -   REQ_CLR_EOF      : Form_Request_Code renames F_Clear_EOF;
          -   REQ_CLR_FIELD    : Form_Request_Code renames F_Clear_Field;
          -   REQ_OVL_MODE     : Form_Request_Code renames F_Overlay_Mode;
          -   REQ_INS_MODE     : Form_Request_Code renames F_Insert_Mode;
          -
          -   REQ_SCR_FLINE    : Form_Request_Code renames F_ScrollForward_Line;
          -   REQ_SCR_BLINE    : Form_Request_Code renames F_ScrollBackward_Line;
          -   REQ_SCR_FPAGE    : Form_Request_Code renames F_ScrollForward_Page;
          -   REQ_SCR_BPAGE    : Form_Request_Code renames F_ScrollBackward_Page;
          -   REQ_SCR_FHPAGE   : Form_Request_Code renames F_ScrollForward_HalfPage;
          -   REQ_SCR_BHPAGE   : Form_Request_Code renames F_ScrollBackward_HalfPage;
          -
          -   REQ_SCR_FCHAR    : Form_Request_Code renames F_HScrollForward_Char;
          -   REQ_SCR_BCHAR    : Form_Request_Code renames F_HScrollBackward_Char;
          -   REQ_SCR_HFLINE   : Form_Request_Code renames F_HScrollForward_Line;
          -   REQ_SCR_HBLINE   : Form_Request_Code renames F_HScrollBackward_Line;
          -   REQ_SCR_HFHALF   : Form_Request_Code renames F_HScrollForward_HalfLine;
          -   REQ_SCR_HBHALF   : Form_Request_Code renames F_HScrollBackward_HalfLine;
          -
          -   REQ_VALIDATION   : Form_Request_Code renames F_Validate_Field;
          -   REQ_NEXT_CHOICE  : Form_Request_Code renames F_Next_Choice;
          -   REQ_PREV_CHOICE  : Form_Request_Code renames F_Previous_Choice;
          +   REQ_NEXT_PAGE    : Form_Request_Code renames F_Next_Page;
          +   REQ_PREV_PAGE    : Form_Request_Code renames F_Previous_Page;
          +   REQ_FIRST_PAGE   : Form_Request_Code renames F_First_Page;
          +   REQ_LAST_PAGE    : Form_Request_Code renames F_Last_Page;
          +
          +   REQ_NEXT_FIELD   : Form_Request_Code renames F_Next_Field;
          +   REQ_PREV_FIELD   : Form_Request_Code renames F_Previous_Field;
          +   REQ_FIRST_FIELD  : Form_Request_Code renames F_First_Field;
          +   REQ_LAST_FIELD   : Form_Request_Code renames F_Last_Field;
          +   REQ_SNEXT_FIELD  : Form_Request_Code renames F_Sorted_Next_Field;
          +   REQ_SPREV_FIELD  : Form_Request_Code renames F_Sorted_Previous_Field;
          +   REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field;
          +   REQ_SLAST_FIELD  : Form_Request_Code renames F_Sorted_Last_Field;
          +   REQ_LEFT_FIELD   : Form_Request_Code renames F_Left_Field;
          +   REQ_RIGHT_FIELD  : Form_Request_Code renames F_Right_Field;
          +   REQ_UP_FIELD     : Form_Request_Code renames F_Up_Field;
          +   REQ_DOWN_FIELD   : Form_Request_Code renames F_Down_Field;
          +
          +   REQ_NEXT_CHAR    : Form_Request_Code renames F_Next_Char;
          +   REQ_PREV_CHAR    : Form_Request_Code renames F_Previous_Char;
          +   REQ_NEXT_LINE    : Form_Request_Code renames F_Next_Line;
          +   REQ_PREV_LINE    : Form_Request_Code renames F_Previous_Line;
          +   REQ_NEXT_WORD    : Form_Request_Code renames F_Next_Word;
          +   REQ_PREV_WORD    : Form_Request_Code renames F_Previous_Word;
          +   REQ_BEG_FIELD    : Form_Request_Code renames F_Begin_Field;
          +   REQ_END_FIELD    : Form_Request_Code renames F_End_Field;
          +   REQ_BEG_LINE     : Form_Request_Code renames F_Begin_Line;
          +   REQ_END_LINE     : Form_Request_Code renames F_End_Line;
          +   REQ_LEFT_CHAR    : Form_Request_Code renames F_Left_Char;
          +   REQ_RIGHT_CHAR   : Form_Request_Code renames F_Right_Char;
          +   REQ_UP_CHAR      : Form_Request_Code renames F_Up_Char;
          +   REQ_DOWN_CHAR    : Form_Request_Code renames F_Down_Char;
          +
          +   REQ_NEW_LINE     : Form_Request_Code renames F_New_Line;
          +   REQ_INS_CHAR     : Form_Request_Code renames F_Insert_Char;
          +   REQ_INS_LINE     : Form_Request_Code renames F_Insert_Line;
          +   REQ_DEL_CHAR     : Form_Request_Code renames F_Delete_Char;
          +   REQ_DEL_PREV     : Form_Request_Code renames F_Delete_Previous;
          +   REQ_DEL_LINE     : Form_Request_Code renames F_Delete_Line;
          +   REQ_DEL_WORD     : Form_Request_Code renames F_Delete_Word;
          +   REQ_CLR_EOL      : Form_Request_Code renames F_Clear_EOL;
          +   REQ_CLR_EOF      : Form_Request_Code renames F_Clear_EOF;
          +   REQ_CLR_FIELD    : Form_Request_Code renames F_Clear_Field;
          +   REQ_OVL_MODE     : Form_Request_Code renames F_Overlay_Mode;
          +   REQ_INS_MODE     : Form_Request_Code renames F_Insert_Mode;
          +
          +   REQ_SCR_FLINE    : Form_Request_Code renames F_ScrollForward_Line;
          +   REQ_SCR_BLINE    : Form_Request_Code renames F_ScrollBackward_Line;
          +   REQ_SCR_FPAGE    : Form_Request_Code renames F_ScrollForward_Page;
          +   REQ_SCR_BPAGE    : Form_Request_Code renames F_ScrollBackward_Page;
          +   REQ_SCR_FHPAGE   : Form_Request_Code renames F_ScrollForward_HalfPage;
          +   REQ_SCR_BHPAGE   : Form_Request_Code renames F_ScrollBackward_HalfPage;
          +
          +   REQ_SCR_FCHAR    : Form_Request_Code renames F_HScrollForward_Char;
          +   REQ_SCR_BCHAR    : Form_Request_Code renames F_HScrollBackward_Char;
          +   REQ_SCR_HFLINE   : Form_Request_Code renames F_HScrollForward_Line;
          +   REQ_SCR_HBLINE   : Form_Request_Code renames F_HScrollBackward_Line;
          +   REQ_SCR_HFHALF   : Form_Request_Code renames F_HScrollForward_HalfLine;
          +   REQ_SCR_HBHALF   : Form_Request_Code renames F_HScrollBackward_HalfLine;
          +
          +   REQ_VALIDATION   : Form_Request_Code renames F_Validate_Field;
          +   REQ_NEXT_CHOICE  : Form_Request_Code renames F_Next_Choice;
          +   REQ_PREV_CHOICE  : Form_Request_Code renames F_Previous_Choice;
           
          -   procedure Request_Name (Key  : in Form_Request_Code;
          -                           Name : out String);
          +   procedure Request_Name (Key  : in Form_Request_Code;
          +                           Name : out String);
           
          -   function  Request_Name (Key : Form_Request_Code) return String;
          +   function  Request_Name (Key : Form_Request_Code) return String;
              --  Same as function
              pragma Inline (Request_Name);
           
              ------------------
              --  Exceptions  --
              ------------------
          -   Form_Exception : exception;
          +   Form_Exception : exception;
           
              --  |=====================================================================
              --  | Man page form_field_new.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   function Create (Height       : Line_Count;
          -                    Width        : Column_Count;
          -                    Top          : Line_Position;
          -                    Left         : Column_Position;
          -                    Off_Screen   : Natural := 0;
          -                    More_Buffers : Buffer_Number := Buffer_Number'First)
          -                    return Field;
          +   function Create (Height       : Line_Count;
          +                    Width        : Column_Count;
          +                    Top          : Line_Position;
          +                    Left         : Column_Position;
          +                    Off_Screen   : Natural := 0;
          +                    More_Buffers : Buffer_Number := Buffer_Number'First)
          +                    return Field;
              --  AKA: new_field()
              --  An overloaded Create is defined later. Pragma Inline appears there.
           
              --  #1A NAME="AFU_2"#2|
          -   function New_Field (Height       : Line_Count;
          -                       Width        : Column_Count;
          -                       Top          : Line_Position;
          -                       Left         : Column_Position;
          -                       Off_Screen   : Natural := 0;
          -                       More_Buffers : Buffer_Number := Buffer_Number'First)
          -                       return Field renames Create;
          +   function New_Field (Height       : Line_Count;
          +                       Width        : Column_Count;
          +                       Top          : Line_Position;
          +                       Left         : Column_Position;
          +                       Off_Screen   : Natural := 0;
          +                       More_Buffers : Buffer_Number := Buffer_Number'First)
          +                       return Field renames Create;
              --  AKA: new_field()
              pragma Inline (New_Field);
           
              --  #1A NAME="AFU_3"#2|
          -   procedure Delete (Fld : in out Field);
          +   procedure Delete (Fld : in out Field);
              --  AKA: free_field()
              --  Reset Fld to Null_Field
              --  An overloaded Delete is defined later. Pragma Inline appears there.
           
              --  #1A NAME="AFU_4"#2|
          -   function Duplicate (Fld  : Field;
          -                       Top  : Line_Position;
          -                       Left : Column_Position) return Field;
          +   function Duplicate (Fld  : Field;
          +                       Top  : Line_Position;
          +                       Left : Column_Position) return Field;
              --  AKA: dup_field()
              pragma Inline (Duplicate);
           
              --  #1A NAME="AFU_5"#2|
          -   function Link (Fld  : Field;
          -                  Top  : Line_Position;
          -                  Left : Column_Position) return Field;
          +   function Link (Fld  : Field;
          +                  Top  : Line_Position;
          +                  Left : Column_Position) return Field;
              --  AKA: link_field()
          -   pragma Inline (Link);
          +   pragma Inline (Link);
           
              --  |=====================================================================
              --  | Man page form_field_just.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_6"#2|
          -   procedure Set_Justification (Fld  : in Field;
          -                                Just : in Field_Justification := None);
          +   procedure Set_Justification (Fld  : in Field;
          +                                Just : in Field_Justification := None);
              --  AKA: set_field_just()
          -   pragma Inline (Set_Justification);
          +   pragma Inline (Set_Justification);
           
              --  #1A NAME="AFU_7"#2|
          -   function Get_Justification (Fld : Field) return Field_Justification;
          +   function Get_Justification (Fld : Field) return Field_Justification;
              --  AKA: field_just()
          -   pragma Inline (Get_Justification);
          +   pragma Inline (Get_Justification);
           
              --  |=====================================================================
              --  | Man page form_field_buffer.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_8"#2|
          -   procedure Set_Buffer
          -     (Fld    : in Field;
          -      Buffer : in Buffer_Number := Buffer_Number'First;
          -      Str    : in String);
          +   procedure Set_Buffer
          +     (Fld    : in Field;
          +      Buffer : in Buffer_Number := Buffer_Number'First;
          +      Str    : in String);
              --  AKA: set_field_buffer()
              --  Not inlined
           
              --  #1A NAME="AFU_9"#2|
          -   procedure Get_Buffer
          -     (Fld    : in Field;
          -      Buffer : in Buffer_Number := Buffer_Number'First;
          -      Str    : out String);
          +   procedure Get_Buffer
          +     (Fld    : in Field;
          +      Buffer : in Buffer_Number := Buffer_Number'First;
          +      Str    : out String);
              --  AKA: field_buffer()
           
          -   function Get_Buffer
          -     (Fld    : in Field;
          -      Buffer : in Buffer_Number := Buffer_Number'First) return String;
          +   function Get_Buffer
          +     (Fld    : in Field;
          +      Buffer : in Buffer_Number := Buffer_Number'First) return String;
              --  AKA: field_buffer()
              --  Same but as function
              pragma Inline (Get_Buffer);
           
              --  #1A NAME="AFU_10"#2|
          -   procedure Set_Status (Fld    : in Field;
          -                         Status : in Boolean := True);
          +   procedure Set_Status (Fld    : in Field;
          +                         Status : in Boolean := True);
              --  AKA: set_field_status()
          -   pragma Inline (Set_Status);
          +   pragma Inline (Set_Status);
           
              --  #1A NAME="AFU_11"#2|
          -   function Changed (Fld : Field) return Boolean;
          +   function Changed (Fld : Field) return Boolean;
              --  AKA: field_status()
          -   pragma Inline (Changed);
          +   pragma Inline (Changed);
           
              --  #1A NAME="AFU_12"#2|
          -   procedure Set_Maximum_Size (Fld : in Field;
          -                               Max : in Natural := 0);
          +   procedure Set_Maximum_Size (Fld : in Field;
          +                               Max : in Natural := 0);
              --  AKA: set_field_max()
          -   pragma Inline (Set_Maximum_Size);
          +   pragma Inline (Set_Maximum_Size);
           
              --  |=====================================================================
              --  | Man page form_field_opts.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_13"#2|
          -   procedure Set_Options (Fld     : in Field;
          -                          Options : in Field_Option_Set);
          +   procedure Set_Options (Fld     : in Field;
          +                          Options : in Field_Option_Set);
              --  AKA: set_field_opts()
              --  An overloaded version is defined later. Pragma Inline appears there
           
              --  #1A NAME="AFU_14"#2|
          -   procedure Switch_Options (Fld     : in Field;
          -                             Options : in Field_Option_Set;
          -                             On      : Boolean := True);
          +   procedure Switch_Options (Fld     : in Field;
          +                             Options : in Field_Option_Set;
          +                             On      : Boolean := True);
              --  AKA: field_opts_on()
              --  AKA: field_opts_off()
              --  An overloaded version is defined later. Pragma Inline appears there
           
              --  #1A NAME="AFU_15"#2|
          -   procedure Get_Options (Fld     : in  Field;
          -                          Options : out Field_Option_Set);
          +   procedure Get_Options (Fld     : in  Field;
          +                          Options : out Field_Option_Set);
              --  AKA: field_opts()
           
              --  #1A NAME="AFU_16"#2|
          -   function Get_Options (Fld : Field := Null_Field)
          -                         return Field_Option_Set;
          +   function Get_Options (Fld : Field := Null_Field)
          +                         return Field_Option_Set;
              --  AKA: field_opts()
              --  An overloaded version is defined later. Pragma Inline appears there
           
          @@ -429,161 +428,161 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_17"#2|
          -   procedure Set_Foreground
          -     (Fld   : in Field;
          -      Fore  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          +   procedure Set_Foreground
          +     (Fld   : in Field;
          +      Fore  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
              --  AKA: set_field_fore()
          -   pragma Inline (Set_Foreground);
          +   pragma Inline (Set_Foreground);
           
              --  #1A NAME="AFU_18"#2|
          -   procedure Foreground (Fld  : in  Field;
          -                         Fore : out Character_Attribute_Set);
          +   procedure Foreground (Fld  : in  Field;
          +                         Fore : out Character_Attribute_Set);
              --  AKA: field_fore()
           
              --  #1A NAME="AFU_19"#2|
          -   procedure Foreground (Fld   : in  Field;
          -                         Fore  : out Character_Attribute_Set;
          -                         Color : out Color_Pair);
          +   procedure Foreground (Fld   : in  Field;
          +                         Fore  : out Character_Attribute_Set;
          +                         Color : out Color_Pair);
              --  AKA: field_fore()
              pragma Inline (Foreground);
           
              --  #1A NAME="AFU_20"#2|
          -   procedure Set_Background
          -     (Fld   : in Field;
          -      Back  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          +   procedure Set_Background
          +     (Fld   : in Field;
          +      Back  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
              --  AKA: set_field_back()
              pragma Inline (Set_Background);
           
              --  #1A NAME="AFU_21"#2|
          -   procedure Background (Fld  : in  Field;
          -                         Back : out Character_Attribute_Set);
          +   procedure Background (Fld  : in  Field;
          +                         Back : out Character_Attribute_Set);
              --  AKA: field_back()
           
              --  #1A NAME="AFU_22"#2|
          -   procedure Background (Fld   : in  Field;
          -                         Back  : out Character_Attribute_Set;
          -                         Color : out Color_Pair);
          +   procedure Background (Fld   : in  Field;
          +                         Back  : out Character_Attribute_Set;
          +                         Color : out Color_Pair);
              --  AKA: field_back()
              pragma Inline (Background);
           
              --  #1A NAME="AFU_23"#2|
          -   procedure Set_Pad_Character (Fld : in Field;
          -                                Pad : in Character := Space);
          +   procedure Set_Pad_Character (Fld : in Field;
          +                                Pad : in Character := Space);
              --  AKA: set_field_pad()
          -   pragma Inline (Set_Pad_Character);
          +   pragma Inline (Set_Pad_Character);
           
              --  #1A NAME="AFU_24"#2|
          -   procedure Pad_Character (Fld : in  Field;
          -                            Pad : out Character);
          +   procedure Pad_Character (Fld : in  Field;
          +                            Pad : out Character);
              --  AKA: field_pad()
          -   pragma Inline (Pad_Character);
          +   pragma Inline (Pad_Character);
           
              --  |=====================================================================
              --  | Man page form_field_info.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_25"#2|
          -   procedure Info (Fld                : in  Field;
          -                   Lines              : out Line_Count;
          -                   Columns            : out Column_Count;
          -                   First_Row          : out Line_Position;
          -                   First_Column       : out Column_Position;
          -                   Off_Screen         : out Natural;
          -                   Additional_Buffers : out Buffer_Number);
          +   procedure Info (Fld                : in  Field;
          +                   Lines              : out Line_Count;
          +                   Columns            : out Column_Count;
          +                   First_Row          : out Line_Position;
          +                   First_Column       : out Column_Position;
          +                   Off_Screen         : out Natural;
          +                   Additional_Buffers : out Buffer_Number);
              --  AKA: field_info()
          -   pragma Inline (Info);
          +   pragma Inline (Info);
           
              --  #1A NAME="AFU_26"#2|
          -   procedure Dynamic_Info (Fld     : in Field;
          -                           Lines   : out Line_Count;
          -                           Columns : out Column_Count;
          -                           Max     : out Natural);
          +   procedure Dynamic_Info (Fld     : in Field;
          +                           Lines   : out Line_Count;
          +                           Columns : out Column_Count;
          +                           Max     : out Natural);
              --  AKA: dynamic_field_info()
          -   pragma Inline (Dynamic_Info);
          +   pragma Inline (Dynamic_Info);
           
              --  |=====================================================================
              --  | Man page form_win.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_27"#2|
          -   procedure Set_Window (Frm : in Form;
          -                         Win : in Window);
          +   procedure Set_Window (Frm : in Form;
          +                         Win : in Window);
              --  AKA: set_form_win()
          -   pragma Inline (Set_Window);
          +   pragma Inline (Set_Window);
           
              --  #1A NAME="AFU_28"#2|
          -   function Get_Window (Frm : Form) return Window;
          +   function Get_Window (Frm : Form) return Window;
              --  AKA: form_win()
          -   pragma Inline (Get_Window);
          +   pragma Inline (Get_Window);
           
              --  #1A NAME="AFU_29"#2|
          -   procedure Set_Sub_Window (Frm : in Form;
          -                             Win : in Window);
          +   procedure Set_Sub_Window (Frm : in Form;
          +                             Win : in Window);
              --  AKA: set_form_sub()
          -   pragma Inline (Set_Sub_Window);
          +   pragma Inline (Set_Sub_Window);
           
              --  #1A NAME="AFU_30"#2|
          -   function Get_Sub_Window (Frm : Form) return Window;
          +   function Get_Sub_Window (Frm : Form) return Window;
              --  AKA: form_sub()
          -   pragma Inline (Get_Sub_Window);
          +   pragma Inline (Get_Sub_Window);
           
              --  #1A NAME="AFU_31"#2|
          -   procedure Scale (Frm     : in Form;
          -                    Lines   : out Line_Count;
          -                    Columns : out Column_Count);
          +   procedure Scale (Frm     : in Form;
          +                    Lines   : out Line_Count;
          +                    Columns : out Column_Count);
              --  AKA: scale_form()
          -   pragma Inline (Scale);
          +   pragma Inline (Scale);
           
              --  |=====================================================================
              --  | Man page form_hook.3x
              --  |=====================================================================
           
          -   type Form_Hook_Function is access procedure (Frm : in Form);
          -   pragma Convention (C, Form_Hook_Function);
          +   type Form_Hook_Function is access procedure (Frm : in Form);
          +   pragma Convention (C, Form_Hook_Function);
           
              --  #1A NAME="AFU_32"#2|
          -   procedure Set_Field_Init_Hook (Frm  : in Form;
          -                                  Proc : in Form_Hook_Function);
          +   procedure Set_Field_Init_Hook (Frm  : in Form;
          +                                  Proc : in Form_Hook_Function);
              --  AKA: set_field_init()
          -   pragma Inline (Set_Field_Init_Hook);
          +   pragma Inline (Set_Field_Init_Hook);
           
              --  #1A NAME="AFU_33"#2|
          -   procedure Set_Field_Term_Hook (Frm  : in Form;
          -                                  Proc : in Form_Hook_Function);
          +   procedure Set_Field_Term_Hook (Frm  : in Form;
          +                                  Proc : in Form_Hook_Function);
              --  AKA: set_field_term()
          -   pragma Inline (Set_Field_Term_Hook);
          +   pragma Inline (Set_Field_Term_Hook);
           
              --  #1A NAME="AFU_34"#2|
          -   procedure Set_Form_Init_Hook (Frm  : in Form;
          -                                 Proc : in Form_Hook_Function);
          +   procedure Set_Form_Init_Hook (Frm  : in Form;
          +                                 Proc : in Form_Hook_Function);
              --  AKA: set_form_init()
          -   pragma Inline (Set_Form_Init_Hook);
          +   pragma Inline (Set_Form_Init_Hook);
           
              --  #1A NAME="AFU_35"#2|
          -   procedure Set_Form_Term_Hook (Frm  : in Form;
          -                                 Proc : in Form_Hook_Function);
          +   procedure Set_Form_Term_Hook (Frm  : in Form;
          +                                 Proc : in Form_Hook_Function);
              --  AKA: set_form_term()
          -   pragma Inline (Set_Form_Term_Hook);
          +   pragma Inline (Set_Form_Term_Hook);
           
              --  #1A NAME="AFU_36"#2|
          -   function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
          +   function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
              --  AKA: field_init()
              pragma Import (C, Get_Field_Init_Hook, "field_init");
           
              --  #1A NAME="AFU_37"#2|
          -   function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
          +   function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
              --  AKA: field_term()
              pragma Import (C, Get_Field_Term_Hook, "field_term");
           
              --  #1A NAME="AFU_38"#2|
          -   function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
          +   function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
              --  AKA: form_init()
              pragma Import (C, Get_Form_Init_Hook, "form_init");
           
              --  #1A NAME="AFU_39"#2|
          -   function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
          +   function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
              --  AKA: form_term()
              pragma Import (C, Get_Form_Term_Hook, "form_term");
           
          @@ -592,52 +591,52 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_40"#2|
          -   procedure Redefine (Frm  : in Form;
          -                       Flds : in Field_Array_Access);
          +   procedure Redefine (Frm  : in Form;
          +                       Flds : in Field_Array_Access);
              --  AKA: set_form_fields()
          -   pragma Inline (Redefine);
          +   pragma Inline (Redefine);
           
              --  #1A NAME="AFU_41"#2|
          -   procedure Set_Fields (Frm  : in Form;
          -                         Flds : in Field_Array_Access) renames Redefine;
          +   procedure Set_Fields (Frm  : in Form;
          +                         Flds : in Field_Array_Access) renames Redefine;
              --  AKA: set_form_fields()
              --  pragma Inline (Set_Fields);
           
              --  #1A NAME="AFU_42"#2|
          -   function Fields (Frm   : Form;
          -                    Index : Positive) return Field;
          +   function Fields (Frm   : Form;
          +                    Index : Positive) return Field;
              --  AKA: form_fields()
          -   pragma Inline (Fields);
          +   pragma Inline (Fields);
           
              --  #1A NAME="AFU_43"#2|
          -   function Field_Count (Frm : Form) return Natural;
          +   function Field_Count (Frm : Form) return Natural;
              --  AKA: field_count()
          -   pragma Inline (Field_Count);
          +   pragma Inline (Field_Count);
           
              --  #1A NAME="AFU_44"#2|
          -   procedure Move (Fld    : in Field;
          -                   Line   : in Line_Position;
          -                   Column : in Column_Position);
          +   procedure Move (Fld    : in Field;
          +                   Line   : in Line_Position;
          +                   Column : in Column_Position);
              --  AKA: move_field()
          -   pragma Inline (Move);
          +   pragma Inline (Move);
           
              --  |=====================================================================
              --  | Man page form_new.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_45"#2|
          -   function Create (Fields : Field_Array_Access) return Form;
          +   function Create (Fields : Field_Array_Access) return Form;
              --  AKA: new_form()
              pragma Inline (Create);
           
              --  #1A NAME="AFU_46"#2|
          -   function New_Form (Fields : Field_Array_Access) return Form
          -     renames Create;
          +   function New_Form (Fields : Field_Array_Access) return Form
          +     renames Create;
              --  AKA: new_form()
              --  pragma Inline (New_Form);
           
              --  #1A NAME="AFU_47"#2|
          -   procedure Delete (Frm : in out Form);
          +   procedure Delete (Frm : in out Form);
              --  AKA: free_form()
              --  Reset Frm to Null_Form
              pragma Inline (Delete);
          @@ -647,26 +646,26 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_48"#2|
          -   procedure Set_Options (Frm     : in Form;
          -                          Options : in Form_Option_Set);
          +   procedure Set_Options (Frm     : in Form;
          +                          Options : in Form_Option_Set);
              --  AKA: set_form_opts()
              pragma Inline (Set_Options);
           
              --  #1A NAME="AFU_49"#2|
          -   procedure Switch_Options (Frm     : in Form;
          -                             Options : in Form_Option_Set;
          -                             On      : Boolean := True);
          +   procedure Switch_Options (Frm     : in Form;
          +                             Options : in Form_Option_Set;
          +                             On      : Boolean := True);
              --  AKA: form_opts_on()
              --  AKA: form_opts_off()
              pragma Inline (Switch_Options);
           
              --  #1A NAME="AFU_50"#2|
          -   procedure Get_Options (Frm     : in  Form;
          -                          Options : out Form_Option_Set);
          +   procedure Get_Options (Frm     : in  Form;
          +                          Options : out Form_Option_Set);
              --  AKA: form_opts()
           
              --  #1A NAME="AFU_51"#2|
          -   function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
          +   function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
              --  AKA: form_opts()
              pragma Inline (Get_Options);
           
          @@ -675,47 +674,47 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_52"#2|
          -   procedure Post (Frm  : in Form;
          -                   Post : in Boolean := True);
          +   procedure Post (Frm  : in Form;
          +                   Post : in Boolean := True);
              --  AKA: post_form()
              --  AKA: unpost_form()
          -   pragma Inline (Post);
          +   pragma Inline (Post);
           
              --  |=====================================================================
              --  | Man page form_cursor.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_53"#2|
          -   procedure Position_Cursor (Frm : Form);
          +   procedure Position_Cursor (Frm : Form);
              --  AKA: pos_form_cursor()
          -   pragma Inline (Position_Cursor);
          +   pragma Inline (Position_Cursor);
           
              --  |=====================================================================
              --  | Man page form_data.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_54"#2|
          -   function Data_Ahead (Frm : Form) return Boolean;
          +   function Data_Ahead (Frm : Form) return Boolean;
              --  AKA: data_ahead()
          -   pragma Inline (Data_Ahead);
          +   pragma Inline (Data_Ahead);
           
              --  #1A NAME="AFU_55"#2|
          -   function Data_Behind (Frm : Form) return Boolean;
          +   function Data_Behind (Frm : Form) return Boolean;
              --  AKA: data_behind()
          -   pragma Inline (Data_Behind);
          +   pragma Inline (Data_Behind);
           
              --  |=====================================================================
              --  | Man page form_driver.3x
              --  |=====================================================================
           
          -   type Driver_Result is (Form_Ok,
          -                          Request_Denied,
          -                          Unknown_Request,
          -                          Invalid_Field);
          +   type Driver_Result is (Form_Ok,
          +                          Request_Denied,
          +                          Unknown_Request,
          +                          Invalid_Field);
           
              --  #1A NAME="AFU_56"#2|
          -   function Driver (Frm : Form;
          -                    Key : Key_Code) return Driver_Result;
          +   function Driver (Frm : Form;
          +                    Key : Key_Code) return Driver_Result;
              --  AKA: form_driver()
              --  Driver not inlined
           
          @@ -723,52 +722,52 @@
              --  | Man page form_page.3x
              --  |=====================================================================
           
          -   type Page_Number is new Natural;
          +   type Page_Number is new Natural;
           
              --  #1A NAME="AFU_57"#2|
          -   procedure Set_Current (Frm : in Form;
          -                          Fld : in Field);
          +   procedure Set_Current (Frm : in Form;
          +                          Fld : in Field);
              --  AKA: set_current_field()
          -   pragma Inline (Set_Current);
          +   pragma Inline (Set_Current);
           
              --  #1A NAME="AFU_58"#2|
          -   function Current (Frm : in Form) return Field;
          +   function Current (Frm : in Form) return Field;
              --  AKA: current_field()
          -   pragma Inline (Current);
          +   pragma Inline (Current);
           
              --  #1A NAME="AFU_59"#2|
          -   procedure Set_Page (Frm  : in Form;
          -                       Page : in Page_Number := Page_Number'First);
          +   procedure Set_Page (Frm  : in Form;
          +                       Page : in Page_Number := Page_Number'First);
              --  AKA: set_form_page()
          -   pragma Inline (Set_Page);
          +   pragma Inline (Set_Page);
           
              --  #1A NAME="AFU_60"#2|
          -   function Page (Frm : Form) return Page_Number;
          +   function Page (Frm : Form) return Page_Number;
              --  AKA: form_page()
          -   pragma Inline (Page);
          +   pragma Inline (Page);
           
              --  #1A NAME="AFU_61"#2|
          -   function Get_Index (Fld : Field) return Positive;
          +   function Get_Index (Fld : Field) return Positive;
              --  AKA: field_index()
              --  Please note that in this binding we start the numbering of fields
              --  with 1. So this is number is one more than you get from the low
              --  level call.
          -   pragma Inline (Get_Index);
          +   pragma Inline (Get_Index);
           
              --  |=====================================================================
              --  | Man page form_new_page.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_62"#2|
          -   procedure Set_New_Page (Fld      : in Field;
          -                           New_Page : in Boolean := True);
          +   procedure Set_New_Page (Fld      : in Field;
          +                           New_Page : in Boolean := True);
              --  AKA: set_new_page()
          -   pragma Inline (Set_New_Page);
          +   pragma Inline (Set_New_Page);
           
              --  #1A NAME="AFU_63"#2|
          -   function Is_New_Page (Fld : Field) return Boolean;
          +   function Is_New_Page (Fld : Field) return Boolean;
              --  AKA: new_page()
          -   pragma Inline (Is_New_Page);
          +   pragma Inline (Is_New_Page);
           
              --  |=====================================================================
              --  | Man page form_requestname.3x
          @@ -777,11 +776,11 @@
           
           ------------------------------------------------------------------------------
           private
          -   type Field is new System.Storage_Elements.Integer_Address;
          -   type Form  is new System.Storage_Elements.Integer_Address;
          +   type Field is new System.Storage_Elements.Integer_Address;
          +   type Form  is new System.Storage_Elements.Integer_Address;
           
          -   Null_Field : constant Field := 0;
          -   Null_Form  : constant Form  := 0;
          +   Null_Field : constant Field := 0;
          +   Null_Form  : constant Form  := 0;
           
          -end Terminal_Interface.Curses.Forms;
          +end Terminal_Interface.Curses.Forms;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-menus-item_user_data.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -47,10 +46,10 @@
           ------------------------------------------------------------------------------
           
           generic
          -   type User is limited private;
          -   type User_Access is access User;
          -package Terminal_Interface.Curses.Menus.Item_User_Data is
          -   pragma Preelaborate (Terminal_Interface.Curses.Menus.Item_User_Data);
          +   type User is limited private;
          +   type User_Access is access User;
          +package Terminal_Interface.Curses.Menus.Item_User_Data is
          +   pragma Preelaborate (Terminal_Interface.Curses.Menus.Item_User_Data);
           
              --  The binding uses the same user pointer for menu items
              --  as the low level C implementation. So you can safely
          @@ -61,21 +60,21 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Set_User_Data (Itm  : in Item;
          -                            Data : in User_Access);
          +   procedure Set_User_Data (Itm  : in Item;
          +                            Data : in User_Access);
              --  AKA: set_item_userptr
          -   pragma Inline (Set_User_Data);
          +   pragma Inline (Set_User_Data);
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Get_User_Data (Itm  : in  Item;
          -                            Data : out User_Access);
          +   procedure Get_User_Data (Itm  : in  Item;
          +                            Data : out User_Access);
              --  AKA: item_userptr
           
              --  #1A NAME="AFU_3"#2|
          -   function Get_User_Data (Itm  : in  Item) return User_Access;
          +   function Get_User_Data (Itm  : in  Item) return User_Access;
              --  AKA: item_userptr
              --  Same as function
              pragma Inline (Get_User_Data);
           
          -end Terminal_Interface.Curses.Menus.Item_User_Data;
          +end Terminal_Interface.Curses.Menus.Item_User_Data;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-menus-menu_user_data.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -46,31 +45,31 @@
           ------------------------------------------------------------------------------
           
           generic
          -   type User is limited private;
          -   type User_Access is access User;
          -package Terminal_Interface.Curses.Menus.Menu_User_Data is
          -   pragma Preelaborate (Terminal_Interface.Curses.Menus.Menu_User_Data);
          +   type User is limited private;
          +   type User_Access is access User;
          +package Terminal_Interface.Curses.Menus.Menu_User_Data is
          +   pragma Preelaborate (Terminal_Interface.Curses.Menus.Menu_User_Data);
           
              --  |=====================================================================
              --  | Man page menu_userptr.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Set_User_Data (Men  : in Menu;
          -                            Data : in User_Access);
          +   procedure Set_User_Data (Men  : in Menu;
          +                            Data : in User_Access);
              --  AKA: set_menu_userptr
          -   pragma Inline (Set_User_Data);
          +   pragma Inline (Set_User_Data);
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Get_User_Data (Men  : in  Menu;
          -                            Data : out User_Access);
          +   procedure Get_User_Data (Men  : in  Menu;
          +                            Data : out User_Access);
              --  AKA: menu_userptr
           
              --  #1A NAME="AFU_3"#2|
          -   function Get_User_Data (Men  : in  Menu) return User_Access;
          +   function Get_User_Data (Men  : in  Menu) return User_Access;
              --  AKA: menu_userptr
              --  Same as function
              pragma Inline (Get_User_Data);
           
          -end Terminal_Interface.Curses.Menus.Menu_User_Data;
          +end Terminal_Interface.Curses.Menus.Menu_User_Data;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-menus__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-menus__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-menus__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-menus__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-menus.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -41,8 +40,8 @@
           ------------------------------------------------------------------------------
           --  Author:  Juergen Pfeifer, 1996
           --  Version Control:
          ---  @Revision: 1.26 @
          ---  @Date: 2006/06/25 14:30:22 @
          +--  @Revision: 1.27 @
          +--  @Date: 2007/05/05 20:20:52 @
           --  Binding Version 01.00
           ------------------------------------------------------------------------------
           --  menu binding.
          @@ -52,90 +51,90 @@
           with System;
           with Ada.Characters.Latin_1;
           
          -package Terminal_Interface.Curses.Menus is
          -   pragma Preelaborate (Terminal_Interface.Curses.Menus);
          +package Terminal_Interface.Curses.Menus is
          +   pragma Preelaborate (Terminal_Interface.Curses.Menus);
              pragma Linker_Options ("-lmenu");
              pragma Linker_Options ("-lncurses");
           
              Space : Character renames Ada.Characters.Latin_1.Space;
           
          -   type Item is private;
          -   type Menu is private;
          +   type Item is private;
          +   type Menu is private;
           
              ---------------------------
              --  Interface constants  --
              ---------------------------
          -   Null_Item : constant Item;
          -   Null_Menu : constant Menu;
          +   Null_Item : constant Item;
          +   Null_Menu : constant Menu;
           
          -   subtype Menu_Request_Code is Key_Code
          -     range (Key_Max + 1) .. (Key_Max + 17);
          +   subtype Menu_Request_Code is Key_Code
          +     range (Key_Max + 1) .. (Key_Max + 17);
           
              --  The prefix M_ stands for "Menu Request"
          -   M_Left_Item       : constant Menu_Request_Code := Key_Max + 1;
          -   M_Right_Item      : constant Menu_Request_Code := Key_Max + 2;
          -   M_Up_Item         : constant Menu_Request_Code := Key_Max + 3;
          -   M_Down_Item       : constant Menu_Request_Code := Key_Max + 4;
          -   M_ScrollUp_Line   : constant Menu_Request_Code := Key_Max + 5;
          -   M_ScrollDown_Line : constant Menu_Request_Code := Key_Max + 6;
          -   M_ScrollDown_Page : constant Menu_Request_Code := Key_Max + 7;
          -   M_ScrollUp_Page   : constant Menu_Request_Code := Key_Max + 8;
          -   M_First_Item      : constant Menu_Request_Code := Key_Max + 9;
          -   M_Last_Item       : constant Menu_Request_Code := Key_Max + 10;
          -   M_Next_Item       : constant Menu_Request_Code := Key_Max + 11;
          -   M_Previous_Item   : constant Menu_Request_Code := Key_Max + 12;
          -   M_Toggle_Item     : constant Menu_Request_Code := Key_Max + 13;
          -   M_Clear_Pattern   : constant Menu_Request_Code := Key_Max + 14;
          -   M_Back_Pattern    : constant Menu_Request_Code := Key_Max + 15;
          -   M_Next_Match      : constant Menu_Request_Code := Key_Max + 16;
          -   M_Previous_Match  : constant Menu_Request_Code := Key_Max + 17;
          +   M_Left_Item       : constant Menu_Request_Code := Key_Max + 1;
          +   M_Right_Item      : constant Menu_Request_Code := Key_Max + 2;
          +   M_Up_Item         : constant Menu_Request_Code := Key_Max + 3;
          +   M_Down_Item       : constant Menu_Request_Code := Key_Max + 4;
          +   M_ScrollUp_Line   : constant Menu_Request_Code := Key_Max + 5;
          +   M_ScrollDown_Line : constant Menu_Request_Code := Key_Max + 6;
          +   M_ScrollDown_Page : constant Menu_Request_Code := Key_Max + 7;
          +   M_ScrollUp_Page   : constant Menu_Request_Code := Key_Max + 8;
          +   M_First_Item      : constant Menu_Request_Code := Key_Max + 9;
          +   M_Last_Item       : constant Menu_Request_Code := Key_Max + 10;
          +   M_Next_Item       : constant Menu_Request_Code := Key_Max + 11;
          +   M_Previous_Item   : constant Menu_Request_Code := Key_Max + 12;
          +   M_Toggle_Item     : constant Menu_Request_Code := Key_Max + 13;
          +   M_Clear_Pattern   : constant Menu_Request_Code := Key_Max + 14;
          +   M_Back_Pattern    : constant Menu_Request_Code := Key_Max + 15;
          +   M_Next_Match      : constant Menu_Request_Code := Key_Max + 16;
          +   M_Previous_Match  : constant Menu_Request_Code := Key_Max + 17;
           
              --  For those who like the old 'C' names for the request codes
          -   REQ_LEFT_ITEM     : Menu_Request_Code renames M_Left_Item;
          -   REQ_RIGHT_ITEM    : Menu_Request_Code renames M_Right_Item;
          -   REQ_UP_ITEM       : Menu_Request_Code renames M_Up_Item;
          -   REQ_DOWN_ITEM     : Menu_Request_Code renames M_Down_Item;
          -   REQ_SCR_ULINE     : Menu_Request_Code renames M_ScrollUp_Line;
          -   REQ_SCR_DLINE     : Menu_Request_Code renames M_ScrollDown_Line;
          -   REQ_SCR_DPAGE     : Menu_Request_Code renames M_ScrollDown_Page;
          -   REQ_SCR_UPAGE     : Menu_Request_Code renames M_ScrollUp_Page;
          -   REQ_FIRST_ITEM    : Menu_Request_Code renames M_First_Item;
          -   REQ_LAST_ITEM     : Menu_Request_Code renames M_Last_Item;
          -   REQ_NEXT_ITEM     : Menu_Request_Code renames M_Next_Item;
          -   REQ_PREV_ITEM     : Menu_Request_Code renames M_Previous_Item;
          -   REQ_TOGGLE_ITEM   : Menu_Request_Code renames M_Toggle_Item;
          -   REQ_CLEAR_PATTERN : Menu_Request_Code renames M_Clear_Pattern;
          -   REQ_BACK_PATTERN  : Menu_Request_Code renames M_Back_Pattern;
          -   REQ_NEXT_MATCH    : Menu_Request_Code renames M_Next_Match;
          -   REQ_PREV_MATCH    : Menu_Request_Code renames M_Previous_Match;
          +   REQ_LEFT_ITEM     : Menu_Request_Code renames M_Left_Item;
          +   REQ_RIGHT_ITEM    : Menu_Request_Code renames M_Right_Item;
          +   REQ_UP_ITEM       : Menu_Request_Code renames M_Up_Item;
          +   REQ_DOWN_ITEM     : Menu_Request_Code renames M_Down_Item;
          +   REQ_SCR_ULINE     : Menu_Request_Code renames M_ScrollUp_Line;
          +   REQ_SCR_DLINE     : Menu_Request_Code renames M_ScrollDown_Line;
          +   REQ_SCR_DPAGE     : Menu_Request_Code renames M_ScrollDown_Page;
          +   REQ_SCR_UPAGE     : Menu_Request_Code renames M_ScrollUp_Page;
          +   REQ_FIRST_ITEM    : Menu_Request_Code renames M_First_Item;
          +   REQ_LAST_ITEM     : Menu_Request_Code renames M_Last_Item;
          +   REQ_NEXT_ITEM     : Menu_Request_Code renames M_Next_Item;
          +   REQ_PREV_ITEM     : Menu_Request_Code renames M_Previous_Item;
          +   REQ_TOGGLE_ITEM   : Menu_Request_Code renames M_Toggle_Item;
          +   REQ_CLEAR_PATTERN : Menu_Request_Code renames M_Clear_Pattern;
          +   REQ_BACK_PATTERN  : Menu_Request_Code renames M_Back_Pattern;
          +   REQ_NEXT_MATCH    : Menu_Request_Code renames M_Next_Match;
          +   REQ_PREV_MATCH    : Menu_Request_Code renames M_Previous_Match;
           
          -   procedure Request_Name (Key  : in Menu_Request_Code;
          -                           Name : out String);
          +   procedure Request_Name (Key  : in Menu_Request_Code;
          +                           Name : out String);
           
          -   function  Request_Name (Key : Menu_Request_Code) return String;
          +   function  Request_Name (Key : Menu_Request_Code) return String;
              --  Same as function
           
              ------------------
              --  Exceptions  --
              ------------------
           
          -   Menu_Exception : exception;
          +   Menu_Exception : exception;
              --
              --  Menu options
              --
              pragma Warnings (Off);
          -   type Menu_Option_Set is
          +   type Menu_Option_Set is
                 record
          -         One_Valued        : Boolean;
          -         Show_Descriptions : Boolean;
          -         Row_Major_Order   : Boolean;
          -         Ignore_Case       : Boolean;
          -         Show_Matches      : Boolean;
          -         Non_Cyclic        : Boolean;
          +         One_Valued        : Boolean;
          +         Show_Descriptions : Boolean;
          +         Row_Major_Order   : Boolean;
          +         Ignore_Case       : Boolean;
          +         Show_Matches      : Boolean;
          +         Non_Cyclic        : Boolean;
                 end record;
          -   pragma Convention (C, Menu_Option_Set);
          +   pragma Convention (C, Menu_Option_Set);
           
          -   for Menu_Option_Set use
          +   for Menu_Option_Set use
                 record
                    One_Valued        at 0 range  0 ..  0;
                    Show_Descriptions at 0 range  1 ..  1;
          @@ -144,47 +143,47 @@
                    Show_Matches      at 0 range  4 ..  4;
                    Non_Cyclic        at 0 range  5 ..  5;
                 end record;
          -   for Menu_Option_Set'Size use 32;
          +   for Menu_Option_Set'Size use 32;
              --  Please note: this rep. clause is generated and may be
              --               different on your system.
              pragma Warnings (On);
           
          -   function Default_Menu_Options return Menu_Option_Set;
          +   function Default_Menu_Options return Menu_Option_Set;
              --  Initial default options for a menu.
          -   pragma Inline (Default_Menu_Options);
          +   pragma Inline (Default_Menu_Options);
              --
              --  Item options
              --
              pragma Warnings (Off);
          -   type Item_Option_Set is
          +   type Item_Option_Set is
                 record
          -         Selectable  : Boolean;
          +         Selectable  : Boolean;
                 end record;
          -   pragma Convention (C, Item_Option_Set);
          +   pragma Convention (C, Item_Option_Set);
           
          -   for Item_Option_Set use
          +   for Item_Option_Set use
                 record
                    Selectable  at 0 range  0 ..  0;
                 end record;
          -   for Item_Option_Set'Size use 32;
          +   for Item_Option_Set'Size use 32;
              --  Please note: this rep. clause is generated and may be
              --               different on your system.
              pragma Warnings (On);
           
          -   function Default_Item_Options return Item_Option_Set;
          +   function Default_Item_Options return Item_Option_Set;
              --  Initial default options for an item.
          -   pragma Inline (Default_Item_Options);
          +   pragma Inline (Default_Item_Options);
           
              --
              --  Item Array
              --
          -   type Item_Array is array (Positive range <>) of aliased Item;
          -   pragma Convention (C, Item_Array);
          +   type Item_Array is array (Positive range <>) of aliased Item;
          +   pragma Convention (C, Item_Array);
           
          -   type Item_Array_Access is access Item_Array;
          +   type Item_Array_Access is access Item_Array;
           
          -   procedure Free (IA         : in out Item_Array_Access;
          -                   Free_Items : Boolean := False);
          +   procedure Free (IA         : in out Item_Array_Access;
          +                   Free_Items : Boolean := False);
              --  Release the memory for an allocated item array
              --  If Free_Items is True, call Delete() for all the items in
              --  the array.
          @@ -194,19 +193,19 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   function Create (Name        : String;
          -                    Description : String := "") return Item;
          +   function Create (Name        : String;
          +                    Description : String := "") return Item;
              --  AKA: new_item()
              --  Not inlined.
           
              --  #1A NAME="AFU_2"#2|
          -   function New_Item (Name        : String;
          -                      Description : String := "") return Item
          -     renames Create;
          +   function New_Item (Name        : String;
          +                      Description : String := "") return Item
          +     renames Create;
              --  AKA: new_item()
           
              --  #1A NAME="AFU_3"#2|
          -   procedure Delete (Itm : in out Item);
          +   procedure Delete (Itm : in out Item);
              --  AKA: free_item()
              --  Resets Itm to Null_Item
           
          @@ -215,51 +214,51 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_4"#2|
          -   procedure Set_Value (Itm   : in Item;
          -                        Value : in Boolean := True);
          +   procedure Set_Value (Itm   : in Item;
          +                        Value : in Boolean := True);
              --  AKA: set_item_value()
          -   pragma Inline (Set_Value);
          +   pragma Inline (Set_Value);
           
              --  #1A NAME="AFU_5"#2|
          -   function Value (Itm : Item) return Boolean;
          +   function Value (Itm : Item) return Boolean;
              --  AKA: item_value()
          -   pragma Inline (Value);
          +   pragma Inline (Value);
           
              --  |=====================================================================
              --  | Man page mitem_visible.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_6"#2|
          -   function Visible (Itm : Item) return Boolean;
          +   function Visible (Itm : Item) return Boolean;
              --  AKA: item_visible()
          -   pragma Inline (Visible);
          +   pragma Inline (Visible);
           
              --  |=====================================================================
              --  | Man page mitem_opts.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_7"#2|
          -   procedure Set_Options (Itm     : in Item;
          -                          Options : in Item_Option_Set);
          +   procedure Set_Options (Itm     : in Item;
          +                          Options : in Item_Option_Set);
              --  AKA: set_item_opts()
              --  An overloaded Set_Options is defined later. Pragma Inline appears there
           
              --  #1A NAME="AFU_8"#2|
          -   procedure Switch_Options (Itm     : in Item;
          -                             Options : in Item_Option_Set;
          -                             On      : Boolean := True);
          +   procedure Switch_Options (Itm     : in Item;
          +                             Options : in Item_Option_Set;
          +                             On      : Boolean := True);
              --  AKA: item_opts_on()
              --  AKA: item_opts_off()
              --  An overloaded Switch_Options is defined later.
              --  Pragma Inline appears there
           
              --  #1A NAME="AFU_9"#2|
          -   procedure Get_Options (Itm     : in  Item;
          -                          Options : out Item_Option_Set);
          +   procedure Get_Options (Itm     : in  Item;
          +                          Options : out Item_Option_Set);
              --  AKA: item_opts()
           
              --  #1A NAME="AFU_10"#2|
          -   function Get_Options (Itm : Item := Null_Item) return Item_Option_Set;
          +   function Get_Options (Itm : Item := Null_Item) return Item_Option_Set;
              --  AKA: item_opts()
              --  An overloaded Get_Options is defined later. Pragma Inline appears there
           
          @@ -268,20 +267,20 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_11"#2|
          -   procedure Name (Itm  : in Item;
          -                   Name : out String);
          +   procedure Name (Itm  : in Item;
          +                   Name : out String);
              --  AKA: item_name()
          -   function  Name (Itm : Item) return String;
          +   function  Name (Itm : Item) return String;
              --  AKA: item_name()
              --  Implemented as function
              pragma Inline (Name);
           
              --  #1A NAME="AFU_12"#2|
          -   procedure Description (Itm         : in Item;
          -                          Description : out String);
          +   procedure Description (Itm         : in Item;
          +                          Description : out String);
              --  AKA: item_description();
           
          -   function  Description (Itm : Item) return String;
          +   function  Description (Itm : Item) return String;
              --  AKA: item_description();
              --  Implemented as function
              pragma Inline (Description);
          @@ -291,71 +290,71 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_13"#2|
          -   procedure Set_Current (Men : in Menu;
          -                          Itm : in Item);
          +   procedure Set_Current (Men : in Menu;
          +                          Itm : in Item);
              --  AKA: set_current_item()
          -   pragma Inline (Set_Current);
          +   pragma Inline (Set_Current);
           
              --  #1A NAME="AFU_14"#2|
          -   function Current (Men : Menu) return Item;
          +   function Current (Men : Menu) return Item;
              --  AKA: current_item()
          -   pragma Inline (Current);
          +   pragma Inline (Current);
           
              --  #1A NAME="AFU_15"#2|
          -   procedure Set_Top_Row (Men  : in Menu;
          -                          Line : in Line_Position);
          +   procedure Set_Top_Row (Men  : in Menu;
          +                          Line : in Line_Position);
              --  AKA: set_top_row()
          -   pragma Inline (Set_Top_Row);
          +   pragma Inline (Set_Top_Row);
           
              --  #1A NAME="AFU_16"#2|
          -   function Top_Row (Men : Menu) return Line_Position;
          +   function Top_Row (Men : Menu) return Line_Position;
              --  AKA: top_row()
          -   pragma Inline (Top_Row);
          +   pragma Inline (Top_Row);
           
              --  #1A NAME="AFU_17"#2|
          -   function Get_Index (Itm : Item) return Positive;
          +   function Get_Index (Itm : Item) return Positive;
              --  AKA: item_index()
              --  Please note that in this binding we start the numbering of items
              --  with 1. So this is number is one more than you get from the low
              --  level call.
          -   pragma Inline (Get_Index);
          +   pragma Inline (Get_Index);
           
              --  |=====================================================================
              --  | Man page menu_post.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_18"#2|
          -   procedure Post (Men  : in Menu;
          -                   Post : in Boolean := True);
          +   procedure Post (Men  : in Menu;
          +                   Post : in Boolean := True);
              --  AKA: post_menu()
              --  AKA: unpost_menu()
          -   pragma Inline (Post);
          +   pragma Inline (Post);
           
              --  |=====================================================================
              --  | Man page menu_opts.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_19"#2|
          -   procedure Set_Options (Men     : in Menu;
          -                          Options : in Menu_Option_Set);
          +   procedure Set_Options (Men     : in Menu;
          +                          Options : in Menu_Option_Set);
              --  AKA: set_menu_opts()
              pragma Inline (Set_Options);
           
              --  #1A NAME="AFU_20"#2|
          -   procedure Switch_Options (Men     : in Menu;
          -                             Options : in Menu_Option_Set;
          -                             On      : Boolean := True);
          +   procedure Switch_Options (Men     : in Menu;
          +                             Options : in Menu_Option_Set;
          +                             On      : Boolean := True);
              --  AKA: menu_opts_on()
              --  AKA: menu_opts_off()
              pragma Inline (Switch_Options);
           
              --  #1A NAME="AFU_21"#2|
          -   procedure Get_Options (Men     : in  Menu;
          -                          Options : out Menu_Option_Set);
          +   procedure Get_Options (Men     : in  Menu;
          +                          Options : out Menu_Option_Set);
              --  AKA: menu_opts()
           
              --  #1A NAME="AFU_22"#2|
          -   function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set;
          +   function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set;
              --  AKA: menu_opts()
              pragma Inline (Get_Options);
           
          @@ -364,185 +363,185 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_23"#2|
          -   procedure Set_Window (Men : in Menu;
          -                         Win : in Window);
          +   procedure Set_Window (Men : in Menu;
          +                         Win : in Window);
              --  AKA: set_menu_win()
          -   pragma Inline (Set_Window);
          +   pragma Inline (Set_Window);
           
              --  #1A NAME="AFU_24"#2|
          -   function Get_Window (Men : Menu) return Window;
          +   function Get_Window (Men : Menu) return Window;
              --  AKA: menu_win()
          -   pragma Inline (Get_Window);
          +   pragma Inline (Get_Window);
           
              --  #1A NAME="AFU_25"#2|
          -   procedure Set_Sub_Window (Men : in Menu;
          -                             Win : in Window);
          +   procedure Set_Sub_Window (Men : in Menu;
          +                             Win : in Window);
              --  AKA: set_menu_sub()
          -   pragma Inline (Set_Sub_Window);
          +   pragma Inline (Set_Sub_Window);
           
              --  #1A NAME="AFU_26"#2|
          -   function Get_Sub_Window (Men : Menu) return Window;
          +   function Get_Sub_Window (Men : Menu) return Window;
              --  AKA: menu_sub()
          -   pragma Inline (Get_Sub_Window);
          +   pragma Inline (Get_Sub_Window);
           
              --  #1A NAME="AFU_27"#2|
          -   procedure Scale (Men     : in Menu;
          -                    Lines   : out Line_Count;
          -                    Columns : out Column_Count);
          +   procedure Scale (Men     : in Menu;
          +                    Lines   : out Line_Count;
          +                    Columns : out Column_Count);
              --  AKA: scale_menu()
          -   pragma Inline (Scale);
          +   pragma Inline (Scale);
           
              --  |=====================================================================
              --  | Man page menu_cursor.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_28"#2|
          -   procedure Position_Cursor (Men : Menu);
          +   procedure Position_Cursor (Men : Menu);
              --  AKA: pos_menu_cursor()
          -   pragma Inline (Position_Cursor);
          +   pragma Inline (Position_Cursor);
           
              --  |=====================================================================
              --  | Man page menu_mark.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_29"#2|
          -   procedure Set_Mark (Men  : in Menu;
          -                       Mark : in String);
          +   procedure Set_Mark (Men  : in Menu;
          +                       Mark : in String);
              --  AKA: set_menu_mark()
          -   pragma Inline (Set_Mark);
          +   pragma Inline (Set_Mark);
           
              --  #1A NAME="AFU_30"#2|
          -   procedure Mark (Men  : in  Menu;
          -                   Mark : out String);
          +   procedure Mark (Men  : in  Menu;
          +                   Mark : out String);
              --  AKA: menu_mark()
           
          -   function  Mark (Men : Menu) return String;
          +   function  Mark (Men : Menu) return String;
              --  AKA: menu_mark()
              --  Implemented as function
              pragma Inline (Mark);
           
              --  |=====================================================================
          -   --  | Man page menu_attribs.3x
          +   --  | Man page menu_attributes.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_31"#2|
          -   procedure Set_Foreground
          -     (Men   : in Menu;
          -      Fore  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          -   --  AKA: set_menu_fore()
          -   pragma Inline (Set_Foreground);
          +   procedure Set_Foreground
          +     (Men   : in Menu;
          +      Fore  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
          +   --  AKA: set_menu_fore()
          +   pragma Inline (Set_Foreground);
           
              --  #1A NAME="AFU_32"#2|
          -   procedure Foreground (Men   : in  Menu;
          -                         Fore  : out Character_Attribute_Set);
          -   --  AKA: menu_fore()
          +   procedure Foreground (Men   : in  Menu;
          +                         Fore  : out Character_Attribute_Set);
          +   --  AKA: menu_fore()
           
              --  #1A NAME="AFU_33"#2|
          -   procedure Foreground (Men   : in  Menu;
          -                         Fore  : out Character_Attribute_Set;
          -                         Color : out Color_Pair);
          -   --  AKA: menu_fore()
          +   procedure Foreground (Men   : in  Menu;
          +                         Fore  : out Character_Attribute_Set;
          +                         Color : out Color_Pair);
          +   --  AKA: menu_fore()
              pragma Inline (Foreground);
           
              --  #1A NAME="AFU_34"#2|
          -   procedure Set_Background
          -     (Men   : in Menu;
          -      Back  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          -   --  AKA: set_menu_back()
          +   procedure Set_Background
          +     (Men   : in Menu;
          +      Back  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
          +   --  AKA: set_menu_back()
              pragma Inline (Set_Background);
           
              --  #1A NAME="AFU_35"#2|
          -   procedure Background (Men  : in  Menu;
          -                         Back : out Character_Attribute_Set);
          -   --  AKA: menu_back()
          +   procedure Background (Men  : in  Menu;
          +                         Back : out Character_Attribute_Set);
          +   --  AKA: menu_back()
              --  #1A NAME="AFU_36"#2|
           
          -   procedure Background (Men   : in  Menu;
          -                         Back  : out Character_Attribute_Set;
          -                         Color : out Color_Pair);
          -   --  AKA: menu_back()
          +   procedure Background (Men   : in  Menu;
          +                         Back  : out Character_Attribute_Set;
          +                         Color : out Color_Pair);
          +   --  AKA: menu_back()
              pragma Inline (Background);
           
              --  #1A NAME="AFU_37"#2|
          -   procedure Set_Grey
          -     (Men   : in Menu;
          -      Grey  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          -   --  AKA: set_menu_grey()
          -   pragma Inline (Set_Grey);
          +   procedure Set_Grey
          +     (Men   : in Menu;
          +      Grey  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
          +   --  AKA: set_menu_grey()
          +   pragma Inline (Set_Grey);
           
              --  #1A NAME="AFU_38"#2|
          -   procedure Grey (Men  : in  Menu;
          -                   Grey : out Character_Attribute_Set);
          -   --  AKA: menu_grey()
          +   procedure Grey (Men  : in  Menu;
          +                   Grey : out Character_Attribute_Set);
          +   --  AKA: menu_grey()
           
              --  #1A NAME="AFU_39"#2|
          -   procedure Grey
          -     (Men   : in  Menu;
          -      Grey  : out Character_Attribute_Set;
          -      Color : out Color_Pair);
          -   --  AKA: menu_grey()
          +   procedure Grey
          +     (Men   : in  Menu;
          +      Grey  : out Character_Attribute_Set;
          +      Color : out Color_Pair);
          +   --  AKA: menu_grey()
              pragma Inline (Grey);
           
              --  #1A NAME="AFU_40"#2|
          -   procedure Set_Pad_Character (Men : in Menu;
          -                                Pad : in Character := Space);
          -   --  AKA: set_menu_pad()
          -   pragma Inline (Set_Pad_Character);
          +   procedure Set_Pad_Character (Men : in Menu;
          +                                Pad : in Character := Space);
          +   --  AKA: set_menu_pad()
          +   pragma Inline (Set_Pad_Character);
           
              --  #1A NAME="AFU_41"#2|
          -   procedure Pad_Character (Men : in  Menu;
          -                            Pad : out Character);
          -   --  AKA: menu_pad()
          -   pragma Inline (Pad_Character);
          +   procedure Pad_Character (Men : in  Menu;
          +                            Pad : out Character);
          +   --  AKA: menu_pad()
          +   pragma Inline (Pad_Character);
           
              --  |=====================================================================
              --  | Man page menu_spacing.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_42"#2|
          -   procedure Set_Spacing (Men   : in Menu;
          -                          Descr : in Column_Position := 0;
          -                          Row   : in Line_Position   := 0;
          -                          Col   : in Column_Position := 0);
          +   procedure Set_Spacing (Men   : in Menu;
          +                          Descr : in Column_Position := 0;
          +                          Row   : in Line_Position   := 0;
          +                          Col   : in Column_Position := 0);
              --  AKA: set_menu_spacing()
          -   pragma Inline (Set_Spacing);
          +   pragma Inline (Set_Spacing);
           
              --  #1A NAME="AFU_43"#2|
          -   procedure Spacing (Men   : in Menu;
          -                      Descr : out Column_Position;
          -                      Row   : out Line_Position;
          -                      Col   : out Column_Position);
          +   procedure Spacing (Men   : in Menu;
          +                      Descr : out Column_Position;
          +                      Row   : out Line_Position;
          +                      Col   : out Column_Position);
              --  AKA: menu_spacing()
          -   pragma Inline (Spacing);
          +   pragma Inline (Spacing);
           
              --  |=====================================================================
              --  | Man page menu_pattern.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_44"#2|
          -   function Set_Pattern (Men  : Menu;
          -                         Text : String) return Boolean;
          +   function Set_Pattern (Men  : Menu;
          +                         Text : String) return Boolean;
              --  AKA: set_menu_pattern()
              --  Return TRUE if the pattern matches, FALSE otherwise
          -   pragma Inline (Set_Pattern);
          +   pragma Inline (Set_Pattern);
           
              --  #1A NAME="AFU_45"#2|
          -   procedure Pattern (Men  : in  Menu;
          -                      Text : out String);
          +   procedure Pattern (Men  : in  Menu;
          +                      Text : out String);
              --  AKA: menu_pattern()
          -   pragma Inline (Pattern);
          +   pragma Inline (Pattern);
           
              --  |=====================================================================
              --  | Man page menu_format.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_46"#2|
          -   procedure Set_Format (Men     : in Menu;
          -                         Lines   : in Line_Count;
          -                         Columns : in Column_Count);
          +   procedure Set_Format (Men     : in Menu;
          +                         Lines   : in Line_Count;
          +                         Columns : in Column_Count);
              --  Not implemented: 0 argument for Lines or Columns;
              --  instead use Format to get the current sizes
              --      The  default  format  is  16  rows,  1  column.    Calling
          @@ -551,104 +550,104 @@
              --      is  interpreted  as  a  request  not to change the current
              --      value.
              --  AKA: set_menu_format()
          -   pragma Inline (Set_Format);
          +   pragma Inline (Set_Format);
           
              --  #1A NAME="AFU_47"#2|
          -   procedure Format (Men     : in  Menu;
          -                     Lines   : out Line_Count;
          -                     Columns : out Column_Count);
          +   procedure Format (Men     : in  Menu;
          +                     Lines   : out Line_Count;
          +                     Columns : out Column_Count);
              --  AKA: menu_format()
          -   pragma Inline (Format);
          +   pragma Inline (Format);
           
              --  |=====================================================================
              --  | Man page menu_hook.3x
              --  |=====================================================================
           
          -   type Menu_Hook_Function is access procedure (Men : in Menu);
          -   pragma Convention (C, Menu_Hook_Function);
          +   type Menu_Hook_Function is access procedure (Men : in Menu);
          +   pragma Convention (C, Menu_Hook_Function);
           
              --  #1A NAME="AFU_48"#2|
          -   procedure Set_Item_Init_Hook (Men  : in Menu;
          -                                 Proc : in Menu_Hook_Function);
          +   procedure Set_Item_Init_Hook (Men  : in Menu;
          +                                 Proc : in Menu_Hook_Function);
              --  AKA: set_item_init()
          -   pragma Inline (Set_Item_Init_Hook);
          +   pragma Inline (Set_Item_Init_Hook);
           
              --  #1A NAME="AFU_49"#2|
          -   procedure Set_Item_Term_Hook (Men  : in Menu;
          -                                 Proc : in Menu_Hook_Function);
          +   procedure Set_Item_Term_Hook (Men  : in Menu;
          +                                 Proc : in Menu_Hook_Function);
              --  AKA: set_item_term()
          -   pragma Inline (Set_Item_Term_Hook);
          +   pragma Inline (Set_Item_Term_Hook);
           
              --  #1A NAME="AFU_50"#2|
          -   procedure Set_Menu_Init_Hook (Men  : in Menu;
          -                                 Proc : in Menu_Hook_Function);
          +   procedure Set_Menu_Init_Hook (Men  : in Menu;
          +                                 Proc : in Menu_Hook_Function);
              --  AKA: set_menu_init()
          -   pragma Inline (Set_Menu_Init_Hook);
          +   pragma Inline (Set_Menu_Init_Hook);
           
              --  #1A NAME="AFU_51"#2|
          -   procedure Set_Menu_Term_Hook (Men  : in Menu;
          -                                 Proc : in Menu_Hook_Function);
          +   procedure Set_Menu_Term_Hook (Men  : in Menu;
          +                                 Proc : in Menu_Hook_Function);
              --  AKA: set_menu_term()
          -   pragma Inline (Set_Menu_Term_Hook);
          +   pragma Inline (Set_Menu_Term_Hook);
           
              --  #1A NAME="AFU_52"#2|
          -   function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function;
          +   function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function;
              --  AKA: item_init()
          -   pragma Inline (Get_Item_Init_Hook);
          +   pragma Inline (Get_Item_Init_Hook);
           
              --  #1A NAME="AFU_53"#2|
          -   function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function;
          +   function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function;
              --  AKA: item_term()
          -   pragma Inline (Get_Item_Term_Hook);
          +   pragma Inline (Get_Item_Term_Hook);
           
              --  #1A NAME="AFU_54"#2|
          -   function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function;
          +   function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function;
              --  AKA: menu_init()
          -   pragma Inline (Get_Menu_Init_Hook);
          +   pragma Inline (Get_Menu_Init_Hook);
           
              --  #1A NAME="AFU_55"#2|
          -   function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function;
          +   function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function;
              --  AKA: menu_term()
          -   pragma Inline (Get_Menu_Term_Hook);
          +   pragma Inline (Get_Menu_Term_Hook);
           
              --  |=====================================================================
              --  | Man page menu_items.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_56"#2|
          -   procedure Redefine (Men   : in Menu;
          -                       Items : in Item_Array_Access);
          +   procedure Redefine (Men   : in Menu;
          +                       Items : in Item_Array_Access);
              --  AKA: set_menu_items()
          -   pragma Inline (Redefine);
          +   pragma Inline (Redefine);
           
          -   procedure Set_Items (Men   : in Menu;
          -                        Items : in Item_Array_Access) renames Redefine;
          +   procedure Set_Items (Men   : in Menu;
          +                        Items : in Item_Array_Access) renames Redefine;
              --  pragma Inline (Set_Items);
           
              --  #1A NAME="AFU_57"#2|
          -   function Items (Men   : Menu;
          -                   Index : Positive) return Item;
          +   function Items (Men   : Menu;
          +                   Index : Positive) return Item;
              --  AKA: menu_items()
          -   pragma Inline (Items);
          +   pragma Inline (Items);
           
              --  #1A NAME="AFU_58"#2|
          -   function Item_Count (Men : Menu) return Natural;
          +   function Item_Count (Men : Menu) return Natural;
              --  AKA: item_count()
          -   pragma Inline (Item_Count);
          +   pragma Inline (Item_Count);
           
              --  |=====================================================================
              --  | Man page menu_new.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_59"#2|
          -   function Create (Items : Item_Array_Access) return Menu;
          +   function Create (Items : Item_Array_Access) return Menu;
              --  AKA: new_menu()
              --  Not inlined
           
          -   function New_Menu (Items : Item_Array_Access) return Menu renames Create;
          +   function New_Menu (Items : Item_Array_Access) return Menu renames Create;
           
              --  #1A NAME="AFU_60"#2|
          -   procedure Delete (Men : in out Menu);
          +   procedure Delete (Men : in out Menu);
              --  AKA: free_menu()
              --  Reset Men to Null_Menu
              --  Not inlined
          @@ -657,14 +656,14 @@
              --  | Man page menu_driver.3x
              --  |=====================================================================
           
          -   type Driver_Result is (Menu_Ok,
          -                          Request_Denied,
          -                          Unknown_Request,
          -                          No_Match);
          +   type Driver_Result is (Menu_Ok,
          +                          Request_Denied,
          +                          Unknown_Request,
          +                          No_Match);
           
              --  #1A NAME="AFU_61"#2|
          -   function Driver (Men : Menu;
          -                    Key : Key_Code) return Driver_Result;
          +   function Driver (Men : Menu;
          +                    Key : Key_Code) return Driver_Result;
              --  AKA: menu_driver()
              --  Driver is not inlined
           
          @@ -672,11 +671,11 @@
              --  Not Implemented: menu_request_name, menu_request_by_name
           -------------------------------------------------------------------------------
           private
          -   type Item   is new System.Storage_Elements.Integer_Address;
          -   type Menu   is new System.Storage_Elements.Integer_Address;
          +   type Item   is new System.Storage_Elements.Integer_Address;
          +   type Menu   is new System.Storage_Elements.Integer_Address;
           
          -   Null_Item : constant Item := 0;
          -   Null_Menu : constant Menu := 0;
          +   Null_Item : constant Item := 0;
          +   Null_Menu : constant Menu := 0;
           
          -end Terminal_Interface.Curses.Menus;
          +end Terminal_Interface.Curses.Menus;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-mouse__adb.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-mouse__adb.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-mouse__adb.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-mouse__adb.htm 2007-12-21 00:02:35.000000000 -0500 @@ -60,7 +60,7 @@ function Mouse_Avail return C_Int; pragma Import (C, Mouse_Avail, "_nc_has_mouse"); begin - if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then + if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then return True; else return False; @@ -123,7 +123,7 @@ begin R := MMask (Mask, Old'Access); if R = No_Events then - Beep; + Beep; end if; return Old; end Start_Mouse; @@ -132,7 +132,7 @@ is begin if Mask /= No_Events then - Beep; + Beep; end if; end End_Mouse; @@ -199,15 +199,15 @@ end if; end Unget_Mouse; - function Enclosed_In_Window (Win : Window := Standard_Window; + function Enclosed_In_Window (Win : Window := Standard_Window; Event : Mouse_Event) return Boolean is function Wenclose (Win : Window; Y : C_Int; X : C_Int) - return Curses_Bool; + return Curses_Bool; pragma Import (C, Wenclose, "wenclose"); begin if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) - = Curses_Bool_False then + = Curses_Bool_False then return False; else return True; diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-mouse__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-mouse__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-mouse__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-mouse__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-mouse.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -51,8 +50,8 @@
           --  |
           with System;
           
          -package Terminal_Interface.Curses.Mouse is
          -   pragma Preelaborate (Terminal_Interface.Curses.Mouse);
          +package Terminal_Interface.Curses.Mouse is
          +   pragma Preelaborate (Terminal_Interface.Curses.Mouse);
           
              --  |=====================================================================
              --  | Man page curs_mouse.3x
          @@ -67,56 +66,56 @@
              --  Not implemented:
              --  REPORT_MOUSE_POSITION (i.e. as a parameter to Register_Reportable_Event
              --  or Start_Mouse)
          -   type Event_Mask is private;
          -   No_Events  : constant Event_Mask;
          -   All_Events : constant Event_Mask;
          -
          -   type Mouse_Button is (Left,     -- aka: Button 1
          -                         Middle,   -- aka: Button 2
          -                         Right,    -- aka: Button 3
          -                         Button4,  -- aka: Button 4
          -                         Control,  -- Control Key
          -                         Shift,    -- Shift Key
          -                         Alt);     -- ALT Key
          -
          -   subtype Real_Buttons  is Mouse_Button range Left .. Button4;
          -   subtype Modifier_Keys is Mouse_Button range Control .. Alt;
          -
          -   type Button_State is (Released,
          -                         Pressed,
          -                         Clicked,
          -                         Double_Clicked,
          -                         Triple_Clicked);
          -
          -   type Button_States is array (Button_State) of Boolean;
          -   pragma Pack (Button_States);
          -
          -   All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True,
          -                                           others => False);
          -   All_States : constant Button_States := (others => True);
          +   type Event_Mask is private;
          +   No_Events  : constant Event_Mask;
          +   All_Events : constant Event_Mask;
          +
          +   type Mouse_Button is (Left,     -- aka: Button 1
          +                         Middle,   -- aka: Button 2
          +                         Right,    -- aka: Button 3
          +                         Button4,  -- aka: Button 4
          +                         Control,  -- Control Key
          +                         Shift,    -- Shift Key
          +                         Alt);     -- ALT Key
          +
          +   subtype Real_Buttons  is Mouse_Button range Left .. Button4;
          +   subtype Modifier_Keys is Mouse_Button range Control .. Alt;
          +
          +   type Button_State is (Released,
          +                         Pressed,
          +                         Clicked,
          +                         Double_Clicked,
          +                         Triple_Clicked);
          +
          +   type Button_States is array (Button_State) of Boolean;
          +   pragma Pack (Button_States);
          +
          +   All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True,
          +                                           others => False);
          +   All_States : constant Button_States := (others => True);
           
          -   type Mouse_Event is private;
          +   type Mouse_Event is private;
           
              --  |=====================================================================
              --  | Man page curs_mouse.3x
              --  |=====================================================================
           
          -   function Has_Mouse return Boolean;
          +   function Has_Mouse return Boolean;
              --  Return true if a mouse device is supported, false otherwise.
           
          -   procedure Register_Reportable_Event
          -     (Button : in Mouse_Button;
          -      State  : in Button_State;
          -      Mask   : in out Event_Mask);
          +   procedure Register_Reportable_Event
          +     (Button : in Mouse_Button;
          +      State  : in Button_State;
          +      Mask   : in out Event_Mask);
              --  Stores the event described by the button and the state in the mask.
              --  Before you call this the first time, you should init the mask
              --  with the Empty_Mask constant
          -   pragma Inline (Register_Reportable_Event);
          +   pragma Inline (Register_Reportable_Event);
           
          -   procedure Register_Reportable_Events
          -     (Button : in Mouse_Button;
          -      State  : in Button_States;
          -      Mask   : in out Event_Mask);
          +   procedure Register_Reportable_Events
          +     (Button : in Mouse_Button;
          +      State  : in Button_States;
          +      Mask   : in out Event_Mask);
              --  Register all events described by the Button and the State bitmap.
              --  Before you call this the first time, you should init the mask
              --  with the Empty_Mask constant
          @@ -126,62 +125,62 @@
              --  old mask, that means the event mask value before this call.
              --  Not Implemented: The library version
              --  returns a Mouse_Mask that tells which events are reported.
          -   function Start_Mouse (Mask : Event_Mask := All_Events)
          -                         return Event_Mask;
          +   function Start_Mouse (Mask : Event_Mask := All_Events)
          +                         return Event_Mask;
              --  AKA: mousemask()
          -   pragma Inline (Start_Mouse);
          +   pragma Inline (Start_Mouse);
           
          -   procedure End_Mouse (Mask : in Event_Mask := No_Events);
          +   procedure End_Mouse (Mask : in Event_Mask := No_Events);
              --  Terminates the mouse, restores the specified event mask
          -   pragma Inline (End_Mouse);
          +   pragma Inline (End_Mouse);
           
              --  #1A NAME="AFU_2"#2|
          -   function Get_Mouse return Mouse_Event;
          +   function Get_Mouse return Mouse_Event;
              --  AKA: getmouse()
          -   pragma Inline (Get_Mouse);
          +   pragma Inline (Get_Mouse);
           
          -   procedure Get_Event (Event  : in  Mouse_Event;
          -                        Y      : out Line_Position;
          -                        X      : out Column_Position;
          -                        Button : out Mouse_Button;
          -                        State  : out Button_State);
          +   procedure Get_Event (Event  : in  Mouse_Event;
          +                        Y      : out Line_Position;
          +                        X      : out Column_Position;
          +                        Button : out Mouse_Button;
          +                        State  : out Button_State);
              --  !!! Warning: X and Y are screen coordinates. Due to ripped of lines they
              --  may not be identical to window coordinates.
              --  Not Implemented: Get_Event only reports one event, the C library
              --  version supports multiple events, e.g. {click-1, click-3}
          -   pragma Inline (Get_Event);
          +   pragma Inline (Get_Event);
           
              --  #1A NAME="AFU_3"#2|
          -   procedure Unget_Mouse (Event : in Mouse_Event);
          +   procedure Unget_Mouse (Event : in Mouse_Event);
              --  AKA: ungetmouse()
          -   pragma Inline (Unget_Mouse);
          +   pragma Inline (Unget_Mouse);
           
              --  #1A NAME="AFU_4"#2|
          -   function Enclosed_In_Window (Win    : Window := Standard_Window;
          -                                Event  : Mouse_Event) return Boolean;
          +   function Enclosed_In_Window (Win    : Window := Standard_Window;
          +                                Event  : Mouse_Event) return Boolean;
              --  AKA: wenclose()
              --  But : use event instead of screen coordinates.
          -   pragma Inline (Enclosed_In_Window);
          +   pragma Inline (Enclosed_In_Window);
           
              --  #1A NAME="AFU_5"#2|
          -   function Mouse_Interval (Msec : Natural := 200) return Natural;
          +   function Mouse_Interval (Msec : Natural := 200) return Natural;
              --  AKA: mouseinterval()
          -   pragma Inline (Mouse_Interval);
          +   pragma Inline (Mouse_Interval);
           
           private
          -   type Event_Mask is new Interfaces.C.unsigned_long;
          +   type Event_Mask is new Interfaces.C.unsigned_long;
           
          -   type Mouse_Event is
          +   type Mouse_Event is
                 record
          -         Id      : Integer range Integer (Interfaces.C.short'First) ..
          -                                 Integer (Interfaces.C.short'Last);
          -         X, Y, Z : Integer range Integer (Interfaces.C.int'First) ..
          -                                 Integer (Interfaces.C.int'Last);
          -         Bstate  : Event_Mask;
          +         Id      : Integer range Integer (Interfaces.C.short'First) ..
          +                                 Integer (Interfaces.C.short'Last);
          +         X, Y, Z : Integer range Integer (Interfaces.C.int'First) ..
          +                                 Integer (Interfaces.C.int'Last);
          +         Bstate  : Event_Mask;
                 end record;
          -   pragma Convention (C, Mouse_Event);
          +   pragma Convention (C, Mouse_Event);
           
          -   for Mouse_Event use
          +   for Mouse_Event use
                 record
                    Id      at 0 range   0 ..  15;
                    X       at 0 range  32 ..  63;
          @@ -192,45 +191,45 @@
                 --  Please note: this rep. clause is generated and may be
                 --               different on your system.
           
          -   Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First;
          +   Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First;
              --  This constant may be different on your system.
           
          -   BUTTON1_RELEASED          : constant Event_Mask := 8#00000000001#;
          -   BUTTON1_PRESSED           : constant Event_Mask := 8#00000000002#;
          -   BUTTON1_CLICKED           : constant Event_Mask := 8#00000000004#;
          -   BUTTON1_DOUBLE_CLICKED    : constant Event_Mask := 8#00000000010#;
          -   BUTTON1_TRIPLE_CLICKED    : constant Event_Mask := 8#00000000020#;
          -   BUTTON1_RESERVED_EVENT    : constant Event_Mask := 8#00000000040#;
          -   BUTTON2_RELEASED          : constant Event_Mask := 8#00000000100#;
          -   BUTTON2_PRESSED           : constant Event_Mask := 8#00000000200#;
          -   BUTTON2_CLICKED           : constant Event_Mask := 8#00000000400#;
          -   BUTTON2_DOUBLE_CLICKED    : constant Event_Mask := 8#00000001000#;
          -   BUTTON2_TRIPLE_CLICKED    : constant Event_Mask := 8#00000002000#;
          -   BUTTON2_RESERVED_EVENT    : constant Event_Mask := 8#00000004000#;
          -   BUTTON3_RELEASED          : constant Event_Mask := 8#00000010000#;
          -   BUTTON3_PRESSED           : constant Event_Mask := 8#00000020000#;
          -   BUTTON3_CLICKED           : constant Event_Mask := 8#00000040000#;
          -   BUTTON3_DOUBLE_CLICKED    : constant Event_Mask := 8#00000100000#;
          -   BUTTON3_TRIPLE_CLICKED    : constant Event_Mask := 8#00000200000#;
          -   BUTTON3_RESERVED_EVENT    : constant Event_Mask := 8#00000400000#;
          -   BUTTON4_RELEASED          : constant Event_Mask := 8#00001000000#;
          -   BUTTON4_PRESSED           : constant Event_Mask := 8#00002000000#;
          -   BUTTON4_CLICKED           : constant Event_Mask := 8#00004000000#;
          -   BUTTON4_DOUBLE_CLICKED    : constant Event_Mask := 8#00010000000#;
          -   BUTTON4_TRIPLE_CLICKED    : constant Event_Mask := 8#00020000000#;
          -   BUTTON4_RESERVED_EVENT    : constant Event_Mask := 8#00040000000#;
          -   BUTTON_CTRL               : constant Event_Mask := 8#00100000000#;
          -   BUTTON_SHIFT              : constant Event_Mask := 8#00200000000#;
          -   BUTTON_ALT                : constant Event_Mask := 8#00400000000#;
          -   REPORT_MOUSE_POSITION     : constant Event_Mask := 8#01000000000#;
          -   ALL_MOUSE_EVENTS          : constant Event_Mask := 8#00777777777#;
          -   BUTTON1_EVENTS            : constant Event_Mask := 8#00000000077#;
          -   BUTTON2_EVENTS            : constant Event_Mask := 8#00000007700#;
          -   BUTTON3_EVENTS            : constant Event_Mask := 8#00000770000#;
          -   BUTTON4_EVENTS            : constant Event_Mask := 8#00077000000#;
          +   BUTTON1_RELEASED          : constant Event_Mask := 8#00000000001#;
          +   BUTTON1_PRESSED           : constant Event_Mask := 8#00000000002#;
          +   BUTTON1_CLICKED           : constant Event_Mask := 8#00000000004#;
          +   BUTTON1_DOUBLE_CLICKED    : constant Event_Mask := 8#00000000010#;
          +   BUTTON1_TRIPLE_CLICKED    : constant Event_Mask := 8#00000000020#;
          +   BUTTON1_RESERVED_EVENT    : constant Event_Mask := 8#00000000040#;
          +   BUTTON2_RELEASED          : constant Event_Mask := 8#00000000100#;
          +   BUTTON2_PRESSED           : constant Event_Mask := 8#00000000200#;
          +   BUTTON2_CLICKED           : constant Event_Mask := 8#00000000400#;
          +   BUTTON2_DOUBLE_CLICKED    : constant Event_Mask := 8#00000001000#;
          +   BUTTON2_TRIPLE_CLICKED    : constant Event_Mask := 8#00000002000#;
          +   BUTTON2_RESERVED_EVENT    : constant Event_Mask := 8#00000004000#;
          +   BUTTON3_RELEASED          : constant Event_Mask := 8#00000010000#;
          +   BUTTON3_PRESSED           : constant Event_Mask := 8#00000020000#;
          +   BUTTON3_CLICKED           : constant Event_Mask := 8#00000040000#;
          +   BUTTON3_DOUBLE_CLICKED    : constant Event_Mask := 8#00000100000#;
          +   BUTTON3_TRIPLE_CLICKED    : constant Event_Mask := 8#00000200000#;
          +   BUTTON3_RESERVED_EVENT    : constant Event_Mask := 8#00000400000#;
          +   BUTTON4_RELEASED          : constant Event_Mask := 8#00001000000#;
          +   BUTTON4_PRESSED           : constant Event_Mask := 8#00002000000#;
          +   BUTTON4_CLICKED           : constant Event_Mask := 8#00004000000#;
          +   BUTTON4_DOUBLE_CLICKED    : constant Event_Mask := 8#00010000000#;
          +   BUTTON4_TRIPLE_CLICKED    : constant Event_Mask := 8#00020000000#;
          +   BUTTON4_RESERVED_EVENT    : constant Event_Mask := 8#00040000000#;
          +   BUTTON_CTRL               : constant Event_Mask := 8#00100000000#;
          +   BUTTON_SHIFT              : constant Event_Mask := 8#00200000000#;
          +   BUTTON_ALT                : constant Event_Mask := 8#00400000000#;
          +   REPORT_MOUSE_POSITION     : constant Event_Mask := 8#01000000000#;
          +   ALL_MOUSE_EVENTS          : constant Event_Mask := 8#00777777777#;
          +   BUTTON1_EVENTS            : constant Event_Mask := 8#00000000077#;
          +   BUTTON2_EVENTS            : constant Event_Mask := 8#00000007700#;
          +   BUTTON3_EVENTS            : constant Event_Mask := 8#00000770000#;
          +   BUTTON4_EVENTS            : constant Event_Mask := 8#00077000000#;
           
          -   No_Events  : constant Event_Mask := 0;
          -   All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;
          +   No_Events  : constant Event_Mask := 0;
          +   All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;
           
          -end Terminal_Interface.Curses.Mouse;
          +end Terminal_Interface.Curses.Mouse;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm 2006-09-23 16:31:31.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-panels-user_data.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -46,31 +45,31 @@
           ------------------------------------------------------------------------------
           
           generic
          -   type User is limited private;
          -   type User_Access is access all User;
          -package Terminal_Interface.Curses.Panels.User_Data is
          -   pragma Preelaborate (Terminal_Interface.Curses.Panels.User_Data);
          +   type User is limited private;
          +   type User_Access is access all User;
          +package Terminal_Interface.Curses.Panels.User_Data is
          +   pragma Preelaborate (Terminal_Interface.Curses.Panels.User_Data);
           
              --  |=====================================================================
              --  | Man page panel.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Set_User_Data (Pan  : in Panel;
          -                            Data : in User_Access);
          +   procedure Set_User_Data (Pan  : in Panel;
          +                            Data : in User_Access);
              --  AKA: set_panel_userptr
          -   pragma Inline (Set_User_Data);
          +   pragma Inline (Set_User_Data);
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Get_User_Data (Pan  : in  Panel;
          -                            Data : out User_Access);
          +   procedure Get_User_Data (Pan  : in  Panel;
          +                            Data : out User_Access);
              --  AKA: panel_userptr
           
              --  #1A NAME="AFU_3"#2|
          -   function Get_User_Data (Pan  : in  Panel) return User_Access;
          +   function Get_User_Data (Pan  : in  Panel) return User_Access;
              --  AKA: panel_userptr
              --  Same as function
              pragma Inline (Get_User_Data);
           
          -end Terminal_Interface.Curses.Panels.User_Data;
          +end Terminal_Interface.Curses.Panels.User_Data;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-panels__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-panels__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-panels__ads.htm 2006-09-23 16:31:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-panels__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-panels.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -47,108 +46,108 @@
           ------------------------------------------------------------------------------
           with System;
           
          -package Terminal_Interface.Curses.Panels is
          -   pragma Preelaborate (Terminal_Interface.Curses.Panels);
          +package Terminal_Interface.Curses.Panels is
          +   pragma Preelaborate (Terminal_Interface.Curses.Panels);
              pragma Linker_Options ("-lpanel");
              pragma Linker_Options ("-lncurses");
           
          -   type Panel is private;
          +   type Panel is private;
           
              ---------------------------
              --  Interface constants  --
              ---------------------------
          -   Null_Panel : constant Panel;
          +   Null_Panel : constant Panel;
           
              -------------------
              --  Exceptions   --
              -------------------
           
          -   Panel_Exception : exception;
          +   Panel_Exception : exception;
           
              --  |=====================================================================
              --  | Man page panel.3x
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   function Create (Win : Window) return Panel;
          +   function Create (Win : Window) return Panel;
              --  AKA: new_panel()
              pragma Inline (Create);
           
              --  #1A NAME="AFU_2"#2|
          -   function New_Panel (Win : Window) return Panel renames Create;
          +   function New_Panel (Win : Window) return Panel renames Create;
              --  AKA: new_panel()
              --  pragma Inline (New_Panel);
           
              --  #1A NAME="AFU_3"#2|
          -   procedure Bottom (Pan : in Panel);
          +   procedure Bottom (Pan : in Panel);
              --  AKA: bottom_panel()
          -   pragma Inline (Bottom);
          +   pragma Inline (Bottom);
           
              --  #1A NAME="AFU_4"#2|
          -   procedure Top (Pan : in Panel);
          +   procedure Top (Pan : in Panel);
              --  AKA: top_panel()
          -   pragma Inline (Top);
          +   pragma Inline (Top);
           
              --  #1A NAME="AFU_5"#2|
          -   procedure Show (Pan : in Panel);
          +   procedure Show (Pan : in Panel);
              --  AKA: show_panel()
          -   pragma Inline (Show);
          +   pragma Inline (Show);
           
              --  #1A NAME="AFU_6"#2|
          -   procedure Update_Panels;
          +   procedure Update_Panels;
              --  AKA: update_panels()
              pragma Import (C, Update_Panels, "update_panels");
           
              --  #1A NAME="AFU_7"#2|
          -   procedure Hide (Pan : in Panel);
          +   procedure Hide (Pan : in Panel);
              --  AKA: hide_panel()
          -   pragma Inline (Hide);
          +   pragma Inline (Hide);
           
              --  #1A NAME="AFU_8"#2|
          -   function Get_Window (Pan : Panel) return Window;
          +   function Get_Window (Pan : Panel) return Window;
              --  AKA: panel_window()
          -   pragma Inline (Get_Window);
          +   pragma Inline (Get_Window);
           
              --  #1A NAME="AFU_9"#2|
          -   function Panel_Window (Pan : Panel) return Window renames Get_Window;
          +   function Panel_Window (Pan : Panel) return Window renames Get_Window;
              --  pragma Inline (Panel_Window);
           
              --  #1A NAME="AFU_10"#2|
          -   procedure Replace (Pan : in Panel;
          -                      Win : in Window);
          +   procedure Replace (Pan : in Panel;
          +                      Win : in Window);
              --  AKA: replace_panel()
          -   pragma Inline (Replace);
          +   pragma Inline (Replace);
           
              --  #1A NAME="AFU_11"#2|
          -   procedure Move (Pan    : in Panel;
          -                   Line   : in Line_Position;
          -                   Column : in Column_Position);
          +   procedure Move (Pan    : in Panel;
          +                   Line   : in Line_Position;
          +                   Column : in Column_Position);
              --  AKA: move_panel()
          -   pragma Inline (Move);
          +   pragma Inline (Move);
           
              --  #1A NAME="AFU_12"#2|
          -   function Is_Hidden (Pan : Panel) return Boolean;
          +   function Is_Hidden (Pan : Panel) return Boolean;
              --  AKA: panel_hidden()
          -   pragma Inline (Is_Hidden);
          +   pragma Inline (Is_Hidden);
           
              --  #1A NAME="AFU_13"#2|
          -   function Above (Pan : Panel) return Panel;
          +   function Above (Pan : Panel) return Panel;
              --  AKA: panel_above()
              pragma Import (C, Above, "panel_above");
           
              --  #1A NAME="AFU_14"#2|
          -   function Below (Pan : Panel) return Panel;
          +   function Below (Pan : Panel) return Panel;
              --  AKA: panel_below()
              pragma Import (C, Below, "panel_below");
           
              --  #1A NAME="AFU_15"#2|
          -   procedure Delete (Pan : in out Panel);
          +   procedure Delete (Pan : in out Panel);
              --  AKA: del_panel()
              pragma Inline (Delete);
           
           private
          -      type Panel is new System.Storage_Elements.Integer_Address;
          -      Null_Panel : constant Panel := 0;
          +      type Panel is new System.Storage_Elements.Integer_Address;
          +      Null_Panel : constant Panel := 0;
           
          -end Terminal_Interface.Curses.Panels;
          +end Terminal_Interface.Curses.Panels;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-terminfo__adb.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-terminfo__adb.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-terminfo__adb.htm 2006-09-23 16:31:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-terminfo__adb.htm 2007-12-21 00:02:35.000000000 -0500 @@ -71,13 +71,13 @@ ------------------------------------------------------------------------------ function Get_Flag (Name : String) return Boolean is - function tigetflag (id : char_array) return Curses_Bool; + function tigetflag (id : char_array) return Curses_Bool; pragma Import (C, tigetflag); Txt : char_array (0 .. Name'Length); Length : size_t; begin To_C (Name, Txt, Length); - if tigetflag (Txt) = Curses_Bool (Curses_True) then + if tigetflag (Txt) = Curses_Bool (Curses_True) then return True; else return False; diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm 2006-09-23 16:31:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm 2007-12-21 00:02:35.000000000 -0500 @@ -76,7 +76,7 @@ end if; pragma Assert (Len <= W); - Get_Size (Win, LC, CC); + Get_Size (Win, LC, CC); if Column_Count (Len) > CC then if Signal then raise Layout_Error; @@ -92,7 +92,7 @@ Put (Win, Filler); end; end if; - Get_Cursor_Position (Win, Y, X); + Get_Cursor_Position (Win, Y, X); if (X + Column_Position (Len)) > CC then New_Line (Win); end if; diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-text_io__adb.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-text_io__adb.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-text_io__adb.htm 2006-09-23 16:31:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-text_io__adb.htm 2007-12-21 00:02:35.000000000 -0500 @@ -58,7 +58,7 @@ is begin if Default_Window = Null_Window then - return Standard_Window; + return Standard_Window; else return Default_Window; end if; @@ -68,7 +68,7 @@ procedure Flush (Win : in Window) is begin - Refresh (Win); + Refresh (Win); end Flush; procedure Flush @@ -91,7 +91,7 @@ N_Lines : Line_Count; N_Cols : Column_Count; begin - Get_Size (Win, N_Lines, N_Cols); + Get_Size (Win, N_Lines, N_Cols); -- if Natural (N_Cols) > Natural (Count'Last) then -- raise Layout_Error; -- end if; @@ -109,10 +109,10 @@ N_Lines : Line_Count; N_Cols : Column_Count; begin - if Scrolling_Allowed (Win) then + if Scrolling_Allowed (Win) then return 0; else - Get_Size (Win, N_Lines, N_Cols); + Get_Size (Win, N_Lines, N_Cols); -- if Natural (N_Lines) > Natural (Count'Last) then -- raise Layout_Error; -- end if; @@ -141,7 +141,7 @@ if P_Size > 0 and then Line (Win) >= P_Size then New_Page (Win); else - Add (Win, ASCII.LF); + Add (Win, ASCII.LF); end if; end loop; end New_Line; @@ -155,7 +155,7 @@ procedure New_Page (Win : in Window) is begin - Clear (Win); + Clear (Win); end New_Page; procedure New_Page @@ -175,7 +175,7 @@ raise Constraint_Error; end if; - Get_Cursor_Position (Win, Y, X1); + Get_Cursor_Position (Win, Y, X1); N := Natural (To); N := N - 1; X2 := Column_Position (N); if X1 > X2 then @@ -209,7 +209,7 @@ raise Constraint_Error; end if; - Get_Cursor_Position (Win, Y1, X); + Get_Cursor_Position (Win, Y1, X); N := Natural (To); N := N - 1; Y2 := Line_Position (N); if Y2 < Y1 then @@ -233,7 +233,7 @@ X : Column_Position; N : Natural; begin - Get_Cursor_Position (Win, Y, X); + Get_Cursor_Position (Win, Y, X); N := Natural (X); N := N + 1; -- if N > Natural (Count'Last) then -- raise Layout_Error; @@ -253,7 +253,7 @@ X : Column_Position; N : Natural; begin - Get_Cursor_Position (Win, Y, X); + Get_Cursor_Position (Win, Y, X); N := Natural (Y); N := N + 1; -- if N > Natural (Count'Last) then -- raise Layout_Error; @@ -280,13 +280,13 @@ C : Column_Count; begin if P_Size > 0 then - Get_Cursor_Position (Win, Y, X); - Get_Size (Win, L, C); + Get_Cursor_Position (Win, Y, X); + Get_Size (Win, L, C); if (Y + 1) = L and then (X + 1) = C then New_Page (Win); end if; end if; - Add (Win, Item); + Add (Win, Item); end Put; procedure Put (Item : in Character) @@ -308,13 +308,13 @@ C : Column_Count; begin if P_Size > 0 then - Get_Cursor_Position (Win, Y, X); - Get_Size (Win, L, C); + Get_Cursor_Position (Win, Y, X); + Get_Size (Win, L, C); if (Y + 1) = L and then (X + 1 + Item'Length) >= C then New_Page (Win); end if; end if; - Add (Win, Item); + Add (Win, Item); end Put; procedure Put (Item : in String) diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-trace__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses-trace__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses-trace__ads.htm 2006-09-23 16:31:32.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses-trace__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses-trace.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -45,28 +44,28 @@
           --  Binding Version 01.00
           ------------------------------------------------------------------------------
           
          -package Terminal_Interface.Curses.Trace is
          -   pragma Preelaborate (Terminal_Interface.Curses.Trace);
          +package Terminal_Interface.Curses.Trace is
          +   pragma Preelaborate (Terminal_Interface.Curses.Trace);
           
              pragma Warnings (Off);
          -   type Trace_Attribute_Set is
          +   type Trace_Attribute_Set is
                 record
          -         Times            : Boolean;
          -         Tputs            : Boolean;
          -         Update           : Boolean;
          -         Cursor_Move      : Boolean;
          -         Character_Output : Boolean;
          -         Calls            : Boolean;
          -         Virtual_Puts     : Boolean;
          -         Input_Events     : Boolean;
          -         TTY_State        : Boolean;
          -         Internal_Calls   : Boolean;
          -         Character_Calls  : Boolean;
          -         Termcap_TermInfo : Boolean;
          +         Times            : Boolean;
          +         Tputs            : Boolean;
          +         Update           : Boolean;
          +         Cursor_Move      : Boolean;
          +         Character_Output : Boolean;
          +         Calls            : Boolean;
          +         Virtual_Puts     : Boolean;
          +         Input_Events     : Boolean;
          +         TTY_State        : Boolean;
          +         Internal_Calls   : Boolean;
          +         Character_Calls  : Boolean;
          +         Termcap_TermInfo : Boolean;
                 end record;
          -   pragma Convention (C, Trace_Attribute_Set);
          +   pragma Convention (C, Trace_Attribute_Set);
           
          -   for Trace_Attribute_Set use
          +   for Trace_Attribute_Set use
                 record
                    Times            at 0 range  0 ..  0;
                    Tputs            at 0 range  1 ..  1;
          @@ -81,22 +80,22 @@
                    Character_Calls  at 0 range 10 .. 10;
                    Termcap_TermInfo at 0 range 11 .. 11;
                 end record;
          -   for Trace_Attribute_Set'Size use 32;
          +   for Trace_Attribute_Set'Size use 32;
              --  Please note: this rep. clause is generated and may be
              --               different on your system.
           
              pragma Warnings (On);
           
          -   Trace_Disable  : constant Trace_Attribute_Set := (others => False);
          +   Trace_Disable  : constant Trace_Attribute_Set := (others => False);
           
          -   Trace_Ordinary : constant Trace_Attribute_Set :=
          -     (Times            => True,
          -      Tputs            => True,
          -      Update           => True,
          -      Cursor_Move      => True,
          -      Character_Output => True,
          -      others           => False);
          -   Trace_Maximum : constant Trace_Attribute_Set := (others => True);
          +   Trace_Ordinary : constant Trace_Attribute_Set :=
          +     (Times            => True,
          +      Tputs            => True,
          +      Update           => True,
          +      Cursor_Move      => True,
          +      Character_Output => True,
          +      others           => False);
          +   Trace_Maximum : constant Trace_Attribute_Set := (others => True);
           
           ------------------------------------------------------------------------------
           
          @@ -105,15 +104,15 @@
              --  |=====================================================================
           
              --  #1A NAME="AFU_1"#2|
          -   procedure Trace_On (x : Trace_Attribute_Set);
          +   procedure Trace_On (x : Trace_Attribute_Set);
              --  The debugging library has trace.
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Trace_Put (str : String);
          +   procedure Trace_Put (str : String);
              --  AKA: _tracef()
           
          -   Current_Trace_Setting : Trace_Attribute_Set;
          -   pragma Import (C, Current_Trace_Setting, "_nc_tracing");
          +   Current_Trace_Setting : Trace_Attribute_Set;
          +   pragma Import (C, Current_Trace_Setting, "_nc_tracing");
           
          -end Terminal_Interface.Curses.Trace;
          +end Terminal_Interface.Curses.Trace;
           
          diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses__adb.htm ncurses-5.6/doc/html/ada/terminal_interface-curses__adb.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses__adb.htm 2006-09-23 16:31:33.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses__adb.htm 2007-12-21 00:02:35.000000000 -0500 @@ -12,7 +12,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 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 -- @@ -40,8 +40,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.34 @ --- @Date: 2006/06/25 14:30:22 @ +-- @Revision: 1.4 @ +-- @Date: 2007/05/05 20:09:10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; @@ -49,2522 +49,2512 @@ with Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; -with Interfaces.C.Pointers; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Strings.Fixed; -with Ada.Unchecked_Conversion; -package body Terminal_Interface.Curses is +package body Terminal_Interface.Curses is use Aux; use type System.Bit_Order; - package ASF renames Ada.Strings.Fixed; + package ASF renames Ada.Strings.Fixed; - type chtype_array is array (size_t range <>) + type chtype_array is array (size_t range <>) of aliased Attributed_Character; - pragma Convention (C, chtype_array); + pragma Convention (C, chtype_array); ------------------------------------------------------------------------------ - generic - type Element is (<>); - function W_Get_Element (Win : in Window; - Offset : in Natural) return Element; - - function W_Get_Element (Win : in Window; - Offset : in Natural) return Element is - type E_Array is array (Natural range <>) of aliased Element; - package C_E_Array is new - Interfaces.C.Pointers (Natural, Element, E_Array, Element'Val (0)); - use C_E_Array; - - function To_Pointer is new - Ada.Unchecked_Conversion (Window, Pointer); - - P : Pointer := To_Pointer (Win); - begin - if Win = Null_Window then - raise Curses_Exception; - else - P := P + ptrdiff_t (Offset); - return P.all; - end if; - end W_Get_Element; - - function W_Get_Int is new W_Get_Element (C_Int); - function W_Get_Short is new W_Get_Element (C_Short); - function W_Get_Byte is new W_Get_Element (Interfaces.C.unsigned_char); - - function Get_Flag (Win : Window; - Offset : Natural) return Boolean; - - function Get_Flag (Win : Window; - Offset : Natural) return Boolean - is - Res : C_Int; - begin - case Sizeof_bool is - when 1 => Res := C_Int (W_Get_Byte (Win, Offset)); - when 2 => Res := C_Int (W_Get_Short (Win, Offset)); - when 4 => Res := C_Int (W_Get_Int (Win, Offset)); - when others => raise Curses_Exception; - end case; - - case Res is - when 0 => return False; - when others => return True; - end case; - end Get_Flag; - ------------------------------------------------------------------------------- - function Key_Name (Key : in Real_Key_Code) return String + function Key_Name (Key : in Real_Key_Code) return String is - function Keyname (K : C_Int) return chars_ptr; + function Keyname (K : C_Int) return chars_ptr; pragma Import (C, Keyname, "keyname"); - Ch : Character; + Ch : Character; begin - if Key <= Character'Pos (Character'Last) then - Ch := Character'Val (Key); - if Is_Control (Ch) then - return Un_Control (Attributed_Character'(Ch => Ch, + if Key <= Character'Pos (Character'Last) then + Ch := Character'Val (Key); + if Is_Control (Ch) then + return Un_Control (Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); - elsif Is_Graphic (Ch) then + elsif Is_Graphic (Ch) then declare - S : String (1 .. 1); + S : String (1 .. 1); begin - S (1) := Ch; - return S; + S (1) := Ch; + return S; end; else return ""; end if; else - return Fill_String (Keyname (C_Int (Key))); + return Fill_String (Keyname (C_Int (Key))); end if; - end Key_Name; + end Key_Name; - procedure Key_Name (Key : in Real_Key_Code; - Name : out String) + procedure Key_Name (Key : in Real_Key_Code; + Name : out String) is begin - ASF.Move (Key_Name (Key), Name); - end Key_Name; + ASF.Move (Key_Name (Key), Name); + end Key_Name; ------------------------------------------------------------------------------ - procedure Init_Screen + procedure Init_Screen is - function Initscr return Window; + function Initscr return Window; pragma Import (C, Initscr, "initscr"); - W : Window; + W : Window; begin - W := Initscr; - if W = Null_Window then + W := Initscr; + if W = Null_Window then raise Curses_Exception; end if; - end Init_Screen; + end Init_Screen; - procedure End_Windows + procedure End_Windows is - function Endwin return C_Int; + function Endwin return C_Int; pragma Import (C, Endwin, "endwin"); begin - if Endwin = Curses_Err then + if Endwin = Curses_Err then raise Curses_Exception; end if; - end End_Windows; + end End_Windows; - function Is_End_Window return Boolean + function Is_End_Window return Boolean is - function Isendwin return Curses_Bool; + function Isendwin return Curses_Bool; pragma Import (C, Isendwin, "isendwin"); begin - if Isendwin = Curses_Bool_False then + if Isendwin = Curses_Bool_False then return False; else return True; end if; - end Is_End_Window; + end Is_End_Window; ------------------------------------------------------------------------------ - procedure Move_Cursor (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position) - is - function Wmove (Win : Window; - Line : C_Int; - Column : C_Int + procedure Move_Cursor (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position) + is + function Wmove (Win : Window; + Line : C_Int; + Column : C_Int ) return C_Int; pragma Import (C, Wmove, "wmove"); begin - if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; - end Move_Cursor; + end Move_Cursor; ------------------------------------------------------------------------------ - procedure Add (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Add (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function Waddch (W : Window; - Ch : C_Chtype) return C_Int; + function Waddch (W : Window; + Ch : C_Chtype) return C_Int; pragma Import (C, Waddch, "waddch"); begin - if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Add; + end Add; - procedure Add (Win : in Window := Standard_Window; - Ch : in Character) + procedure Add (Win : in Window := Standard_Window; + Ch : in Character) is begin - Add (Win, - Attributed_Character'(Ch => Ch, + Add (Win, + Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); - end Add; + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Attributed_Character) - is - function mvwaddch (W : Window; - Y : C_Int; - X : C_Int; - Ch : C_Chtype) return C_Int; + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Attributed_Character) + is + function mvwaddch (W : Window; + Y : C_Int; + X : C_Int; + Ch : C_Chtype) return C_Int; pragma Import (C, mvwaddch, "mvwaddch"); begin - if mvwaddch (Win, C_Int (Line), - C_Int (Column), - AttrChar_To_Chtype (Ch)) = Curses_Err then + if mvwaddch (Win, C_Int (Line), + C_Int (Column), + AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Add; + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Character) + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Character) is begin - Add (Win, - Line, - Column, - Attributed_Character'(Ch => Ch, + Add (Win, + Line, + Column, + Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); - end Add; + end Add; - procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Add_With_Immediate_Echo + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function Wechochar (W : Window; - Ch : C_Chtype) return C_Int; + function Wechochar (W : Window; + Ch : C_Chtype) return C_Int; pragma Import (C, Wechochar, "wechochar"); begin - if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Add_With_Immediate_Echo; + end Add_With_Immediate_Echo; - procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; - Ch : in Character) + procedure Add_With_Immediate_Echo + (Win : in Window := Standard_Window; + Ch : in Character) is begin - Add_With_Immediate_Echo - (Win, - Attributed_Character'(Ch => Ch, + Add_With_Immediate_Echo + (Win, + Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); - end Add_With_Immediate_Echo; + end Add_With_Immediate_Echo; ------------------------------------------------------------------------------ - function Create (Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Newwin (Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; + function Create (Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Newwin (Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; pragma Import (C, Newwin, "newwin"); - W : Window; + W : Window; begin - W := Newwin (C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then + W := Newwin (C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then raise Curses_Exception; end if; - return W; - end Create; + return W; + end Create; - procedure Delete (Win : in out Window) + procedure Delete (Win : in out Window) is - function Wdelwin (W : Window) return C_Int; + function Wdelwin (W : Window) return C_Int; pragma Import (C, Wdelwin, "delwin"); begin - if Wdelwin (Win) = Curses_Err then + if Wdelwin (Win) = Curses_Err then raise Curses_Exception; end if; - Win := Null_Window; - end Delete; + Win := Null_Window; + end Delete; - function Sub_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Subwin - (Win : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; + function Sub_Window + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Subwin + (Win : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; pragma Import (C, Subwin, "subwin"); - W : Window; + W : Window; begin - W := Subwin (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Sub_Window; - - function Derived_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Derwin - (Win : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; + W := Subwin (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Sub_Window; + + function Derived_Window + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Derwin + (Win : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; pragma Import (C, Derwin, "derwin"); - W : Window; + W : Window; begin - W := Derwin (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then + W := Derwin (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then raise Curses_Exception; end if; - return W; - end Derived_Window; + return W; + end Derived_Window; - function Duplicate (Win : Window) return Window + function Duplicate (Win : Window) return Window is - function Dupwin (Win : Window) return Window; + function Dupwin (Win : Window) return Window; pragma Import (C, Dupwin, "dupwin"); - W : constant Window := Dupwin (Win); + W : constant Window := Dupwin (Win); begin - if W = Null_Window then + if W = Null_Window then raise Curses_Exception; end if; - return W; - end Duplicate; + return W; + end Duplicate; - procedure Move_Window (Win : in Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Move_Window (Win : in Window; + Line : in Line_Position; + Column : in Column_Position) is - function Mvwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; + function Mvwin (Win : Window; + Line : C_Int; + Column : C_Int) return C_Int; pragma Import (C, Mvwin, "mvwin"); begin - if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; - end Move_Window; + end Move_Window; - procedure Move_Derived_Window (Win : in Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Move_Derived_Window (Win : in Window; + Line : in Line_Position; + Column : in Column_Position) is - function Mvderwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; + function Mvderwin (Win : Window; + Line : C_Int; + Column : C_Int) return C_Int; pragma Import (C, Mvderwin, "mvderwin"); begin - if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; - end Move_Derived_Window; + end Move_Derived_Window; - procedure Set_Synch_Mode (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Set_Synch_Mode (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Syncok (Win : Window; - Mode : Curses_Bool) return C_Int; + function Syncok (Win : Window; + Mode : Curses_Bool) return C_Int; pragma Import (C, Syncok, "syncok"); begin - if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; - end Set_Synch_Mode; + end Set_Synch_Mode; ------------------------------------------------------------------------------ - procedure Add (Win : in Window := Standard_Window; - Str : in String; - Len : in Integer := -1) + procedure Add (Win : in Window := Standard_Window; + Str : in String; + Len : in Integer := -1) is - function Waddnstr (Win : Window; - Str : char_array; - Len : C_Int := -1) return C_Int; + function Waddnstr (Win : Window; + Str : char_array; + Len : C_Int := -1) return C_Int; pragma Import (C, Waddnstr, "waddnstr"); - Txt : char_array (0 .. Str'Length); - Length : size_t; + Txt : char_array (0 .. Str'Length); + Length : size_t; begin - To_C (Str, Txt, Length); - if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then + To_C (Str, Txt, Length); + if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; - end Add; + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; - Len : in Integer := -1) + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Add (Win, Str, Len); - end Add; + Move_Cursor (Win, Line, Column); + Add (Win, Str, Len); + end Add; ------------------------------------------------------------------------------ - procedure Add - (Win : in Window := Standard_Window; - Str : in Attributed_String; - Len : in Integer := -1) + procedure Add + (Win : in Window := Standard_Window; + Str : in Attributed_String; + Len : in Integer := -1) is - function Waddchnstr (Win : Window; - Str : chtype_array; - Len : C_Int := -1) return C_Int; + function Waddchnstr (Win : Window; + Str : chtype_array; + Len : C_Int := -1) return C_Int; pragma Import (C, Waddchnstr, "waddchnstr"); - Txt : chtype_array (0 .. Str'Length); + Txt : chtype_array (0 .. Str'Length); begin - for Length in 1 .. size_t (Str'Length) loop - Txt (Length - 1) := Str (Natural (Length)); + for Length in 1 .. size_t (Str'Length) loop + Txt (Length - 1) := Str (Natural (Length)); end loop; - Txt (Str'Length) := Default_Character; - if Waddchnstr (Win, - Txt, - C_Int (Len)) = Curses_Err then - raise Curses_Exception; - end if; - end Add; - - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in Attributed_String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Add (Win, Str, Len); - end Add; ------------------------------------------------------------------------------- - procedure Border - (Win : in Window := Standard_Window; - Left_Side_Symbol : in Attributed_Character := Default_Character; - Right_Side_Symbol : in Attributed_Character := Default_Character; - Top_Side_Symbol : in Attributed_Character := Default_Character; - Bottom_Side_Symbol : in Attributed_Character := Default_Character; - Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) - is - function Wborder (W : Window; - LS : C_Chtype; - RS : C_Chtype; - TS : C_Chtype; - BS : C_Chtype; - ULC : C_Chtype; - URC : C_Chtype; - LLC : C_Chtype; - LRC : C_Chtype) return C_Int; + Txt (Str'Length) := Default_Character; + if Waddchnstr (Win, + Txt, + C_Int (Len)) = Curses_Err then + raise Curses_Exception; + end if; + end Add; + + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in Attributed_String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Add (Win, Str, Len); + end Add; +------------------------------------------------------------------------------ + procedure Border + (Win : in Window := Standard_Window; + Left_Side_Symbol : in Attributed_Character := Default_Character; + Right_Side_Symbol : in Attributed_Character := Default_Character; + Top_Side_Symbol : in Attributed_Character := Default_Character; + Bottom_Side_Symbol : in Attributed_Character := Default_Character; + Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) + is + function Wborder (W : Window; + LS : C_Chtype; + RS : C_Chtype; + TS : C_Chtype; + BS : C_Chtype; + ULC : C_Chtype; + URC : C_Chtype; + LLC : C_Chtype; + LRC : C_Chtype) return C_Int; pragma Import (C, Wborder, "wborder"); begin - if Wborder (Win, - AttrChar_To_Chtype (Left_Side_Symbol), - AttrChar_To_Chtype (Right_Side_Symbol), - AttrChar_To_Chtype (Top_Side_Symbol), - AttrChar_To_Chtype (Bottom_Side_Symbol), - AttrChar_To_Chtype (Upper_Left_Corner_Symbol), - AttrChar_To_Chtype (Upper_Right_Corner_Symbol), - AttrChar_To_Chtype (Lower_Left_Corner_Symbol), - AttrChar_To_Chtype (Lower_Right_Corner_Symbol) + if Wborder (Win, + AttrChar_To_Chtype (Left_Side_Symbol), + AttrChar_To_Chtype (Right_Side_Symbol), + AttrChar_To_Chtype (Top_Side_Symbol), + AttrChar_To_Chtype (Bottom_Side_Symbol), + AttrChar_To_Chtype (Upper_Left_Corner_Symbol), + AttrChar_To_Chtype (Upper_Right_Corner_Symbol), + AttrChar_To_Chtype (Lower_Left_Corner_Symbol), + AttrChar_To_Chtype (Lower_Right_Corner_Symbol) ) = Curses_Err then raise Curses_Exception; end if; - end Border; + end Border; - procedure Box - (Win : in Window := Standard_Window; - Vertical_Symbol : in Attributed_Character := Default_Character; - Horizontal_Symbol : in Attributed_Character := Default_Character) - is - begin - Border (Win, - Vertical_Symbol, Vertical_Symbol, - Horizontal_Symbol, Horizontal_Symbol); - end Box; - - procedure Horizontal_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; - Line_Symbol : in Attributed_Character := Default_Character) - is - function Whline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; + procedure Box + (Win : in Window := Standard_Window; + Vertical_Symbol : in Attributed_Character := Default_Character; + Horizontal_Symbol : in Attributed_Character := Default_Character) + is + begin + Border (Win, + Vertical_Symbol, Vertical_Symbol, + Horizontal_Symbol, Horizontal_Symbol); + end Box; + + procedure Horizontal_Line + (Win : in Window := Standard_Window; + Line_Size : in Natural; + Line_Symbol : in Attributed_Character := Default_Character) + is + function Whline (W : Window; + Ch : C_Chtype; + Len : C_Int) return C_Int; pragma Import (C, Whline, "whline"); begin - if Whline (Win, - AttrChar_To_Chtype (Line_Symbol), - C_Int (Line_Size)) = Curses_Err then + if Whline (Win, + AttrChar_To_Chtype (Line_Symbol), + C_Int (Line_Size)) = Curses_Err then raise Curses_Exception; end if; - end Horizontal_Line; + end Horizontal_Line; - procedure Vertical_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; - Line_Symbol : in Attributed_Character := Default_Character) + procedure Vertical_Line + (Win : in Window := Standard_Window; + Line_Size : in Natural; + Line_Symbol : in Attributed_Character := Default_Character) is - function Wvline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; + function Wvline (W : Window; + Ch : C_Chtype; + Len : C_Int) return C_Int; pragma Import (C, Wvline, "wvline"); begin - if Wvline (Win, - AttrChar_To_Chtype (Line_Symbol), - C_Int (Line_Size)) = Curses_Err then + if Wvline (Win, + AttrChar_To_Chtype (Line_Symbol), + C_Int (Line_Size)) = Curses_Err then raise Curses_Exception; end if; - end Vertical_Line; + end Vertical_Line; ------------------------------------------------------------------------------ - function Get_Keystroke (Win : Window := Standard_Window) + function Get_Keystroke (Win : Window := Standard_Window) return Real_Key_Code is - function Wgetch (W : Window) return C_Int; + function Wgetch (W : Window) return C_Int; pragma Import (C, Wgetch, "wgetch"); - C : constant C_Int := Wgetch (Win); + C : constant C_Int := Wgetch (Win); begin - if C = Curses_Err then + if C = Curses_Err then return Key_None; else - return Real_Key_Code (C); + return Real_Key_Code (C); end if; - end Get_Keystroke; + end Get_Keystroke; - procedure Undo_Keystroke (Key : in Real_Key_Code) + procedure Undo_Keystroke (Key : in Real_Key_Code) is - function Ungetch (Ch : C_Int) return C_Int; + function Ungetch (Ch : C_Int) return C_Int; pragma Import (C, Ungetch, "ungetch"); begin - if Ungetch (C_Int (Key)) = Curses_Err then + if Ungetch (C_Int (Key)) = Curses_Err then raise Curses_Exception; end if; - end Undo_Keystroke; + end Undo_Keystroke; - function Has_Key (Key : Special_Key_Code) return Boolean + function Has_Key (Key : Special_Key_Code) return Boolean is - function Haskey (Key : C_Int) return C_Int; + function Haskey (Key : C_Int) return C_Int; pragma Import (C, Haskey, "has_key"); begin - if Haskey (C_Int (Key)) = Curses_False then + if Haskey (C_Int (Key)) = Curses_False then return False; else return True; end if; - end Has_Key; + end Has_Key; - function Is_Function_Key (Key : Special_Key_Code) return Boolean + function Is_Function_Key (Key : Special_Key_Code) return Boolean is - L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + - Natural (Function_Key_Number'Last)); + L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + + Natural (Function_Key_Number'Last)); begin - if (Key >= Key_F0) and then (Key <= L) then + if (Key >= Key_F0) and then (Key <= L) then return True; else return False; end if; - end Is_Function_Key; + end Is_Function_Key; - function Function_Key (Key : Real_Key_Code) - return Function_Key_Number + function Function_Key (Key : Real_Key_Code) + return Function_Key_Number is begin - if Is_Function_Key (Key) then - return Function_Key_Number (Key - Key_F0); + if Is_Function_Key (Key) then + return Function_Key_Number (Key - Key_F0); else raise Constraint_Error; end if; - end Function_Key; + end Function_Key; - function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code + function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code is begin - return Real_Key_Code (Natural (Key_F0) + Natural (Key)); - end Function_Key_Code; + return Real_Key_Code (Natural (Key_F0) + Natural (Key)); + end Function_Key_Code; ------------------------------------------------------------------------------ - procedure Standout (Win : Window := Standard_Window; - On : Boolean := True) + procedure Standout (Win : Window := Standard_Window; + On : Boolean := True) is - function wstandout (Win : Window) return C_Int; + function wstandout (Win : Window) return C_Int; pragma Import (C, wstandout, "wstandout"); - function wstandend (Win : Window) return C_Int; + function wstandend (Win : Window) return C_Int; pragma Import (C, wstandend, "wstandend"); - Err : C_Int; + Err : C_Int; begin - if On then - Err := wstandout (Win); + if On then + Err := wstandout (Win); else - Err := wstandend (Win); + Err := wstandend (Win); end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Standout; + end Standout; - procedure Switch_Character_Attribute - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; - On : in Boolean := True) + procedure Switch_Character_Attribute + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; + On : in Boolean := True) is - function Wattron (Win : Window; - C_Attr : C_AttrType) return C_Int; + function Wattron (Win : Window; + C_Attr : C_AttrType) return C_Int; pragma Import (C, Wattron, "wattr_on"); - function Wattroff (Win : Window; - C_Attr : C_AttrType) return C_Int; + function Wattroff (Win : Window; + C_Attr : C_AttrType) return C_Int; pragma Import (C, Wattroff, "wattr_off"); -- In Ada we use the On Boolean to control whether or not we want to -- switch on or off the attributes in the set. - Err : C_Int; - AC : constant Attributed_Character := (Ch => Character'First, + Err : C_Int; + AC : constant Attributed_Character := (Ch => Character'First, Color => Color_Pair'First, - Attr => Attr); + Attr => Attr); begin - if On then - Err := Wattron (Win, AttrChar_To_AttrType (AC)); + if On then + Err := Wattron (Win, AttrChar_To_AttrType (AC)); else - Err := Wattroff (Win, AttrChar_To_AttrType (AC)); + Err := Wattroff (Win, AttrChar_To_AttrType (AC)); end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Switch_Character_Attribute; + end Switch_Character_Attribute; - procedure Set_Character_Attributes - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Character_Attributes + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Wattrset (Win : Window; - C_Attr : C_AttrType) return C_Int; + function Wattrset (Win : Window; + C_Attr : C_AttrType) return C_Int; pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set begin - if Wattrset (Win, + if Wattrset (Win, AttrChar_To_AttrType (Attributed_Character' (Ch => Character'First, - Color => Color, - Attr => Attr))) = Curses_Err then + Color => Color, + Attr => Attr))) = Curses_Err then raise Curses_Exception; end if; - end Set_Character_Attributes; + end Set_Character_Attributes; - function Get_Character_Attribute (Win : Window := Standard_Window) + function Get_Character_Attribute (Win : Window := Standard_Window) return Character_Attribute_Set is - function Wattrget (Win : Window; - Atr : access C_AttrType; - Col : access C_Short; - Opt : System.Address) return C_Int; + function Wattrget (Win : Window; + Atr : access C_AttrType; + Col : access C_Short; + Opt : System.Address) return C_Int; pragma Import (C, Wattrget, "wattr_get"); - Attr : aliased C_AttrType; - Col : aliased C_Short; - Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + Attr : aliased C_AttrType; + Col : aliased C_Short; + Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, System.Null_Address); - Ch : Attributed_Character; + Ch : Attributed_Character; begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); - return Ch.Attr; + if Res = Curses_Ok then + Ch := AttrType_To_AttrChar (Attr); + return Ch.Attr; else raise Curses_Exception; end if; - end Get_Character_Attribute; + end Get_Character_Attribute; - function Get_Character_Attribute (Win : Window := Standard_Window) + function Get_Character_Attribute (Win : Window := Standard_Window) return Color_Pair is - function Wattrget (Win : Window; - Atr : access C_AttrType; - Col : access C_Short; - Opt : System.Address) return C_Int; + function Wattrget (Win : Window; + Atr : access C_AttrType; + Col : access C_Short; + Opt : System.Address) return C_Int; pragma Import (C, Wattrget, "wattr_get"); - Attr : aliased C_AttrType; - Col : aliased C_Short; - Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + Attr : aliased C_AttrType; + Col : aliased C_Short; + Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, System.Null_Address); - Ch : Attributed_Character; + Ch : Attributed_Character; begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); - return Ch.Color; + if Res = Curses_Ok then + Ch := AttrType_To_AttrChar (Attr); + return Ch.Color; else raise Curses_Exception; end if; - end Get_Character_Attribute; + end Get_Character_Attribute; - procedure Set_Color (Win : in Window := Standard_Window; - Pair : in Color_Pair) + procedure Set_Color (Win : in Window := Standard_Window; + Pair : in Color_Pair) is - function Wset_Color (Win : Window; - Color : C_Short; - Opts : C_Void_Ptr) return C_Int; + function Wset_Color (Win : Window; + Color : C_Short; + Opts : C_Void_Ptr) return C_Int; pragma Import (C, Wset_Color, "wcolor_set"); begin - if Wset_Color (Win, - C_Short (Pair), + if Wset_Color (Win, + C_Short (Pair), C_Void_Ptr (System.Null_Address)) = Curses_Err then raise Curses_Exception; end if; - end Set_Color; + end Set_Color; - procedure Change_Attributes - (Win : in Window := Standard_Window; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) - is - function Wchgat (Win : Window; - Cnt : C_Int; - Attr : C_AttrType; - Color : C_Short; - Opts : System.Address := System.Null_Address) + procedure Change_Attributes + (Win : in Window := Standard_Window; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) + is + function Wchgat (Win : Window; + Cnt : C_Int; + Attr : C_AttrType; + Color : C_Short; + Opts : System.Address := System.Null_Address) return C_Int; pragma Import (C, Wchgat, "wchgat"); - Ch : constant Attributed_Character := - (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); + Ch : constant Attributed_Character := + (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); begin - if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), - C_Short (Color)) = Curses_Err then + if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), + C_Short (Color)) = Curses_Err then raise Curses_Exception; end if; - end Change_Attributes; + end Change_Attributes; - procedure Change_Attributes - (Win : in Window := Standard_Window; - Line : in Line_Position := Line_Position'First; - Column : in Column_Position := Column_Position'First; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Change_Attributes + (Win : in Window := Standard_Window; + Line : in Line_Position := Line_Position'First; + Column : in Column_Position := Column_Position'First; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is begin - Move_Cursor (Win, Line, Column); - Change_Attributes (Win, Count, Attr, Color); - end Change_Attributes; + Move_Cursor (Win, Line, Column); + Change_Attributes (Win, Count, Attr, Color); + end Change_Attributes; ------------------------------------------------------------------------------ - procedure Beep + procedure Beep is - function Beeper return C_Int; + function Beeper return C_Int; pragma Import (C, Beeper, "beep"); begin - if Beeper = Curses_Err then + if Beeper = Curses_Err then raise Curses_Exception; end if; - end Beep; + end Beep; - procedure Flash_Screen + procedure Flash_Screen is - function Flash return C_Int; + function Flash return C_Int; pragma Import (C, Flash, "flash"); begin - if Flash = Curses_Err then + if Flash = Curses_Err then raise Curses_Exception; end if; - end Flash_Screen; + end Flash_Screen; ------------------------------------------------------------------------------ - procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) + procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) is - function Cbreak return C_Int; + function Cbreak return C_Int; pragma Import (C, Cbreak, "cbreak"); - function NoCbreak return C_Int; + function NoCbreak return C_Int; pragma Import (C, NoCbreak, "nocbreak"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := Cbreak; + if SwitchOn then + Err := Cbreak; else - Err := NoCbreak; + Err := NoCbreak; end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Set_Cbreak_Mode; + end Set_Cbreak_Mode; - procedure Set_Raw_Mode (SwitchOn : in Boolean := True) + procedure Set_Raw_Mode (SwitchOn : in Boolean := True) is - function Raw return C_Int; + function Raw return C_Int; pragma Import (C, Raw, "raw"); - function NoRaw return C_Int; + function NoRaw return C_Int; pragma Import (C, NoRaw, "noraw"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := Raw; + if SwitchOn then + Err := Raw; else - Err := NoRaw; + Err := NoRaw; end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Set_Raw_Mode; + end Set_Raw_Mode; - procedure Set_Echo_Mode (SwitchOn : in Boolean := True) + procedure Set_Echo_Mode (SwitchOn : in Boolean := True) is - function Echo return C_Int; + function Echo return C_Int; pragma Import (C, Echo, "echo"); - function NoEcho return C_Int; + function NoEcho return C_Int; pragma Import (C, NoEcho, "noecho"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := Echo; + if SwitchOn then + Err := Echo; else - Err := NoEcho; + Err := NoEcho; end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Set_Echo_Mode; + end Set_Echo_Mode; - procedure Set_Meta_Mode (Win : in Window := Standard_Window; - SwitchOn : in Boolean := True) + procedure Set_Meta_Mode (Win : in Window := Standard_Window; + SwitchOn : in Boolean := True) is - function Meta (W : Window; Mode : Curses_Bool) return C_Int; + function Meta (W : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Meta, "meta"); begin - if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then raise Curses_Exception; end if; - end Set_Meta_Mode; + end Set_Meta_Mode; - procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; - SwitchOn : in Boolean := True) + procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; + SwitchOn : in Boolean := True) is - function Keypad (W : Window; Mode : Curses_Bool) return C_Int; + function Keypad (W : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Keypad, "keypad"); begin - if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then raise Curses_Exception; end if; - end Set_KeyPad_Mode; + end Set_KeyPad_Mode; - function Get_KeyPad_Mode (Win : in Window := Standard_Window) + function Get_KeyPad_Mode (Win : in Window := Standard_Window) return Boolean is + function Is_Keypad (W : Window) return Curses_Bool; + pragma Import (C, Is_Keypad, "is_keypad"); begin - return Get_Flag (Win, Offset_use_keypad); - end Get_KeyPad_Mode; + return (Is_Keypad (Win) /= Curses_Bool_False); + end Get_KeyPad_Mode; - procedure Half_Delay (Amount : in Half_Delay_Amount) + procedure Half_Delay (Amount : in Half_Delay_Amount) is - function Halfdelay (Amount : C_Int) return C_Int; + function Halfdelay (Amount : C_Int) return C_Int; pragma Import (C, Halfdelay, "halfdelay"); begin - if Halfdelay (C_Int (Amount)) = Curses_Err then + if Halfdelay (C_Int (Amount)) = Curses_Err then raise Curses_Exception; end if; - end Half_Delay; + end Half_Delay; - procedure Set_Flush_On_Interrupt_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := True) + procedure Set_Flush_On_Interrupt_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := True) is - function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; + function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Intrflush, "intrflush"); begin - if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; - end Set_Flush_On_Interrupt_Mode; + end Set_Flush_On_Interrupt_Mode; - procedure Set_Queue_Interrupt_Mode - (Win : in Window := Standard_Window; - Flush : in Boolean := True) + procedure Set_Queue_Interrupt_Mode + (Win : in Window := Standard_Window; + Flush : in Boolean := True) is - procedure Qiflush; + procedure Qiflush; pragma Import (C, Qiflush, "qiflush"); - procedure No_Qiflush; + procedure No_Qiflush; pragma Import (C, No_Qiflush, "noqiflush"); begin - if Win = Null_Window then + if Win = Null_Window then raise Curses_Exception; end if; - if Flush then - Qiflush; + if Flush then + Qiflush; else - No_Qiflush; + No_Qiflush; end if; - end Set_Queue_Interrupt_Mode; + end Set_Queue_Interrupt_Mode; - procedure Set_NoDelay_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Set_NoDelay_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; + function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Nodelay, "nodelay"); begin - if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; - end Set_NoDelay_Mode; + end Set_NoDelay_Mode; - procedure Set_Timeout_Mode (Win : in Window := Standard_Window; - Mode : in Timeout_Mode; - Amount : in Natural) + procedure Set_Timeout_Mode (Win : in Window := Standard_Window; + Mode : in Timeout_Mode; + Amount : in Natural) is - function Wtimeout (Win : Window; Amount : C_Int) return C_Int; + procedure Wtimeout (Win : Window; Amount : C_Int); pragma Import (C, Wtimeout, "wtimeout"); - Time : C_Int; + Time : C_Int; begin - case Mode is - when Blocking => Time := -1; - when Non_Blocking => Time := 0; - when Delayed => - if Amount = 0 then + case Mode is + when Blocking => Time := -1; + when Non_Blocking => Time := 0; + when Delayed => + if Amount = 0 then raise Constraint_Error; end if; - Time := C_Int (Amount); + Time := C_Int (Amount); end case; - if Wtimeout (Win, Time) = Curses_Err then - raise Curses_Exception; - end if; - end Set_Timeout_Mode; + Wtimeout (Win, Time); + end Set_Timeout_Mode; - procedure Set_Escape_Timer_Mode - (Win : in Window := Standard_Window; - Timer_Off : in Boolean := False) + procedure Set_Escape_Timer_Mode + (Win : in Window := Standard_Window; + Timer_Off : in Boolean := False) is - function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; + function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Notimeout, "notimeout"); begin - if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) + if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) = Curses_Err then raise Curses_Exception; end if; - end Set_Escape_Timer_Mode; + end Set_Escape_Timer_Mode; ------------------------------------------------------------------------------ - procedure Set_NL_Mode (SwitchOn : in Boolean := True) + procedure Set_NL_Mode (SwitchOn : in Boolean := True) is - function NL return C_Int; + function NL return C_Int; pragma Import (C, NL, "nl"); - function NoNL return C_Int; + function NoNL return C_Int; pragma Import (C, NoNL, "nonl"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := NL; + if SwitchOn then + Err := NL; else - Err := NoNL; + Err := NoNL; end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Set_NL_Mode; + end Set_NL_Mode; - procedure Clear_On_Next_Update - (Win : in Window := Standard_Window; - Do_Clear : in Boolean := True) + procedure Clear_On_Next_Update + (Win : in Window := Standard_Window; + Do_Clear : in Boolean := True) is - function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; + function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, Clear_Ok, "clearok"); begin - if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then + if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then raise Curses_Exception; end if; - end Clear_On_Next_Update; + end Clear_On_Next_Update; - procedure Use_Insert_Delete_Line - (Win : in Window := Standard_Window; - Do_Idl : in Boolean := True) + procedure Use_Insert_Delete_Line + (Win : in Window := Standard_Window; + Do_Idl : in Boolean := True) is - function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; + function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, IDL_Ok, "idlok"); begin - if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then + if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then raise Curses_Exception; end if; - end Use_Insert_Delete_Line; + end Use_Insert_Delete_Line; - procedure Use_Insert_Delete_Character - (Win : in Window := Standard_Window; - Do_Idc : in Boolean := True) + procedure Use_Insert_Delete_Character + (Win : in Window := Standard_Window; + Do_Idc : in Boolean := True) is - function IDC_Ok (W : Window; Flag : Curses_Bool) return C_Int; + procedure IDC_Ok (W : Window; Flag : Curses_Bool); pragma Import (C, IDC_Ok, "idcok"); begin - if IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))) = Curses_Err then - raise Curses_Exception; - end if; - end Use_Insert_Delete_Character; + IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))); + end Use_Insert_Delete_Character; - procedure Leave_Cursor_After_Update - (Win : in Window := Standard_Window; - Do_Leave : in Boolean := True) + procedure Leave_Cursor_After_Update + (Win : in Window := Standard_Window; + Do_Leave : in Boolean := True) is - function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; + function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; pragma Import (C, Leave_Ok, "leaveok"); begin - if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then + if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then raise Curses_Exception; end if; - end Leave_Cursor_After_Update; + end Leave_Cursor_After_Update; - procedure Immediate_Update_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Immediate_Update_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Immedok (Win : Window; Mode : Curses_Bool) return C_Int; + procedure Immedok (Win : Window; Mode : Curses_Bool); pragma Import (C, Immedok, "immedok"); begin - if Immedok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; - end if; - end Immediate_Update_Mode; + Immedok (Win, Curses_Bool (Boolean'Pos (Mode))); + end Immediate_Update_Mode; - procedure Allow_Scrolling - (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Allow_Scrolling + (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; + function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; pragma Import (C, Scrollok, "scrollok"); begin - if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then raise Curses_Exception; end if; - end Allow_Scrolling; + end Allow_Scrolling; - function Scrolling_Allowed (Win : Window := Standard_Window) + function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean is + function Is_Scroll_Ok (W : Window) return Curses_Bool; + pragma Import (C, Is_Scroll_Ok, "is_scrollok"); begin - return Get_Flag (Win, Offset_scroll); - end Scrolling_Allowed; + return (Is_Scroll_Ok (Win) /= Curses_Bool_False); + end Scrolling_Allowed; - procedure Set_Scroll_Region - (Win : in Window := Standard_Window; - Top_Line : in Line_Position; - Bottom_Line : in Line_Position) - is - function Wsetscrreg (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; + procedure Set_Scroll_Region + (Win : in Window := Standard_Window; + Top_Line : in Line_Position; + Bottom_Line : in Line_Position) + is + function Wsetscrreg (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Int; pragma Import (C, Wsetscrreg, "wsetscrreg"); begin - if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) + if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) = Curses_Err then raise Curses_Exception; end if; - end Set_Scroll_Region; + end Set_Scroll_Region; ------------------------------------------------------------------------------ - procedure Update_Screen + procedure Update_Screen is - function Do_Update return C_Int; + function Do_Update return C_Int; pragma Import (C, Do_Update, "doupdate"); begin - if Do_Update = Curses_Err then + if Do_Update = Curses_Err then raise Curses_Exception; end if; - end Update_Screen; + end Update_Screen; - procedure Refresh (Win : in Window := Standard_Window) + procedure Refresh (Win : in Window := Standard_Window) is - function Wrefresh (W : Window) return C_Int; + function Wrefresh (W : Window) return C_Int; pragma Import (C, Wrefresh, "wrefresh"); begin - if Wrefresh (Win) = Curses_Err then + if Wrefresh (Win) = Curses_Err then raise Curses_Exception; end if; - end Refresh; + end Refresh; - procedure Refresh_Without_Update - (Win : in Window := Standard_Window) + procedure Refresh_Without_Update + (Win : in Window := Standard_Window) is - function Wnoutrefresh (W : Window) return C_Int; + function Wnoutrefresh (W : Window) return C_Int; pragma Import (C, Wnoutrefresh, "wnoutrefresh"); begin - if Wnoutrefresh (Win) = Curses_Err then + if Wnoutrefresh (Win) = Curses_Err then raise Curses_Exception; end if; - end Refresh_Without_Update; + end Refresh_Without_Update; - procedure Redraw (Win : in Window := Standard_Window) + procedure Redraw (Win : in Window := Standard_Window) is - function Redrawwin (Win : Window) return C_Int; + function Redrawwin (Win : Window) return C_Int; pragma Import (C, Redrawwin, "redrawwin"); begin - if Redrawwin (Win) = Curses_Err then + if Redrawwin (Win) = Curses_Err then raise Curses_Exception; end if; - end Redraw; + end Redraw; - procedure Redraw - (Win : in Window := Standard_Window; - Begin_Line : in Line_Position; - Line_Count : in Positive) + procedure Redraw + (Win : in Window := Standard_Window; + Begin_Line : in Line_Position; + Line_Count : in Positive) is - function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) + function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) return C_Int; pragma Import (C, Wredrawln, "wredrawln"); begin - if Wredrawln (Win, - C_Int (Begin_Line), - C_Int (Line_Count)) = Curses_Err then + if Wredrawln (Win, + C_Int (Begin_Line), + C_Int (Line_Count)) = Curses_Err then raise Curses_Exception; end if; - end Redraw; + end Redraw; ------------------------------------------------------------------------------ - procedure Erase (Win : in Window := Standard_Window) + procedure Erase (Win : in Window := Standard_Window) is - function Werase (W : Window) return C_Int; + function Werase (W : Window) return C_Int; pragma Import (C, Werase, "werase"); begin - if Werase (Win) = Curses_Err then + if Werase (Win) = Curses_Err then raise Curses_Exception; end if; - end Erase; + end Erase; - procedure Clear (Win : in Window := Standard_Window) + procedure Clear (Win : in Window := Standard_Window) is - function Wclear (W : Window) return C_Int; + function Wclear (W : Window) return C_Int; pragma Import (C, Wclear, "wclear"); begin - if Wclear (Win) = Curses_Err then + if Wclear (Win) = Curses_Err then raise Curses_Exception; end if; - end Clear; + end Clear; - procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) + procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) is - function Wclearbot (W : Window) return C_Int; + function Wclearbot (W : Window) return C_Int; pragma Import (C, Wclearbot, "wclrtobot"); begin - if Wclearbot (Win) = Curses_Err then + if Wclearbot (Win) = Curses_Err then raise Curses_Exception; end if; - end Clear_To_End_Of_Screen; + end Clear_To_End_Of_Screen; - procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) + procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) is - function Wcleareol (W : Window) return C_Int; + function Wcleareol (W : Window) return C_Int; pragma Import (C, Wcleareol, "wclrtoeol"); begin - if Wcleareol (Win) = Curses_Err then + if Wcleareol (Win) = Curses_Err then raise Curses_Exception; end if; - end Clear_To_End_Of_Line; + end Clear_To_End_Of_Line; ------------------------------------------------------------------------------ - procedure Set_Background - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Set_Background + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - procedure WBackground (W : in Window; Ch : in C_Chtype); + procedure WBackground (W : in Window; Ch : in C_Chtype); pragma Import (C, WBackground, "wbkgdset"); begin - WBackground (Win, AttrChar_To_Chtype (Ch)); - end Set_Background; + WBackground (Win, AttrChar_To_Chtype (Ch)); + end Set_Background; - procedure Change_Background - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Change_Background + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; + function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; pragma Import (C, WChangeBkgd, "wbkgd"); begin - if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Change_Background; + end Change_Background; - function Get_Background (Win : Window := Standard_Window) + function Get_Background (Win : Window := Standard_Window) return Attributed_Character is - function Wgetbkgd (Win : Window) return C_Chtype; + function Wgetbkgd (Win : Window) return C_Chtype; pragma Import (C, Wgetbkgd, "getbkgd"); begin - return Chtype_To_AttrChar (Wgetbkgd (Win)); - end Get_Background; + return Chtype_To_AttrChar (Wgetbkgd (Win)); + end Get_Background; ------------------------------------------------------------------------------ - procedure Change_Lines_Status (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive; - State : in Boolean) - is - function Wtouchln (Win : Window; - Sta : C_Int; - Cnt : C_Int; - Chg : C_Int) return C_Int; + procedure Change_Lines_Status (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive; + State : in Boolean) + is + function Wtouchln (Win : Window; + Sta : C_Int; + Cnt : C_Int; + Chg : C_Int) return C_Int; pragma Import (C, Wtouchln, "wtouchln"); begin - if Wtouchln (Win, C_Int (Start), C_Int (Count), - C_Int (Boolean'Pos (State))) = Curses_Err then + if Wtouchln (Win, C_Int (Start), C_Int (Count), + C_Int (Boolean'Pos (State))) = Curses_Err then raise Curses_Exception; end if; - end Change_Lines_Status; + end Change_Lines_Status; - procedure Touch (Win : in Window := Standard_Window) + procedure Touch (Win : in Window := Standard_Window) is - Y : Line_Position; - X : Column_Position; + Y : Line_Position; + X : Column_Position; begin - Get_Size (Win, Y, X); - Change_Lines_Status (Win, 0, Positive (Y), True); - end Touch; + Get_Size (Win, Y, X); + Change_Lines_Status (Win, 0, Positive (Y), True); + end Touch; - procedure Untouch (Win : in Window := Standard_Window) + procedure Untouch (Win : in Window := Standard_Window) is - Y : Line_Position; - X : Column_Position; + Y : Line_Position; + X : Column_Position; begin - Get_Size (Win, Y, X); - Change_Lines_Status (Win, 0, Positive (Y), False); - end Untouch; + Get_Size (Win, Y, X); + Change_Lines_Status (Win, 0, Positive (Y), False); + end Untouch; - procedure Touch (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive) + procedure Touch (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive) is begin - Change_Lines_Status (Win, Start, Count, True); - end Touch; + Change_Lines_Status (Win, Start, Count, True); + end Touch; - function Is_Touched - (Win : Window := Standard_Window; - Line : Line_Position) return Boolean + function Is_Touched + (Win : Window := Standard_Window; + Line : Line_Position) return Boolean is - function WLineTouched (W : Window; L : C_Int) return Curses_Bool; + function WLineTouched (W : Window; L : C_Int) return Curses_Bool; pragma Import (C, WLineTouched, "is_linetouched"); begin - if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then + if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then return False; else return True; end if; - end Is_Touched; + end Is_Touched; - function Is_Touched - (Win : Window := Standard_Window) return Boolean + function Is_Touched + (Win : Window := Standard_Window) return Boolean is - function WWinTouched (W : Window) return Curses_Bool; + function WWinTouched (W : Window) return Curses_Bool; pragma Import (C, WWinTouched, "is_wintouched"); begin - if WWinTouched (Win) = Curses_Bool_False then + if WWinTouched (Win) = Curses_Bool_False then return False; else return True; end if; - end Is_Touched; + end Is_Touched; ------------------------------------------------------------------------------ - procedure Copy - (Source_Window : in Window; - Destination_Window : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position; - Non_Destructive_Mode : in Boolean := True) - is - function Copywin (Src : Window; - Dst : Window; - Str : C_Int; - Slc : C_Int; - Dtr : C_Int; - Dlc : C_Int; - Dbr : C_Int; - Drc : C_Int; - Ndm : C_Int) return C_Int; + procedure Copy + (Source_Window : in Window; + Destination_Window : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position; + Non_Destructive_Mode : in Boolean := True) + is + function Copywin (Src : Window; + Dst : Window; + Str : C_Int; + Slc : C_Int; + Dtr : C_Int; + Dlc : C_Int; + Dbr : C_Int; + Drc : C_Int; + Ndm : C_Int) return C_Int; pragma Import (C, Copywin, "copywin"); begin - if Copywin (Source_Window, - Destination_Window, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column), - Boolean'Pos (Non_Destructive_Mode) + if Copywin (Source_Window, + Destination_Window, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column), + Boolean'Pos (Non_Destructive_Mode) ) = Curses_Err then raise Curses_Exception; end if; - end Copy; + end Copy; - procedure Overwrite - (Source_Window : in Window; - Destination_Window : in Window) + procedure Overwrite + (Source_Window : in Window; + Destination_Window : in Window) is - function Overwrite (Src : Window; Dst : Window) return C_Int; + function Overwrite (Src : Window; Dst : Window) return C_Int; pragma Import (C, Overwrite, "overwrite"); begin - if Overwrite (Source_Window, Destination_Window) = Curses_Err then + if Overwrite (Source_Window, Destination_Window) = Curses_Err then raise Curses_Exception; end if; - end Overwrite; + end Overwrite; - procedure Overlay - (Source_Window : in Window; - Destination_Window : in Window) + procedure Overlay + (Source_Window : in Window; + Destination_Window : in Window) is - function Overlay (Src : Window; Dst : Window) return C_Int; + function Overlay (Src : Window; Dst : Window) return C_Int; pragma Import (C, Overlay, "overlay"); begin - if Overlay (Source_Window, Destination_Window) = Curses_Err then + if Overlay (Source_Window, Destination_Window) = Curses_Err then raise Curses_Exception; end if; - end Overlay; + end Overlay; ------------------------------------------------------------------------------ - procedure Insert_Delete_Lines - (Win : in Window := Standard_Window; - Lines : in Integer := 1) -- default is to insert one line above + procedure Insert_Delete_Lines + (Win : in Window := Standard_Window; + Lines : in Integer := 1) -- default is to insert one line above is - function Winsdelln (W : Window; N : C_Int) return C_Int; + function Winsdelln (W : Window; N : C_Int) return C_Int; pragma Import (C, Winsdelln, "winsdelln"); begin - if Winsdelln (Win, C_Int (Lines)) = Curses_Err then + if Winsdelln (Win, C_Int (Lines)) = Curses_Err then raise Curses_Exception; end if; - end Insert_Delete_Lines; + end Insert_Delete_Lines; - procedure Delete_Line (Win : in Window := Standard_Window) + procedure Delete_Line (Win : in Window := Standard_Window) is begin - Insert_Delete_Lines (Win, -1); - end Delete_Line; + Insert_Delete_Lines (Win, -1); + end Delete_Line; - procedure Insert_Line (Win : in Window := Standard_Window) + procedure Insert_Line (Win : in Window := Standard_Window) is begin - Insert_Delete_Lines (Win, 1); - end Insert_Line; + Insert_Delete_Lines (Win, 1); + end Insert_Line; ------------------------------------------------------------------------------ - procedure Get_Size - (Win : in Window := Standard_Window; - Number_Of_Lines : out Line_Count; - Number_Of_Columns : out Column_Count) + procedure Get_Size + (Win : in Window := Standard_Window; + Number_Of_Lines : out Line_Count; + Number_Of_Columns : out Column_Count) is - -- Please note: in ncurses they are one off. - -- This might be different in other implementations of curses - 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); + function GetMaxY (W : Window) return C_Int; + pragma Import (C, GetMaxY, "getmaxy"); + + function GetMaxX (W : Window) return C_Int; + pragma Import (C, GetMaxX, "getmaxx"); + + Y : constant C_Int := GetMaxY (Win) + + C_Int (Offset_XY); + X : constant C_Int := GetMaxX (Win) + + C_Int (Offset_XY); begin - Number_Of_Lines := Line_Count (Y); - Number_Of_Columns := Column_Count (X); - end Get_Size; + Number_Of_Lines := Line_Count (Y); + Number_Of_Columns := Column_Count (X); + end Get_Size; - procedure Get_Window_Position - (Win : in Window := Standard_Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position) + procedure Get_Window_Position + (Win : in Window := Standard_Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position) is - Y : constant C_Short := W_Get_Short (Win, Offset_begy); - X : constant C_Short := W_Get_Short (Win, Offset_begx); + function GetBegY (W : Window) return C_Int; + pragma Import (C, GetBegY, "getbegy"); + + function GetBegX (W : Window) return C_Int; + pragma Import (C, GetBegX, "getbegx"); + + Y : constant C_Short := C_Short (GetBegY (Win)); + X : constant C_Short := C_Short (GetBegX (Win)); begin - Top_Left_Line := Line_Position (Y); - Top_Left_Column := Column_Position (X); - end Get_Window_Position; + Top_Left_Line := Line_Position (Y); + Top_Left_Column := Column_Position (X); + end Get_Window_Position; - procedure Get_Cursor_Position - (Win : in Window := Standard_Window; - Line : out Line_Position; - Column : out Column_Position) + procedure Get_Cursor_Position + (Win : in Window := Standard_Window; + Line : out Line_Position; + Column : out Column_Position) is - Y : constant C_Short := W_Get_Short (Win, Offset_cury); - X : constant C_Short := W_Get_Short (Win, Offset_curx); + function GetCurY (W : Window) return C_Int; + pragma Import (C, GetCurY, "getcury"); + + function GetCurX (W : Window) return C_Int; + pragma Import (C, GetCurX, "getcurx"); + + Y : constant C_Short := C_Short (GetCurY (Win)); + X : constant C_Short := C_Short (GetCurX (Win)); begin - Line := Line_Position (Y); - Column := Column_Position (X); - end Get_Cursor_Position; + Line := Line_Position (Y); + Column := Column_Position (X); + end Get_Cursor_Position; - procedure Get_Origin_Relative_To_Parent - (Win : in Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position; - Is_Not_A_Subwindow : out Boolean) + procedure Get_Origin_Relative_To_Parent + (Win : in Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position; + Is_Not_A_Subwindow : out Boolean) is - Y : constant C_Int := W_Get_Int (Win, Offset_pary); - X : constant C_Int := W_Get_Int (Win, Offset_parx); + function GetParY (W : Window) return C_Int; + pragma Import (C, GetParY, "getpary"); + + function GetParX (W : Window) return C_Int; + pragma Import (C, GetParX, "getparx"); + + Y : constant C_Int := GetParY (Win); + X : constant C_Int := GetParX (Win); begin - if Y = -1 then - Top_Left_Line := Line_Position'Last; - Top_Left_Column := Column_Position'Last; - Is_Not_A_Subwindow := True; + if Y = -1 then + Top_Left_Line := Line_Position'Last; + Top_Left_Column := Column_Position'Last; + Is_Not_A_Subwindow := True; else - Top_Left_Line := Line_Position (Y); - Top_Left_Column := Column_Position (X); - Is_Not_A_Subwindow := False; + Top_Left_Line := Line_Position (Y); + Top_Left_Column := Column_Position (X); + Is_Not_A_Subwindow := False; end if; - end Get_Origin_Relative_To_Parent; + end Get_Origin_Relative_To_Parent; ------------------------------------------------------------------------------ - function New_Pad (Lines : Line_Count; - Columns : Column_Count) return Window + function New_Pad (Lines : Line_Count; + Columns : Column_Count) return Window is - function Newpad (Lines : C_Int; Columns : C_Int) return Window; + function Newpad (Lines : C_Int; Columns : C_Int) return Window; pragma Import (C, Newpad, "newpad"); - W : Window; + W : Window; begin - W := Newpad (C_Int (Lines), C_Int (Columns)); - if W = Null_Window then + W := Newpad (C_Int (Lines), C_Int (Columns)); + if W = Null_Window then raise Curses_Exception; end if; - return W; - end New_Pad; + return W; + end New_Pad; - function Sub_Pad - (Pad : Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Subpad - (Pad : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; + function Sub_Pad + (Pad : Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Subpad + (Pad : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; pragma Import (C, Subpad, "subpad"); - W : Window; + W : Window; begin - W := Subpad (Pad, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Sub_Pad; - - procedure Refresh - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position) - is - function Prefresh - (Pad : Window; - Source_Top_Row : C_Int; - Source_Left_Column : C_Int; - Destination_Top_Row : C_Int; - Destination_Left_Column : C_Int; - Destination_Bottom_Row : C_Int; - Destination_Right_Column : C_Int) return C_Int; + W := Subpad (Pad, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Sub_Pad; + + procedure Refresh + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position) + is + function Prefresh + (Pad : Window; + Source_Top_Row : C_Int; + Source_Left_Column : C_Int; + Destination_Top_Row : C_Int; + Destination_Left_Column : C_Int; + Destination_Bottom_Row : C_Int; + Destination_Right_Column : C_Int) return C_Int; pragma Import (C, Prefresh, "prefresh"); begin - if Prefresh (Pad, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh; - - procedure Refresh_Without_Update - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position) - is - function Pnoutrefresh - (Pad : Window; - Source_Top_Row : C_Int; - Source_Left_Column : C_Int; - Destination_Top_Row : C_Int; - Destination_Left_Column : C_Int; - Destination_Bottom_Row : C_Int; - Destination_Right_Column : C_Int) return C_Int; + if Prefresh (Pad, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh; + + procedure Refresh_Without_Update + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position) + is + function Pnoutrefresh + (Pad : Window; + Source_Top_Row : C_Int; + Source_Left_Column : C_Int; + Destination_Top_Row : C_Int; + Destination_Left_Column : C_Int; + Destination_Bottom_Row : C_Int; + Destination_Right_Column : C_Int) return C_Int; pragma Import (C, Pnoutrefresh, "pnoutrefresh"); begin - if Pnoutrefresh (Pad, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh_Without_Update; - - procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; - Ch : in Attributed_Character) + if Pnoutrefresh (Pad, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh_Without_Update; + + procedure Add_Character_To_Pad_And_Echo_It + (Pad : in Window; + Ch : in Attributed_Character) is - function Pechochar (Pad : Window; Ch : C_Chtype) + function Pechochar (Pad : Window; Ch : C_Chtype) return C_Int; pragma Import (C, Pechochar, "pechochar"); begin - if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then + if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Add_Character_To_Pad_And_Echo_It; + end Add_Character_To_Pad_And_Echo_It; - procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; - Ch : in Character) + procedure Add_Character_To_Pad_And_Echo_It + (Pad : in Window; + Ch : in Character) is begin - Add_Character_To_Pad_And_Echo_It - (Pad, - Attributed_Character'(Ch => Ch, + Add_Character_To_Pad_And_Echo_It + (Pad, + Attributed_Character'(Ch => Ch, Color => Color_Pair'First, Attr => Normal_Video)); - end Add_Character_To_Pad_And_Echo_It; + end Add_Character_To_Pad_And_Echo_It; ------------------------------------------------------------------------------ - procedure Scroll (Win : in Window := Standard_Window; - Amount : in Integer := 1) + procedure Scroll (Win : in Window := Standard_Window; + Amount : in Integer := 1) is - function Wscrl (Win : Window; N : C_Int) return C_Int; + function Wscrl (Win : Window; N : C_Int) return C_Int; pragma Import (C, Wscrl, "wscrl"); begin - if Wscrl (Win, C_Int (Amount)) = Curses_Err then + if Wscrl (Win, C_Int (Amount)) = Curses_Err then raise Curses_Exception; end if; - end Scroll; + end Scroll; ------------------------------------------------------------------------------ - procedure Delete_Character (Win : in Window := Standard_Window) + procedure Delete_Character (Win : in Window := Standard_Window) is - function Wdelch (Win : Window) return C_Int; + function Wdelch (Win : Window) return C_Int; pragma Import (C, Wdelch, "wdelch"); begin - if Wdelch (Win) = Curses_Err then + if Wdelch (Win) = Curses_Err then raise Curses_Exception; end if; - end Delete_Character; + end Delete_Character; - procedure Delete_Character - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Delete_Character + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position) is - function Mvwdelch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; + function Mvwdelch (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Int; pragma Import (C, Mvwdelch, "mvwdelch"); begin - if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then raise Curses_Exception; end if; - end Delete_Character; + end Delete_Character; ------------------------------------------------------------------------------ - function Peek (Win : Window := Standard_Window) + function Peek (Win : Window := Standard_Window) return Attributed_Character is - function Winch (Win : Window) return C_Chtype; + function Winch (Win : Window) return C_Chtype; pragma Import (C, Winch, "winch"); begin - return Chtype_To_AttrChar (Winch (Win)); - end Peek; + return Chtype_To_AttrChar (Winch (Win)); + end Peek; - function Peek - (Win : Window := Standard_Window; - Line : Line_Position; - Column : Column_Position) return Attributed_Character - is - function Mvwinch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Chtype; + function Peek + (Win : Window := Standard_Window; + Line : Line_Position; + Column : Column_Position) return Attributed_Character + is + function Mvwinch (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Chtype; pragma Import (C, Mvwinch, "mvwinch"); begin - return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); - end Peek; + return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); + end Peek; ------------------------------------------------------------------------------ - procedure Insert (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Insert (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function Winsch (Win : Window; Ch : C_Chtype) return C_Int; + function Winsch (Win : Window; Ch : C_Chtype) return C_Int; pragma Import (C, Winsch, "winsch"); begin - if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Insert; + end Insert; - procedure Insert - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Attributed_Character) - is - function Mvwinsch (Win : Window; - Lin : C_Int; - Col : C_Int; - Ch : C_Chtype) return C_Int; + procedure Insert + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Attributed_Character) + is + function Mvwinsch (Win : Window; + Lin : C_Int; + Col : C_Int; + Ch : C_Chtype) return C_Int; pragma Import (C, Mvwinsch, "mvwinsch"); begin - if Mvwinsch (Win, - C_Int (Line), - C_Int (Column), - AttrChar_To_Chtype (Ch)) = Curses_Err then + if Mvwinsch (Win, + C_Int (Line), + C_Int (Column), + AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Insert; + end Insert; ------------------------------------------------------------------------------ - procedure Insert (Win : in Window := Standard_Window; - Str : in String; - Len : in Integer := -1) - is - function Winsnstr (Win : Window; - Str : char_array; - Len : Integer := -1) return C_Int; + procedure Insert (Win : in Window := Standard_Window; + Str : in String; + Len : in Integer := -1) + is + function Winsnstr (Win : Window; + Str : char_array; + Len : Integer := -1) return C_Int; pragma Import (C, Winsnstr, "winsnstr"); - Txt : char_array (0 .. Str'Length); - Length : size_t; + Txt : char_array (0 .. Str'Length); + Length : size_t; begin - To_C (Str, Txt, Length); - if Winsnstr (Win, Txt, Len) = Curses_Err then + To_C (Str, Txt, Length); + if Winsnstr (Win, Txt, Len) = Curses_Err then raise Curses_Exception; end if; - end Insert; + end Insert; - procedure Insert - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; - Len : in Integer := -1) - is - function Mvwinsnstr (Win : Window; - Line : C_Int; - Column : C_Int; - Str : char_array; - Len : C_Int) return C_Int; + procedure Insert + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; + Len : in Integer := -1) + is + function Mvwinsnstr (Win : Window; + Line : C_Int; + Column : C_Int; + Str : char_array; + Len : C_Int) return C_Int; pragma Import (C, Mvwinsnstr, "mvwinsnstr"); - Txt : char_array (0 .. Str'Length); - Length : size_t; + Txt : char_array (0 .. Str'Length); + Length : size_t; begin - To_C (Str, Txt, Length); - if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) + To_C (Str, Txt, Length); + if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; - end Insert; + end Insert; ------------------------------------------------------------------------------ - procedure Peek (Win : in Window := Standard_Window; - Str : out String; - Len : in Integer := -1) - is - function Winnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; + procedure Peek (Win : in Window := Standard_Window; + Str : out String; + Len : in Integer := -1) + is + function Winnstr (Win : Window; + Str : char_array; + Len : C_Int) return C_Int; pragma Import (C, Winnstr, "winnstr"); - N : Integer := Len; - Txt : char_array (0 .. Str'Length); - Cnt : Natural; + N : Integer := Len; + Txt : char_array (0 .. Str'Length); + Cnt : Natural; begin - if N < 0 then - N := Str'Length; + if N < 0 then + N := Str'Length; end if; - if N > Str'Length then + if N > Str'Length then raise Constraint_Error; end if; - Txt (0) := Interfaces.C.char'First; - if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then + Txt (0) := Interfaces.C.char'First; + if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then raise Curses_Exception; end if; - To_Ada (Txt, Str, Cnt, True); - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + To_Ada (Txt, Str, Cnt, True); + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); end if; - end Peek; + end Peek; - procedure Peek - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; - Len : in Integer := -1) + procedure Peek + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Peek (Win, Str, Len); - end Peek; + Move_Cursor (Win, Line, Column); + Peek (Win, Str, Len); + end Peek; ------------------------------------------------------------------------------ - procedure Peek - (Win : in Window := Standard_Window; - Str : out Attributed_String; - Len : in Integer := -1) + procedure Peek + (Win : in Window := Standard_Window; + Str : out Attributed_String; + Len : in Integer := -1) is - function Winchnstr (Win : Window; - Str : chtype_array; -- out - Len : C_Int) return C_Int; + function Winchnstr (Win : Window; + Str : chtype_array; -- out + Len : C_Int) return C_Int; pragma Import (C, Winchnstr, "winchnstr"); - N : Integer := Len; - Txt : constant chtype_array (0 .. Str'Length) + N : Integer := Len; + Txt : constant chtype_array (0 .. Str'Length) := (0 => Default_Character); - Cnt : Natural := 0; + Cnt : Natural := 0; begin - if N < 0 then - N := Str'Length; + if N < 0 then + N := Str'Length; end if; - if N > Str'Length then + if N > Str'Length then raise Constraint_Error; end if; - if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then + if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then raise Curses_Exception; end if; - for To in Str'Range loop - exit when Txt (size_t (Cnt)) = Default_Character; - Str (To) := Txt (size_t (Cnt)); - Cnt := Cnt + 1; + for To in Str'Range loop + exit when Txt (size_t (Cnt)) = Default_Character; + Str (To) := Txt (size_t (Cnt)); + Cnt := Cnt + 1; end loop; - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => (Ch => ' ', Color => Color_Pair'First, Attr => Normal_Video)); end if; - end Peek; + end Peek; - procedure Peek - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out Attributed_String; - Len : in Integer := -1) - is - begin - Move_Cursor (Win, Line, Column); - Peek (Win, Str, Len); - end Peek; ------------------------------------------------------------------------------- - procedure Get (Win : in Window := Standard_Window; - Str : out String; - Len : in Integer := -1) - is - function Wgetnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; + procedure Peek + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out Attributed_String; + Len : in Integer := -1) + is + begin + Move_Cursor (Win, Line, Column); + Peek (Win, Str, Len); + end Peek; +------------------------------------------------------------------------------ + procedure Get (Win : in Window := Standard_Window; + Str : out String; + Len : in Integer := -1) + is + function Wgetnstr (Win : Window; + Str : char_array; + Len : C_Int) return C_Int; pragma Import (C, Wgetnstr, "wgetnstr"); - N : Integer := Len; - Txt : char_array (0 .. Str'Length); - Cnt : Natural; + N : Integer := Len; + Txt : char_array (0 .. Str'Length); + Cnt : Natural; begin - if N < 0 then - N := Str'Length; + if N < 0 then + N := Str'Length; end if; - if N > Str'Length then + if N > Str'Length then raise Constraint_Error; end if; - Txt (0) := Interfaces.C.char'First; - if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then + Txt (0) := Interfaces.C.char'First; + if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then raise Curses_Exception; end if; - To_Ada (Txt, Str, Cnt, True); - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + To_Ada (Txt, Str, Cnt, True); + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); end if; - end Get; + end Get; - procedure Get - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; - Len : in Integer := -1) + procedure Get + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Get (Win, Str, Len); - end Get; + Move_Cursor (Win, Line, Column); + Get (Win, Str, Len); + end Get; ------------------------------------------------------------------------------ - procedure Init_Soft_Label_Keys - (Format : in Soft_Label_Key_Format := Three_Two_Three) + procedure Init_Soft_Label_Keys + (Format : in Soft_Label_Key_Format := Three_Two_Three) is - function Slk_Init (Fmt : C_Int) return C_Int; + function Slk_Init (Fmt : C_Int) return C_Int; pragma Import (C, Slk_Init, "slk_init"); begin - if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then + if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then raise Curses_Exception; end if; - end Init_Soft_Label_Keys; + end Init_Soft_Label_Keys; - procedure Set_Soft_Label_Key (Label : in Label_Number; - Text : in String; - Fmt : in Label_Justification := Left) + procedure Set_Soft_Label_Key (Label : in Label_Number; + Text : in String; + Fmt : in Label_Justification := Left) is - function Slk_Set (Label : C_Int; - Txt : char_array; - Fmt : C_Int) return C_Int; + function Slk_Set (Label : C_Int; + Txt : char_array; + Fmt : C_Int) return C_Int; pragma Import (C, Slk_Set, "slk_set"); - Txt : char_array (0 .. Text'Length); - Len : size_t; + Txt : char_array (0 .. Text'Length); + Len : size_t; begin - To_C (Text, Txt, Len); - if Slk_Set (C_Int (Label), Txt, - C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then + To_C (Text, Txt, Len); + if Slk_Set (C_Int (Label), Txt, + C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then raise Curses_Exception; end if; - end Set_Soft_Label_Key; + end Set_Soft_Label_Key; - procedure Refresh_Soft_Label_Keys + procedure Refresh_Soft_Label_Keys is - function Slk_Refresh return C_Int; + function Slk_Refresh return C_Int; pragma Import (C, Slk_Refresh, "slk_refresh"); begin - if Slk_Refresh = Curses_Err then + if Slk_Refresh = Curses_Err then raise Curses_Exception; end if; - end Refresh_Soft_Label_Keys; + end Refresh_Soft_Label_Keys; - procedure Refresh_Soft_Label_Keys_Without_Update + procedure Refresh_Soft_Label_Keys_Without_Update is - function Slk_Noutrefresh return C_Int; + function Slk_Noutrefresh return C_Int; pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); begin - if Slk_Noutrefresh = Curses_Err then + if Slk_Noutrefresh = Curses_Err then raise Curses_Exception; end if; - end Refresh_Soft_Label_Keys_Without_Update; + end Refresh_Soft_Label_Keys_Without_Update; - procedure Get_Soft_Label_Key (Label : in Label_Number; - Text : out String) + procedure Get_Soft_Label_Key (Label : in Label_Number; + Text : out String) is - function Slk_Label (Label : C_Int) return chars_ptr; + function Slk_Label (Label : C_Int) return chars_ptr; pragma Import (C, Slk_Label, "slk_label"); begin - Fill_String (Slk_Label (C_Int (Label)), Text); - end Get_Soft_Label_Key; + Fill_String (Slk_Label (C_Int (Label)), Text); + end Get_Soft_Label_Key; - function Get_Soft_Label_Key (Label : in Label_Number) return String + function Get_Soft_Label_Key (Label : in Label_Number) return String is - function Slk_Label (Label : C_Int) return chars_ptr; + function Slk_Label (Label : C_Int) return chars_ptr; pragma Import (C, Slk_Label, "slk_label"); begin - return Fill_String (Slk_Label (C_Int (Label))); - end Get_Soft_Label_Key; + return Fill_String (Slk_Label (C_Int (Label))); + end Get_Soft_Label_Key; - procedure Clear_Soft_Label_Keys + procedure Clear_Soft_Label_Keys is - function Slk_Clear return C_Int; + function Slk_Clear return C_Int; pragma Import (C, Slk_Clear, "slk_clear"); begin - if Slk_Clear = Curses_Err then + if Slk_Clear = Curses_Err then raise Curses_Exception; end if; - end Clear_Soft_Label_Keys; + end Clear_Soft_Label_Keys; - procedure Restore_Soft_Label_Keys + procedure Restore_Soft_Label_Keys is - function Slk_Restore return C_Int; + function Slk_Restore return C_Int; pragma Import (C, Slk_Restore, "slk_restore"); begin - if Slk_Restore = Curses_Err then + if Slk_Restore = Curses_Err then raise Curses_Exception; end if; - end Restore_Soft_Label_Keys; + end Restore_Soft_Label_Keys; - procedure Touch_Soft_Label_Keys + procedure Touch_Soft_Label_Keys is - function Slk_Touch return C_Int; + function Slk_Touch return C_Int; pragma Import (C, Slk_Touch, "slk_touch"); begin - if Slk_Touch = Curses_Err then + if Slk_Touch = Curses_Err then raise Curses_Exception; end if; - end Touch_Soft_Label_Keys; + end Touch_Soft_Label_Keys; - procedure Switch_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set; - On : in Boolean := True) + procedure Switch_Soft_Label_Key_Attributes + (Attr : in Character_Attribute_Set; + On : in Boolean := True) is - function Slk_Attron (Ch : C_Chtype) return C_Int; + function Slk_Attron (Ch : C_Chtype) return C_Int; pragma Import (C, Slk_Attron, "slk_attron"); - function Slk_Attroff (Ch : C_Chtype) return C_Int; + function Slk_Attroff (Ch : C_Chtype) return C_Int; pragma Import (C, Slk_Attroff, "slk_attroff"); - Err : C_Int; - Ch : constant Attributed_Character := (Ch => Character'First, - Attr => Attr, + Err : C_Int; + Ch : constant Attributed_Character := (Ch => Character'First, + Attr => Attr, Color => Color_Pair'First); begin - if On then - Err := Slk_Attron (AttrChar_To_Chtype (Ch)); + if On then + Err := Slk_Attron (AttrChar_To_Chtype (Ch)); else - Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); + Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); end if; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Switch_Soft_Label_Key_Attributes; + end Switch_Soft_Label_Key_Attributes; - procedure Set_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Soft_Label_Key_Attributes + (Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Slk_Attrset (Ch : C_Chtype) return C_Int; + function Slk_Attrset (Ch : C_Chtype) return C_Int; pragma Import (C, Slk_Attrset, "slk_attrset"); - Ch : constant Attributed_Character := (Ch => Character'First, - Attr => Attr, - Color => Color); + Ch : constant Attributed_Character := (Ch => Character'First, + Attr => Attr, + Color => Color); begin - if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then + if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then raise Curses_Exception; end if; - end Set_Soft_Label_Key_Attributes; + end Set_Soft_Label_Key_Attributes; - function Get_Soft_Label_Key_Attributes return Character_Attribute_Set + function Get_Soft_Label_Key_Attributes return Character_Attribute_Set is - function Slk_Attr return C_Chtype; + function Slk_Attr return C_Chtype; pragma Import (C, Slk_Attr, "slk_attr"); - Attr : constant C_Chtype := Slk_Attr; + Attr : constant C_Chtype := Slk_Attr; begin - return Chtype_To_AttrChar (Attr).Attr; - end Get_Soft_Label_Key_Attributes; + return Chtype_To_AttrChar (Attr).Attr; + end Get_Soft_Label_Key_Attributes; - function Get_Soft_Label_Key_Attributes return Color_Pair + function Get_Soft_Label_Key_Attributes return Color_Pair is - function Slk_Attr return C_Chtype; + function Slk_Attr return C_Chtype; pragma Import (C, Slk_Attr, "slk_attr"); - Attr : constant C_Chtype := Slk_Attr; + Attr : constant C_Chtype := Slk_Attr; begin - return Chtype_To_AttrChar (Attr).Color; - end Get_Soft_Label_Key_Attributes; + return Chtype_To_AttrChar (Attr).Color; + end Get_Soft_Label_Key_Attributes; - procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) + procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) is - function Slk_Color (Color : in C_Short) return C_Int; + function Slk_Color (Color : in C_Short) return C_Int; pragma Import (C, Slk_Color, "slk_color"); begin - if Slk_Color (C_Short (Pair)) = Curses_Err then + if Slk_Color (C_Short (Pair)) = Curses_Err then raise Curses_Exception; end if; - end Set_Soft_Label_Key_Color; + end Set_Soft_Label_Key_Color; ------------------------------------------------------------------------------ - procedure Enable_Key (Key : in Special_Key_Code; - Enable : in Boolean := True) + procedure Enable_Key (Key : in Special_Key_Code; + Enable : in Boolean := True) is - function Keyok (Keycode : C_Int; - On_Off : Curses_Bool) return C_Int; + function Keyok (Keycode : C_Int; + On_Off : Curses_Bool) return C_Int; pragma Import (C, Keyok, "keyok"); begin - if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) + if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) = Curses_Err then raise Curses_Exception; end if; - end Enable_Key; + end Enable_Key; ------------------------------------------------------------------------------ - procedure Define_Key (Definition : in String; - Key : in Special_Key_Code) + procedure Define_Key (Definition : in String; + Key : in Special_Key_Code) is - function Defkey (Def : char_array; - Key : C_Int) return C_Int; + function Defkey (Def : char_array; + Key : C_Int) return C_Int; pragma Import (C, Defkey, "define_key"); - Txt : char_array (0 .. Definition'Length); - Length : size_t; + Txt : char_array (0 .. Definition'Length); + Length : size_t; begin - To_C (Definition, Txt, Length); - if Defkey (Txt, C_Int (Key)) = Curses_Err then + To_C (Definition, Txt, Length); + if Defkey (Txt, C_Int (Key)) = Curses_Err then raise Curses_Exception; end if; - end Define_Key; + end Define_Key; ------------------------------------------------------------------------------ - procedure Un_Control (Ch : in Attributed_Character; - Str : out String) + procedure Un_Control (Ch : in Attributed_Character; + Str : out String) is - function Unctrl (Ch : C_Chtype) return chars_ptr; + function Unctrl (Ch : C_Chtype) return chars_ptr; pragma Import (C, Unctrl, "unctrl"); begin - Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); - end Un_Control; + Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); + end Un_Control; - function Un_Control (Ch : in Attributed_Character) return String + function Un_Control (Ch : in Attributed_Character) return String is - function Unctrl (Ch : C_Chtype) return chars_ptr; + function Unctrl (Ch : C_Chtype) return chars_ptr; pragma Import (C, Unctrl, "unctrl"); begin - return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); - end Un_Control; + return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); + end Un_Control; - procedure Delay_Output (Msecs : in Natural) + procedure Delay_Output (Msecs : in Natural) is - function Delayoutput (Msecs : C_Int) return C_Int; + function Delayoutput (Msecs : C_Int) return C_Int; pragma Import (C, Delayoutput, "delay_output"); begin - if Delayoutput (C_Int (Msecs)) = Curses_Err then + if Delayoutput (C_Int (Msecs)) = Curses_Err then raise Curses_Exception; end if; - end Delay_Output; + end Delay_Output; - procedure Flush_Input + procedure Flush_Input is - function Flushinp return C_Int; + function Flushinp return C_Int; pragma Import (C, Flushinp, "flushinp"); begin - if Flushinp = Curses_Err then -- docu says that never happens, but... + if Flushinp = Curses_Err then -- docu says that never happens, but... raise Curses_Exception; end if; - end Flush_Input; + end Flush_Input; ------------------------------------------------------------------------------ - function Baudrate return Natural + function Baudrate return Natural is - function Baud return C_Int; + function Baud return C_Int; pragma Import (C, Baud, "baudrate"); begin - return Natural (Baud); - end Baudrate; + return Natural (Baud); + end Baudrate; - function Erase_Character return Character + function Erase_Character return Character is - function Erasechar return C_Int; + function Erasechar return C_Int; pragma Import (C, Erasechar, "erasechar"); begin - return Character'Val (Erasechar); - end Erase_Character; + return Character'Val (Erasechar); + end Erase_Character; - function Kill_Character return Character + function Kill_Character return Character is - function Killchar return C_Int; + function Killchar return C_Int; pragma Import (C, Killchar, "killchar"); begin - return Character'Val (Killchar); - end Kill_Character; + return Character'Val (Killchar); + end Kill_Character; - function Has_Insert_Character return Boolean + function Has_Insert_Character return Boolean is - function Has_Ic return Curses_Bool; + function Has_Ic return Curses_Bool; pragma Import (C, Has_Ic, "has_ic"); begin - if Has_Ic = Curses_Bool_False then + if Has_Ic = Curses_Bool_False then return False; else return True; end if; - end Has_Insert_Character; + end Has_Insert_Character; - function Has_Insert_Line return Boolean + function Has_Insert_Line return Boolean is - function Has_Il return Curses_Bool; + function Has_Il return Curses_Bool; pragma Import (C, Has_Il, "has_il"); begin - if Has_Il = Curses_Bool_False then + if Has_Il = Curses_Bool_False then return False; else return True; end if; - end Has_Insert_Line; + end Has_Insert_Line; - function Supported_Attributes return Character_Attribute_Set + function Supported_Attributes return Character_Attribute_Set is - function Termattrs return C_Chtype; + function Termattrs return C_Chtype; pragma Import (C, Termattrs, "termattrs"); - Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); + Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); begin - return Ch.Attr; - end Supported_Attributes; + return Ch.Attr; + end Supported_Attributes; - procedure Long_Name (Name : out String) + procedure Long_Name (Name : out String) is - function Longname return chars_ptr; + function Longname return chars_ptr; pragma Import (C, Longname, "longname"); begin - Fill_String (Longname, Name); - end Long_Name; + Fill_String (Longname, Name); + end Long_Name; - function Long_Name return String + function Long_Name return String is - function Longname return chars_ptr; + function Longname return chars_ptr; pragma Import (C, Longname, "longname"); begin - return Fill_String (Longname); - end Long_Name; + return Fill_String (Longname); + end Long_Name; - procedure Terminal_Name (Name : out String) + procedure Terminal_Name (Name : out String) is - function Termname return chars_ptr; + function Termname return chars_ptr; pragma Import (C, Termname, "termname"); begin - Fill_String (Termname, Name); - end Terminal_Name; + Fill_String (Termname, Name); + end Terminal_Name; - function Terminal_Name return String + function Terminal_Name return String is - function Termname return chars_ptr; + function Termname return chars_ptr; pragma Import (C, Termname, "termname"); begin - return Fill_String (Termname); - end Terminal_Name; + return Fill_String (Termname); + end Terminal_Name; ------------------------------------------------------------------------------ - procedure Init_Pair (Pair : in Redefinable_Color_Pair; - Fore : in Color_Number; - Back : in Color_Number) - is - function Initpair (Pair : C_Short; - Fore : C_Short; - Back : C_Short) return C_Int; + procedure Init_Pair (Pair : in Redefinable_Color_Pair; + Fore : in Color_Number; + Back : in Color_Number) + is + function Initpair (Pair : C_Short; + Fore : C_Short; + Back : C_Short) return C_Int; pragma Import (C, Initpair, "init_pair"); begin - if Integer (Pair) >= Number_Of_Color_Pairs then + if Integer (Pair) >= Number_Of_Color_Pairs then raise Constraint_Error; end if; - if Integer (Fore) >= Number_Of_Colors or else - Integer (Back) >= Number_Of_Colors then raise Constraint_Error; + if Integer (Fore) >= Number_Of_Colors or else + Integer (Back) >= Number_Of_Colors then raise Constraint_Error; end if; - if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) + if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) = Curses_Err then raise Curses_Exception; end if; - end Init_Pair; + end Init_Pair; - procedure Pair_Content (Pair : in Color_Pair; - Fore : out Color_Number; - Back : out Color_Number) - is - type C_Short_Access is access all C_Short; - function Paircontent (Pair : C_Short; - Fp : C_Short_Access; - Bp : C_Short_Access) return C_Int; + procedure Pair_Content (Pair : in Color_Pair; + Fore : out Color_Number; + Back : out Color_Number) + is + type C_Short_Access is access all C_Short; + function Paircontent (Pair : C_Short; + Fp : C_Short_Access; + Bp : C_Short_Access) return C_Int; pragma Import (C, Paircontent, "pair_content"); - F, B : aliased C_Short; + F, B : aliased C_Short; begin - if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then + if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then raise Curses_Exception; else - Fore := Color_Number (F); - Back := Color_Number (B); + Fore := Color_Number (F); + Back := Color_Number (B); end if; - end Pair_Content; + end Pair_Content; - function Has_Colors return Boolean + function Has_Colors return Boolean is - function Hascolors return Curses_Bool; + function Hascolors return Curses_Bool; pragma Import (C, Hascolors, "has_colors"); begin - if Hascolors = Curses_Bool_False then + if Hascolors = Curses_Bool_False then return False; else return True; end if; - end Has_Colors; + end Has_Colors; - procedure Init_Color (Color : in Color_Number; - Red : in RGB_Value; - Green : in RGB_Value; - Blue : in RGB_Value) - is - function Initcolor (Col : C_Short; - Red : C_Short; - Green : C_Short; - Blue : C_Short) return C_Int; + procedure Init_Color (Color : in Color_Number; + Red : in RGB_Value; + Green : in RGB_Value; + Blue : in RGB_Value) + is + function Initcolor (Col : C_Short; + Red : C_Short; + Green : C_Short; + Blue : C_Short) return C_Int; pragma Import (C, Initcolor, "init_color"); begin - if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), - C_Short (Blue)) = Curses_Err then + if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), + C_Short (Blue)) = Curses_Err then raise Curses_Exception; end if; - end Init_Color; + end Init_Color; - function Can_Change_Color return Boolean + function Can_Change_Color return Boolean is - function Canchangecolor return Curses_Bool; + function Canchangecolor return Curses_Bool; pragma Import (C, Canchangecolor, "can_change_color"); begin - if Canchangecolor = Curses_Bool_False then + if Canchangecolor = Curses_Bool_False then return False; else return True; end if; - end Can_Change_Color; + end Can_Change_Color; - procedure Color_Content (Color : in Color_Number; - Red : out RGB_Value; - Green : out RGB_Value; - Blue : out RGB_Value) + procedure Color_Content (Color : in Color_Number; + Red : out RGB_Value; + Green : out RGB_Value; + Blue : out RGB_Value) is - type C_Short_Access is access all C_Short; + type C_Short_Access is access all C_Short; - function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) + function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) return C_Int; pragma Import (C, Colorcontent, "color_content"); - R, G, B : aliased C_Short; + R, G, B : aliased C_Short; begin - if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = + if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = Curses_Err then raise Curses_Exception; else - Red := RGB_Value (R); - Green := RGB_Value (G); - Blue := RGB_Value (B); + Red := RGB_Value (R); + Green := RGB_Value (G); + Blue := RGB_Value (B); end if; - end Color_Content; + end Color_Content; ------------------------------------------------------------------------------ - procedure Save_Curses_Mode (Mode : in Curses_Mode) + procedure Save_Curses_Mode (Mode : in Curses_Mode) is - function Def_Prog_Mode return C_Int; + function Def_Prog_Mode return C_Int; pragma Import (C, Def_Prog_Mode, "def_prog_mode"); - function Def_Shell_Mode return C_Int; + function Def_Shell_Mode return C_Int; pragma Import (C, Def_Shell_Mode, "def_shell_mode"); - Err : C_Int; + Err : C_Int; begin - case Mode is - when Curses => Err := Def_Prog_Mode; - when Shell => Err := Def_Shell_Mode; + case Mode is + when Curses => Err := Def_Prog_Mode; + when Shell => Err := Def_Shell_Mode; end case; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Save_Curses_Mode; + end Save_Curses_Mode; - procedure Reset_Curses_Mode (Mode : in Curses_Mode) + procedure Reset_Curses_Mode (Mode : in Curses_Mode) is - function Reset_Prog_Mode return C_Int; + function Reset_Prog_Mode return C_Int; pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); - function Reset_Shell_Mode return C_Int; + function Reset_Shell_Mode return C_Int; pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); - Err : C_Int; + Err : C_Int; begin - case Mode is - when Curses => Err := Reset_Prog_Mode; - when Shell => Err := Reset_Shell_Mode; + case Mode is + when Curses => Err := Reset_Prog_Mode; + when Shell => Err := Reset_Shell_Mode; end case; - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Reset_Curses_Mode; + end Reset_Curses_Mode; - procedure Save_Terminal_State + procedure Save_Terminal_State is - function Savetty return C_Int; + function Savetty return C_Int; pragma Import (C, Savetty, "savetty"); begin - if Savetty = Curses_Err then + if Savetty = Curses_Err then raise Curses_Exception; end if; - end Save_Terminal_State; + end Save_Terminal_State; - procedure Reset_Terminal_State + procedure Reset_Terminal_State is - function Resetty return C_Int; + function Resetty return C_Int; pragma Import (C, Resetty, "resetty"); begin - if Resetty = Curses_Err then + if Resetty = Curses_Err then raise Curses_Exception; end if; - end Reset_Terminal_State; + end Reset_Terminal_State; - procedure Rip_Off_Lines (Lines : in Integer; - Proc : in Stdscr_Init_Proc) + procedure Rip_Off_Lines (Lines : in Integer; + Proc : in Stdscr_Init_Proc) is - function Ripoffline (Lines : C_Int; - Proc : Stdscr_Init_Proc) return C_Int; + function Ripoffline (Lines : C_Int; + Proc : Stdscr_Init_Proc) return C_Int; pragma Import (C, Ripoffline, "_nc_ripoffline"); begin - if Ripoffline (C_Int (Lines), Proc) = Curses_Err then + if Ripoffline (C_Int (Lines), Proc) = Curses_Err then raise Curses_Exception; end if; - end Rip_Off_Lines; + end Rip_Off_Lines; - procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) + procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) is - function Curs_Set (Curs : C_Int) return C_Int; + function Curs_Set (Curs : C_Int) return C_Int; pragma Import (C, Curs_Set, "curs_set"); - Res : C_Int; + Res : C_Int; begin - Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); - if Res /= Curses_Err then - Visibility := Cursor_Visibility'Val (Res); + Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); + if Res /= Curses_Err then + Visibility := Cursor_Visibility'Val (Res); end if; - end Set_Cursor_Visibility; + end Set_Cursor_Visibility; - procedure Nap_Milli_Seconds (Ms : in Natural) + procedure Nap_Milli_Seconds (Ms : in Natural) is - function Napms (Ms : C_Int) return C_Int; + function Napms (Ms : C_Int) return C_Int; pragma Import (C, Napms, "napms"); begin - if Napms (C_Int (Ms)) = Curses_Err then + if Napms (C_Int (Ms)) = Curses_Err then raise Curses_Exception; end if; - end Nap_Milli_Seconds; + end Nap_Milli_Seconds; ------------------------------------------------------------------------------ - function Standard_Window return Window + function Standard_Window return Window + is + Result : Window; + pragma Import (C, Result, "stdscr"); + begin + return Result; + end Standard_Window; + + function Current_Window return Window is - Stdscr : Window; - pragma Import (C, Stdscr, "stdscr"); + Result : Window; + pragma Import (C, Result, "curscr"); begin - return Stdscr; - end Standard_Window; + return Result; + end Current_Window; - function Lines return Line_Count + function Lines return Line_Count is - C_Lines : C_Int; - pragma Import (C, C_Lines, "LINES"); + Result : C_Int; + pragma Import (C, Result, "LINES"); begin - return Line_Count (C_Lines); + return Line_Count (Result); end Lines; - function Columns return Column_Count + function Columns return Column_Count is - C_Columns : C_Int; - pragma Import (C, C_Columns, "COLS"); + Result : C_Int; + pragma Import (C, Result, "COLS"); begin - return Column_Count (C_Columns); + return Column_Count (Result); end Columns; - function Tab_Size return Natural + function Tab_Size return Natural is - C_Tab_Size : C_Int; - pragma Import (C, C_Tab_Size, "TABSIZE"); + Result : C_Int; + pragma Import (C, Result, "TABSIZE"); begin - return Natural (C_Tab_Size); + return Natural (Result); end Tab_Size; - function Number_Of_Colors return Natural + function Number_Of_Colors return Natural is - C_Number_Of_Colors : C_Int; - pragma Import (C, C_Number_Of_Colors, "COLORS"); + Result : C_Int; + pragma Import (C, Result, "COLORS"); begin - return Natural (C_Number_Of_Colors); + return Natural (Result); end Number_Of_Colors; - function Number_Of_Color_Pairs return Natural + function Number_Of_Color_Pairs return Natural is - C_Number_Of_Color_Pairs : C_Int; - pragma Import (C, C_Number_Of_Color_Pairs, "COLOR_PAIRS"); + Result : C_Int; + pragma Import (C, Result, "COLOR_PAIRS"); begin - return Natural (C_Number_Of_Color_Pairs); + return Natural (Result); end Number_Of_Color_Pairs; + ------------------------------------------------------------------------------ - procedure Transform_Coordinates - (W : in Window := Standard_Window; - Line : in out Line_Position; - Column : in out Column_Position; - Dir : in Transform_Direction := From_Screen) - is - type Int_Access is access all C_Int; - function Transform (W : Window; - Y, X : Int_Access; - Dir : Curses_Bool) return C_Int; + procedure Transform_Coordinates + (W : in Window := Standard_Window; + Line : in out Line_Position; + Column : in out Column_Position; + Dir : in Transform_Direction := From_Screen) + is + type Int_Access is access all C_Int; + function Transform (W : Window; + Y, X : Int_Access; + Dir : Curses_Bool) return C_Int; pragma Import (C, Transform, "wmouse_trafo"); - X : aliased C_Int := C_Int (Column); - Y : aliased C_Int := C_Int (Line); - D : Curses_Bool := Curses_Bool_False; - R : C_Int; + X : aliased C_Int := C_Int (Column); + Y : aliased C_Int := C_Int (Line); + D : Curses_Bool := Curses_Bool_False; + R : C_Int; begin - if Dir = To_Screen then - D := 1; + if Dir = To_Screen then + D := 1; end if; - R := Transform (W, Y'Access, X'Access, D); - if R = Curses_False then + R := Transform (W, Y'Access, X'Access, D); + if R = Curses_False then raise Curses_Exception; else - Line := Line_Position (Y); - Column := Column_Position (X); + Line := Line_Position (Y); + Column := Column_Position (X); end if; - end Transform_Coordinates; + end Transform_Coordinates; ------------------------------------------------------------------------------ - procedure Use_Default_Colors is - function C_Use_Default_Colors return C_Int; + procedure Use_Default_Colors is + function C_Use_Default_Colors return C_Int; pragma Import (C, C_Use_Default_Colors, "use_default_colors"); - Err : constant C_Int := C_Use_Default_Colors; + Err : constant C_Int := C_Use_Default_Colors; begin - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Use_Default_Colors; + end Use_Default_Colors; - procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; - Back : Color_Number := Default_Color) + procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; + Back : Color_Number := Default_Color) is - function C_Assume_Default_Colors (Fore : C_Int; - Back : C_Int) return C_Int; + function C_Assume_Default_Colors (Fore : C_Int; + Back : C_Int) return C_Int; pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); - Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), - C_Int (Back)); + Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), + C_Int (Back)); begin - if Err = Curses_Err then + if Err = Curses_Err then raise Curses_Exception; end if; - end Assume_Default_Colors; + end Assume_Default_Colors; ------------------------------------------------------------------------------ - function Curses_Version return String + function Curses_Version return String is - function curses_versionC return chars_ptr; + function curses_versionC return chars_ptr; pragma Import (C, curses_versionC, "curses_version"); - Result : constant chars_ptr := curses_versionC; + Result : constant chars_ptr := curses_versionC; begin - return Fill_String (Result); - end Curses_Version; + return Fill_String (Result); + end Curses_Version; +------------------------------------------------------------------------------ + procedure Curses_Free_All is + procedure curses_freeall; + pragma Import (C, curses_freeall, "_nc_freeall"); + begin + -- Use this only for testing: you cannot use curses after calling it, + -- so it has to be the "last" thing done before exiting the program. + -- This will not really free ALL of memory used by curses. That is + -- because it cannot free the memory used for stdout's setbuf. The + -- _nc_free_and_exit() procedure can do that, but it can be invoked + -- safely only from C - and again, that only as the "last" thing done + -- before exiting the program. + curses_freeall; + end Curses_Free_All; ------------------------------------------------------------------------------ - function Use_Extended_Names (Enable : Boolean) return Boolean + function Use_Extended_Names (Enable : Boolean) return Boolean is - function use_extended_namesC (e : Curses_Bool) return C_Int; + function use_extended_namesC (e : Curses_Bool) return C_Int; pragma Import (C, use_extended_namesC, "use_extended_names"); - Res : constant C_Int := - use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); + Res : constant C_Int := + use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); begin - if Res = C_Int (Curses_Bool_False) then + if Res = C_Int (Curses_Bool_False) then return False; else return True; end if; - end Use_Extended_Names; + end Use_Extended_Names; ------------------------------------------------------------------------------ - procedure Screen_Dump_To_File (Filename : in String) + procedure Screen_Dump_To_File (Filename : in String) is - function scr_dump (f : char_array) return C_Int; + function scr_dump (f : char_array) return C_Int; pragma Import (C, scr_dump, "scr_dump"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_dump (Txt) then + To_C (Filename, Txt, Length); + if Curses_Err = scr_dump (Txt) then raise Curses_Exception; end if; - end Screen_Dump_To_File; + end Screen_Dump_To_File; - procedure Screen_Restore_From_File (Filename : in String) + procedure Screen_Restore_From_File (Filename : in String) is - function scr_restore (f : char_array) return C_Int; + function scr_restore (f : char_array) return C_Int; pragma Import (C, scr_restore, "scr_restore"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_restore (Txt) then + To_C (Filename, Txt, Length); + if Curses_Err = scr_restore (Txt) then raise Curses_Exception; end if; - end Screen_Restore_From_File; + end Screen_Restore_From_File; - procedure Screen_Init_From_File (Filename : in String) + procedure Screen_Init_From_File (Filename : in String) is - function scr_init (f : char_array) return C_Int; + function scr_init (f : char_array) return C_Int; pragma Import (C, scr_init, "scr_init"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_init (Txt) then + To_C (Filename, Txt, Length); + if Curses_Err = scr_init (Txt) then raise Curses_Exception; end if; - end Screen_Init_From_File; + end Screen_Init_From_File; - procedure Screen_Set_File (Filename : in String) + procedure Screen_Set_File (Filename : in String) is - function scr_set (f : char_array) return C_Int; + function scr_set (f : char_array) return C_Int; pragma Import (C, scr_set, "scr_set"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_set (Txt) then + To_C (Filename, Txt, Length); + if Curses_Err = scr_set (Txt) then raise Curses_Exception; end if; - end Screen_Set_File; + end Screen_Set_File; ------------------------------------------------------------------------------ - procedure Resize (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count) is - function wresize (win : Window; - lines : C_Int; - columns : C_Int) return C_Int; + procedure Resize (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count) is + function wresize (win : Window; + lines : C_Int; + columns : C_Int) return C_Int; pragma Import (C, wresize); begin - if wresize (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns)) = Curses_Err then + if wresize (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns)) = Curses_Err then raise Curses_Exception; end if; - end Resize; + end Resize; ------------------------------------------------------------------------------ end Terminal_Interface.Curses; diff -Naur ncurses-5.6.orig/doc/html/ada/terminal_interface-curses__ads.htm ncurses-5.6/doc/html/ada/terminal_interface-curses__ads.htm --- ncurses-5.6.orig/doc/html/ada/terminal_interface-curses__ads.htm 2006-09-23 16:31:33.000000000 -0400 +++ ncurses-5.6/doc/html/ada/terminal_interface-curses__ads.htm 2007-12-21 00:02:35.000000000 -0500 @@ -3,7 +3,6 @@

          File : terminal_interface-curses.ads


          -
           ------------------------------------------------------------------------------
           --                                                                          --
           --                           GNAT ncurses Binding                           --
          @@ -13,7 +12,7 @@
           --                                 S P E C                                  --
           --                                                                          --
           ------------------------------------------------------------------------------
          --- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              --
          +-- Copyright (c) 1998-2006,2007 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            --
          @@ -41,296 +40,296 @@
           ------------------------------------------------------------------------------
           --  Author:  Juergen Pfeifer, 1996
           --  Version Control:
          ---  @Revision: 1.37 @
          ---  @Date: 2006/06/25 14:30:22 @
          +--  @Revision: 1.41 @
          +--  @Date: 2007/05/05 20:33:52 @
           --  Binding Version 01.00
           ------------------------------------------------------------------------------
           --  curses binding.
           --  This module is generated. Please don't change it manually!
           --  Run the generator instead.
           --  |
          -with System.Storage_Elements;
          -with Interfaces.C;   --  We need this for some assertions.
          +with System.Storage_Elements;
          +with Interfaces.C;   --  We need this for some assertions.
           
          -package Terminal_Interface.Curses is
          -   pragma Preelaborate (Terminal_Interface.Curses);
          +package Terminal_Interface.Curses is
          +   pragma Preelaborate (Terminal_Interface.Curses);
              pragma Linker_Options ("-lncurses");
           
          -   NC_Major_Version : constant := 5; --  Major version of the library
          -   NC_Minor_Version : constant := 5; --  Minor version of the library
          -   NC_Version : constant String := "5.5";  --  Version of library
          +   NC_Major_Version : constant := 5; --  Major version of the library
          +   NC_Minor_Version : constant := 6; --  Minor version of the library
          +   NC_Version : constant String := "5.6";  --  Version of library
           
          -   type Window is private;
          -   Null_Window : constant Window;
          +   type Window is private;
          +   Null_Window : constant Window;
           
          -   type Line_Position   is new Natural; --  line coordinate
          -   type Column_Position is new Natural; --  column coordinate
          +   type Line_Position   is new Natural; --  line coordinate
          +   type Column_Position is new Natural; --  column coordinate
           
          -   subtype Line_Count   is Line_Position   range 1 .. Line_Position'Last;
          +   subtype Line_Count   is Line_Position   range 1 .. Line_Position'Last;
              --  Type to count lines. We do not allow null windows, so must be positive
          -   subtype Column_Count is Column_Position range 1 .. Column_Position'Last;
          +   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 Integer;
          +   type Key_Code is new Integer;
              --  That is anything including real characters, special keys and logical
              --  request codes.
           
              --  FIXME: The "-1" should be Curses_Err
          -   subtype Real_Key_Code is Key_Code range -1 .. 8#777#;
          +   subtype Real_Key_Code is Key_Code range -1 .. 8#777#;
              --  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.
           
          -   subtype Special_Key_Code is Real_Key_Code
          -     range 8#400# .. Real_Key_Code'Last;
          +   subtype Special_Key_Code is Real_Key_Code
          +     range 8#400# .. Real_Key_Code'Last;
              --  Type for a function- or special key number
           
          -   subtype Normal_Key_Code is Real_Key_Code range
          +   subtype Normal_Key_Code is Real_Key_Code range
                Character'Pos (Character'First) .. Character'Pos (Character'Last);
              --  This are the codes for regular (incl. non-graphical) characters.
           
              --  Constants for function- and special keys
              --
          -   Key_None                       : constant Special_Key_Code := 8#400#;
          -   Key_Code_Yes                   : constant Special_Key_Code := 8#400#;
          -   Key_Min                        : constant Special_Key_Code := 8#401#;
          -   Key_Break                      : constant Special_Key_Code := 8#401#;
          -   Key_Cursor_Down                : constant Special_Key_Code := 8#402#;
          -   Key_Cursor_Up                  : constant Special_Key_Code := 8#403#;
          -   Key_Cursor_Left                : constant Special_Key_Code := 8#404#;
          -   Key_Cursor_Right               : constant Special_Key_Code := 8#405#;
          -   Key_Home                       : constant Special_Key_Code := 8#406#;
          -   Key_Backspace                  : constant Special_Key_Code := 8#407#;
          -   Key_F0                         : constant Special_Key_Code := 8#410#;
          -   Key_F1                         : constant Special_Key_Code := 8#411#;
          -   Key_F2                         : constant Special_Key_Code := 8#412#;
          -   Key_F3                         : constant Special_Key_Code := 8#413#;
          -   Key_F4                         : constant Special_Key_Code := 8#414#;
          -   Key_F5                         : constant Special_Key_Code := 8#415#;
          -   Key_F6                         : constant Special_Key_Code := 8#416#;
          -   Key_F7                         : constant Special_Key_Code := 8#417#;
          -   Key_F8                         : constant Special_Key_Code := 8#420#;
          -   Key_F9                         : constant Special_Key_Code := 8#421#;
          -   Key_F10                        : constant Special_Key_Code := 8#422#;
          -   Key_F11                        : constant Special_Key_Code := 8#423#;
          -   Key_F12                        : constant Special_Key_Code := 8#424#;
          -   Key_F13                        : constant Special_Key_Code := 8#425#;
          -   Key_F14                        : constant Special_Key_Code := 8#426#;
          -   Key_F15                        : constant Special_Key_Code := 8#427#;
          -   Key_F16                        : constant Special_Key_Code := 8#430#;
          -   Key_F17                        : constant Special_Key_Code := 8#431#;
          -   Key_F18                        : constant Special_Key_Code := 8#432#;
          -   Key_F19                        : constant Special_Key_Code := 8#433#;
          -   Key_F20                        : constant Special_Key_Code := 8#434#;
          -   Key_F21                        : constant Special_Key_Code := 8#435#;
          -   Key_F22                        : constant Special_Key_Code := 8#436#;
          -   Key_F23                        : constant Special_Key_Code := 8#437#;
          -   Key_F24                        : constant Special_Key_Code := 8#440#;
          -   Key_Delete_Line                : constant Special_Key_Code := 8#510#;
          -   Key_Insert_Line                : constant Special_Key_Code := 8#511#;
          -   Key_Delete_Char                : constant Special_Key_Code := 8#512#;
          -   Key_Insert_Char                : constant Special_Key_Code := 8#513#;
          -   Key_Exit_Insert_Mode           : constant Special_Key_Code := 8#514#;
          -   Key_Clear_Screen               : constant Special_Key_Code := 8#515#;
          -   Key_Clear_End_Of_Screen        : constant Special_Key_Code := 8#516#;
          -   Key_Clear_End_Of_Line          : constant Special_Key_Code := 8#517#;
          -   Key_Scroll_1_Forward           : constant Special_Key_Code := 8#520#;
          -   Key_Scroll_1_Backward          : constant Special_Key_Code := 8#521#;
          -   Key_Next_Page                  : constant Special_Key_Code := 8#522#;
          -   Key_Previous_Page              : constant Special_Key_Code := 8#523#;
          -   Key_Set_Tab                    : constant Special_Key_Code := 8#524#;
          -   Key_Clear_Tab                  : constant Special_Key_Code := 8#525#;
          -   Key_Clear_All_Tabs             : constant Special_Key_Code := 8#526#;
          -   Key_Enter_Or_Send              : constant Special_Key_Code := 8#527#;
          -   Key_Soft_Reset                 : constant Special_Key_Code := 8#530#;
          -   Key_Reset                      : constant Special_Key_Code := 8#531#;
          -   Key_Print                      : constant Special_Key_Code := 8#532#;
          -   Key_Bottom                     : constant Special_Key_Code := 8#533#;
          -   Key_Upper_Left_Of_Keypad       : constant Special_Key_Code := 8#534#;
          -   Key_Upper_Right_Of_Keypad      : constant Special_Key_Code := 8#535#;
          -   Key_Center_Of_Keypad           : constant Special_Key_Code := 8#536#;
          -   Key_Lower_Left_Of_Keypad       : constant Special_Key_Code := 8#537#;
          -   Key_Lower_Right_Of_Keypad      : constant Special_Key_Code := 8#540#;
          -   Key_Back_Tab                   : constant Special_Key_Code := 8#541#;
          -   Key_Beginning                  : constant Special_Key_Code := 8#542#;
          -   Key_Cancel                     : constant Special_Key_Code := 8#543#;
          -   Key_Close                      : constant Special_Key_Code := 8#544#;
          -   Key_Command                    : constant Special_Key_Code := 8#545#;
          -   Key_Copy                       : constant Special_Key_Code := 8#546#;
          -   Key_Create                     : constant Special_Key_Code := 8#547#;
          -   Key_End                        : constant Special_Key_Code := 8#550#;
          -   Key_Exit                       : constant Special_Key_Code := 8#551#;
          -   Key_Find                       : constant Special_Key_Code := 8#552#;
          -   Key_Help                       : constant Special_Key_Code := 8#553#;
          -   Key_Mark                       : constant Special_Key_Code := 8#554#;
          -   Key_Message                    : constant Special_Key_Code := 8#555#;
          -   Key_Move                       : constant Special_Key_Code := 8#556#;
          -   Key_Next                       : constant Special_Key_Code := 8#557#;
          -   Key_Open                       : constant Special_Key_Code := 8#560#;
          -   Key_Options                    : constant Special_Key_Code := 8#561#;
          -   Key_Previous                   : constant Special_Key_Code := 8#562#;
          -   Key_Redo                       : constant Special_Key_Code := 8#563#;
          -   Key_Reference                  : constant Special_Key_Code := 8#564#;
          -   Key_Refresh                    : constant Special_Key_Code := 8#565#;
          -   Key_Replace                    : constant Special_Key_Code := 8#566#;
          -   Key_Restart                    : constant Special_Key_Code := 8#567#;
          -   Key_Resume                     : constant Special_Key_Code := 8#570#;
          -   Key_Save                       : constant Special_Key_Code := 8#571#;
          -   Key_Shift_Begin                : constant Special_Key_Code := 8#572#;
          -   Key_Shift_Cancel               : constant Special_Key_Code := 8#573#;
          -   Key_Shift_Command              : constant Special_Key_Code := 8#574#;
          -   Key_Shift_Copy                 : constant Special_Key_Code := 8#575#;
          -   Key_Shift_Create               : constant Special_Key_Code := 8#576#;
          -   Key_Shift_Delete_Char          : constant Special_Key_Code := 8#577#;
          -   Key_Shift_Delete_Line          : constant Special_Key_Code := 8#600#;
          -   Key_Select                     : constant Special_Key_Code := 8#601#;
          -   Key_Shift_End                  : constant Special_Key_Code := 8#602#;
          -   Key_Shift_Clear_End_Of_Line    : constant Special_Key_Code := 8#603#;
          -   Key_Shift_Exit                 : constant Special_Key_Code := 8#604#;
          -   Key_Shift_Find                 : constant Special_Key_Code := 8#605#;
          -   Key_Shift_Help                 : constant Special_Key_Code := 8#606#;
          -   Key_Shift_Home                 : constant Special_Key_Code := 8#607#;
          -   Key_Shift_Insert_Char          : constant Special_Key_Code := 8#610#;
          -   Key_Shift_Cursor_Left          : constant Special_Key_Code := 8#611#;
          -   Key_Shift_Message              : constant Special_Key_Code := 8#612#;
          -   Key_Shift_Move                 : constant Special_Key_Code := 8#613#;
          -   Key_Shift_Next_Page            : constant Special_Key_Code := 8#614#;
          -   Key_Shift_Options              : constant Special_Key_Code := 8#615#;
          -   Key_Shift_Previous_Page        : constant Special_Key_Code := 8#616#;
          -   Key_Shift_Print                : constant Special_Key_Code := 8#617#;
          -   Key_Shift_Redo                 : constant Special_Key_Code := 8#620#;
          -   Key_Shift_Replace              : constant Special_Key_Code := 8#621#;
          -   Key_Shift_Cursor_Right         : constant Special_Key_Code := 8#622#;
          -   Key_Shift_Resume               : constant Special_Key_Code := 8#623#;
          -   Key_Shift_Save                 : constant Special_Key_Code := 8#624#;
          -   Key_Shift_Suspend              : constant Special_Key_Code := 8#625#;
          -   Key_Shift_Undo                 : constant Special_Key_Code := 8#626#;
          -   Key_Suspend                    : constant Special_Key_Code := 8#627#;
          -   Key_Undo                       : constant Special_Key_Code := 8#630#;
          -   Key_Mouse                      : constant Special_Key_Code := 8#631#;
          -   Key_Resize                     : constant Special_Key_Code := 8#632#;
          +   Key_None                       : constant Special_Key_Code := 8#400#;
          +   Key_Code_Yes                   : constant Special_Key_Code := 8#400#;
          +   Key_Min                        : constant Special_Key_Code := 8#401#;
          +   Key_Break                      : constant Special_Key_Code := 8#401#;
          +   Key_Cursor_Down                : constant Special_Key_Code := 8#402#;
          +   Key_Cursor_Up                  : constant Special_Key_Code := 8#403#;
          +   Key_Cursor_Left                : constant Special_Key_Code := 8#404#;
          +   Key_Cursor_Right               : constant Special_Key_Code := 8#405#;
          +   Key_Home                       : constant Special_Key_Code := 8#406#;
          +   Key_Backspace                  : constant Special_Key_Code := 8#407#;
          +   Key_F0                         : constant Special_Key_Code := 8#410#;
          +   Key_F1                         : constant Special_Key_Code := 8#411#;
          +   Key_F2                         : constant Special_Key_Code := 8#412#;
          +   Key_F3                         : constant Special_Key_Code := 8#413#;
          +   Key_F4                         : constant Special_Key_Code := 8#414#;
          +   Key_F5                         : constant Special_Key_Code := 8#415#;
          +   Key_F6                         : constant Special_Key_Code := 8#416#;
          +   Key_F7                         : constant Special_Key_Code := 8#417#;
          +   Key_F8                         : constant Special_Key_Code := 8#420#;
          +   Key_F9                         : constant Special_Key_Code := 8#421#;
          +   Key_F10                        : constant Special_Key_Code := 8#422#;
          +   Key_F11                        : constant Special_Key_Code := 8#423#;
          +   Key_F12                        : constant Special_Key_Code := 8#424#;
          +   Key_F13                        : constant Special_Key_Code := 8#425#;
          +   Key_F14                        : constant Special_Key_Code := 8#426#;
          +   Key_F15                        : constant Special_Key_Code := 8#427#;
          +   Key_F16                        : constant Special_Key_Code := 8#430#;
          +   Key_F17                        : constant Special_Key_Code := 8#431#;
          +   Key_F18                        : constant Special_Key_Code := 8#432#;
          +   Key_F19                        : constant Special_Key_Code := 8#433#;
          +   Key_F20                        : constant Special_Key_Code := 8#434#;
          +   Key_F21                        : constant Special_Key_Code := 8#435#;
          +   Key_F22                        : constant Special_Key_Code := 8#436#;
          +   Key_F23                        : constant Special_Key_Code := 8#437#;
          +   Key_F24                        : constant Special_Key_Code := 8#440#;
          +   Key_Delete_Line                : constant Special_Key_Code := 8#510#;
          +   Key_Insert_Line                : constant Special_Key_Code := 8#511#;
          +   Key_Delete_Char                : constant Special_Key_Code := 8#512#;
          +   Key_Insert_Char                : constant Special_Key_Code := 8#513#;
          +   Key_Exit_Insert_Mode           : constant Special_Key_Code := 8#514#;
          +   Key_Clear_Screen               : constant Special_Key_Code := 8#515#;
          +   Key_Clear_End_Of_Screen        : constant Special_Key_Code := 8#516#;
          +   Key_Clear_End_Of_Line          : constant Special_Key_Code := 8#517#;
          +   Key_Scroll_1_Forward           : constant Special_Key_Code := 8#520#;
          +   Key_Scroll_1_Backward          : constant Special_Key_Code := 8#521#;
          +   Key_Next_Page                  : constant Special_Key_Code := 8#522#;
          +   Key_Previous_Page              : constant Special_Key_Code := 8#523#;
          +   Key_Set_Tab                    : constant Special_Key_Code := 8#524#;
          +   Key_Clear_Tab                  : constant Special_Key_Code := 8#525#;
          +   Key_Clear_All_Tabs             : constant Special_Key_Code := 8#526#;
          +   Key_Enter_Or_Send              : constant Special_Key_Code := 8#527#;
          +   Key_Soft_Reset                 : constant Special_Key_Code := 8#530#;
          +   Key_Reset                      : constant Special_Key_Code := 8#531#;
          +   Key_Print                      : constant Special_Key_Code := 8#532#;
          +   Key_Bottom                     : constant Special_Key_Code := 8#533#;
          +   Key_Upper_Left_Of_Keypad       : constant Special_Key_Code := 8#534#;
          +   Key_Upper_Right_Of_Keypad      : constant Special_Key_Code := 8#535#;
          +   Key_Center_Of_Keypad           : constant Special_Key_Code := 8#536#;
          +   Key_Lower_Left_Of_Keypad       : constant Special_Key_Code := 8#537#;
          +   Key_Lower_Right_Of_Keypad      : constant Special_Key_Code := 8#540#;
          +   Key_Back_Tab                   : constant Special_Key_Code := 8#541#;
          +   Key_Beginning                  : constant Special_Key_Code := 8#542#;
          +   Key_Cancel                     : constant Special_Key_Code := 8#543#;
          +   Key_Close                      : constant Special_Key_Code := 8#544#;
          +   Key_Command                    : constant Special_Key_Code := 8#545#;
          +   Key_Copy                       : constant Special_Key_Code := 8#546#;
          +   Key_Create                     : constant Special_Key_Code := 8#547#;
          +   Key_End                        : constant Special_Key_Code := 8#550#;
          +   Key_Exit                       : constant Special_Key_Code := 8#551#;
          +   Key_Find                       : constant Special_Key_Code := 8#552#;
          +   Key_Help                       : constant Special_Key_Code := 8#553#;
          +   Key_Mark                       : constant Special_Key_Code := 8#554#;
          +   Key_Message                    : constant Special_Key_Code := 8#555#;
          +   Key_Move                       : constant Special_Key_Code := 8#556#;
          +   Key_Next                       : constant Special_Key_Code := 8#557#;
          +   Key_Open                       : constant Special_Key_Code := 8#560#;
          +   Key_Options                    : constant Special_Key_Code := 8#561#;
          +   Key_Previous                   : constant Special_Key_Code := 8#562#;
          +   Key_Redo                       : constant Special_Key_Code := 8#563#;
          +   Key_Reference                  : constant Special_Key_Code := 8#564#;
          +   Key_Refresh                    : constant Special_Key_Code := 8#565#;
          +   Key_Replace                    : constant Special_Key_Code := 8#566#;
          +   Key_Restart                    : constant Special_Key_Code := 8#567#;
          +   Key_Resume                     : constant Special_Key_Code := 8#570#;
          +   Key_Save                       : constant Special_Key_Code := 8#571#;
          +   Key_Shift_Begin                : constant Special_Key_Code := 8#572#;
          +   Key_Shift_Cancel               : constant Special_Key_Code := 8#573#;
          +   Key_Shift_Command              : constant Special_Key_Code := 8#574#;
          +   Key_Shift_Copy                 : constant Special_Key_Code := 8#575#;
          +   Key_Shift_Create               : constant Special_Key_Code := 8#576#;
          +   Key_Shift_Delete_Char          : constant Special_Key_Code := 8#577#;
          +   Key_Shift_Delete_Line          : constant Special_Key_Code := 8#600#;
          +   Key_Select                     : constant Special_Key_Code := 8#601#;
          +   Key_Shift_End                  : constant Special_Key_Code := 8#602#;
          +   Key_Shift_Clear_End_Of_Line    : constant Special_Key_Code := 8#603#;
          +   Key_Shift_Exit                 : constant Special_Key_Code := 8#604#;
          +   Key_Shift_Find                 : constant Special_Key_Code := 8#605#;
          +   Key_Shift_Help                 : constant Special_Key_Code := 8#606#;
          +   Key_Shift_Home                 : constant Special_Key_Code := 8#607#;
          +   Key_Shift_Insert_Char          : constant Special_Key_Code := 8#610#;
          +   Key_Shift_Cursor_Left          : constant Special_Key_Code := 8#611#;
          +   Key_Shift_Message              : constant Special_Key_Code := 8#612#;
          +   Key_Shift_Move                 : constant Special_Key_Code := 8#613#;
          +   Key_Shift_Next_Page            : constant Special_Key_Code := 8#614#;
          +   Key_Shift_Options              : constant Special_Key_Code := 8#615#;
          +   Key_Shift_Previous_Page        : constant Special_Key_Code := 8#616#;
          +   Key_Shift_Print                : constant Special_Key_Code := 8#617#;
          +   Key_Shift_Redo                 : constant Special_Key_Code := 8#620#;
          +   Key_Shift_Replace              : constant Special_Key_Code := 8#621#;
          +   Key_Shift_Cursor_Right         : constant Special_Key_Code := 8#622#;
          +   Key_Shift_Resume               : constant Special_Key_Code := 8#623#;
          +   Key_Shift_Save                 : constant Special_Key_Code := 8#624#;
          +   Key_Shift_Suspend              : constant Special_Key_Code := 8#625#;
          +   Key_Shift_Undo                 : constant Special_Key_Code := 8#626#;
          +   Key_Suspend                    : constant Special_Key_Code := 8#627#;
          +   Key_Undo                       : constant Special_Key_Code := 8#630#;
          +   Key_Mouse                      : constant Special_Key_Code := 8#631#;
          +   Key_Resize                     : constant Special_Key_Code := 8#632#;
           
          -   Key_Max                        : constant Special_Key_Code
          -     := Special_Key_Code'Last;
          +   Key_Max                        : constant Special_Key_Code
          +     := Special_Key_Code'Last;
           
          -   subtype User_Key_Code is Key_Code
          -     range (Key_Max + 129) .. Key_Code'Last;
          +   subtype User_Key_Code is Key_Code
          +     range (Key_Max + 129) .. Key_Code'Last;
              --  This is reserved for user defined key codes. The range between Key_Max
              --  and the first user code is reserved for subsystems like menu and forms.
           
              --  For those who like to use the original key names we produce them were
              --  they differ from the original. Please note that they may differ in
              --  lower/upper case.
          -   KEY_DOWN         : Special_Key_Code renames Key_Cursor_Down;
          -   KEY_UP           : Special_Key_Code renames Key_Cursor_Up;
          -   KEY_LEFT         : Special_Key_Code renames Key_Cursor_Left;
          -   KEY_RIGHT        : Special_Key_Code renames Key_Cursor_Right;
          -   KEY_DL           : Special_Key_Code renames Key_Delete_Line;
          -   KEY_IL           : Special_Key_Code renames Key_Insert_Line;
          -   KEY_DC           : Special_Key_Code renames Key_Delete_Char;
          -   KEY_IC           : Special_Key_Code renames Key_Insert_Char;
          -   KEY_EIC          : Special_Key_Code renames Key_Exit_Insert_Mode;
          -   KEY_CLEAR        : Special_Key_Code renames Key_Clear_Screen;
          -   KEY_EOS          : Special_Key_Code renames Key_Clear_End_Of_Screen;
          -   KEY_EOL          : Special_Key_Code renames Key_Clear_End_Of_Line;
          -   KEY_SF           : Special_Key_Code renames Key_Scroll_1_Forward;
          -   KEY_SR           : Special_Key_Code renames Key_Scroll_1_Backward;
          -   KEY_NPAGE        : Special_Key_Code renames Key_Next_Page;
          -   KEY_PPAGE        : Special_Key_Code renames Key_Previous_Page;
          -   KEY_STAB         : Special_Key_Code renames Key_Set_Tab;
          -   KEY_CTAB         : Special_Key_Code renames Key_Clear_Tab;
          -   KEY_CATAB        : Special_Key_Code renames Key_Clear_All_Tabs;
          -   KEY_ENTER        : Special_Key_Code renames Key_Enter_Or_Send;
          -   KEY_SRESET       : Special_Key_Code renames Key_Soft_Reset;
          -   KEY_LL           : Special_Key_Code renames Key_Bottom;
          -   KEY_A1           : Special_Key_Code renames Key_Upper_Left_Of_Keypad;
          -   KEY_A3           : Special_Key_Code renames Key_Upper_Right_Of_Keypad;
          -   KEY_B2           : Special_Key_Code renames Key_Center_Of_Keypad;
          -   KEY_C1           : Special_Key_Code renames Key_Lower_Left_Of_Keypad;
          -   KEY_C3           : Special_Key_Code renames Key_Lower_Right_Of_Keypad;
          -   KEY_BTAB         : Special_Key_Code renames Key_Back_Tab;
          -   KEY_BEG          : Special_Key_Code renames Key_Beginning;
          -   KEY_SBEG         : Special_Key_Code renames Key_Shift_Begin;
          -   KEY_SCANCEL      : Special_Key_Code renames Key_Shift_Cancel;
          -   KEY_SCOMMAND     : Special_Key_Code renames Key_Shift_Command;
          -   KEY_SCOPY        : Special_Key_Code renames Key_Shift_Copy;
          -   KEY_SCREATE      : Special_Key_Code renames Key_Shift_Create;
          -   KEY_SDC          : Special_Key_Code renames Key_Shift_Delete_Char;
          -   KEY_SDL          : Special_Key_Code renames Key_Shift_Delete_Line;
          -   KEY_SEND         : Special_Key_Code renames Key_Shift_End;
          -   KEY_SEOL         : Special_Key_Code renames Key_Shift_Clear_End_Of_Line;
          -   KEY_SEXIT        : Special_Key_Code renames Key_Shift_Exit;
          -   KEY_SFIND        : Special_Key_Code renames Key_Shift_Find;
          -   KEY_SHELP        : Special_Key_Code renames Key_Shift_Help;
          -   KEY_SHOME        : Special_Key_Code renames Key_Shift_Home;
          -   KEY_SIC          : Special_Key_Code renames Key_Shift_Insert_Char;
          -   KEY_SLEFT        : Special_Key_Code renames Key_Shift_Cursor_Left;
          -   KEY_SMESSAGE     : Special_Key_Code renames Key_Shift_Message;
          -   KEY_SMOVE        : Special_Key_Code renames Key_Shift_Move;
          -   KEY_SNEXT        : Special_Key_Code renames Key_Shift_Next_Page;
          -   KEY_SOPTIONS     : Special_Key_Code renames Key_Shift_Options;
          -   KEY_SPREVIOUS    : Special_Key_Code renames Key_Shift_Previous_Page;
          -   KEY_SPRINT       : Special_Key_Code renames Key_Shift_Print;
          -   KEY_SREDO        : Special_Key_Code renames Key_Shift_Redo;
          -   KEY_SREPLACE     : Special_Key_Code renames Key_Shift_Replace;
          -   KEY_SRIGHT       : Special_Key_Code renames Key_Shift_Cursor_Right;
          -   KEY_SRSUME       : Special_Key_Code renames Key_Shift_Resume;
          -   KEY_SSAVE        : Special_Key_Code renames Key_Shift_Save;
          -   KEY_SSUSPEND     : Special_Key_Code renames Key_Shift_Suspend;
          -   KEY_SUNDO        : Special_Key_Code renames Key_Shift_Undo;
          +   KEY_DOWN         : Special_Key_Code renames Key_Cursor_Down;
          +   KEY_UP           : Special_Key_Code renames Key_Cursor_Up;
          +   KEY_LEFT         : Special_Key_Code renames Key_Cursor_Left;
          +   KEY_RIGHT        : Special_Key_Code renames Key_Cursor_Right;
          +   KEY_DL           : Special_Key_Code renames Key_Delete_Line;
          +   KEY_IL           : Special_Key_Code renames Key_Insert_Line;
          +   KEY_DC           : Special_Key_Code renames Key_Delete_Char;
          +   KEY_IC           : Special_Key_Code renames Key_Insert_Char;
          +   KEY_EIC          : Special_Key_Code renames Key_Exit_Insert_Mode;
          +   KEY_CLEAR        : Special_Key_Code renames Key_Clear_Screen;
          +   KEY_EOS          : Special_Key_Code renames Key_Clear_End_Of_Screen;
          +   KEY_EOL          : Special_Key_Code renames Key_Clear_End_Of_Line;
          +   KEY_SF           : Special_Key_Code renames Key_Scroll_1_Forward;
          +   KEY_SR           : Special_Key_Code renames Key_Scroll_1_Backward;
          +   KEY_NPAGE        : Special_Key_Code renames Key_Next_Page;
          +   KEY_PPAGE        : Special_Key_Code renames Key_Previous_Page;
          +   KEY_STAB         : Special_Key_Code renames Key_Set_Tab;
          +   KEY_CTAB         : Special_Key_Code renames Key_Clear_Tab;
          +   KEY_CATAB        : Special_Key_Code renames Key_Clear_All_Tabs;
          +   KEY_ENTER        : Special_Key_Code renames Key_Enter_Or_Send;
          +   KEY_SRESET       : Special_Key_Code renames Key_Soft_Reset;
          +   KEY_LL           : Special_Key_Code renames Key_Bottom;
          +   KEY_A1           : Special_Key_Code renames Key_Upper_Left_Of_Keypad;
          +   KEY_A3           : Special_Key_Code renames Key_Upper_Right_Of_Keypad;
          +   KEY_B2           : Special_Key_Code renames Key_Center_Of_Keypad;
          +   KEY_C1           : Special_Key_Code renames Key_Lower_Left_Of_Keypad;
          +   KEY_C3           : Special_Key_Code renames Key_Lower_Right_Of_Keypad;
          +   KEY_BTAB         : Special_Key_Code renames Key_Back_Tab;
          +   KEY_BEG          : Special_Key_Code renames Key_Beginning;
          +   KEY_SBEG         : Special_Key_Code renames Key_Shift_Begin;
          +   KEY_SCANCEL      : Special_Key_Code renames Key_Shift_Cancel;
          +   KEY_SCOMMAND     : Special_Key_Code renames Key_Shift_Command;
          +   KEY_SCOPY        : Special_Key_Code renames Key_Shift_Copy;
          +   KEY_SCREATE      : Special_Key_Code renames Key_Shift_Create;
          +   KEY_SDC          : Special_Key_Code renames Key_Shift_Delete_Char;
          +   KEY_SDL          : Special_Key_Code renames Key_Shift_Delete_Line;
          +   KEY_SEND         : Special_Key_Code renames Key_Shift_End;
          +   KEY_SEOL         : Special_Key_Code renames Key_Shift_Clear_End_Of_Line;
          +   KEY_SEXIT        : Special_Key_Code renames Key_Shift_Exit;
          +   KEY_SFIND        : Special_Key_Code renames Key_Shift_Find;
          +   KEY_SHELP        : Special_Key_Code renames Key_Shift_Help;
          +   KEY_SHOME        : Special_Key_Code renames Key_Shift_Home;
          +   KEY_SIC          : Special_Key_Code renames Key_Shift_Insert_Char;
          +   KEY_SLEFT        : Special_Key_Code renames Key_Shift_Cursor_Left;
          +   KEY_SMESSAGE     : Special_Key_Code renames Key_Shift_Message;
          +   KEY_SMOVE        : Special_Key_Code renames Key_Shift_Move;
          +   KEY_SNEXT        : Special_Key_Code renames Key_Shift_Next_Page;
          +   KEY_SOPTIONS     : Special_Key_Code renames Key_Shift_Options;
          +   KEY_SPREVIOUS    : Special_Key_Code renames Key_Shift_Previous_Page;
          +   KEY_SPRINT       : Special_Key_Code renames Key_Shift_Print;
          +   KEY_SREDO        : Special_Key_Code renames Key_Shift_Redo;
          +   KEY_SREPLACE     : Special_Key_Code renames Key_Shift_Replace;
          +   KEY_SRIGHT       : Special_Key_Code renames Key_Shift_Cursor_Right;
          +   KEY_SRSUME       : Special_Key_Code renames Key_Shift_Resume;
          +   KEY_SSAVE        : Special_Key_Code renames Key_Shift_Save;
          +   KEY_SSUSPEND     : Special_Key_Code renames Key_Shift_Suspend;
          +   KEY_SUNDO        : Special_Key_Code renames Key_Shift_Undo;
           
           ------------------------------------------------------------------------------
           
          -   type Color_Number is range -1 .. Integer (Interfaces.C.short'Last);
          -   for Color_Number'Size use Interfaces.C.short'Size;
          +   type Color_Number is range -1 .. Integer (Interfaces.C.short'Last);
          +   for Color_Number'Size use Interfaces.C.short'Size;
              --  (n)curses uses a short for the color index
              --  The model is, that a Color_Number is an index into an array of
              --  (potentially) definable colors. Some of those indices are
              --  predefined (see below), although they may not really exist.
           
          -   Default_Color    : constant Color_Number := -1;
          -   Black            : constant Color_Number := 0;
          -   Red              : constant Color_Number := 1;
          -   Green            : constant Color_Number := 2;
          -   Yellow           : constant Color_Number := 3;
          -   Blue             : constant Color_Number := 4;
          -   Magenta          : constant Color_Number := 5;
          -   Cyan             : constant Color_Number := 6;
          -   White            : constant Color_Number := 7;
          +   Default_Color    : constant Color_Number := -1;
          +   Black            : constant Color_Number := 0;
          +   Red              : constant Color_Number := 1;
          +   Green            : constant Color_Number := 2;
          +   Yellow           : constant Color_Number := 3;
          +   Blue             : constant Color_Number := 4;
          +   Magenta          : constant Color_Number := 5;
          +   Cyan             : constant Color_Number := 6;
          +   White            : constant Color_Number := 7;
           
          -   type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last);
          -   for RGB_Value'Size use Interfaces.C.short'Size;
          +   type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last);
          +   for RGB_Value'Size use Interfaces.C.short'Size;
              --  Some system may allow to redefine a color by setting RGB values.
           
          -   type Color_Pair is range 0 .. 255;
          -   for Color_Pair'Size use 8;
          -   subtype Redefinable_Color_Pair is Color_Pair range 1 .. 255;
          +   type Color_Pair is range 0 .. 255;
          +   for Color_Pair'Size use 8;
          +   subtype Redefinable_Color_Pair is Color_Pair range 1 .. 255;
              --  (n)curses reserves 1 Byte for the color-pair number. Color Pair 0
              --  is fixed (Black & White). A color pair is simply a combination of
              --  two colors described by Color_Numbers, one for the foreground and
              --  the other for the background
           
          -   type Character_Attribute_Set is
          +   type Character_Attribute_Set is
                 record
          -         Stand_Out               : Boolean;
          -         Under_Line              : Boolean;
          -         Reverse_Video           : Boolean;
          -         Blink                   : Boolean;
          -         Dim_Character           : Boolean;
          -         Bold_Character          : Boolean;
          -         Alternate_Character_Set : Boolean;
          -         Invisible_Character     : Boolean;
          -         Protected_Character     : Boolean;
          -         Horizontal              : Boolean;
          -         Left                    : Boolean;
          -         Low                     : Boolean;
          -         Right                   : Boolean;
          -         Top                     : Boolean;
          -         Vertical                : Boolean;
          +         Stand_Out               : Boolean;
          +         Under_Line              : Boolean;
          +         Reverse_Video           : Boolean;
          +         Blink                   : Boolean;
          +         Dim_Character           : Boolean;
          +         Bold_Character          : Boolean;
          +         Alternate_Character_Set : Boolean;
          +         Invisible_Character     : Boolean;
          +         Protected_Character     : Boolean;
          +         Horizontal              : Boolean;
          +         Left                    : Boolean;
          +         Low                     : Boolean;
          +         Right                   : Boolean;
          +         Top                     : Boolean;
          +         Vertical                : Boolean;
                 end record;
          -   pragma Convention (C, Character_Attribute_Set);
          +   pragma Convention (C, Character_Attribute_Set);
           
          -   for Character_Attribute_Set use
          +   for Character_Attribute_Set use
                 record
                    Stand_Out               at 0 range  0 ..  0;
                    Under_Line              at 0 range  1 ..  1;
          @@ -348,64 +347,64 @@
                    Top                     at 0 range 13 .. 13;
                    Vertical                at 0 range 14 .. 14;
                 end record;
          -   for Character_Attribute_Set'Size use 16;
          +   for Character_Attribute_Set'Size use 16;
              --  Please note: this rep. clause is generated and may be
              --               different on your system.
              --  (n)curses uses all but the lowest 16 Bits for Attributes.
           
          -   Normal_Video : constant Character_Attribute_Set := (others => False);
          +   Normal_Video : constant Character_Attribute_Set := (others => False);
           
          -   type Attributed_Character is
          +   type Attributed_Character is
                 record
          -         Attr  : Character_Attribute_Set;
          -         Color : Color_Pair;
          -         Ch    : Character;
          +         Attr  : Character_Attribute_Set;
          +         Color : Color_Pair;
          +         Ch    : Character;
                 end record;
          -   pragma Convention (C, Attributed_Character);
          +   pragma Convention (C, Attributed_Character);
              --  This is the counterpart for the chtype in C.
           
          -   for Attributed_Character use
          +   for Attributed_Character use
                 record
                    Ch    at 0 range  0 ..  7;
                    Color at 0 range  8 .. 15;
                    Attr  at 0 range 16 .. 31;
                 end record;
          -   for Attributed_Character'Size use 32;
          +   for Attributed_Character'Size use 32;
                 --  Please note: this rep. clause is generated and may be
                 --               different on your system.
           
          -   Default_Character : constant Attributed_Character
          -     := (Ch    => Character'First,
          -         Color => Color_Pair'First,
          -         Attr  => (others => False));  --  preelaboratable Normal_Video
          +   Default_Character : constant Attributed_Character
          +     := (Ch    => Character'First,
          +         Color => Color_Pair'First,
          +         Attr  => (others => False));  --  preelaboratable Normal_Video
           
          -   type Attributed_String is array (Positive range <>) of Attributed_Character;
          -   pragma Pack (Attributed_String);
          +   type Attributed_String is array (Positive range <>) of Attributed_Character;
          +   pragma Pack (Attributed_String);
              --  In this binding we allow strings of attributed characters.
           
              ------------------
              --  Exceptions  --
              ------------------
          -   Curses_Exception     : exception;
          -   Wrong_Curses_Version : exception;
          +   Curses_Exception     : exception;
          +   Wrong_Curses_Version : exception;
           
              --  Those exceptions are raised by the ETI (Extended Terminal Interface)
              --  subpackets for Menu and Forms handling.
              --
          -   Eti_System_Error    : exception;
          -   Eti_Bad_Argument    : exception;
          -   Eti_Posted          : exception;
          -   Eti_Connected       : exception;
          -   Eti_Bad_State       : exception;
          -   Eti_No_Room         : exception;
          -   Eti_Not_Posted      : exception;
          -   Eti_Unknown_Command : exception;
          -   Eti_No_Match        : exception;
          -   Eti_Not_Selectable  : exception;
          -   Eti_Not_Connected   : exception;
          -   Eti_Request_Denied  : exception;
          -   Eti_Invalid_Field   : exception;
          -   Eti_Current         : exception;
          +   Eti_System_Error    : exception;
          +   Eti_Bad_Argument    : exception;
          +   Eti_Posted          : exception;
          +   Eti_Connected       : exception;
          +   Eti_Bad_State       : exception;
          +   Eti_No_Room         : exception;
          +   Eti_Not_Posted      : exception;
          +   Eti_Unknown_Command : exception;
          +   Eti_No_Match        : exception;
          +   Eti_Not_Selectable  : exception;
          +   Eti_Not_Connected   : exception;
          +   Eti_Request_Denied  : exception;
          +   Eti_Invalid_Field   : exception;
          +   Eti_Current         : exception;
           
              --------------------------------------------------------------------------
              --  External C variables
          @@ -415,28 +414,29 @@
              --  this is to use functions.
              --------------------------------------------------------------------------
           
          -   function Lines            return Line_Count;
          -   pragma Inline (Lines);
          +   function Lines            return Line_Count;
          +   pragma Inline (Lines);
           
          -   function Columns          return Column_Count;
          -   pragma Inline (Columns);
          +   function Columns          return Column_Count;
          +   pragma Inline (Columns);
           
          -   function Tab_Size         return Natural;
          -   pragma Inline (Tab_Size);
          +   function Tab_Size         return Natural;
          +   pragma Inline (Tab_Size);
           
          -   function Number_Of_Colors return Natural;
          -   pragma Inline (Number_Of_Colors);
          +   function Number_Of_Colors return Natural;
          +   pragma Inline (Number_Of_Colors);
           
          -   function Number_Of_Color_Pairs return Natural;
          -   pragma Inline (Number_Of_Color_Pairs);
          +   function Number_Of_Color_Pairs return Natural;
          +   pragma Inline (Number_Of_Color_Pairs);
           
          -   ACS_Map : array (Character'Val (0) .. Character'Val (127)) of
          -     Attributed_Character;
          -   pragma Import (C, ACS_Map, "acs_map");
          +   type C_ACS_Map is array (Character'Val (0) .. Character'Val (127))
          +        of Attributed_Character;
          +   ACS_Map : C_ACS_Map;
          +   pragma Import (C, ACS_Map, "acs_map");
              --
              --
              --  Constants for several characters from the Alternate Character Set
          -   --  You must use this constants as indices into the ACS_Map array
          +   --  You must use these constants as indices into the ACS_Map array
              --  to get the corresponding attributed character at runtime.
              --
              ACS_Upper_Left_Corner    : constant Character := 'l';
          @@ -470,93 +470,98 @@
              ACS_Greater_Or_Equal     : constant Character := 'z';
              ACS_PI                   : constant Character := '{';
              ACS_Not_Equal            : constant Character := '|';
          -   ACS_Sterling             : constant Character := '}';
          +   ACS_Sterling             : constant Character := '}';
           
              --  |=====================================================================
              --  | Man page curs_initscr.3x
              --  |=====================================================================
          -   --  | Not implemented: newterm, set_term, delscreen, curscr
          +   --  | Not implemented: newterm, set_term, delscreen
           
              --  #1A NAME="AFU_1"#2|
          -   function Standard_Window return Window;
          +   function Standard_Window return Window;
              --  AKA: stdscr
          -   pragma Inline (Standard_Window);
          +   pragma Inline (Standard_Window);
           
              --  #1A NAME="AFU_2"#2|
          -   procedure Init_Screen;
          +   function Current_Window return Window;
          +   --  AKA: curscr
          +   pragma Inline (Current_Window);
           
              --  #1A NAME="AFU_3"#2|
          -   procedure Init_Windows renames Init_Screen;
          +   procedure Init_Screen;
          +
          +   --  #1A NAME="AFU_4"#2|
          +   procedure Init_Windows renames Init_Screen;
              --  AKA: initscr()
          -   pragma Inline (Init_Screen);
          +   pragma Inline (Init_Screen);
              --  pragma Inline (Init_Windows);
           
          -   --  #1A NAME="AFU_4"#2|
          -   procedure End_Windows;
          +   --  #1A NAME="AFU_5"#2|
          +   procedure End_Windows;
              --  AKA: endwin()
          -   procedure End_Screen renames End_Windows;
          -   pragma Inline (End_Windows);
          +   procedure End_Screen renames End_Windows;
          +   pragma Inline (End_Windows);
              --  pragma Inline (End_Screen);
           
          -   --  #1A NAME="AFU_5"#2|
          -   function Is_End_Window return Boolean;
          +   --  #1A NAME="AFU_6"#2|
          +   function Is_End_Window return Boolean;
              --  AKA: isendwin()
          -   pragma Inline (Is_End_Window);
          +   pragma Inline (Is_End_Window);
           
              --  |=====================================================================
              --  | Man page curs_move.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_6"#2|
          -   procedure Move_Cursor (Win    : in Window := Standard_Window;
          -                          Line   : in Line_Position;
          -                          Column : in Column_Position);
          +   --  #1A NAME="AFU_7"#2|
          +   procedure Move_Cursor (Win    : in Window := Standard_Window;
          +                          Line   : in Line_Position;
          +                          Column : in Column_Position);
              --  AKA: wmove()
              --  AKA: move()
          -   pragma Inline (Move_Cursor);
          +   pragma Inline (Move_Cursor);
           
              --  |=====================================================================
              --  | Man page curs_addch.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_7"#2|
          -   procedure Add (Win :  in Window := Standard_Window;
          -                  Ch  :  in Attributed_Character);
          +   --  #1A NAME="AFU_8"#2|
          +   procedure Add (Win :  in Window := Standard_Window;
          +                  Ch  :  in Attributed_Character);
              --  AKA: waddch()
              --  AKA: addch()
           
          -   procedure Add (Win :  in Window := Standard_Window;
          -                  Ch  :  in Character);
          +   procedure Add (Win :  in Window := Standard_Window;
          +                  Ch  :  in Character);
              --  Add a single character at the current logical cursor position to
              --  the window. Use the current windows attributes.
           
          -   --  #1A NAME="AFU_8"#2|
          -   procedure Add
          -     (Win    : in Window := Standard_Window;
          -      Line   : in Line_Position;
          -      Column : in Column_Position;
          -      Ch     : in Attributed_Character);
          +   --  #1A NAME="AFU_9"#2|
          +   procedure Add
          +     (Win    : in Window := Standard_Window;
          +      Line   : in Line_Position;
          +      Column : in Column_Position;
          +      Ch     : in Attributed_Character);
              --  AKA: mvwaddch()
              --  AKA: mvaddch()
           
          -   procedure Add
          -     (Win    : in Window := Standard_Window;
          -      Line   : in Line_Position;
          -      Column : in Column_Position;
          -      Ch     : in Character);
          +   procedure Add
          +     (Win    : in Window := Standard_Window;
          +      Line   : in Line_Position;
          +      Column : in Column_Position;
          +      Ch     : in Character);
              --  Move to the position and add a single character into the window
              --  There are more Add routines, so the Inline pragma follows later
           
          -   --  #1A NAME="AFU_9"#2|
          -   procedure Add_With_Immediate_Echo
          -     (Win : in Window := Standard_Window;
          -      Ch  : in Attributed_Character);
          +   --  #1A NAME="AFU_10"#2|
          +   procedure Add_With_Immediate_Echo
          +     (Win : in Window := Standard_Window;
          +      Ch  : in Attributed_Character);
              --  AKA: wechochar()
              --  AKA: echochar()
           
          -   procedure Add_With_Immediate_Echo
          -     (Win : in Window := Standard_Window;
          -      Ch  : in Character);
          +   procedure Add_With_Immediate_Echo
          +     (Win : in Window := Standard_Window;
          +      Ch  : in Character);
              --  Add a character and do an immediate refresh of the screen.
              pragma Inline (Add_With_Immediate_Echo);
           
          @@ -565,105 +570,105 @@
              --  |=====================================================================
              --  Not Implemented: wcursyncup
           
          -   --  #1A NAME="AFU_10"#2|
          -   function Create
          -     (Number_Of_Lines       : Line_Count;
          -      Number_Of_Columns     : Column_Count;
          -      First_Line_Position   : Line_Position;
          -      First_Column_Position : Column_Position) return Window;
          +   --  #1A NAME="AFU_11"#2|
          +   function Create
          +     (Number_Of_Lines       : Line_Count;
          +      Number_Of_Columns     : Column_Count;
          +      First_Line_Position   : Line_Position;
          +      First_Column_Position : Column_Position) return Window;
              --  Not Implemented: Default Number_Of_Lines, Number_Of_Columns
              --  the C version lets them be 0, see the man page.
              --  AKA: newwin()
          -   pragma Inline (Create);
          +   pragma Inline (Create);
           
              function New_Window
          -     (Number_Of_Lines       : Line_Count;
          -      Number_Of_Columns     : Column_Count;
          -      First_Line_Position   : Line_Position;
          -      First_Column_Position : Column_Position) return Window
          -     renames Create;
          +     (Number_Of_Lines       : Line_Count;
          +      Number_Of_Columns     : Column_Count;
          +      First_Line_Position   : Line_Position;
          +      First_Column_Position : Column_Position) return Window
          +     renames Create;
              --  pragma Inline (New_Window);
           
          -   --  #1A NAME="AFU_11"#2|
          -   procedure Delete (Win : in out Window);
          +   --  #1A NAME="AFU_12"#2|
          +   procedure Delete (Win : in out Window);
              --  AKA: delwin()
              --  Reset Win to Null_Window
          -   pragma Inline (Delete);
          +   pragma Inline (Delete);
           
          -   --  #1A NAME="AFU_12"#2|
          -   function Sub_Window
          -     (Win                   : Window := Standard_Window;
          -      Number_Of_Lines       : Line_Count;
          -      Number_Of_Columns     : Column_Count;
          -      First_Line_Position   : Line_Position;
          -      First_Column_Position : Column_Position) return Window;
          +   --  #1A NAME="AFU_13"#2|
          +   function Sub_Window
          +     (Win                   : Window := Standard_Window;
          +      Number_Of_Lines       : Line_Count;
          +      Number_Of_Columns     : Column_Count;
          +      First_Line_Position   : Line_Position;
          +      First_Column_Position : Column_Position) return Window;
              --  AKA: subwin()
          -   pragma Inline (Sub_Window);
          +   pragma Inline (Sub_Window);
           
          -   --  #1A NAME="AFU_13"#2|
          -   function Derived_Window
          -     (Win                   : Window := Standard_Window;
          -      Number_Of_Lines       : Line_Count;
          -      Number_Of_Columns     : Column_Count;
          -      First_Line_Position   : Line_Position;
          -      First_Column_Position : Column_Position) return Window;
          +   --  #1A NAME="AFU_14"#2|
          +   function Derived_Window
          +     (Win                   : Window := Standard_Window;
          +      Number_Of_Lines       : Line_Count;
          +      Number_Of_Columns     : Column_Count;
          +      First_Line_Position   : Line_Position;
          +      First_Column_Position : Column_Position) return Window;
              --  AKA: derwin()
          -   pragma Inline (Derived_Window);
          +   pragma Inline (Derived_Window);
           
          -   --  #1A NAME="AFU_14"#2|
          -   function Duplicate (Win : Window) return Window;
          +   --  #1A NAME="AFU_15"#2|
          +   function Duplicate (Win : Window) return Window;
              --  AKA: dupwin()
          -   pragma Inline (Duplicate);
          +   pragma Inline (Duplicate);
           
          -   --  #1A NAME="AFU_15"#2|
          -   procedure Move_Window (Win    : in Window;
          -                          Line   : in Line_Position;
          -                          Column : in Column_Position);
          +   --  #1A NAME="AFU_16"#2|
          +   procedure Move_Window (Win    : in Window;
          +                          Line   : in Line_Position;
          +                          Column : in Column_Position);
              --  AKA: mvwin()
          -   pragma Inline (Move_Window);
          +   pragma Inline (Move_Window);
           
          -   --  #1A NAME="AFU_16"#2|
          -   procedure Move_Derived_Window (Win    : in Window;
          -                                  Line   : in Line_Position;
          -                                  Column : in Column_Position);
          +   --  #1A NAME="AFU_17"#2|
          +   procedure Move_Derived_Window (Win    : in Window;
          +                                  Line   : in Line_Position;
          +                                  Column : in Column_Position);
              --  AKA: mvderwin()
          -   pragma Inline (Move_Derived_Window);
          +   pragma Inline (Move_Derived_Window);
           
          -   --  #1A NAME="AFU_17"#2|
          -   procedure Synchronize_Upwards (Win : in Window);
          +   --  #1A NAME="AFU_18"#2|
          +   procedure Synchronize_Upwards (Win : in Window);
              --  AKA: wsyncup()
              pragma Import (C, Synchronize_Upwards, "wsyncup");
           
          -   --  #1A NAME="AFU_18"#2|
          -   procedure Synchronize_Downwards (Win : in Window);
          +   --  #1A NAME="AFU_19"#2|
          +   procedure Synchronize_Downwards (Win : in Window);
              --  AKA: wsyncdown()
              pragma Import (C, Synchronize_Downwards, "wsyncdown");
           
          -   --  #1A NAME="AFU_19"#2|
          -   procedure Set_Synch_Mode (Win  : in Window := Standard_Window;
          -                             Mode : in Boolean := False);
          +   --  #1A NAME="AFU_20"#2|
          +   procedure Set_Synch_Mode (Win  : in Window := Standard_Window;
          +                             Mode : in Boolean := False);
              --  AKA: syncok()
          -   pragma Inline (Set_Synch_Mode);
          +   pragma Inline (Set_Synch_Mode);
           
              --  |=====================================================================
              --  | Man page curs_addstr.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_20"#2|
          -   procedure Add (Win : in Window := Standard_Window;
          -                  Str : in String;
          -                  Len : in Integer := -1);
          +   --  #1A NAME="AFU_21"#2|
          +   procedure Add (Win : in Window := Standard_Window;
          +                  Str : in String;
          +                  Len : in Integer := -1);
              --  AKA: waddnstr()
              --  AKA: waddstr()
              --  AKA: addnstr()
              --  AKA: addstr()
           
          -   --  #1A NAME="AFU_21"#2|
          -   procedure Add (Win    : in Window := Standard_Window;
          -                  Line   : in Line_Position;
          -                  Column : in Column_Position;
          -                  Str    : in String;
          -                  Len    : in Integer := -1);
          +   --  #1A NAME="AFU_22"#2|
          +   procedure Add (Win    : in Window := Standard_Window;
          +                  Line   : in Line_Position;
          +                  Column : in Column_Position;
          +                  Str    : in String;
          +                  Len    : in Integer := -1);
              --  AKA: mvwaddnstr()
              --  AKA: mvwaddstr()
              --  AKA: mvaddnstr()
          @@ -673,21 +678,21 @@
              --  | Man page curs_addchstr.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_22"#2|
          -   procedure Add (Win : in Window := Standard_Window;
          -                  Str : in Attributed_String;
          -                  Len : in Integer := -1);
          +   --  #1A NAME="AFU_23"#2|
          +   procedure Add (Win : in Window := Standard_Window;
          +                  Str : in Attributed_String;
          +                  Len : in Integer := -1);
              --  AKA: waddchnstr()
              --  AKA: waddchstr()
              --  AKA: addchnstr()
              --  AKA: addchstr()
           
          -   --  #1A NAME="AFU_23"#2|
          -   procedure Add (Win    : in Window := Standard_Window;
          -                  Line   : in Line_Position;
          -                  Column : in Column_Position;
          -                  Str    : in Attributed_String;
          -                  Len    : in Integer := -1);
          +   --  #1A NAME="AFU_24"#2|
          +   procedure Add (Win    : in Window := Standard_Window;
          +                  Line   : in Line_Position;
          +                  Column : in Column_Position;
          +                  Str    : in Attributed_String;
          +                  Len    : in Integer := -1);
              --  AKA: mvwaddchnstr()
              --  AKA: mvwaddchstr()
              --  AKA: mvaddchnstr()
          @@ -700,92 +705,92 @@
              --  | Not implemented: mvhline,  mvwhline, mvvline, mvwvline
              --  | use Move_Cursor then Horizontal_Line or Vertical_Line
           
          -   --  #1A NAME="AFU_24"#2|
          -   procedure Border
          -     (Win                       : in Window := Standard_Window;
          -      Left_Side_Symbol          : in Attributed_Character := Default_Character;
          -      Right_Side_Symbol         : in Attributed_Character := Default_Character;
          -      Top_Side_Symbol           : in Attributed_Character := Default_Character;
          -      Bottom_Side_Symbol        : in Attributed_Character := Default_Character;
          -      Upper_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
          -      Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
          -      Lower_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
          -      Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character
          +   --  #1A NAME="AFU_25"#2|
          +   procedure Border
          +     (Win                       : in Window := Standard_Window;
          +      Left_Side_Symbol          : in Attributed_Character := Default_Character;
          +      Right_Side_Symbol         : in Attributed_Character := Default_Character;
          +      Top_Side_Symbol           : in Attributed_Character := Default_Character;
          +      Bottom_Side_Symbol        : in Attributed_Character := Default_Character;
          +      Upper_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
          +      Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
          +      Lower_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
          +      Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character
                );
              --  AKA: wborder()
              --  AKA: border()
          -   pragma Inline (Border);
          +   pragma Inline (Border);
           
          -   --  #1A NAME="AFU_25"#2|
          -   procedure Box
          -     (Win               : in Window := Standard_Window;
          -      Vertical_Symbol   : in Attributed_Character := Default_Character;
          -      Horizontal_Symbol : in Attributed_Character := Default_Character);
          +   --  #1A NAME="AFU_26"#2|
          +   procedure Box
          +     (Win               : in Window := Standard_Window;
          +      Vertical_Symbol   : in Attributed_Character := Default_Character;
          +      Horizontal_Symbol : in Attributed_Character := Default_Character);
              --  AKA: box()
          -   pragma Inline (Box);
          +   pragma Inline (Box);
           
          -   --  #1A NAME="AFU_26"#2|
          -   procedure Horizontal_Line
          -     (Win         : in Window := Standard_Window;
          -      Line_Size   : in Natural;
          -      Line_Symbol : in Attributed_Character := Default_Character);
          +   --  #1A NAME="AFU_27"#2|
          +   procedure Horizontal_Line
          +     (Win         : in Window := Standard_Window;
          +      Line_Size   : in Natural;
          +      Line_Symbol : in Attributed_Character := Default_Character);
              --  AKA: whline()
              --  AKA: hline()
          -   pragma Inline (Horizontal_Line);
          +   pragma Inline (Horizontal_Line);
           
          -   --  #1A NAME="AFU_27"#2|
          -   procedure Vertical_Line
          -     (Win         : in Window := Standard_Window;
          -      Line_Size   : in Natural;
          -      Line_Symbol : in Attributed_Character := Default_Character);
          +   --  #1A NAME="AFU_28"#2|
          +   procedure Vertical_Line
          +     (Win         : in Window := Standard_Window;
          +      Line_Size   : in Natural;
          +      Line_Symbol : in Attributed_Character := Default_Character);
              --  AKA: wvline()
              --  AKA: vline()
          -   pragma Inline (Vertical_Line);
          +   pragma Inline (Vertical_Line);
           
              --  |=====================================================================
              --  | Man page curs_getch.3x
              --  |=====================================================================
              --  Not implemented: mvgetch, mvwgetch
           
          -   --  #1A NAME="AFU_28"#2|
          -   function Get_Keystroke (Win : Window := Standard_Window)
          -                           return Real_Key_Code;
          +   --  #1A NAME="AFU_29"#2|
          +   function Get_Keystroke (Win : Window := Standard_Window)
          +                           return Real_Key_Code;
              --  AKA: wgetch()
              --  AKA: getch()
              --  Get a character from the keyboard and echo it - if enabled - to the
              --  window.
              --  If for any reason (i.e. a timeout) we couldn't get a character the
              --  returned keycode is Key_None.
          -   pragma Inline (Get_Keystroke);
          +   pragma Inline (Get_Keystroke);
           
          -   --  #1A NAME="AFU_29"#2|
          -   procedure Undo_Keystroke (Key : in Real_Key_Code);
          +   --  #1A NAME="AFU_30"#2|
          +   procedure Undo_Keystroke (Key : in Real_Key_Code);
              --  AKA: ungetch()
          -   pragma Inline (Undo_Keystroke);
          +   pragma Inline (Undo_Keystroke);
           
          -   --  #1A NAME="AFU_30"#2|
          -   function Has_Key (Key : Special_Key_Code) return Boolean;
          +   --  #1A NAME="AFU_31"#2|
          +   function Has_Key (Key : Special_Key_Code) return Boolean;
              --  AKA: has_key()
          -   pragma Inline (Has_Key);
          +   pragma Inline (Has_Key);
           
              --  |
              --  | Some helper functions
              --  |
          -   function Is_Function_Key (Key : Special_Key_Code) return Boolean;
          +   function Is_Function_Key (Key : Special_Key_Code) return Boolean;
              --  Return True if the Key is a function key (i.e. one of F0 .. F63)
          -   pragma Inline (Is_Function_Key);
          +   pragma Inline (Is_Function_Key);
           
          -   subtype Function_Key_Number is Integer range 0 .. 63;
          +   subtype Function_Key_Number is Integer range 0 .. 63;
              --  (n)curses allows for 64 function keys.
           
          -   function Function_Key (Key : Real_Key_Code) return Function_Key_Number;
          +   function Function_Key (Key : Real_Key_Code) return Function_Key_Number;
              --  Return the number of the function key. If the code is not a
              --  function key, a CONSTRAINT_ERROR will be raised.
          -   pragma Inline (Function_Key);
          +   pragma Inline (Function_Key);
           
          -   function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code;
          +   function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code;
              --  Return the key code for a given function-key number.
          -   pragma Inline (Function_Key_Code);
          +   pragma Inline (Function_Key_Code);
           
              --  |=====================================================================
              --  | Man page curs_attr.3x
          @@ -796,68 +801,68 @@
              --  PAIR_NUMBER
              --  PAIR_NUMBER(c) is the same as c.Color
           
          -   --  #1A NAME="AFU_31"#2|
          -   procedure Standout (Win : Window  := Standard_Window;
          -                       On  : Boolean := True);
          +   --  #1A NAME="AFU_32"#2|
          +   procedure Standout (Win : Window  := Standard_Window;
          +                       On  : Boolean := True);
              --  AKA: wstandout()
              --  AKA: wstandend()
           
          -   --  #1A NAME="AFU_32"#2|
          -   procedure Switch_Character_Attribute
          -     (Win  : in Window := Standard_Window;
          -      Attr : in Character_Attribute_Set := Normal_Video;
          -      On   : in Boolean := True); --  if False we switch Off.
          +   --  #1A NAME="AFU_33"#2|
          +   procedure Switch_Character_Attribute
          +     (Win  : in Window := Standard_Window;
          +      Attr : in Character_Attribute_Set := Normal_Video;
          +      On   : in Boolean := True); --  if False we switch Off.
              --  Switches those Attributes set to true in the list.
              --  AKA: wattron()
              --  AKA: wattroff()
              --  AKA: attron()
              --  AKA: attroff()
           
          -   --  #1A NAME="AFU_33"#2|
          -   procedure Set_Character_Attributes
          -     (Win   : in Window := Standard_Window;
          -      Attr  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          +   --  #1A NAME="AFU_34"#2|
          +   procedure Set_Character_Attributes
          +     (Win   : in Window := Standard_Window;
          +      Attr  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
              --  AKA: wattrset()
              --  AKA: attrset()
          -   pragma Inline (Set_Character_Attributes);
          +   pragma Inline (Set_Character_Attributes);
           
          -   --  #1A NAME="AFU_34"#2|
          -   function Get_Character_Attribute
          -     (Win : in Window := Standard_Window) return Character_Attribute_Set;
          +   --  #1A NAME="AFU_35"#2|
          +   function Get_Character_Attribute
          +     (Win : in Window := Standard_Window) return Character_Attribute_Set;
              --  AKA: wattr_get()
              --  AKA: attr_get()
           
          -   --  #1A NAME="AFU_35"#2|
          -   function Get_Character_Attribute
          -     (Win : in Window := Standard_Window) return Color_Pair;
          +   --  #1A NAME="AFU_36"#2|
          +   function Get_Character_Attribute
          +     (Win : in Window := Standard_Window) return Color_Pair;
              --  AKA: wattr_get()
              pragma Inline (Get_Character_Attribute);
           
          -   --  #1A NAME="AFU_36"#2|
          -   procedure Set_Color (Win  : in Window := Standard_Window;
          -                        Pair : in Color_Pair);
          +   --  #1A NAME="AFU_37"#2|
          +   procedure Set_Color (Win  : in Window := Standard_Window;
          +                        Pair : in Color_Pair);
              --  AKA: wcolor_set()
              --  AKA: color_set()
          -   pragma Inline (Set_Color);
          +   pragma Inline (Set_Color);
           
          -   --  #1A NAME="AFU_37"#2|
          -   procedure Change_Attributes
          -     (Win   : in Window := Standard_Window;
          -      Count : in Integer := -1;
          -      Attr  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          +   --  #1A NAME="AFU_38"#2|
          +   procedure Change_Attributes
          +     (Win   : in Window := Standard_Window;
          +      Count : in Integer := -1;
          +      Attr  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
              --  AKA: wchgat()
              --  AKA: chgat()
           
          -   --  #1A NAME="AFU_38"#2|
          -   procedure Change_Attributes
          -     (Win    : in Window := Standard_Window;
          -      Line   : in Line_Position := Line_Position'First;
          -      Column : in Column_Position := Column_Position'First;
          -      Count  : in Integer := -1;
          -      Attr   : in Character_Attribute_Set := Normal_Video;
          -      Color  : in Color_Pair := Color_Pair'First);
          +   --  #1A NAME="AFU_39"#2|
          +   procedure Change_Attributes
          +     (Win    : in Window := Standard_Window;
          +      Line   : in Line_Position := Line_Position'First;
          +      Column : in Column_Position := Column_Position'First;
          +      Count  : in Integer := -1;
          +      Attr   : in Character_Attribute_Set := Normal_Video;
          +      Color  : in Color_Pair := Color_Pair'First);
              --  AKA: mvwchgat()
              --  AKA: mvchgat()
              pragma Inline (Change_Attributes);
          @@ -866,15 +871,15 @@
              --  | Man page curs_beep.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_39"#2|
          -   procedure Beep;
          +   --  #1A NAME="AFU_40"#2|
          +   procedure Beep;
              --  AKA: beep()
          -   pragma Inline (Beep);
          +   pragma Inline (Beep);
           
          -   --  #1A NAME="AFU_40"#2|
          -   procedure Flash_Screen;
          +   --  #1A NAME="AFU_41"#2|
          +   procedure Flash_Screen;
              --  AKA: flash()
          -   pragma Inline (Flash_Screen);
          +   pragma Inline (Flash_Screen);
           
              --  |=====================================================================
              --  | Man page curs_inopts.3x
          @@ -882,76 +887,76 @@
           
              --  | Not implemented : typeahead
              --
          -   --  #1A NAME="AFU_41"#2|
          -   procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
          +   --  #1A NAME="AFU_42"#2|
          +   procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
              --  AKA: cbreak()
              --  AKA: nocbreak()
          -   pragma Inline (Set_Cbreak_Mode);
          +   pragma Inline (Set_Cbreak_Mode);
           
          -   --  #1A NAME="AFU_42"#2|
          -   procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
          +   --  #1A NAME="AFU_43"#2|
          +   procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
              --  AKA: raw()
              --  AKA: noraw()
          -   pragma Inline (Set_Raw_Mode);
          +   pragma Inline (Set_Raw_Mode);
           
          -   --  #1A NAME="AFU_43"#2|
          -   procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
          +   --  #1A NAME="AFU_44"#2|
          +   procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
              --  AKA: echo()
              --  AKA: noecho()
          -   pragma Inline (Set_Echo_Mode);
          +   pragma Inline (Set_Echo_Mode);
           
          -   --  #1A NAME="AFU_44"#2|
          -   procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
          -                            SwitchOn : in Boolean := True);
          +   --  #1A NAME="AFU_45"#2|
          +   procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
          +                            SwitchOn : in Boolean := True);
              --  AKA: meta()
          -   pragma Inline (Set_Meta_Mode);
          +   pragma Inline (Set_Meta_Mode);
           
          -   --  #1A NAME="AFU_45"#2|
          -   procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
          -                              SwitchOn : in Boolean := True);
          +   --  #1A NAME="AFU_46"#2|
          +   procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
          +                              SwitchOn : in Boolean := True);
              --  AKA: keypad()
          -   pragma Inline (Set_KeyPad_Mode);
          +   pragma Inline (Set_KeyPad_Mode);
           
          -   function Get_KeyPad_Mode (Win : in Window := Standard_Window)
          +   function Get_KeyPad_Mode (Win : in Window := Standard_Window)
                                        return Boolean;
              --  This has no pendant in C. There you've to look into the WINDOWS
              --  structure to get the value. Bad practice, not repeated in Ada.
           
          -   type Half_Delay_Amount is range 1 .. 255;
          +   type Half_Delay_Amount is range 1 .. 255;
           
          -   --  #1A NAME="AFU_46"#2|
          -   procedure Half_Delay (Amount : in Half_Delay_Amount);
          +   --  #1A NAME="AFU_47"#2|
          +   procedure Half_Delay (Amount : in Half_Delay_Amount);
              --  AKA: halfdelay()
          -   pragma Inline (Half_Delay);
          +   pragma Inline (Half_Delay);
           
          -   --  #1A NAME="AFU_47"#2|
          -   procedure Set_Flush_On_Interrupt_Mode
          -     (Win  : in Window := Standard_Window;
          -      Mode : in Boolean := True);
          +   --  #1A NAME="AFU_48"#2|
          +   procedure Set_Flush_On_Interrupt_Mode
          +     (Win  : in Window := Standard_Window;
          +      Mode : in Boolean := True);
              --  AKA: intrflush()
          -   pragma Inline (Set_Flush_On_Interrupt_Mode);
          +   pragma Inline (Set_Flush_On_Interrupt_Mode);
           
          -   --  #1A NAME="AFU_48"#2|
          -   procedure Set_Queue_Interrupt_Mode
          -     (Win   : in Window := Standard_Window;
          -      Flush : in Boolean := True);
          +   --  #1A NAME="AFU_49"#2|
          +   procedure Set_Queue_Interrupt_Mode
          +     (Win   : in Window := Standard_Window;
          +      Flush : in Boolean := True);
              --  AKA: qiflush()
              --  AKA: noqiflush()
          -   pragma Inline (Set_Queue_Interrupt_Mode);
          +   pragma Inline (Set_Queue_Interrupt_Mode);
           
          -   --  #1A NAME="AFU_49"#2|
          -   procedure Set_NoDelay_Mode
          -     (Win  : in Window := Standard_Window;
          -      Mode : in Boolean := False);
          +   --  #1A NAME="AFU_50"#2|
          +   procedure Set_NoDelay_Mode
          +     (Win  : in Window := Standard_Window;
          +      Mode : in Boolean := False);
              --  AKA: nodelay()
          -   pragma Inline (Set_NoDelay_Mode);
          +   pragma Inline (Set_NoDelay_Mode);
           
          -   type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
          +   type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
           
          -   --  #1A NAME="AFU_50"#2|
          -   procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
          -                               Mode   : in Timeout_Mode;
          -                               Amount : in Natural); --  in Milliseconds
          +   --  #1A NAME="AFU_51"#2|
          +   procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
          +                               Mode   : in Timeout_Mode;
          +                               Amount : in Natural); --  in Milliseconds
              --  AKA: wtimeout()
              --  AKA: timeout()
              --  Instead of overloading the semantic of the sign of amount, we
          @@ -960,109 +965,109 @@
              --  evaluated.
              --  We don't inline this procedure.
           
          -   --  #1A NAME="AFU_51"#2|
          -   procedure Set_Escape_Timer_Mode
          -     (Win       : in Window := Standard_Window;
          -      Timer_Off : in Boolean := False);
          +   --  #1A NAME="AFU_52"#2|
          +   procedure Set_Escape_Timer_Mode
          +     (Win       : in Window := Standard_Window;
          +      Timer_Off : in Boolean := False);
              --  AKA: notimeout()
          -   pragma Inline (Set_Escape_Timer_Mode);
          +   pragma Inline (Set_Escape_Timer_Mode);
           
              --  |=====================================================================
              --  | Man page curs_outopts.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_52"#2|
          -   procedure Set_NL_Mode (SwitchOn : in Boolean := True);
          +   --  #1A NAME="AFU_53"#2|
          +   procedure Set_NL_Mode (SwitchOn : in Boolean := True);
              --  AKA: nl()
              --  AKA: nonl()
          -   pragma Inline (Set_NL_Mode);
          +   pragma Inline (Set_NL_Mode);
           
          -   --  #1A NAME="AFU_53"#2|
          -   procedure Clear_On_Next_Update
          -     (Win      : in Window := Standard_Window;
          -      Do_Clear : in Boolean := True);
          +   --  #1A NAME="AFU_54"#2|
          +   procedure Clear_On_Next_Update
          +     (Win      : in Window := Standard_Window;
          +      Do_Clear : in Boolean := True);
              --  AKA: clearok()
          -   pragma Inline (Clear_On_Next_Update);
          +   pragma Inline (Clear_On_Next_Update);
           
          -   --  #1A NAME="AFU_54"#2|
          -   procedure Use_Insert_Delete_Line
          -     (Win    : in Window := Standard_Window;
          -      Do_Idl : in Boolean := True);
          +   --  #1A NAME="AFU_55"#2|
          +   procedure Use_Insert_Delete_Line
          +     (Win    : in Window := Standard_Window;
          +      Do_Idl : in Boolean := True);
              --  AKA: idlok()
          -   pragma Inline (Use_Insert_Delete_Line);
          +   pragma Inline (Use_Insert_Delete_Line);
           
          -   --  #1A NAME="AFU_55"#2|
          -   procedure Use_Insert_Delete_Character
          -     (Win    : in Window := Standard_Window;
          -      Do_Idc : in Boolean := True);
          +   --  #1A NAME="AFU_56"#2|
          +   procedure Use_Insert_Delete_Character
          +     (Win    : in Window := Standard_Window;
          +      Do_Idc : in Boolean := True);
              --  AKA: idcok()
          -   pragma Inline (Use_Insert_Delete_Character);
          +   pragma Inline (Use_Insert_Delete_Character);
           
          -   --  #1A NAME="AFU_56"#2|
          -   procedure Leave_Cursor_After_Update
          -     (Win      : in Window := Standard_Window;
          -      Do_Leave : in Boolean := True);
          +   --  #1A NAME="AFU_57"#2|
          +   procedure Leave_Cursor_After_Update
          +     (Win      : in Window := Standard_Window;
          +      Do_Leave : in Boolean := True);
              --  AKA: leaveok()
          -   pragma Inline (Leave_Cursor_After_Update);
          +   pragma Inline (Leave_Cursor_After_Update);
           
          -   --  #1A NAME="AFU_57"#2|
          -   procedure Immediate_Update_Mode
          -     (Win  : in Window := Standard_Window;
          -      Mode : in Boolean := False);
          +   --  #1A NAME="AFU_58"#2|
          +   procedure Immediate_Update_Mode
          +     (Win  : in Window := Standard_Window;
          +      Mode : in Boolean := False);
              --  AKA: immedok()
          -   pragma Inline (Immediate_Update_Mode);
          +   pragma Inline (Immediate_Update_Mode);
           
          -   --  #1A NAME="AFU_58"#2|
          -   procedure Allow_Scrolling
          -     (Win  : in Window := Standard_Window;
          -      Mode : in Boolean := False);
          +   --  #1A NAME="AFU_59"#2|
          +   procedure Allow_Scrolling
          +     (Win  : in Window := Standard_Window;
          +      Mode : in Boolean := False);
              --  AKA: scrollok()
          -   pragma Inline (Allow_Scrolling);
          +   pragma Inline (Allow_Scrolling);
           
          -   function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
          +   function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
              --  There is no such function in the C interface.
          -   pragma Inline (Scrolling_Allowed);
          +   pragma Inline (Scrolling_Allowed);
           
          -   --  #1A NAME="AFU_59"#2|
          -   procedure Set_Scroll_Region
          -     (Win         : in Window := Standard_Window;
          -      Top_Line    : in Line_Position;
          -      Bottom_Line : in Line_Position);
          +   --  #1A NAME="AFU_60"#2|
          +   procedure Set_Scroll_Region
          +     (Win         : in Window := Standard_Window;
          +      Top_Line    : in Line_Position;
          +      Bottom_Line : in Line_Position);
              --  AKA: wsetscrreg()
              --  AKA: setscrreg()
          -   pragma Inline (Set_Scroll_Region);
          +   pragma Inline (Set_Scroll_Region);
           
              --  |=====================================================================
              --  | Man page curs_refresh.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_60"#2|
          -   procedure Update_Screen;
          +   --  #1A NAME="AFU_61"#2|
          +   procedure Update_Screen;
              --  AKA: doupdate()
          -   pragma Inline (Update_Screen);
          +   pragma Inline (Update_Screen);
           
          -   --  #1A NAME="AFU_61"#2|
          -   procedure Refresh (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_62"#2|
          +   procedure Refresh (Win : in Window := Standard_Window);
              --  AKA: wrefresh()
              --  There is an overloaded Refresh for Pads.
              --  The Inline pragma appears there
              --  AKA: refresh()
           
          -   --  #1A NAME="AFU_62"#2|
          -   procedure Refresh_Without_Update
          -     (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_63"#2|
          +   procedure Refresh_Without_Update
          +     (Win : in Window := Standard_Window);
              --  AKA: wnoutrefresh()
              --  There is an overloaded Refresh_Without_Update for Pads.
              --  The Inline pragma appears there
           
          -   --  #1A NAME="AFU_63"#2|
          -   procedure Redraw (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_64"#2|
          +   procedure Redraw (Win : in Window := Standard_Window);
              --  AKA: redrawwin()
           
          -   --  #1A NAME="AFU_64"#2|
          -   procedure Redraw (Win        : in Window := Standard_Window;
          -                     Begin_Line : in Line_Position;
          -                     Line_Count : in Positive);
          +   --  #1A NAME="AFU_65"#2|
          +   procedure Redraw (Win        : in Window := Standard_Window;
          +                     Begin_Line : in Line_Position;
          +                     Line_Count : in Positive);
              --  AKA: wredrawln()
              pragma Inline (Redraw);
           
          @@ -1070,99 +1075,99 @@
              --  | Man page curs_clear.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_65"#2|
          -   procedure Erase (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_66"#2|
          +   procedure Erase (Win : in Window := Standard_Window);
              --  AKA: werase()
              --  AKA: erase()
          -   pragma Inline (Erase);
          +   pragma Inline (Erase);
           
          -   --  #1A NAME="AFU_66"#2|
          -   procedure Clear
          -     (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_67"#2|
          +   procedure Clear
          +     (Win : in Window := Standard_Window);
              --  AKA: wclear()
              --  AKA: clear()
          -   pragma Inline (Clear);
          +   pragma Inline (Clear);
           
          -   --  #1A NAME="AFU_67"#2|
          -   procedure Clear_To_End_Of_Screen
          -     (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_68"#2|
          +   procedure Clear_To_End_Of_Screen
          +     (Win : in Window := Standard_Window);
              --  AKA: wclrtobot()
              --  AKA: clrtobot()
          -   pragma Inline (Clear_To_End_Of_Screen);
          +   pragma Inline (Clear_To_End_Of_Screen);
           
          -   --  #1A NAME="AFU_68"#2|
          -   procedure Clear_To_End_Of_Line
          -     (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_69"#2|
          +   procedure Clear_To_End_Of_Line
          +     (Win : in Window := Standard_Window);
              --  AKA: wclrtoeol()
              --  AKA: clrtoeol()
          -   pragma Inline (Clear_To_End_Of_Line);
          +   pragma Inline (Clear_To_End_Of_Line);
           
              --  |=====================================================================
              --  | Man page curs_bkgd.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_69"#2|
          +   --  #1A NAME="AFU_70"#2|
              --  TODO: we could have Set_Background(Window; Character_Attribute_Set)
              --  because in C it is common to see bkgdset(A_BOLD) or
              --  bkgdset(COLOR_PAIR(n))
          -   procedure Set_Background
          -     (Win : in Window := Standard_Window;
          -      Ch  : in Attributed_Character);
          +   procedure Set_Background
          +     (Win : in Window := Standard_Window;
          +      Ch  : in Attributed_Character);
              --  AKA: wbkgdset()
              --  AKA: bkgdset()
          -   pragma Inline (Set_Background);
          +   pragma Inline (Set_Background);
           
          -   --  #1A NAME="AFU_70"#2|
          -   procedure Change_Background
          -     (Win : in Window := Standard_Window;
          -      Ch  : in Attributed_Character);
          +   --  #1A NAME="AFU_71"#2|
          +   procedure Change_Background
          +     (Win : in Window := Standard_Window;
          +      Ch  : in Attributed_Character);
              --  AKA: wbkgd()
              --  AKA: bkgd()
          -   pragma Inline (Change_Background);
          +   pragma Inline (Change_Background);
           
          -   --  #1A NAME="AFU_71"#2|
          +   --  #1A NAME="AFU_72"#2|
              --  ? wbkgdget is not listed in curs_bkgd, getbkgd is thpough.
          -   function Get_Background (Win : Window := Standard_Window)
          -     return Attributed_Character;
          +   function Get_Background (Win : Window := Standard_Window)
          +     return Attributed_Character;
              --  AKA: wbkgdget()
              --  AKA: bkgdget()
          -   pragma Inline (Get_Background);
          +   pragma Inline (Get_Background);
           
              --  |=====================================================================
              --  | Man page curs_touch.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_72"#2|
          -   procedure Untouch (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_73"#2|
          +   procedure Untouch (Win : in Window := Standard_Window);
              --  AKA: untouchwin()
          -   pragma Inline (Untouch);
          +   pragma Inline (Untouch);
           
          -   --  #1A NAME="AFU_73"#2|
          -   procedure Touch (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_74"#2|
          +   procedure Touch (Win : in Window := Standard_Window);
              --  AKA: touchwin()
           
          -   --  #1A NAME="AFU_74"#2|
          -   procedure Touch (Win   : in Window := Standard_Window;
          -                    Start : in Line_Position;
          -                    Count : in Positive);
          +   --  #1A NAME="AFU_75"#2|
          +   procedure Touch (Win   : in Window := Standard_Window;
          +                    Start : in Line_Position;
          +                    Count : in Positive);
              --  AKA: touchline()
              pragma Inline (Touch);
           
          -   --  #1A NAME="AFU_75"#2|
          -   procedure Change_Lines_Status (Win   : in Window := Standard_Window;
          -                                  Start : in Line_Position;
          -                                  Count : in Positive;
          -                                  State : in Boolean);
          +   --  #1A NAME="AFU_76"#2|
          +   procedure Change_Lines_Status (Win   : in Window := Standard_Window;
          +                                  Start : in Line_Position;
          +                                  Count : in Positive;
          +                                  State : in Boolean);
              --  AKA: wtouchln()
          -   pragma Inline (Change_Lines_Status);
          +   pragma Inline (Change_Lines_Status);
           
          -   --  #1A NAME="AFU_76"#2|
          -   function Is_Touched (Win  : Window := Standard_Window;
          -                        Line : Line_Position) return Boolean;
          +   --  #1A NAME="AFU_77"#2|
          +   function Is_Touched (Win  : Window := Standard_Window;
          +                        Line : Line_Position) return Boolean;
              --  AKA: is_linetouched()
           
          -   --  #1A NAME="AFU_77"#2|
          -   function Is_Touched (Win : Window := Standard_Window) return Boolean;
          +   --  #1A NAME="AFU_78"#2|
          +   function Is_Touched (Win : Window := Standard_Window) return Boolean;
              --  AKA: is_wintouched()
              pragma Inline (Is_Touched);
           
          @@ -1170,176 +1175,176 @@
              --  | Man page curs_overlay.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_78"#2|
          -   procedure Copy
          -     (Source_Window            : in Window;
          -      Destination_Window       : in Window;
          -      Source_Top_Row           : in Line_Position;
          -      Source_Left_Column       : in Column_Position;
          -      Destination_Top_Row      : in Line_Position;
          -      Destination_Left_Column  : in Column_Position;
          -      Destination_Bottom_Row   : in Line_Position;
          -      Destination_Right_Column : in Column_Position;
          -      Non_Destructive_Mode     : in Boolean := True);
          +   --  #1A NAME="AFU_79"#2|
          +   procedure Copy
          +     (Source_Window            : in Window;
          +      Destination_Window       : in Window;
          +      Source_Top_Row           : in Line_Position;
          +      Source_Left_Column       : in Column_Position;
          +      Destination_Top_Row      : in Line_Position;
          +      Destination_Left_Column  : in Column_Position;
          +      Destination_Bottom_Row   : in Line_Position;
          +      Destination_Right_Column : in Column_Position;
          +      Non_Destructive_Mode     : in Boolean := True);
              --  AKA: copywin()
          -   pragma Inline (Copy);
          +   pragma Inline (Copy);
           
          -   --  #1A NAME="AFU_79"#2|
          -   procedure Overwrite (Source_Window      : in Window;
          -                        Destination_Window : in Window);
          +   --  #1A NAME="AFU_80"#2|
          +   procedure Overwrite (Source_Window      : in Window;
          +                        Destination_Window : in Window);
              --  AKA: overwrite()
          -   pragma Inline (Overwrite);
          +   pragma Inline (Overwrite);
           
          -   --  #1A NAME="AFU_80"#2|
          -   procedure Overlay (Source_Window      : in Window;
          -                      Destination_Window : in Window);
          +   --  #1A NAME="AFU_81"#2|
          +   procedure Overlay (Source_Window      : in Window;
          +                      Destination_Window : in Window);
              --  AKA: overlay()
          -   pragma Inline (Overlay);
          +   pragma Inline (Overlay);
           
              --  |=====================================================================
              --  | Man page curs_deleteln.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_81"#2|
          -   procedure Insert_Delete_Lines
          -     (Win   : in Window  := Standard_Window;
          -      Lines : in Integer := 1); --  default is to insert one line above
          +   --  #1A NAME="AFU_82"#2|
          +   procedure Insert_Delete_Lines
          +     (Win   : in Window  := Standard_Window;
          +      Lines : in Integer := 1); --  default is to insert one line above
              --  AKA: winsdelln()
              --  AKA: insdelln()
          -   pragma Inline (Insert_Delete_Lines);
          +   pragma Inline (Insert_Delete_Lines);
           
          -   --  #1A NAME="AFU_82"#2|
          -   procedure Delete_Line (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_83"#2|
          +   procedure Delete_Line (Win : in Window := Standard_Window);
              --  AKA: wdeleteln()
              --  AKA: deleteln()
          -   pragma Inline (Delete_Line);
          +   pragma Inline (Delete_Line);
           
          -   --  #1A NAME="AFU_83"#2|
          -   procedure Insert_Line (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_84"#2|
          +   procedure Insert_Line (Win : in Window := Standard_Window);
              --  AKA: winsertln()
              --  AKA: insertln()
          -   pragma Inline (Insert_Line);
          +   pragma Inline (Insert_Line);
           
              --  |=====================================================================
              --  | Man page curs_getyx.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_84"#2|
          -   procedure Get_Size
          -     (Win               : in Window := Standard_Window;
          -      Number_Of_Lines   : out Line_Count;
          -      Number_Of_Columns : out Column_Count);
          +   --  #1A NAME="AFU_85"#2|
          +   procedure Get_Size
          +     (Win               : in Window := Standard_Window;
          +      Number_Of_Lines   : out Line_Count;
          +      Number_Of_Columns : out Column_Count);
              --  AKA: getmaxyx()
          -   pragma Inline (Get_Size);
          +   pragma Inline (Get_Size);
           
          -   --  #1A NAME="AFU_85"#2|
          -   procedure Get_Window_Position
          -     (Win             : in Window := Standard_Window;
          -      Top_Left_Line   : out Line_Position;
          -      Top_Left_Column : out Column_Position);
          +   --  #1A NAME="AFU_86"#2|
          +   procedure Get_Window_Position
          +     (Win             : in Window := Standard_Window;
          +      Top_Left_Line   : out Line_Position;
          +      Top_Left_Column : out Column_Position);
              --  AKA: getbegyx()
          -   pragma Inline (Get_Window_Position);
          +   pragma Inline (Get_Window_Position);
           
          -   --  #1A NAME="AFU_86"#2|
          -   procedure Get_Cursor_Position
          -     (Win    : in  Window := Standard_Window;
          -      Line   : out Line_Position;
          -      Column : out Column_Position);
          +   --  #1A NAME="AFU_87"#2|
          +   procedure Get_Cursor_Position
          +     (Win    : in  Window := Standard_Window;
          +      Line   : out Line_Position;
          +      Column : out Column_Position);
              --  AKA: getyx()
          -   pragma Inline (Get_Cursor_Position);
          +   pragma Inline (Get_Cursor_Position);
           
          -   --  #1A NAME="AFU_87"#2|
          -   procedure Get_Origin_Relative_To_Parent
          -     (Win                : in  Window;
          -      Top_Left_Line      : out Line_Position;
          -      Top_Left_Column    : out Column_Position;
          -      Is_Not_A_Subwindow : out Boolean);
          +   --  #1A NAME="AFU_88"#2|
          +   procedure Get_Origin_Relative_To_Parent
          +     (Win                : in  Window;
          +      Top_Left_Line      : out Line_Position;
          +      Top_Left_Column    : out Column_Position;
          +      Is_Not_A_Subwindow : out Boolean);
              --  AKA: getparyx()
              --  Instead of placing -1 in the coordinates as return, we use a boolean
              --  to return the info that the window has no parent.
          -   pragma Inline (Get_Origin_Relative_To_Parent);
          +   pragma Inline (Get_Origin_Relative_To_Parent);
           
              --  |=====================================================================
              --  | Man page curs_pad.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_88"#2|
          -   function New_Pad (Lines   : Line_Count;
          -                     Columns : Column_Count) return Window;
          +   --  #1A NAME="AFU_89"#2|
          +   function New_Pad (Lines   : Line_Count;
          +                     Columns : Column_Count) return Window;
              --  AKA: newpad()
          -   pragma Inline (New_Pad);
          +   pragma Inline (New_Pad);
           
          -   --  #1A NAME="AFU_89"#2|
          -   function Sub_Pad
          -     (Pad                   : Window;
          -      Number_Of_Lines       : Line_Count;
          -      Number_Of_Columns     : Column_Count;
          -      First_Line_Position   : Line_Position;
          -      First_Column_Position : Column_Position) return Window;
          +   --  #1A NAME="AFU_90"#2|
          +   function Sub_Pad
          +     (Pad                   : Window;
          +      Number_Of_Lines       : Line_Count;
          +      Number_Of_Columns     : Column_Count;
          +      First_Line_Position   : Line_Position;
          +      First_Column_Position : Column_Position) return Window;
              --  AKA: subpad()
          -   pragma Inline (Sub_Pad);
          +   pragma Inline (Sub_Pad);
           
          -   --  #1A NAME="AFU_90"#2|
          -   procedure Refresh
          -     (Pad                      : in Window;
          -      Source_Top_Row           : in Line_Position;
          -      Source_Left_Column       : in Column_Position;
          -      Destination_Top_Row      : in Line_Position;
          -      Destination_Left_Column  : in Column_Position;
          -      Destination_Bottom_Row   : in Line_Position;
          -      Destination_Right_Column : in Column_Position);
          +   --  #1A NAME="AFU_91"#2|
          +   procedure Refresh
          +     (Pad                      : in Window;
          +      Source_Top_Row           : in Line_Position;
          +      Source_Left_Column       : in Column_Position;
          +      Destination_Top_Row      : in Line_Position;
          +      Destination_Left_Column  : in Column_Position;
          +      Destination_Bottom_Row   : in Line_Position;
          +      Destination_Right_Column : in Column_Position);
              --  AKA: prefresh()
              pragma Inline (Refresh);
           
          -   --  #1A NAME="AFU_91"#2|
          -   procedure Refresh_Without_Update
          -     (Pad                      : in Window;
          -      Source_Top_Row           : in Line_Position;
          -      Source_Left_Column       : in Column_Position;
          -      Destination_Top_Row      : in Line_Position;
          -      Destination_Left_Column  : in Column_Position;
          -      Destination_Bottom_Row   : in Line_Position;
          -      Destination_Right_Column : in Column_Position);
          +   --  #1A NAME="AFU_92"#2|
          +   procedure Refresh_Without_Update
          +     (Pad                      : in Window;
          +      Source_Top_Row           : in Line_Position;
          +      Source_Left_Column       : in Column_Position;
          +      Destination_Top_Row      : in Line_Position;
          +      Destination_Left_Column  : in Column_Position;
          +      Destination_Bottom_Row   : in Line_Position;
          +      Destination_Right_Column : in Column_Position);
              --  AKA: pnoutrefresh()
              pragma Inline (Refresh_Without_Update);
           
          -   --  #1A NAME="AFU_92"#2|
          -   procedure Add_Character_To_Pad_And_Echo_It
          -     (Pad : in Window;
          -      Ch  : in Attributed_Character);
          +   --  #1A NAME="AFU_93"#2|
          +   procedure Add_Character_To_Pad_And_Echo_It
          +     (Pad : in Window;
          +      Ch  : in Attributed_Character);
              --  AKA: pechochar()
           
          -   procedure Add_Character_To_Pad_And_Echo_It
          -     (Pad : in Window;
          -      Ch  : in Character);
          +   procedure Add_Character_To_Pad_And_Echo_It
          +     (Pad : in Window;
          +      Ch  : in Character);
              pragma Inline (Add_Character_To_Pad_And_Echo_It);
           
              --  |=====================================================================
              --  | Man page curs_scroll.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_93"#2|
          -   procedure Scroll (Win    : in Window  := Standard_Window;
          -                     Amount : in Integer := 1);
          +   --  #1A NAME="AFU_94"#2|
          +   procedure Scroll (Win    : in Window  := Standard_Window;
          +                     Amount : in Integer := 1);
              --  AKA: wscrl()
              --  AKA: scroll()
              --  AKA: scrl()
          -   pragma Inline (Scroll);
          +   pragma Inline (Scroll);
           
              --  |=====================================================================
              --  | Man page curs_delch.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_94"#2|
          -   procedure Delete_Character (Win : in Window := Standard_Window);
          +   --  #1A NAME="AFU_95"#2|
          +   procedure Delete_Character (Win : in Window := Standard_Window);
              --  AKA: wdelch()
              --  AKA: delch()
           
          -   --  #1A NAME="AFU_95"#2|
          -   procedure Delete_Character
          -     (Win    : in Window := Standard_Window;
          -      Line   : in Line_Position;
          -      Column : in Column_Position);
          +   --  #1A NAME="AFU_96"#2|
          +   procedure Delete_Character
          +     (Win    : in Window := Standard_Window;
          +      Line   : in Line_Position;
          +      Column : in Column_Position);
              --  AKA: mvwdelch()
              --  AKA: mvdelch()
              pragma Inline (Delete_Character);
          @@ -1348,17 +1353,17 @@
              --  | Man page curs_inch.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_96"#2|
          -   function Peek (Win : Window := Standard_Window)
          -     return Attributed_Character;
          +   --  #1A NAME="AFU_97"#2|
          +   function Peek (Win : Window := Standard_Window)
          +     return Attributed_Character;
              --  AKA: inch()
              --  AKA: winch()
           
          -   --  #1A NAME="AFU_97"#2|
          -   function Peek
          -     (Win    : Window := Standard_Window;
          -      Line   : Line_Position;
          -      Column : Column_Position) return Attributed_Character;
          +   --  #1A NAME="AFU_98"#2|
          +   function Peek
          +     (Win    : Window := Standard_Window;
          +      Line   : Line_Position;
          +      Column : Column_Position) return Attributed_Character;
              --  AKA: mvwinch()
              --  AKA: mvinch()
              --  More Peek's follow, pragma Inline appears later.
          @@ -1367,17 +1372,17 @@
              --  | Man page curs_insch.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_98"#2|
          -   procedure Insert (Win : in Window := Standard_Window;
          -                     Ch  : in Attributed_Character);
          +   --  #1A NAME="AFU_99"#2|
          +   procedure Insert (Win : in Window := Standard_Window;
          +                     Ch  : in Attributed_Character);
              --  AKA: winsch()
              --  AKA: insch()
           
          -   --  #1A NAME="AFU_99"#2|
          -   procedure Insert (Win    : in Window := Standard_Window;
          -                     Line   : in Line_Position;
          -                     Column : in Column_Position;
          -                     Ch     : in Attributed_Character);
          +   --  #1A NAME="AFU_100"#2|
          +   procedure Insert (Win    : in Window := Standard_Window;
          +                     Line   : in Line_Position;
          +                     Column : in Column_Position;
          +                     Ch     : in Attributed_Character);
              --  AKA: mvwinsch()
              --  AKA: mvinsch()
           
          @@ -1385,21 +1390,21 @@
              --  | Man page curs_insstr.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_100"#2|
          -   procedure Insert (Win : in Window := Standard_Window;
          -                     Str : in String;
          -                     Len : in Integer := -1);
          +   --  #1A NAME="AFU_101"#2|
          +   procedure Insert (Win : in Window := Standard_Window;
          +                     Str : in String;
          +                     Len : in Integer := -1);
              --  AKA: winsnstr()
              --  AKA: winsstr()
              --  AKA: insnstr()
              --  AKA: insstr()
           
          -   --  #1A NAME="AFU_101"#2|
          -   procedure Insert (Win    : in Window := Standard_Window;
          -                     Line   : in Line_Position;
          -                     Column : in Column_Position;
          -                     Str    : in String;
          -                     Len    : in Integer := -1);
          +   --  #1A NAME="AFU_102"#2|
          +   procedure Insert (Win    : in Window := Standard_Window;
          +                     Line   : in Line_Position;
          +                     Column : in Column_Position;
          +                     Str    : in String;
          +                     Len    : in Integer := -1);
              --  AKA: mvwinsnstr()
              --  AKA: mvwinsstr()
              --  AKA: mvinsnstr()
          @@ -1410,21 +1415,21 @@
              --  | Man page curs_instr.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_102"#2|
          -   procedure Peek (Win : in  Window := Standard_Window;
          -                   Str : out String;
          -                   Len : in  Integer := -1);
          +   --  #1A NAME="AFU_103"#2|
          +   procedure Peek (Win : in  Window := Standard_Window;
          +                   Str : out String;
          +                   Len : in  Integer := -1);
              --  AKA: winnstr()
              --  AKA: winstr()
              --  AKA: innstr()
              --  AKA: instr()
           
          -   --  #1A NAME="AFU_103"#2|
          -   procedure Peek (Win    : in  Window := Standard_Window;
          -                   Line   : in  Line_Position;
          -                   Column : in  Column_Position;
          -                   Str    : out String;
          -                   Len    : in  Integer := -1);
          +   --  #1A NAME="AFU_104"#2|
          +   procedure Peek (Win    : in  Window := Standard_Window;
          +                   Line   : in  Line_Position;
          +                   Column : in  Column_Position;
          +                   Str    : out String;
          +                   Len    : in  Integer := -1);
              --  AKA: mvwinnstr()
              --  AKA: mvwinstr()
              --  AKA: mvinnstr()
          @@ -1434,21 +1439,21 @@
              --  | Man page curs_inchstr.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_104"#2|
          -   procedure Peek (Win : in  Window := Standard_Window;
          -                   Str : out Attributed_String;
          -                   Len : in  Integer := -1);
          +   --  #1A NAME="AFU_105"#2|
          +   procedure Peek (Win : in  Window := Standard_Window;
          +                   Str : out Attributed_String;
          +                   Len : in  Integer := -1);
              --  AKA: winchnstr()
              --  AKA: winchstr()
              --  AKA: inchnstr()
              --  AKA: inchstr()
           
          -   --  #1A NAME="AFU_105"#2|
          -   procedure Peek (Win    : in  Window := Standard_Window;
          -                   Line   : in  Line_Position;
          -                   Column : in  Column_Position;
          -                   Str    : out Attributed_String;
          -                   Len    : in  Integer := -1);
          +   --  #1A NAME="AFU_106"#2|
          +   procedure Peek (Win    : in  Window := Standard_Window;
          +                   Line   : in  Line_Position;
          +                   Column : in  Column_Position;
          +                   Str    : out Attributed_String;
          +                   Len    : in  Integer := -1);
              --  AKA: mvwinchnstr()
              --  AKA: mvwinchstr()
              --  AKA: mvinchnstr()
          @@ -1459,10 +1464,10 @@
              --  | Man page curs_getstr.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_106"#2|
          -   procedure Get (Win : in  Window := Standard_Window;
          -                  Str : out String;
          -                  Len : in  Integer := -1);
          +   --  #1A NAME="AFU_107"#2|
          +   procedure Get (Win : in  Window := Standard_Window;
          +                  Str : out String;
          +                  Len : in  Integer := -1);
              --  AKA: wgetnstr()
              --  AKA: wgetstr()
              --  AKA: getnstr()
          @@ -1470,12 +1475,12 @@
              --  actually getstr is not supported because that results in buffer
              --  overflows.
           
          -   --  #1A NAME="AFU_107"#2|
          -   procedure Get (Win    : in  Window := Standard_Window;
          -                  Line   : in  Line_Position;
          -                  Column : in  Column_Position;
          -                  Str    : out String;
          -                  Len    : in  Integer := -1);
          +   --  #1A NAME="AFU_108"#2|
          +   procedure Get (Win    : in  Window := Standard_Window;
          +                  Line   : in  Line_Position;
          +                  Column : in  Column_Position;
          +                  Str    : out String;
          +                  Len    : in  Integer := -1);
              --  AKA: mvwgetnstr()
              --  AKA: mvwgetstr()
              --  AKA: mvgetnstr()
          @@ -1488,90 +1493,90 @@
           
              --  Not Implemented: slk_attr_on, slk_attr_off, slk_attr_set
           
          -   type Soft_Label_Key_Format is (Three_Two_Three,
          -                                  Four_Four,
          -                                  PC_Style,              --  ncurses specific
          -                                  PC_Style_With_Index);  --  "
          -   type Label_Number is new Positive range 1 .. 12;
          -   type Label_Justification is (Left, Centered, Right);
          +   type Soft_Label_Key_Format is (Three_Two_Three,
          +                                  Four_Four,
          +                                  PC_Style,              --  ncurses specific
          +                                  PC_Style_With_Index);  --  "
          +   type Label_Number is new Positive range 1 .. 12;
          +   type Label_Justification is (Left, Centered, Right);
           
          -   --  #1A NAME="AFU_108"#2|
          -   procedure Init_Soft_Label_Keys
          -     (Format : in Soft_Label_Key_Format := Three_Two_Three);
          +   --  #1A NAME="AFU_109"#2|
          +   procedure Init_Soft_Label_Keys
          +     (Format : in Soft_Label_Key_Format := Three_Two_Three);
              --  AKA: slk_init()
          -   pragma Inline (Init_Soft_Label_Keys);
          +   pragma Inline (Init_Soft_Label_Keys);
           
          -   --  #1A NAME="AFU_109"#2|
          -   procedure Set_Soft_Label_Key (Label : in Label_Number;
          -                                 Text  : in String;
          -                                 Fmt   : in Label_Justification := Left);
          +   --  #1A NAME="AFU_110"#2|
          +   procedure Set_Soft_Label_Key (Label : in Label_Number;
          +                                 Text  : in String;
          +                                 Fmt   : in Label_Justification := Left);
              --  AKA: slk_set()
              --  We don't inline this procedure
           
          -   --  #1A NAME="AFU_110"#2|
          -   procedure Refresh_Soft_Label_Keys;
          +   --  #1A NAME="AFU_111"#2|
          +   procedure Refresh_Soft_Label_Keys;
              --  AKA: slk_refresh()
          -   pragma Inline (Refresh_Soft_Label_Keys);
          +   pragma Inline (Refresh_Soft_Label_Keys);
           
          -   --  #1A NAME="AFU_111"#2|
          -   procedure Refresh_Soft_Label_Keys_Without_Update;
          +   --  #1A NAME="AFU_112"#2|
          +   procedure Refresh_Soft_Label_Keys_Without_Update;
              --  AKA: slk_noutrefresh()
          -   pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
          +   pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
           
          -   --  #1A NAME="AFU_112"#2|
          -   procedure Get_Soft_Label_Key (Label : in Label_Number;
          -                                 Text  : out String);
          +   --  #1A NAME="AFU_113"#2|
          +   procedure Get_Soft_Label_Key (Label : in Label_Number;
          +                                 Text  : out String);
              --  AKA: slk_label()
           
          -   --  #1A NAME="AFU_113"#2|
          -   function Get_Soft_Label_Key (Label : in Label_Number) return String;
          +   --  #1A NAME="AFU_114"#2|
          +   function Get_Soft_Label_Key (Label : in Label_Number) return String;
              --  AKA: slk_label()
              --  Same as function
              pragma Inline (Get_Soft_Label_Key);
           
          -   --  #1A NAME="AFU_114"#2|
          -   procedure Clear_Soft_Label_Keys;
          +   --  #1A NAME="AFU_115"#2|
          +   procedure Clear_Soft_Label_Keys;
              --  AKA: slk_clear()
          -   pragma Inline (Clear_Soft_Label_Keys);
          +   pragma Inline (Clear_Soft_Label_Keys);
           
          -   --  #1A NAME="AFU_115"#2|
          -   procedure Restore_Soft_Label_Keys;
          +   --  #1A NAME="AFU_116"#2|
          +   procedure Restore_Soft_Label_Keys;
              --  AKA: slk_restore()
          -   pragma Inline (Restore_Soft_Label_Keys);
          +   pragma Inline (Restore_Soft_Label_Keys);
           
          -   --  #1A NAME="AFU_116"#2|
          -   procedure Touch_Soft_Label_Keys;
          +   --  #1A NAME="AFU_117"#2|
          +   procedure Touch_Soft_Label_Keys;
              --  AKA: slk_touch()
          -   pragma Inline (Touch_Soft_Label_Keys);
          +   pragma Inline (Touch_Soft_Label_Keys);
           
          -   --  #1A NAME="AFU_117"#2|
          -   procedure Switch_Soft_Label_Key_Attributes
          -     (Attr : in Character_Attribute_Set;
          -      On   : in Boolean := True);
          +   --  #1A NAME="AFU_118"#2|
          +   procedure Switch_Soft_Label_Key_Attributes
          +     (Attr : in Character_Attribute_Set;
          +      On   : in Boolean := True);
              --  AKA: slk_attron()
              --  AKA: slk_attroff()
          -   pragma Inline (Switch_Soft_Label_Key_Attributes);
          +   pragma Inline (Switch_Soft_Label_Key_Attributes);
           
          -   --  #1A NAME="AFU_118"#2|
          -   procedure Set_Soft_Label_Key_Attributes
          -     (Attr  : in Character_Attribute_Set := Normal_Video;
          -      Color : in Color_Pair := Color_Pair'First);
          +   --  #1A NAME="AFU_119"#2|
          +   procedure Set_Soft_Label_Key_Attributes
          +     (Attr  : in Character_Attribute_Set := Normal_Video;
          +      Color : in Color_Pair := Color_Pair'First);
              --  AKA: slk_attrset()
          -   pragma Inline (Set_Soft_Label_Key_Attributes);
          +   pragma Inline (Set_Soft_Label_Key_Attributes);
           
          -   --  #1A NAME="AFU_119"#2|
          -   function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
          +   --  #1A NAME="AFU_120"#2|
          +   function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
              --  AKA: slk_attr()
           
          -   --  #1A NAME="AFU_120"#2|
          -   function Get_Soft_Label_Key_Attributes return Color_Pair;
          +   --  #1A NAME="AFU_121"#2|
          +   function Get_Soft_Label_Key_Attributes return Color_Pair;
              --  AKA: slk_attr()
              pragma Inline (Get_Soft_Label_Key_Attributes);
           
          -   --  #1A NAME="AFU_121"#2|
          -   procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
          +   --  #1A NAME="AFU_122"#2|
          +   procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
              --  AKA: slk_color()
          -   pragma Inline (Set_Soft_Label_Key_Color);
          +   pragma Inline (Set_Soft_Label_Key_Color);
           
              --  |=====================================================================
              --  | Man page keybound.3x
          @@ -1582,21 +1587,21 @@
              --  | Man page keyok.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_122"#2|
          -   procedure Enable_Key (Key    : in Special_Key_Code;
          -                         Enable : in Boolean := True);
          +   --  #1A NAME="AFU_123"#2|
          +   procedure Enable_Key (Key    : in Special_Key_Code;
          +                         Enable : in Boolean := True);
              --  AKA: keyok()
          -   pragma Inline (Enable_Key);
          +   pragma Inline (Enable_Key);
           
              --  |=====================================================================
              --  | Man page define_key.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_123"#2|
          -   procedure Define_Key (Definition : in String;
          -                         Key        : in Special_Key_Code);
          +   --  #1A NAME="AFU_124"#2|
          +   procedure Define_Key (Definition : in String;
          +                         Key        : in Special_Key_Code);
              --  AKA: define_key()
          -   pragma Inline (Define_Key);
          +   pragma Inline (Define_Key);
           
              --  |=====================================================================
              --  | Man page curs_util.3x
          @@ -1606,89 +1611,89 @@
              --  | putwin, getwin are in the child package PutWin
              --
           
          -   --  #1A NAME="AFU_124"#2|
          -   procedure Key_Name (Key  : in  Real_Key_Code;
          -                       Name : out String);
          +   --  #1A NAME="AFU_125"#2|
          +   procedure Key_Name (Key  : in  Real_Key_Code;
          +                       Name : out String);
              --  AKA: keyname()
              --  The external name for a real keystroke.
           
          -   --  #1A NAME="AFU_125"#2|
          -   function Key_Name (Key  : in  Real_Key_Code) return String;
          +   --  #1A NAME="AFU_126"#2|
          +   function Key_Name (Key  : in  Real_Key_Code) return String;
              --  AKA: keyname()
              --  Same as function
              --  We don't inline this routine
           
          -   --  #1A NAME="AFU_126"#2|
          -   procedure Un_Control (Ch  : in Attributed_Character;
          -                         Str : out String);
          +   --  #1A NAME="AFU_127"#2|
          +   procedure Un_Control (Ch  : in Attributed_Character;
          +                         Str : out String);
              --  AKA: unctrl()
           
          -   --  #1A NAME="AFU_127"#2|
          -   function Un_Control (Ch  : in Attributed_Character) return String;
          +   --  #1A NAME="AFU_128"#2|
          +   function Un_Control (Ch  : in Attributed_Character) return String;
              --  AKA: unctrl()
              --  Same as function
              pragma Inline (Un_Control);
           
          -   --  #1A NAME="AFU_128"#2|
          -   procedure Delay_Output (Msecs : in Natural);
          +   --  #1A NAME="AFU_129"#2|
          +   procedure Delay_Output (Msecs : in Natural);
              --  AKA: delay_output()
          -   pragma Inline (Delay_Output);
          +   pragma Inline (Delay_Output);
           
          -   --  #1A NAME="AFU_129"#2|
          -   procedure Flush_Input;
          +   --  #1A NAME="AFU_130"#2|
          +   procedure Flush_Input;
              --  AKA: flushinp()
          -   pragma Inline (Flush_Input);
          +   pragma Inline (Flush_Input);
           
              --  |=====================================================================
              --  | Man page curs_termattrs.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_130"#2|
          -   function Baudrate return Natural;
          +   --  #1A NAME="AFU_131"#2|
          +   function Baudrate return Natural;
              --  AKA: baudrate()
          -   pragma Inline (Baudrate);
          +   pragma Inline (Baudrate);
           
          -   --  #1A NAME="AFU_131"#2|
          -   function Erase_Character return Character;
          +   --  #1A NAME="AFU_132"#2|
          +   function Erase_Character return Character;
              --  AKA: erasechar()
          -   pragma Inline (Erase_Character);
          +   pragma Inline (Erase_Character);
           
          -   --  #1A NAME="AFU_132"#2|
          -   function Kill_Character return Character;
          +   --  #1A NAME="AFU_133"#2|
          +   function Kill_Character return Character;
              --  AKA: killchar()
          -   pragma Inline (Kill_Character);
          +   pragma Inline (Kill_Character);
           
          -   --  #1A NAME="AFU_133"#2|
          -   function Has_Insert_Character return Boolean;
          +   --  #1A NAME="AFU_134"#2|
          +   function Has_Insert_Character return Boolean;
              --  AKA: has_ic()
          -   pragma Inline (Has_Insert_Character);
          +   pragma Inline (Has_Insert_Character);
           
          -   --  #1A NAME="AFU_134"#2|
          -   function Has_Insert_Line return Boolean;
          +   --  #1A NAME="AFU_135"#2|
          +   function Has_Insert_Line return Boolean;
              --  AKA: has_il()
          -   pragma Inline (Has_Insert_Line);
          +   pragma Inline (Has_Insert_Line);
           
          -   --  #1A NAME="AFU_135"#2|
          -   function Supported_Attributes return Character_Attribute_Set;
          +   --  #1A NAME="AFU_136"#2|
          +   function Supported_Attributes return Character_Attribute_Set;
              --  AKA: termattrs()
          -   pragma Inline (Supported_Attributes);
          +   pragma Inline (Supported_Attributes);
           
          -   --  #1A NAME="AFU_136"#2|
          -   procedure Long_Name (Name : out String);
          +   --  #1A NAME="AFU_137"#2|
          +   procedure Long_Name (Name : out String);
              --  AKA: longname()
           
          -   --  #1A NAME="AFU_137"#2|
          -   function Long_Name return String;
          +   --  #1A NAME="AFU_138"#2|
          +   function Long_Name return String;
              --  AKA: longname()
              --  Same as function
              pragma Inline (Long_Name);
           
          -   --  #1A NAME="AFU_138"#2|
          -   procedure Terminal_Name (Name : out String);
          +   --  #1A NAME="AFU_139"#2|
          +   procedure Terminal_Name (Name : out String);
              --  AKA: termname()
           
          -   --  #1A NAME="AFU_139"#2|
          -   function Terminal_Name return String;
          +   --  #1A NAME="AFU_140"#2|
          +   function Terminal_Name return String;
              --  AKA: termname()
              --  Same as function
              pragma Inline (Terminal_Name);
          @@ -1703,119 +1708,119 @@
              --  In C you often see something like c = c | COLOR_PAIR(n);
              --  This is equivalent to c.Color := n;
           
          -   --  #1A NAME="AFU_140"#2|
          -   procedure Start_Color;
          +   --  #1A NAME="AFU_141"#2|
          +   procedure Start_Color;
              --  AKA: start_color()
              pragma Import (C, Start_Color, "start_color");
           
          -   --  #1A NAME="AFU_141"#2|
          -   procedure Init_Pair (Pair : in Redefinable_Color_Pair;
          -                        Fore : in Color_Number;
          -                        Back : in Color_Number);
          +   --  #1A NAME="AFU_142"#2|
          +   procedure Init_Pair (Pair : in Redefinable_Color_Pair;
          +                        Fore : in Color_Number;
          +                        Back : in Color_Number);
              --  AKA: init_pair()
          -   pragma Inline (Init_Pair);
          +   pragma Inline (Init_Pair);
           
          -   --  #1A NAME="AFU_142"#2|
          -   procedure Pair_Content (Pair : in Color_Pair;
          -                           Fore : out Color_Number;
          -                           Back : out Color_Number);
          +   --  #1A NAME="AFU_143"#2|
          +   procedure Pair_Content (Pair : in Color_Pair;
          +                           Fore : out Color_Number;
          +                           Back : out Color_Number);
              --  AKA: pair_content()
          -   pragma Inline (Pair_Content);
          +   pragma Inline (Pair_Content);
           
          -   --  #1A NAME="AFU_143"#2|
          -   function Has_Colors return Boolean;
          +   --  #1A NAME="AFU_144"#2|
          +   function Has_Colors return Boolean;
              --  AKA: has_colors()
          -   pragma Inline (Has_Colors);
          +   pragma Inline (Has_Colors);
           
          -   --  #1A NAME="AFU_144"#2|
          -   procedure Init_Color (Color : in Color_Number;
          -                         Red   : in RGB_Value;
          -                         Green : in RGB_Value;
          -                         Blue  : in RGB_Value);
          +   --  #1A NAME="AFU_145"#2|
          +   procedure Init_Color (Color : in Color_Number;
          +                         Red   : in RGB_Value;
          +                         Green : in RGB_Value;
          +                         Blue  : in RGB_Value);
              --  AKA: init_color()
          -   pragma Inline (Init_Color);
          +   pragma Inline (Init_Color);
           
          -   --  #1A NAME="AFU_145"#2|
          -   function Can_Change_Color return Boolean;
          +   --  #1A NAME="AFU_146"#2|
          +   function Can_Change_Color return Boolean;
              --  AKA: can_change_color()
          -   pragma Inline (Can_Change_Color);
          +   pragma Inline (Can_Change_Color);
           
          -   --  #1A NAME="AFU_146"#2|
          -   procedure Color_Content (Color : in  Color_Number;
          -                            Red   : out RGB_Value;
          -                            Green : out RGB_Value;
          -                            Blue  : out RGB_Value);
          +   --  #1A NAME="AFU_147"#2|
          +   procedure Color_Content (Color : in  Color_Number;
          +                            Red   : out RGB_Value;
          +                            Green : out RGB_Value;
          +                            Blue  : out RGB_Value);
              --  AKA: color_content()
          -   pragma Inline (Color_Content);
          +   pragma Inline (Color_Content);
           
              --  |=====================================================================
              --  | Man page curs_kernel.3x
              --  |=====================================================================
              --  | Not implemented: getsyx, setsyx
              --
          -   type Curses_Mode is (Curses, Shell);
          +   type Curses_Mode is (Curses, Shell);
           
          -   --  #1A NAME="AFU_147"#2|
          -   procedure Save_Curses_Mode (Mode : in Curses_Mode);
          +   --  #1A NAME="AFU_148"#2|
          +   procedure Save_Curses_Mode (Mode : in Curses_Mode);
              --  AKA: def_prog_mode()
              --  AKA: def_shell_mode()
          -   pragma Inline (Save_Curses_Mode);
          +   pragma Inline (Save_Curses_Mode);
           
          -   --  #1A NAME="AFU_148"#2|
          -   procedure Reset_Curses_Mode (Mode : in Curses_Mode);
          +   --  #1A NAME="AFU_149"#2|
          +   procedure Reset_Curses_Mode (Mode : in Curses_Mode);
              --  AKA: reset_prog_mode()
              --  AKA: reset_shell_mode()
          -   pragma Inline (Reset_Curses_Mode);
          +   pragma Inline (Reset_Curses_Mode);
           
          -   --  #1A NAME="AFU_149"#2|
          -   procedure Save_Terminal_State;
          +   --  #1A NAME="AFU_150"#2|
          +   procedure Save_Terminal_State;
              --  AKA: savetty()
          -   pragma Inline (Save_Terminal_State);
          +   pragma Inline (Save_Terminal_State);
           
          -   --  #1A NAME="AFU_150"#2|
          -   procedure Reset_Terminal_State;
          +   --  #1A NAME="AFU_151"#2|
          +   procedure Reset_Terminal_State;
              --  AKA: resetty();
          -   pragma Inline (Reset_Terminal_State);
          +   pragma Inline (Reset_Terminal_State);
           
          -   type Stdscr_Init_Proc is access
          -      function (Win     : Window;
          -                Columns : Column_Count) return Integer;
          -   pragma Convention (C, Stdscr_Init_Proc);
          +   type Stdscr_Init_Proc is access
          +      function (Win     : Window;
          +                Columns : Column_Count) return Integer;
          +   pragma Convention (C, Stdscr_Init_Proc);
              --  N.B.: the return value is actually ignored, but it seems to be
              --        a good practice to return 0 if you think all went fine
              --        and -1 otherwise.
           
          -   --  #1A NAME="AFU_151"#2|
          -   procedure Rip_Off_Lines (Lines : in Integer;
          -                            Proc  : in Stdscr_Init_Proc);
          +   --  #1A NAME="AFU_152"#2|
          +   procedure Rip_Off_Lines (Lines : in Integer;
          +                            Proc  : in Stdscr_Init_Proc);
              --  AKA: ripoffline()
              --  N.B.: to be more precise, this uses a ncurses specific enhancement of
              --        ripoffline(), in which the Lines argument absolute value is the
              --        number of lines to be ripped of. The official ripoffline() only
              --        uses the sign of Lines to rip of a single line from bottom or top.
          -   pragma Inline (Rip_Off_Lines);
          +   pragma Inline (Rip_Off_Lines);
           
          -   type Cursor_Visibility is (Invisible, Normal, Very_Visible);
          +   type Cursor_Visibility is (Invisible, Normal, Very_Visible);
           
          -   --  #1A NAME="AFU_152"#2|
          -   procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
          +   --  #1A NAME="AFU_153"#2|
          +   procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
              --  AKA: curs_set()
          -   pragma Inline (Set_Cursor_Visibility);
          +   pragma Inline (Set_Cursor_Visibility);
           
          -   --  #1A NAME="AFU_153"#2|
          -   procedure Nap_Milli_Seconds (Ms : in Natural);
          +   --  #1A NAME="AFU_154"#2|
          +   procedure Nap_Milli_Seconds (Ms : in Natural);
              --  AKA: napms()
          -   pragma Inline (Nap_Milli_Seconds);
          +   pragma Inline (Nap_Milli_Seconds);
           
              --  |=====================================================================
              --  | Some useful helpers.
              --  |=====================================================================
          -   type Transform_Direction is (From_Screen, To_Screen);
          -   procedure Transform_Coordinates
          -     (W      : in Window := Standard_Window;
          -      Line   : in out Line_Position;
          -      Column : in out Column_Position;
          -      Dir    : in Transform_Direction := From_Screen);
          +   type Transform_Direction is (From_Screen, To_Screen);
          +   procedure Transform_Coordinates
          +     (W      : in Window := Standard_Window;
          +      Line   : in out Line_Position;
          +      Column : in out Column_Position;
          +      Dir    : in Transform_Direction := From_Screen);
              --  This procedure transforms screen coordinates into coordinates relative
              --  to the window and vice versa, depending on the Dir parameter.
              --  Screen coordinates are the position informations on the physical device.
          @@ -1824,51 +1829,59 @@
              --  We don't inline this procedure
           
              --  |=====================================================================
          -   --  | Man page dft_fgbg.3x
          +   --  | Man page default_colors.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_154"#2|
          -   procedure Use_Default_Colors;
          -   --  AKA: use_default_colors()
          -   pragma Inline (Use_Default_Colors);
          -
              --  #1A NAME="AFU_155"#2|
          -   procedure Assume_Default_Colors (Fore : Color_Number := Default_Color;
          -                                    Back : Color_Number := Default_Color);
          -   --  AKA: assume_default_colors()
          -   pragma Inline (Assume_Default_Colors);
          +   procedure Use_Default_Colors;
          +   --  AKA: use_default_colors()
          +   pragma Inline (Use_Default_Colors);
          +
          +   --  #1A NAME="AFU_156"#2|
          +   procedure Assume_Default_Colors (Fore : Color_Number := Default_Color;
          +                                    Back : Color_Number := Default_Color);
          +   --  AKA: assume_default_colors()
          +   pragma Inline (Assume_Default_Colors);
           
              --  |=====================================================================
              --  | Man page curs_extend.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_156"#2|
          -   function Curses_Version return String;
          +   --  #1A NAME="AFU_157"#2|
          +   function Curses_Version return String;
              --  AKA: curses_version()
           
          -   --  #1A NAME="AFU_157"#2|
          +   --  #1A NAME="AFU_158"#2|
              --  The returnvalue is the previous setting of the flag
          -   function Use_Extended_Names (Enable : Boolean) return Boolean;
          +   function Use_Extended_Names (Enable : Boolean) return Boolean;
              --  AKA: use_extended_names()
           
              --  |=====================================================================
          +   --  | Man page curs_trace.3x
          +   --  |=====================================================================
          +
          +   --  #1A NAME="AFU_159"#2|
          +   procedure Curses_Free_All;
          +   --  AKA: _nc_freeall()
          +
          +   --  |=====================================================================
              --  | Man page curs_scr_dump.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_158"#2|
          -   procedure Screen_Dump_To_File (Filename : in String);
          +   --  #1A NAME="AFU_160"#2|
          +   procedure Screen_Dump_To_File (Filename : in String);
              --  AKA: scr_dump()
           
          -   --  #1A NAME="AFU_159"#2|
          -   procedure Screen_Restore_From_File (Filename : in String);
          +   --  #1A NAME="AFU_161"#2|
          +   procedure Screen_Restore_From_File (Filename : in String);
              --  AKA: scr_restore()
           
          -   --  #1A NAME="AFU_160"#2|
          -   procedure Screen_Init_From_File (Filename : in String);
          +   --  #1A NAME="AFU_162"#2|
          +   procedure Screen_Init_From_File (Filename : in String);
              --  AKA: scr_init()
           
          -   --  #1A NAME="AFU_161"#2|
          -   procedure Screen_Set_File (Filename : in String);
          +   --  #1A NAME="AFU_163"#2|
          +   procedure Screen_Set_File (Filename : in String);
              --  AKA: scr_set()
           
              --  |=====================================================================
          @@ -1899,42 +1912,24 @@
              --  | Man page wresize.3x
              --  |=====================================================================
           
          -   --  #1A NAME="AFU_162"#2|
          -   procedure Resize (Win               : Window := Standard_Window;
          -                     Number_Of_Lines   : Line_Count;
          -                     Number_Of_Columns : Column_Count);
          +   --  #1A NAME="AFU_164"#2|
          +   procedure Resize (Win               : Window := Standard_Window;
          +                     Number_Of_Lines   : Line_Count;
          +                     Number_Of_Columns : Column_Count);
              --  AKA: wresize()
           
           private
          -   type Window is new System.Storage_Elements.Integer_Address;
          -   Null_Window : constant Window := 0;
          +   type Window is new System.Storage_Elements.Integer_Address;
          +   Null_Window : constant Window := 0;
           
              --  The next constants are generated and may be different on your
              --  architecture.
              --
          -   Offset_maxy        : constant Natural :=  2; --  short
          -   Offset_maxx        : constant Natural :=  3; --  short
          -   Offset_begy        : constant Natural :=  4; --  short
          -   Offset_begx        : constant Natural :=  5; --  short
          -   Offset_cury        : constant Natural :=  0; --  short
          -   Offset_curx        : constant Natural :=  1; --  short
          -   Offset_yoffset     : constant Natural := 36; --  short
          -   Offset_pary        : constant Natural := 13; --  int
          -   Offset_parx        : constant Natural := 12; --  int
          -   Offset_notimeout   : constant Natural := 24; --  char
          -   Offset_clear       : constant Natural := 25; --  char
          -   Offset_leaveok     : constant Natural := 26; --  char
          -   Offset_scroll      : constant Natural := 27; --  char
          -   Offset_idlok       : constant Natural := 28; --  char
          -   Offset_idcok       : constant Natural := 29; --  char
          -   Offset_immed       : constant Natural := 30; --  char
          -   Offset_sync        : constant Natural := 31; --  char
          -   Offset_use_keypad  : constant Natural := 32; --  char
          -   Sizeof_bool        : constant Natural :=  1; --  bool
          -   Offset_XY          : constant Natural :=  1; --  int
          +   Sizeof_bool        : constant Natural :=  1; --  bool
          +   Offset_XY          : constant Natural :=  1; --  int
           
          -   type Curses_Bool is mod 2 ** Interfaces.C.char'Size;
          -   Curses_Bool_False : constant Curses_Bool := 0;
          +   type Curses_Bool is mod 2 ** Interfaces.C.char'Size;
          +   Curses_Bool_False : constant Curses_Bool := 0;
           
          -end Terminal_Interface.Curses;
          +end Terminal_Interface.Curses;
           
          diff -Naur ncurses-5.6.orig/doc/html/man/captoinfo.1m.html ncurses-5.6/doc/html/man/captoinfo.1m.html --- ncurses-5.6.orig/doc/html/man/captoinfo.1m.html 2006-12-16 17:51:21.000000000 -0500 +++ ncurses-5.6/doc/html/man/captoinfo.1m.html 2007-12-21 00:02:35.000000000 -0500 @@ -28,7 +28,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: captoinfo.1m,v 1.20 2006/05/13 15:14:01 tom Exp @ + * @Id: captoinfo.1m,v 1.21 2006/12/24 18:07:15 tom Exp @ --> @@ -166,7 +166,7 @@ GG acs magic cookie count If the single-line capabilities occur in an entry, they - will automatically be composed into an acsc string. The + will automatically be composed into an acsc string. The double-line capabilities and GG are discarded with a warn- ing message. @@ -183,11 +183,11 @@ font2 s2ds font3 s3ds - Additionally, the AIX box1 capability will be automati- - cally translated to an acsc string. + Additionally, the AIX box1 capability will be automati- + cally translated to an acsc string. Hewlett-Packard's terminfo library supports two nonstan- - dard terminfo capabilities meml (memory lock) and memu + dard terminfo capabilities meml (memory lock) and memu (memory unlock). These will be discarded with a warning message. @@ -195,7 +195,7 @@

          NOTES

                  This utility is actually a link to tic(1m), running in  -I
          -       mode.  You can use other tic options such as -f and  -x.
          +       mode.  You can use other tic options such as -f and  -x.
           
                  The  trace  option isn't identical to SVr4's.  Under SVr4,
                  instead of following the -v with  a  trace  level  n,  you
          @@ -206,7 +206,7 @@
           

          SEE ALSO

                  infocmp(1m), curses(3x), terminfo(5)
           
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/clear.1.html ncurses-5.6/doc/html/man/clear.1.html --- ncurses-5.6.orig/doc/html/man/clear.1.html 2006-12-16 17:51:21.000000000 -0500 +++ ncurses-5.6/doc/html/man/clear.1.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: clear.1,v 1.5 2006/07/01 21:55:09 tom Exp @ + * @Id: clear.1,v 1.6 2006/12/24 18:07:53 tom Exp @ --> @@ -69,7 +69,7 @@

          SEE ALSO

                  tput(1), terminfo(5)
           
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_add_wch.3x.html ncurses-5.6/doc/html/man/curs_add_wch.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_add_wch.3x.html	2006-12-16 17:51:22.000000000 -0500
          +++ ncurses-5.6/doc/html/man/curs_add_wch.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_add_wch.3x,v 1.5 2006/12/02 17:02:35 tom Exp @
          +  * @Id: curs_add_wch.3x,v 1.6 2006/12/24 15:22:22 tom Exp @
           -->
           
           
          @@ -87,8 +87,7 @@
           
                  -    If  the  character  part  of  wch  is a tab, newline,
                       backspace or other control character, the  window  is
          -            updated  and  the  cursor  moves as if addch(3x) were
          -            called.
          +            updated and the cursor moves as if addch were called.
           
                  The echo_wchar function is functionally  equivalent  to  a
                  call to add_wch followed by a call to refresh.  Similarly,
          @@ -125,9 +124,8 @@
           
           

          SEE ALSO

          -       curses(3x),       curs_addch(3x),       curs_attr_get(3x),
          -       curs_clear(3x),    curs_outopts(3x),     curs_refresh(3x),
          -       putwc(3)
          +       curses(3x), curs_addch(3x), curs_attr(3x), curs_clear(3x),
          +       curs_outopts(3x), curs_refresh(3x), putwc(3)
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_addch.3x.html ncurses-5.6/doc/html/man/curs_addch.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_addch.3x.html	2006-12-16 17:51:22.000000000 -0500
          +++ ncurses-5.6/doc/html/man/curs_addch.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -28,7 +28,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_addch.3x,v 1.25 2006/12/02 17:02:22 tom Exp @
          +  * @Id: curs_addch.3x,v 1.26 2006/12/24 16:05:17 tom Exp @
           -->
           
           
          @@ -192,7 +192,7 @@
           

          SEE ALSO

                  curses(3x), curs_attr(3x), curs_clear(3x),  curs_inch(3x),
          -       curs_outopts(3x), curs_refresh(3x), putc(3S).
          +       curs_outopts(3x), curs_refresh(3x), putc(3).
           
                  Comparable  functions  in  the  wide-character  (ncursesw)
                  library are described in curs_add_wch(3x).
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_border.3x.html ncurses-5.6/doc/html/man/curs_border.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_border.3x.html	2006-09-23 16:43:00.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_border.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -1,7 +1,7 @@
           
           
           
           
          @@ -65,8 +65,8 @@
                  int whline(WINDOW *win, chtype ch, int n);
                  int vline(chtype ch, int n);
                  int wvline(WINDOW *win, chtype ch, int n);
          -       mvhline(int y, int x, chtype ch, int n);
          -       mvwhline(WINDOW *, int y, int x, chtype ch, int n);
          +       int mvhline(int y, int x, chtype ch, int n);
          +       int mvwhline(WINDOW *, int y, int x, chtype ch, int n);
                  int mvvline(int y, int x, chtype ch, int n);
                  int mvwvline(WINDOW *, int y, int x, chtype ch, int n);
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_extend.3x.html ncurses-5.6/doc/html/man/curs_extend.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_extend.3x.html	2006-09-23 16:43:01.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_extend.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -28,7 +28,7 @@
             * authorization.                                                           *
             ****************************************************************************
             * Author: Thomas E. Dickey 1999-on
          -  * @Id: curs_extend.3x,v 1.15 2006/02/25 21:04:43 tom Exp @
          +  * @Id: curs_extend.3x,v 1.17 2006/12/24 18:01:48 tom Exp @
           -->
           
           
          @@ -73,7 +73,7 @@
                  standard names which may be  compiled  into  the  terminfo
                  description, i.e., via the terminfo or termcap interfaces.
                  Normally these names are  available  for  use,  since  the
          -       essential  decision  is made by using the -x option of tic
          +       essential  decision  is made by using the -x option of tic
                  to compile extended terminal definitions.  However you can
                  disable  this  feature  to ensure compatibility with other
                  implementations of curses.
          @@ -90,8 +90,8 @@
           

          SEE ALSO

                  curs_getch(3x),       curs_mouse(3x),      curs_print(3x),
          -       default_colors(3x),     define_key(3x),      keybound(3x),
          -       keyok(3x), nofilter(3x), resizeterm(3x), wresize(3x).
          +       curs_util(3x),  default_colors(3x),  define_key(3x),  key-
          +       bound(3x), keyok(3x), resizeterm(3x), wresize(3x).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_getcchar.3x.html ncurses-5.6/doc/html/man/curs_getcchar.3x.html --- ncurses-5.6.orig/doc/html/man/curs_getcchar.3x.html 2006-09-23 16:43:01.000000000 -0400 +++ ncurses-5.6/doc/html/man/curs_getcchar.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_getcchar.3x,v 1.8 2006/07/15 22:51:07 wcmbrine Exp @ + * @Id: curs_getcchar.3x,v 1.10 2006/12/24 16:00:02 tom Exp @ --> @@ -136,8 +136,8 @@

          SEE ALSO

          -       Functions:   curses(3x),  wcwidth(3x),  curs_attr_get(3x),
          -       can_change_color(3x).
          +       Functions:   curs_attr(3x),   curs_color(3x),  curses(3x),
          +       wcwidth(3).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_insstr.3x.html ncurses-5.6/doc/html/man/curs_insstr.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_insstr.3x.html	2006-09-23 16:43:04.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_insstr.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_insstr.3x,v 1.17 2006/02/25 21:49:19 tom Exp @
          +  * @Id: curs_insstr.3x,v 1.18 2006/12/24 14:59:30 tom Exp @
           -->
           
           
          @@ -112,7 +112,7 @@
           
           

          SEE ALSO

          -       curses(3x), unctrl(3x), curs_clear(3x), curs_inch(3x).
          +       curses(3x),  curs_util(3x), curs_clear(3x), curs_inch(3x).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_mouse.3x.html ncurses-5.6/doc/html/man/curs_mouse.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_mouse.3x.html	2005-05-15 13:05:53.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_mouse.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -2,7 +2,7 @@
           
           
           
          @@ -162,45 +162,48 @@
                  screen windows enclose the location of a mouse event.
           
                  The wmouse_trafo function transforms a given pair of coor-
          -       dinates from stdscr-relative coordinates  to  screen-rela-
          -       tive  coordinates  or  vice  versa.  Please remember, that
          -       stdscr-relative coordinates are not  always  identical  to
          -       screen-relative  coordinates  due  to the mechanism to re-
          -       serve lines on top or bottom of the screen for other  pur-
          -       poses  (ripoff()  call,  see also slk_...  functions).  If
          -       the parameter to_screen is TRUE, the pointers pY, pX  must
          -       reference  the coordinates of a location inside the window
          -       win.  They are converted  to  screen-relative  coordinates
          -       and  returned through the pointers.  If the conversion was
          -       successful, the function returns TRUE.  If one of the  pa-
          -       rameters  was  NULL or the location is not inside the win-
          -       dow, FALSE is returned.  If to_screen is FALSE, the point-
          -       ers  pY,  pX  must  reference screen-relative coordinates.
          -       They are converted to stdscr-relative coordinates  if  the
          -       window win encloses this point.  In this case the function
          -       returns TRUE.  If one of the parameters  is  NULL  or  the
          -       point is not inside the window, FALSE is returned.  Please
          -       notice, that the referenced coordinates are only  replaced
          -       by  the  converted  coordinates  if the transformation was
          -       successful.
          +       dinates from stdscr-relative  coordinates  to  coordinates
          +       relative to the given window or vice versa.  Please remem-
          +       ber, that stdscr-relative coordinates are not always iden-
          +       tical  to window-relative coordinates due to the mechanism
          +       to reserve lines on top or bottom of the screen for  other
          +       purposes (see the ripoffline() and slk_init calls, for ex-
          +       ample).  If the parameter to_screen is TRUE, the  pointers
          +       pY, pX must reference the coordinates of a location inside
          +       the window win.  They are converted to window-relative co-
          +       ordinates  and returned through the pointers.  If the con-
          +       version was successful, the function returns TRUE.  If one
          +       of  the  parameters was NULL or the location is not inside
          +       the window, FALSE is returned.  If to_screen is FALSE, the
          +       pointers  pY,  pX  must  reference window-relative coordi-
          +       nates.  They are converted to stdscr-relative  coordinates
          +       if  the  window win encloses this point.  In this case the
          +       function returns TRUE.  If one of the parameters  is  NULL
          +       or  the point is not inside the window, FALSE is returned.
          +       Please notice, that the referenced  coordinates  are  only
          +       replaced  by  the converted coordinates if the transforma-
          +       tion was successful.
          +
          +       The mouse_trafo function performs the same translation  as
          +       wmouse_trafo, using stdscr for win.
           
                  The mouseinterval function sets the maximum time (in thou-
          -       sands  of  a second) that can elapse between press and re-
          -       lease events for them to be recognized as  a  click.   Use
          -       mouseinterval(0)  to disable click resolution.  This func-
          +       sands of a second) that can elapse between press  and  re-
          +       lease  events  for  them to be recognized as a click.  Use
          +       mouseinterval(0) to disable click resolution.  This  func-
                  tion returns the previous interval value.  Use mouseinter-
          -       val(-1)  to  obtain the interval without altering it.  The
          +       val(-1) 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  get-
          +       is  being simulated in a window by a function such as get-
                  str that expects a linefeed for input-loop termination.
           
           
           

          RETURN VALUE

          -       getmouse  and ungetmouse return the integer ERR upon fail-
          +       getmouse and ungetmouse return the integer ERR upon  fail-
                  ure or OK upon successful completion.
           
                         getmouse
          @@ -212,83 +215,85 @@
           
                  mousemask returns the mask of reportable events.
           
          -       mouseinterval  returns the previous interval value, unless
          -       the terminal was not initialized.  In that  case,  it  re-
          +       mouseinterval returns the previous interval value,  unless
          +       the  terminal  was  not initialized.  In that case, it re-
                  turns the maximum interval value (166).
           
          -       wenclose  and wmouse_trafo are boolean functions returning
          +       wenclose and wmouse_trafo are boolean functions  returning
                  TRUE or FALSE depending on their test result.
           
           
           

          PORTABILITY

          -       These calls were designed for  ncurses(3x),  and  are  not
          +       These  calls  were  designed  for ncurses(3x), and are not
                  found in SVr4 curses, 4.4BSD curses, or any other previous
                  version of curses.
           
                  The feature macro NCURSES_MOUSE_VERSION is provided so the
          -       preprocessor  can  be  used to test whether these features
          -       are present.  If the interface is changed,  the  value  of
          -       NCURSES_MOUSE_VERSION  will  be incremented.  These values
          -       for NCURSES_MOUSE_VERSION may be specified when  configur-
          +       preprocessor can be used to test  whether  these  features
          +       are  present.   If  the interface is changed, the value of
          +       NCURSES_MOUSE_VERSION will be incremented.   These  values
          +       for  NCURSES_MOUSE_VERSION may be specified when configur-
                  ing ncurses:
           
          -              1  has  definitions  for reserved events.  The mask
          +              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
          +                 nitions for reserved events.  The mask  uses  29
                            bits.
           
          -       The order of the MEVENT structure members is  not  guaran-
          -       teed.   Additional fields may be added to the structure in
          +       The  order  of the MEVENT structure members is not guaran-
          +       teed.  Additional fields may be added to the structure  in
                  the future.
           
          -       Under ncurses(3x), these calls are implemented  using  ei-
          -       ther  xterm's built-in mouse-tracking API or platform-spe-
          +       Under  ncurses(3x),  these calls are implemented using ei-
          +       ther xterm's built-in mouse-tracking API or  platform-spe-
                  cific drivers including
                         Alessandro Rubini's gpm server.
                         FreeBSD sysmouse
                         OS/2 EMX
          -       If you  are  using  an  unsupported  configuration,  mouse
          -       events will not be visible to ncurses(3x) (and the wmouse-
          +       If  you  are  using  an  unsupported  configuration, mouse
          +       events will not be visible to ncurses(3x) (and the  mouse-
                  mask function will always return 0).
           
          -       If the terminfo entry contains a XM string, this  is  used
          -       in  the xterm mouse driver to control the way the terminal
          +       If  the  terminfo entry contains a XM string, this is used
          +       in the xterm mouse driver to control the way the  terminal
                  is initialized for mouse operation.  The default, if XM 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.
           
           
           

          BUGS

          -       Mouse events under xterm will not in fact be ignored  dur-
          -       ing  cooked mode, if they have been enabled by wmousemask.
          -       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  mousemask.
          +       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 de-
          -       scription must have kmous 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,  ncurses assumes that if your $TERM envi-
          -       ronment variable contains "xterm", or kmous is defined  in
          +       a  window  with  its keypad bit off, since they are inter-
          +       preted as a variety of function key.   Your  terminfo  de-
          +       scription  should  have kmous set to "\E[M" (the beginning
          +       of the response from xterm for mouse clicks).  Other  val-
          +       ues  for  kmous  are permitted, but under the same assump-
          +       tion, i.e., it is the beginning of the response.
          +
          +       Because there are  no  standard  terminal  responses  that
          +       would  serve to identify terminals which support the xterm
          +       mouse protocol, ncurses assumes that if your  $TERM  envi-
          +       ronment  variable contains "xterm", or kmous is defined in
                  the terminal description, then the terminal may send mouse
                  events.
           
           
           

          SEE ALSO

          -       curses(3x).
          +       curses(3x), curs_kernel(3x), curs_slk(3x).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_printw.3x.html ncurses-5.6/doc/html/man/curs_printw.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_printw.3x.html	2006-09-23 16:43:06.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_printw.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_printw.3x,v 1.16 2006/02/25 21:49:19 tom Exp @
          +  * @Id: curs_printw.3x,v 1.17 2006/12/24 16:05:17 tom Exp @
           -->
           
           
          @@ -69,12 +69,12 @@
           

          DESCRIPTION

                  The  printw,  wprintw, mvprintw and mvwprintw routines are
          -       analogous to printf  [see  printf(3S)].   In  effect,  the
          +       analogous to  printf  [see  printf(3)].   In  effect,  the
                  string that would be output by printf is output instead as
                  though waddstr were used on the given window.
           
                  The vwprintw  and  wv_printw  routines  are  analogous  to
          -       vprintf  [see  printf(3S)]  and  perform a wprintw using a
          +       vprintf  [see  printf(3)]  and  perform  a wprintw using a
                  variable argument list.  The third argument is a  va_list,
                  a   pointer   to  a  list  of  arguments,  as  defined  in
                  <stdarg.h>.
          @@ -107,7 +107,7 @@
           
           

          SEE ALSO

          -       curses(3x), printf(3S), vprintf(3S)
          +       curses(3x), printf(3), vprintf(3)
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_scanw.3x.html ncurses-5.6/doc/html/man/curs_scanw.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_scanw.3x.html	2006-09-23 16:43:07.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_scanw.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_scanw.3x,v 1.13 2006/02/25 21:42:22 tom Exp @
          +  * @Id: curs_scanw.3x,v 1.14 2006/12/24 16:05:49 tom Exp @
           -->
           
           
          @@ -66,7 +66,7 @@
           

          DESCRIPTION

                  The scanw, wscanw and mvscanw routines  are  analogous  to
          -       scanf [see scanf(3S)].  The effect of these routines is as
          +       scanf  [see scanf(3)].  The effect of these routines is as
                  though wgetstr were called on the window, and the  result-
                  ing line used as input for sscanf(3).  Fields which do not
                  map to a variable in the fmt field are lost.
          @@ -114,7 +114,7 @@
           
           

          SEE ALSO

          -       curses(3x), curs_getstr(3x), curs_printw(3x), scanf(3S)
          +       curses(3x), curs_getstr(3x), curs_printw(3x), scanf(3)
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_scr_dump.3x.html ncurses-5.6/doc/html/man/curs_scr_dump.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_scr_dump.3x.html	2006-09-23 16:43:07.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_scr_dump.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_scr_dump.3x,v 1.6 2006/02/25 21:49:19 tom Exp @
          +  * @Id: curs_scr_dump.3x,v 1.7 2006/12/24 16:05:49 tom Exp @
           -->
           
           
          @@ -122,7 +122,7 @@
           

          SEE ALSO

                  curses(3x),      curs_initscr(3x),       curs_refresh(3x),
          -       curs_util(3x), system(3S)
          +       curs_util(3x), system(3)
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_termcap.3x.html ncurses-5.6/doc/html/man/curs_termcap.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_termcap.3x.html	2006-09-23 16:43:08.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_termcap.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: curs_termcap.3x,v 1.20 2006/02/25 21:50:01 tom Exp @
          +  * @Id: curs_termcap.3x,v 1.21 2006/12/24 16:05:49 tom Exp @
           -->
           
           
          @@ -175,7 +175,7 @@
           
           

          SEE ALSO

          -       curses(3x), terminfo(5), putc(3S).
          +       curses(3x), terminfo(5), putc(3).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_terminfo.3x.html ncurses-5.6/doc/html/man/curs_terminfo.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_terminfo.3x.html	2006-12-16 17:51:32.000000000 -0500
          +++ ncurses-5.6/doc/html/man/curs_terminfo.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -1,7 +1,7 @@
           
           
           
           
          @@ -62,7 +62,7 @@
                  int setterm(char *term);
                  TERMINAL *set_curterm(TERMINAL *nterm);
                  int del_curterm(TERMINAL *oterm);
          -       int restartterm(const char *term, int fildes, int *errret);
          +       int restartterm(char *term, int fildes, int *errret);
                  char *tparm(char *str, ...);
                  int tputs(const char *str, int affcnt, int (*putc)(int));
                  int putp(const char *str);
          @@ -318,7 +318,7 @@
           

          SEE ALSO

                  curses(3x),  curs_initscr(3x), curs_kernel(3x), curs_term-
          -       cap(3x), putc(3S), terminfo(5)
          +       cap(3x), putc(3), terminfo(5)
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_trace.3x.html ncurses-5.6/doc/html/man/curs_trace.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_trace.3x.html	2005-05-15 13:05:56.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_trace.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -1,7 +1,7 @@
           
           
           
           
          @@ -61,7 +61,7 @@
                  char *_traceattr(attr_t attr);
                  char *_traceattr2(int buffer, chtype ch);
                  char *_nc_tracebits(void);
          -       char *_tracechar(const unsigned char ch);
          +       char *_tracechar(int);
                  char *_tracechtype(chtype ch);
                  char *_tracechtype2(int buffer, chtype ch);
                  char *_tracemouse(const MEVENT *event);
          diff -Naur ncurses-5.6.orig/doc/html/man/curs_util.3x.html ncurses-5.6/doc/html/man/curs_util.3x.html
          --- ncurses-5.6.orig/doc/html/man/curs_util.3x.html	2006-09-23 16:43:09.000000000 -0400
          +++ ncurses-5.6/doc/html/man/curs_util.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -1,7 +1,7 @@
           
           
           
           
          @@ -57,7 +57,7 @@
                  #include <curses.h>
           
                  char *unctrl(chtype c);
          -       char *wunctrl(cchar_t *c);
          +       wchar_t *wunctrl(cchar_t *c);
                  char *keyname(int c);
                  char *key_name(wchar_t w);
                  void filter(void);
          @@ -191,8 +191,8 @@
           
           

          SEE ALSO

          -       use_legacy_coding(3),    curses(3x),     curs_initscr(3x),
          -       curs_kernel(3x), curs_scr_dump(3x).
          +       legacy_coding(3x), curses(3x), curs_initscr(3x), curs_ker-
          +       nel(3x), curs_scr_dump(3x).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/default_colors.3x.html ncurses-5.6/doc/html/man/default_colors.3x.html
          --- ncurses-5.6.orig/doc/html/man/default_colors.3x.html	2006-09-23 16:43:09.000000000 -0400
          +++ ncurses-5.6/doc/html/man/default_colors.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -28,7 +28,7 @@
             * authorization.                                                           *
             ****************************************************************************
             * Author: Thomas E. Dickey 1997,1999,2000,2005
          -  * @Id: default_colors.3x,v 1.19 2006/02/25 21:49:19 tom Exp @
          +  * @Id: default_colors.3x,v 1.20 2006/12/24 15:02:53 tom Exp @
           -->
           
           
          @@ -121,7 +121,7 @@
           
           

          NOTES

          -       Associated with this extension, the init_pair(3x) function
          +       Associated  with  this  extension,  the init_pair function
                  accepts negative arguments to specify  default  foreground
                  or background colors.
           
          diff -Naur ncurses-5.6.orig/doc/html/man/form.3x.html ncurses-5.6/doc/html/man/form.3x.html
          --- ncurses-5.6.orig/doc/html/man/form.3x.html	2006-12-16 17:51:33.000000000 -0500
          +++ ncurses-5.6/doc/html/man/form.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -236,7 +236,7 @@
           
           

          SEE ALSO

          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/form_field_new.3x.html ncurses-5.6/doc/html/man/form_field_new.3x.html
          --- ncurses-5.6.orig/doc/html/man/form_field_new.3x.html	2006-12-16 17:51:35.000000000 -0500
          +++ ncurses-5.6/doc/html/man/form_field_new.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -28,7 +28,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: form_field_new.3x,v 1.14 2006/11/04 17:12:00 tom Exp @
          +  * @Id: form_field_new.3x,v 1.15 2006/12/24 14:56:41 tom Exp @
           -->
           
           
          @@ -127,9 +127,9 @@
                  were not supported on Version 7 or BSD versions.
           
                  It may be unwise to count on the set of attributes  copied
          -       by  dup_field(3x)  being  portable;  the  System  V  forms
          -       library documents are not very explicit  about  what  gets
          -       copied and what doesn't.
          +       by  dup_field  being  portable; the System V forms library
          +       documents are not very explicit about what gets copied and
          +       what doesn't.
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/form_field_opts.3x.html ncurses-5.6/doc/html/man/form_field_opts.3x.html --- ncurses-5.6.orig/doc/html/man/form_field_opts.3x.html 2006-12-16 17:51:36.000000000 -0500 +++ ncurses-5.6/doc/html/man/form_field_opts.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -2,7 +2,7 @@ @@ -54,10 +54,10 @@

          SYNOPSIS

                  #include <form.h>
          -       int set_field_opts(FIELD *field, OPTIONS opts);
          -       int field_opts_on(FIELD *field, OPTIONS opts);
          -       int field_opts_off(FIELD *field, OPTIONS opts);
          -       OPTIONS field_opts(const FIELD *field);
          +       int set_field_opts(FIELD *field, Field_Options opts);
          +       int field_opts_on(FIELD *field, Field_Options opts);
          +       int field_opts_off(FIELD *field, Field_Options opts);
          +       Field_Options field_opts(const FIELD *field);
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/form_field_validation.3x.html ncurses-5.6/doc/html/man/form_field_validation.3x.html --- ncurses-5.6.orig/doc/html/man/form_field_validation.3x.html 2006-12-16 17:51:36.000000000 -0500 +++ ncurses-5.6/doc/html/man/form_field_validation.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: form_field_validation.3x,v 1.15 2006/11/04 17:14:19 tom Exp @ + * @Id: form_field_validation.3x,v 1.16 2006/12/24 16:08:08 tom Exp @ --> @@ -124,16 +124,16 @@ Regular expression data. Requires a regular expres- sion (char *) third argument; the data is valid if the regular expression matches it. Regular expres- - sions are in the format of regcomp(3x) and - regexec(3x). Please notice that the regular expres- - sion must match the whole field. If you have for - example an eight character wide field, a regular - expression "^[0-9]*$" always means that you have to - fill all eight positions with digits. If you want to - allow fewer digits, you may use for example "^[0-9]* - *$" which is good for trailing spaces (up to an empty - field), or "^ *[0-9]* *$" which is good for leading - and trailing spaces around the digits. + sions are in the format of regcomp and regexec. + Please notice that the regular expression must match + the whole field. If you have for example an eight + character wide field, a regular expression "^[0-9]*$" + always means that you have to fill all eight posi- + tions with digits. If you want to allow fewer digits, + you may use for example "^[0-9]* *$" which is good + for trailing spaces (up to an empty field), or "^ + *[0-9]* *$" which is good for leading and trailing + spaces around the digits. TYPE_IPV4 An Internet Protocol Version 4 address. This requires diff -Naur ncurses-5.6.orig/doc/html/man/form_hook.3x.html ncurses-5.6/doc/html/man/form_hook.3x.html --- ncurses-5.6.orig/doc/html/man/form_hook.3x.html 2006-12-16 17:51:36.000000000 -0500 +++ ncurses-5.6/doc/html/man/form_hook.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -2,7 +2,7 @@ @@ -55,14 +55,14 @@

          SYNOPSIS

                  #include <form.h>
          -       int set_field_init(FORM *form, void (*func)(FORM *));
          -       void (*)(FORM *) field_init(const FORM *form);
          -       int set_field_term(FORM *form, void (*func)(FORM *));
          -       void (*)(FORM *) field_term(const FORM *form);
          -       int set_form_init(FORM *form, void (*func)(FORM *));
          -       void (*)(FORM *) form_init(const FORM *form);
          -       int set_form_term(FORM *form, void (*func)(FORM *));
          -       void (*)(FORM *) form_term(const FORM *form);
          +       int set_field_init(FORM *form, Form_Hook func);
          +       Form_Hook field_init(const FORM *form);
          +       int set_field_term(FORM *form, Form_Hook func);
          +       Form_Hook field_term(const FORM *form);
          +       int set_form_init(FORM *form, Form_Hook func);
          +       Form_Hook form_init(const FORM *form);
          +       int set_form_term(FORM *form, Form_Hook func);
          +       Form_Hook form_term(const FORM *form);
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/form_opts.3x.html ncurses-5.6/doc/html/man/form_opts.3x.html --- ncurses-5.6.orig/doc/html/man/form_opts.3x.html 2006-12-16 17:51:37.000000000 -0500 +++ ncurses-5.6/doc/html/man/form_opts.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -2,7 +2,7 @@ @@ -54,10 +54,10 @@

          SYNOPSIS

                  #include <form.h>
          -       int set_form_opts(FORM *form, OPTIONS opts);
          -       int form_opts_on(FORM *form, OPTIONS opts);
          -       int form_opts_off(FORM *form, OPTIONS opts);
          -       OPTIONS form_opts(const FORM *form);
          +       int set_form_opts(FORM *form, Field_Options opts);
          +       int form_opts_on(FORM *form, Field_Options opts);
          +       int form_opts_off(FORM *form, Field_Options opts);
          +       Field_Options form_opts(const FORM *form);
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/index.html ncurses-5.6/doc/html/man/index.html --- ncurses-5.6.orig/doc/html/man/index.html 2006-04-22 18:29:12.000000000 -0400 +++ ncurses-5.6/doc/html/man/index.html 2007-12-21 00:02:35.000000000 -0500 @@ -1,6 +1,6 @@ @@ -423,7 +423,7 @@ captoinfo(1m), infotocap(1m), tic(1m), toe(1m), curses(3x), terminfo(5). - This describes ncurses version 5.5 (patch 20061209). + This describes ncurses version 5.6 (patch 20070303). diff -Naur ncurses-5.6.orig/doc/html/man/infotocap.1m.html ncurses-5.6/doc/html/man/infotocap.1m.html --- ncurses-5.6.orig/doc/html/man/infotocap.1m.html 2006-12-16 17:51:38.000000000 -0500 +++ ncurses-5.6/doc/html/man/infotocap.1m.html 2007-12-21 00:02:35.000000000 -0500 @@ -28,7 +28,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: infotocap.1m,v 1.6 2006/05/13 15:35:45 tom Exp @ + * @Id: infotocap.1m,v 1.8 2006/12/24 20:13:56 tom Exp @ --> @@ -85,7 +85,7 @@

          NOTES

          -       This utility is actually a link to tic(1m), running in  -C
          +       This utility is actually a link  to  tic,  running  in  -C
                  mode.  You can use other tic options such as -f and  -x.
           
           
          @@ -93,7 +93,7 @@
           

          SEE ALSO

                  curses(3x), tic(1m), infocmp(1m), terminfo(5)
           
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/legacy_coding.3x.html ncurses-5.6/doc/html/man/legacy_coding.3x.html
          --- ncurses-5.6.orig/doc/html/man/legacy_coding.3x.html	2006-09-23 16:43:15.000000000 -0400
          +++ ncurses-5.6/doc/html/man/legacy_coding.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -28,7 +28,7 @@
             * authorization.                                                           *
             ****************************************************************************
             * Author: Thomas E. Dickey
          -  * @Id: legacy_coding.3x,v 1.2 2006/02/25 21:50:01 tom Exp @
          +  * @Id: legacy_coding.3x,v 1.3 2006/12/24 15:12:55 tom Exp @
           -->
           
           
          @@ -70,21 +70,20 @@
                  The level parameter controls the result:
           
                         0    the library functions normally, rendering non-
          -                   printing   characters  as  described  in  unc-
          -                   trl(3x).
          +                   printing characters as described in unctrl.
           
          -              1    the library ignores isprintf for codes in  the
          +              1    the  library ignores isprintf for codes in the
                              range 160-255.
           
          -              2    the  library ignores isprintf for codes in the
          +              2    the library ignores isprintf for codes in  the
                              range 128-255.  It also modifies the output of
          -                   unctrl,  showing codes in the range 128-159 as
          +                   unctrl, showing codes in the range 128-159  as
                              is.
           
           
           

          RETURN VALUE

          -       If the screen has  not  been  initialized,  or  the  level
          +       If  the  screen  has  not  been  initialized, or the level
                  parameter is out of range, the function returns ERR.  Oth-
                  erwise, it returns the previous level: 0, 1 or 2.
           
          @@ -93,7 +92,7 @@
           

          PORTABILITY

                  This routine is specific to ncurses.  It was not supported
                  on Version 7, BSD or System V implementations.  It is rec-
          -       ommended that any code depending on ncurses extensions  be
          +       ommended  that any code depending on ncurses extensions be
                  conditioned using NCURSES_VERSION.
           
           
          @@ -104,7 +103,7 @@
           
           

          AUTHOR

          -       Thomas  Dickey (to support lynx's font-switching feature).
          +       Thomas Dickey (to support lynx's font-switching  feature).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/menu.3x.html ncurses-5.6/doc/html/man/menu.3x.html
          --- ncurses-5.6.orig/doc/html/man/menu.3x.html	2006-12-16 17:51:40.000000000 -0500
          +++ ncurses-5.6/doc/html/man/menu.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -226,7 +226,7 @@
           
           

          SEE ALSO

          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/menu_hook.3x.html ncurses-5.6/doc/html/man/menu_hook.3x.html
          --- ncurses-5.6.orig/doc/html/man/menu_hook.3x.html	2006-12-16 17:51:41.000000000 -0500
          +++ ncurses-5.6/doc/html/man/menu_hook.3x.html	2007-12-21 00:02:35.000000000 -0500
          @@ -2,7 +2,7 @@
           
           
           
          @@ -55,14 +55,14 @@
           

          SYNOPSIS

                  #include <menu.h>
          -       int set_item_init(MENU *menu, void (*func)(MENU *));
          -       void (*)(MENU *) item_init(const MENU *menu);
          -       int set_item_term(MENU *menu, void (*func)(MENU *));
          -       void (*)(MENU *) item_term(const MENU *menu);
          -       int set_menu_init(MENU *menu, void (*func)(MENU *));
          -       void (*)(MENU *) menu_init(const MENU *menu);
          -       int set_menu_term(MENU *menu, void (*func)(MENU *));
          -       void (*)(MENU *) menu_term(const MENU *menu);
          +       int set_item_init(MENU *menu, Menu_Hook func);
          +       Menu_Hook item_init(const MENU *menu);
          +       int set_item_term(MENU *menu, Menu_Hook func);
          +       Menu_Hook item_term(const MENU *menu);
          +       int set_menu_init(MENU *menu, Menu_Hook func);
          +       Menu_Hook menu_init(const MENU *menu);
          +       int set_menu_term(MENU *menu, Menu_Hook func);
          +       Menu_Hook menu_term(const MENU *menu);
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/menu_opts.3x.html ncurses-5.6/doc/html/man/menu_opts.3x.html --- ncurses-5.6.orig/doc/html/man/menu_opts.3x.html 2006-12-16 17:51:42.000000000 -0500 +++ ncurses-5.6/doc/html/man/menu_opts.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -2,7 +2,7 @@ @@ -54,10 +54,10 @@

          SYNOPSIS

                  #include <menu.h>
          -       int set_menu_opts(MENU *menu, OPTIONS opts);
          -       int menu_opts_on(MENU *menu, OPTIONS opts);
          -       int menu_opts_off(MENU *menu, OPTIONS opts);
          -       OPTIONS menu_opts(const MENU *menu);
          +       int set_menu_opts(MENU *menu, Menu_Options opts);
          +       int menu_opts_on(MENU *menu, Menu_Options opts);
          +       int menu_opts_off(MENU *menu, Menu_Options opts);
          +       Menu_Options menu_opts(const MENU *menu);
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/mitem_opts.3x.html ncurses-5.6/doc/html/man/mitem_opts.3x.html --- ncurses-5.6.orig/doc/html/man/mitem_opts.3x.html 2006-12-16 17:51:44.000000000 -0500 +++ ncurses-5.6/doc/html/man/mitem_opts.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -2,7 +2,7 @@ @@ -54,10 +54,10 @@

          SYNOPSIS

                  #include <menu.h>
          -       int set_item_opts(ITEM *item, OPTIONS opts);
          -       int item_opts_on(ITEM *item, OPTIONS opts);
          -       int item_opts_off(ITEM *item, OPTIONS opts);
          -       OPTIONS item_opts(const ITEM *item);
          +       int set_item_opts(ITEM *item, Item_Options opts);
          +       int item_opts_on(ITEM *item, Item_Options opts);
          +       int item_opts_off(ITEM *item, Item_Options opts);
          +       Item_Options item_opts(const ITEM *item);
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/ncurses.3x.html ncurses-5.6/doc/html/man/ncurses.3x.html --- ncurses-5.6.orig/doc/html/man/ncurses.3x.html 2006-12-16 17:51:45.000000000 -0500 +++ ncurses-5.6/doc/html/man/ncurses.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -28,7 +28,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: ncurses.3x,v 1.81 2006/12/02 19:23:11 tom Exp @ + * @Id: ncurses.3x,v 1.82 2006/12/24 14:44:05 tom Exp @ --> @@ -63,7 +63,7 @@ sonable optimization. This implementation is ``new curses'' (ncurses) and is the approved replacement for 4.4BSD classic curses, which has been discontinued. This - describes ncurses version 5.5 (patch 20061209). + describes ncurses version 5.6 (patch 20070303). The ncurses routines emulate the curses(3x) library of System V Release 4 UNIX, and the XPG4 curses standard (XSI @@ -774,9 +774,9 @@ NCURSES_ASSUMED_COLORS Override the compiled-in assumption that the termi- nal's default colors are white-on-black (see - assume_default_colors(3x)). You may set the fore- - ground and background color values with this environ- - ment variable by proving a 2-element list: + default_colors(3x)). You may set the foreground and + background color values with this environment vari- + able by proving a 2-element list: foreground,background. For example, to tell ncurses to not assume anything about the colors, set this to "-1,-1". To make it green-on-black, set it to "2,0". diff -Naur ncurses-5.6.orig/doc/html/man/panel.3x.html ncurses-5.6/doc/html/man/panel.3x.html --- ncurses-5.6.orig/doc/html/man/panel.3x.html 2006-12-16 17:51:45.000000000 -0500 +++ ncurses-5.6/doc/html/man/panel.3x.html 2007-12-21 00:02:35.000000000 -0500 @@ -213,7 +213,7 @@

          SEE ALSO

                  curses(3x)
           
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/term.5.html ncurses-5.6/doc/html/man/term.5.html --- ncurses-5.6.orig/doc/html/man/term.5.html 2006-12-16 17:51:45.000000000 -0500 +++ ncurses-5.6/doc/html/man/term.5.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,20 +27,20 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: term.5,v 1.17 2006/12/03 01:08:16 tom Exp @ + * @Id: term.5,v 1.19 2006/12/24 18:12:38 tom Exp @ --> -TERM 5 +term 5 -

          TERM 5

          +

          term 5


           
          -TERM(5)                                                         TERM(5)
          +term(5)                                                         term(5)
           
           
           
          @@ -95,7 +95,7 @@
                  assumptions about byte  ordering  or  sign  extension  are
                  made.
           
          -       The  compiled  file  is  created with the tic program, and
          +       The  compiled  file  is  created with the tic program, and
                  read by the routine setupterm.  The file is  divided  into
                  six parts: the header, terminal names, boolean flags, num-
                  bers, strings, and string table.
          @@ -297,7 +297,7 @@
           
           
           
          -                                                                TERM(5)
          +                                                                term(5)
           

          diff -Naur ncurses-5.6.orig/doc/html/man/term.7.html ncurses-5.6/doc/html/man/term.7.html --- ncurses-5.6.orig/doc/html/man/term.7.html 2006-09-23 16:43:22.000000000 -0400 +++ ncurses-5.6/doc/html/man/term.7.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,20 +27,20 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: term.7,v 1.15 2006/02/25 21:47:06 tom Exp @ + * @Id: term.7,v 1.17 2006/12/24 18:14:09 tom Exp @ --> -TERM 7 +term 7 -

          TERM 7

          +

          term 7


           
          -TERM(7)                                                         TERM(7)
          +term(7)                                                         term(7)
           
           
           
          @@ -98,7 +98,7 @@
                  from your shell.  These capability files are in  a  binary
                  format optimized for retrieval speed (unlike the old text-
                  based termcap format they replace); to examine  an  entry,
          -       you  must  use  the infocmp(1) command.  Invoke it as fol-
          +       you  must  use the infocmp(1m) command.  Invoke it as fol-
                  lows:
           
                       infocmp entry-name
          @@ -240,7 +240,7 @@
           
           
           
          -                                                                TERM(7)
          +                                                                term(7)
           

          diff -Naur ncurses-5.6.orig/doc/html/man/terminfo.5.html ncurses-5.6/doc/html/man/terminfo.5.html --- ncurses-5.6.orig/doc/html/man/terminfo.5.html 2006-12-16 17:51:46.000000000 -0500 +++ ncurses-5.6/doc/html/man/terminfo.5.html 2007-12-21 00:02:35.000000000 -0500 @@ -32,9 +32,9 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: terminfo.head,v 1.13 2006/05/13 15:35:45 tom Exp @ + * @Id: terminfo.head,v 1.15 2006/12/24 18:04:42 tom Exp @ * Head of terminfo man page ends here - * @Id: terminfo.tail,v 1.44 2006/04/01 22:47:01 tom Exp @ + * @Id: terminfo.tail,v 1.47 2006/12/24 18:14:22 tom Exp @ * Beginning of terminfo.tail file * This file is part of ncurses. * See "terminfo.head" for copyright. @@ -46,16 +46,16 @@ --> -TERMINFO 5 File Formats +terminfo 5 File Formats -

          TERMINFO 5 File Formats

          +

          terminfo 5 File Formats


           
          -TERMINFO(5)                   File Formats                  TERMINFO(5)
          +terminfo(5)                   File Formats                  terminfo(5)
           
           
           
          @@ -78,7 +78,7 @@
                  nals by giving a set of capabilities which they  have,  by
                  specifying how to perform screen operations, and by speci-
                  fying padding requirements and  initialization  sequences.
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
                  Entries in terminfo consist of a sequence of `,' separated
                  fields (embedded commas may be escaped with a backslash or
          @@ -95,13 +95,13 @@
           
                  Lines beginning with a `#' in the first column are treated
                  as  comments.  While comment lines are legal at any point,
          -       the output of captoinfo and infotocap  (aliases  for  tic)
          +       the output of captoinfo and infotocap  (aliases  for  tic)
                  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  infocmp -f option relies on this to format
          -       if-then-else expressions: the result can be read by tic.
          +       entries.   The  infocmp -f option relies on this to format
          +       if-then-else expressions: the result can be read by tic.
           
                  Terminal names (except for the last, verbose entry) should
                  be chosen using the following conventions.  The particular
          @@ -1234,7 +1234,7 @@
              Parameterized Strings
                  Cursor addressing and other strings  requiring  parameters
                  in  the  terminal  are described by a parameterized string
          -       capability, with printf(3S) like escapes %x  in  it.   For
          +       capability, with printf(3) like escapes  %x  in  it.   For
                  example,  to  address  the  cursor,  the cup capability is
                  given, using two parameters: the row and column to address
                  to.  (Rows and columns are numbered from zero and refer to
          @@ -2269,7 +2269,7 @@
                  termcap entry.
           
                  When in -C (translate to termcap) mode, the ncurses imple-
          -       mentation  of tic(1) issues warning messages when the pre-
          +       mentation of tic(1m) 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.
          @@ -2351,7 +2351,7 @@
           
           

          SEE ALSO

          -       tic(1m), infocmp(1m), curses(3x), printf(3S), term(5).
          +       tic(1m), infocmp(1m), curses(3x), printf(3), term(5).
           
           
           
          @@ -2361,7 +2361,7 @@ - TERMINFO(5) + terminfo(5)
          diff -Naur ncurses-5.6.orig/doc/html/man/tic.1m.html ncurses-5.6/doc/html/man/tic.1m.html --- ncurses-5.6.orig/doc/html/man/tic.1m.html 2006-12-16 17:51:46.000000000 -0500 +++ ncurses-5.6/doc/html/man/tic.1m.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: tic.1m,v 1.43 2006/05/13 15:14:01 tom Exp @ + * @Id: tic.1m,v 1.44 2006/12/24 17:59:11 tom Exp @ --> @@ -309,7 +309,7 @@ infocmp(1m), captoinfo(1m), infotocap(1m), toe(1m), curses(3x), terminfo(5). - This describes ncurses version 5.5 (patch 20061209). + This describes ncurses version 5.6 (patch 20070303). diff -Naur ncurses-5.6.orig/doc/html/man/toe.1m.html ncurses-5.6/doc/html/man/toe.1m.html --- ncurses-5.6.orig/doc/html/man/toe.1m.html 2006-12-16 17:51:47.000000000 -0500 +++ ncurses-5.6/doc/html/man/toe.1m.html 2007-12-21 00:02:35.000000000 -0500 @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: toe.1m,v 1.18 2006/05/13 15:14:01 tom Exp @ + * @Id: toe.1m,v 1.20 2006/12/24 17:20:37 tom Exp @ --> @@ -92,7 +92,7 @@ -vn specifies that (verbose) output be written to stan- dard error, showing toe's progress. The optional parameter n is a number from 1 to 10, interpreted - as for tic(1). + as for tic(1m). -V reports the version of ncurses which was used in this program, and exits. @@ -109,7 +109,7 @@ tic(1m), infocmp(1m), captoinfo(1m), infotocap(1m), curses(3x), terminfo(5). - This describes ncurses version 5.5 (patch 20061209). + This describes ncurses version 5.6 (patch 20070303). diff -Naur ncurses-5.6.orig/doc/html/man/tput.1.html ncurses-5.6/doc/html/man/tput.1.html --- ncurses-5.6.orig/doc/html/man/tput.1.html 2006-12-16 17:51:47.000000000 -0500 +++ ncurses-5.6/doc/html/man/tput.1.html 2007-12-21 00:02:35.000000000 -0500 @@ -28,7 +28,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: tput.1,v 1.25 2006/05/13 15:14:01 tom Exp @ + * @Id: tput.1,v 1.27 2006/12/24 18:11:31 tom Exp @ --> @@ -89,7 +89,7 @@ application should test the exit code (e.g., $?, see sh(1)) to be sure it is 0. (See the EXIT CODES and DIAG- NOSTICS sections.) For a complete list of capabilities - and the capname associated with each, see terminfo(1). + and the capname associated with each, see terminfo(5). -Ttype indicates the type of terminal. Normally this option is unnecessary, because the default is taken @@ -298,7 +298,7 @@ exit code error message --------------------------------------------------------------------- 0 (capname is a numeric variable that is not specified in - the terminfo(1) database for this terminal type, e.g. + the terminfo(5) database for this terminal type, e.g. tput -T450 lines and tput -T2621 xmc) 1 no error message is printed, see the EXIT CODES section. 2 usage error @@ -328,7 +328,7 @@

          SEE ALSO

                  clear(1), stty(1), tabs(1), terminfo(5).
           
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/man/tset.1.html ncurses-5.6/doc/html/man/tset.1.html
          --- ncurses-5.6.orig/doc/html/man/tset.1.html	2006-12-16 17:51:47.000000000 -0500
          +++ ncurses-5.6/doc/html/man/tset.1.html	2007-12-21 00:02:35.000000000 -0500
          @@ -27,7 +27,7 @@
             * sale, use or other dealings in this Software without prior written       *
             * authorization.                                                           *
             ****************************************************************************
          -  * @Id: tset.1,v 1.18 2006/07/29 11:34:07 tom Exp @
          +  * @Id: tset.1,v 1.19 2006/12/24 15:00:30 tom Exp @
           -->
           
           
          @@ -315,10 +315,10 @@
           
           

          SEE ALSO

          -       csh(1),  sh(1),  stty(1),  setupterm(3x),   tty(4),   ter-
          +       csh(1), sh(1), stty(1),  curs_terminfo(3x),  tty(4),  ter-
                  minfo(5), ttys(5), environ(7)
           
          -       This describes ncurses version 5.5 (patch 20061209).
          +       This describes ncurses version 5.6 (patch 20070303).
           
           
           
          diff -Naur ncurses-5.6.orig/doc/html/ncurses-intro.html ncurses-5.6/doc/html/ncurses-intro.html
          --- ncurses-5.6.orig/doc/html/ncurses-intro.html	2005-12-24 10:47:05.000000000 -0500
          +++ ncurses-5.6/doc/html/ncurses-intro.html	2007-12-21 00:02:35.000000000 -0500
          @@ -1,8 +1,8 @@
           
           |   ----+-->|  NULL |   next
          - *	  |-------|   |-------|   |-------|
          - *	  |  NULL |<--+----   |<--+----   |   last
          - *	  ---------   ---------   ---------
          - *	      ^                       ^
          - *	      |                       |
          - *	      |                       |
          - *	   _nc_head                _nc_tail
          - */
          -
          -NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0;
          -NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0;
          -
           static void
           enqueue(ENTRY * ep)
           /* add an entry to the in-core list */
          @@ -103,51 +79,6 @@
           	newp->last->next = newp;
           }
           
          -NCURSES_EXPORT(void)
          -_nc_free_entries(ENTRY * headp)
          -/* free the allocated storage consumed by list entries */
          -{
          -    (void) headp;		/* unused - _nc_head is altered here! */
          -
          -    while (_nc_head != 0) {
          -	_nc_free_termtype(&(_nc_head->tterm));
          -    }
          -}
          -
          -NCURSES_EXPORT(ENTRY *)
          -_nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
          -/* delink the allocated storage for the given list entry */
          -{
          -    ENTRY *ep, *last;
          -
          -    for (last = 0, ep = headp; ep != 0; last = ep, ep = ep->next) {
          -	if (&(ep->tterm) == tterm) {
          -	    if (last != 0) {
          -		last->next = ep->next;
          -	    }
          -	    if (ep == _nc_head) {
          -		_nc_head = ep->next;
          -	    }
          -	    if (ep == _nc_tail) {
          -		_nc_tail = last;
          -	    }
          -	    break;
          -	}
          -    }
          -    return ep;
          -}
          -
          -NCURSES_EXPORT(void)
          -_nc_free_entry(ENTRY * headp, TERMTYPE *tterm)
          -/* free the allocated storage consumed by the given list entry */
          -{
          -    ENTRY *ep;
          -
          -    if ((ep = _nc_delink_entry(headp, tterm)) != 0) {
          -	free(ep);
          -    }
          -}
          -
           static char *
           force_bar(char *dst, char *src)
           {
          @@ -534,3 +465,26 @@
           {
               sanity_check2(tp, FALSE);
           }
          +
          +#if NO_LEAKS
          +NCURSES_EXPORT(void)
          +_nc_leaks_tic(void)
          +{
          +    _nc_alloc_entry_leaks();
          +    _nc_captoinfo_leaks();
          +    _nc_comp_captab_leaks();
          +    _nc_comp_scan_leaks();
          +#if BROKEN_LINKER || USE_REENTRANT
          +    _nc_names_leaks();
          +    _nc_codes_leaks();
          +#endif
          +    _nc_tic_expand(0, FALSE, 0);
          +}
          +
          +NCURSES_EXPORT(void)
          +_nc_free_tic(int code)
          +{
          +    _nc_leaks_tic();
          +    _nc_free_tinfo(code);
          +}
          +#endif
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/db_iterator.c ncurses-5.6/ncurses/tinfo/db_iterator.c
          --- ncurses-5.6.orig/ncurses/tinfo/db_iterator.c	2006-12-16 14:06:42.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/db_iterator.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2006 Free Software Foundation, Inc.                        *
          + * Copyright (c) 2006,2007 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 @@
            ****************************************************************************/
           
           /****************************************************************************
          - *  Author: Thomas E. Dickey                     2006                       *
          + *  Author: Thomas E. Dickey                                                *
            ****************************************************************************/
           
           /*
          @@ -38,10 +38,11 @@
           
           #include 
           
          -MODULE_ID("$Id: db_iterator.c,v 1.5 2006/12/16 19:06:42 tom Exp $")
          +MODULE_ID("$Id: db_iterator.c,v 1.6 2007/04/22 00:00:26 tom Exp $")
           
          -static bool have_tic_directory = FALSE;
          -static bool keep_tic_directory = FALSE;
          +#define HaveTicDirectory _nc_globals.have_tic_directory
          +#define KeepTicDirectory _nc_globals.keep_tic_directory
          +#define TicDirectory     _nc_globals.tic_directory
           
           /*
            * Record the "official" location of the terminfo directory, according to
          @@ -50,19 +51,17 @@
           NCURSES_EXPORT(const char *)
           _nc_tic_dir(const char *path)
           {
          -    static const char *result = TERMINFO;
          -
          -    if (!keep_tic_directory) {
          +    if (!KeepTicDirectory) {
           	if (path != 0) {
          -	    result = path;
          -	    have_tic_directory = TRUE;
          -	} else if (!have_tic_directory && use_terminfo_vars()) {
          +	    TicDirectory = path;
          +	    HaveTicDirectory = TRUE;
          +	} else if (!HaveTicDirectory && use_terminfo_vars()) {
           	    char *envp;
           	    if ((envp = getenv("TERMINFO")) != 0)
           		return _nc_tic_dir(envp);
           	}
               }
          -    return result;
          +    return TicDirectory;
           }
           
           /*
          @@ -74,16 +73,15 @@
           _nc_keep_tic_dir(const char *path)
           {
               _nc_tic_dir(path);
          -    keep_tic_directory = TRUE;
          +    KeepTicDirectory = TRUE;
           }
           
           /*
            * Process the list of :-separated directories, looking for the terminal type.
            * We don't use strtok because it does not show us empty tokens.
            */
          -
          -static char *this_db_list = 0;
          -static int size_db_list;
          +#define ThisDbList	_nc_globals.dbi_list
          +#define ThisDbSize	_nc_globals.dbi_size
           
           /*
            * Cleanup.
          @@ -91,10 +89,10 @@
           NCURSES_EXPORT(void)
           _nc_last_db(void)
           {
          -    if (this_db_list != 0) {
          -	FreeAndNull(this_db_list);
          +    if (ThisDbList != 0) {
          +	FreeAndNull(ThisDbList);
               }
          -    size_db_list = 0;
          +    ThisDbSize = 0;
           }
           
           /* The TERMINFO_DIRS value, if defined by the configure script, begins with a
          @@ -104,14 +102,14 @@
           next_list_item(const char *source, int *offset)
           {
               if (source != 0) {
          -	FreeIfNeeded(this_db_list);
          -	this_db_list = strdup(source);
          -	size_db_list = strlen(source);
          +	FreeIfNeeded(ThisDbList);
          +	ThisDbList = strdup(source);
          +	ThisDbSize = strlen(source);
               }
           
          -    if (this_db_list != 0 && size_db_list && *offset < size_db_list) {
          +    if (ThisDbList != 0 && ThisDbSize && *offset < ThisDbSize) {
           	static char system_db[] = TERMINFO;
          -	char *result = this_db_list + *offset;
          +	char *result = ThisDbList + *offset;
           	char *marker = strchr(result, NCURSES_PATHSEP);
           
           	/*
          @@ -124,9 +122,9 @@
           	    marker = result + *offset;
           	} else {
           	    *marker++ = 0;
          -	    *offset = marker - this_db_list;
          +	    *offset = marker - ThisDbList;
           	}
          -	if (*result == 0 && result != (this_db_list + size_db_list))
          +	if (*result == 0 && result != (ThisDbList + ThisDbSize))
           	    result = system_db;
           	return result;
               }
          @@ -153,7 +151,7 @@
           
           	switch (*state) {
           	case dbdTIC:
          -	    if (have_tic_directory)
          +	    if (HaveTicDirectory)
           		result = _nc_tic_dir(0);
           	    break;
           #if USE_DATABASE
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/entries.c ncurses-5.6/ncurses/tinfo/entries.c
          --- ncurses-5.6.orig/ncurses/tinfo/entries.c	1969-12-31 19:00:00.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/entries.c	2007-12-21 00:02:36.000000000 -0500
          @@ -0,0 +1,144 @@
          +/****************************************************************************
          + * Copyright (c) 2006,2007 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"), to deal in the Software without restriction, including      *
          + * without limitation the rights to use, copy, modify, merge, publish,      *
          + * distribute, distribute with modifications, sublicense, and/or sell       *
          + * copies of the Software, and to permit persons to whom the Software is    *
          + * furnished to do so, subject to the following conditions:                 *
          + *                                                                          *
          + * The above copyright notice and this permission notice shall be included  *
          + * in all copies or substantial portions of the Software.                   *
          + *                                                                          *
          + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
          + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
          + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
          + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
          + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
          + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
          + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
          + *                                                                          *
          + * Except as contained in this notice, the name(s) of the above copyright   *
          + * holders shall not be used in advertising or otherwise to promote the     *
          + * sale, use or other dealings in this Software without prior written       *
          + * authorization.                                                           *
          + ****************************************************************************/
          +
          +/****************************************************************************
          + *  Author: Thomas E. Dickey                                                *
          + ****************************************************************************/
          +
          +#include 
          +
          +#include 
          +
          +#include 
          +#include 
          +
          +MODULE_ID("$Id: entries.c,v 1.4 2007/11/03 21:00:27 tom Exp $")
          +
          +/****************************************************************************
          + *
          + * Entry queue handling
          + *
          + ****************************************************************************/
          +/*
          + *  The entry list is a doubly linked list with NULLs terminating the lists:
          + *
          + *	  ---------   ---------   ---------
          + *	  |       |   |       |   |       |   offset
          + *        |-------|   |-------|   |-------|
          + *	  |   ----+-->|   ----+-->|  NULL |   next
          + *	  |-------|   |-------|   |-------|
          + *	  |  NULL |<--+----   |<--+----   |   last
          + *	  ---------   ---------   ---------
          + *	      ^                       ^
          + *	      |                       |
          + *	      |                       |
          + *	   _nc_head                _nc_tail
          + */
          +
          +NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0;
          +NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0;
          +
          +NCURSES_EXPORT(void)
          +_nc_free_entry(ENTRY * headp, TERMTYPE *tterm)
          +/* free the allocated storage consumed by the given list entry */
          +{
          +    ENTRY *ep;
          +
          +    if ((ep = _nc_delink_entry(headp, tterm)) != 0) {
          +	free(ep);
          +    }
          +}
          +
          +NCURSES_EXPORT(void)
          +_nc_free_entries(ENTRY * headp)
          +/* free the allocated storage consumed by list entries */
          +{
          +    (void) headp;		/* unused - _nc_head is altered here! */
          +
          +    while (_nc_head != 0) {
          +	_nc_free_termtype(&(_nc_head->tterm));
          +    }
          +}
          +
          +NCURSES_EXPORT(ENTRY *)
          +_nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
          +/* delink the allocated storage for the given list entry */
          +{
          +    ENTRY *ep, *last;
          +
          +    for (last = 0, ep = headp; ep != 0; last = ep, ep = ep->next) {
          +	if (&(ep->tterm) == tterm) {
          +	    if (last != 0) {
          +		last->next = ep->next;
          +	    }
          +	    if (ep == _nc_head) {
          +		_nc_head = ep->next;
          +	    }
          +	    if (ep == _nc_tail) {
          +		_nc_tail = last;
          +	    }
          +	    break;
          +	}
          +    }
          +    return ep;
          +}
          +
          +NCURSES_EXPORT(void)
          +_nc_leaks_tinfo(void)
          +{
          +    char *s;
          +
          +    T((T_CALLED("_nc_free_tinfo()")));
          +#if NO_LEAKS
          +    _nc_free_tparm();
          +    _nc_tgetent_leaks();
          +#endif
          +    _nc_free_entries(_nc_head);
          +    _nc_get_type(0);
          +    _nc_first_name(0);
          +#if NO_LEAKS
          +    _nc_keyname_leaks();
          +#endif
          +#if BROKEN_LINKER || USE_REENTRANT
          +    _nc_names_leaks();
          +    _nc_codes_leaks();
          +#endif
          +
          +    if ((s = _nc_home_terminfo()) != 0)
          +	free(s);
          +    returnVoid;
          +}
          +
          +#if NO_LEAKS
          +NCURSES_EXPORT(void)
          +_nc_free_tinfo(int code)
          +{
          +    _nc_leaks_tinfo();
          +    exit(code);
          +}
          +#endif
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/home_terminfo.c ncurses-5.6/ncurses/tinfo/home_terminfo.c
          --- ncurses-5.6.orig/ncurses/tinfo/home_terminfo.c	2005-07-02 15:43:38.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/home_terminfo.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2005,2007 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 @@
            ****************************************************************************/
           
           /****************************************************************************
          - *  Author: Thomas E. Dickey 1998,2000,2004,2005                            *
          + *  Author: Thomas E. Dickey                                                *
            ****************************************************************************/
           
           /*
          @@ -37,31 +37,32 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: home_terminfo.c,v 1.9 2005/07/02 19:43:38 tom Exp $")
          +MODULE_ID("$Id: home_terminfo.c,v 1.10 2007/04/21 23:11:53 tom Exp $")
           
           #define my_length (strlen(home) + sizeof(PRIVATE_INFO))
           
           /* ncurses extension...fall back on user's private directory */
           
          +#define MyBuffer _nc_globals.home_terminfo
          +
           NCURSES_EXPORT(char *)
           _nc_home_terminfo(void)
           {
               char *result = 0;
          -#ifdef USE_HOME_TERMINFO
          +#if USE_HOME_TERMINFO
               char *home;
          -    static char *temp = 0;
           
               if (use_terminfo_vars()) {
          -	if (temp == 0) {
          +	if (MyBuffer == 0) {
           	    if ((home = getenv("HOME")) != 0
           		&& my_length <= PATH_MAX) {
          -		temp = typeMalloc(char, my_length);
          -		if (temp == 0)
          +		MyBuffer = typeMalloc(char, my_length);
          +		if (MyBuffer == 0)
           		    _nc_err_abort(MSG_NO_MEMORY);
          -		(void) sprintf(temp, PRIVATE_INFO, home);
          +		(void) sprintf(MyBuffer, PRIVATE_INFO, home);
           	    }
           	}
          -	result = temp;
          +	result = MyBuffer;
               }
           #endif
               return result;
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/init_keytry.c ncurses-5.6/ncurses/tinfo/init_keytry.c
          --- ncurses-5.6.orig/ncurses/tinfo/init_keytry.c	2006-01-21 18:43:28.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/init_keytry.c	2007-12-21 00:02:36.000000000 -0500
          @@ -36,7 +36,7 @@
           
           #include 
           
          -MODULE_ID("$Id: init_keytry.c,v 1.8 2006/01/21 23:43:28 tom Exp $")
          +MODULE_ID("$Id: init_keytry.c,v 1.10 2007/04/29 22:57:50 tom Exp $")
           
           /*
           **      _nc_init_keytry()
          @@ -56,7 +56,7 @@
           #endif*/
           
           #if	BROKEN_LINKER
          -struct tinfo_fkeys *
          +const struct tinfo_fkeys *
           _nc_tinfo_fkeysf(void)
           {
               return _nc_tinfo_fkeys;
          @@ -76,9 +76,9 @@
               if (SP != 0) {
           	for (n = 0; _nc_tinfo_fkeys[n].code; n++) {
           	    if (_nc_tinfo_fkeys[n].offset < STRCOUNT) {
          -		_nc_add_to_try(&(SP->_keytry),
          -			       CUR Strings[_nc_tinfo_fkeys[n].offset],
          -			       _nc_tinfo_fkeys[n].code);
          +		(void) _nc_add_to_try(&(SP->_keytry),
          +				      CUR Strings[_nc_tinfo_fkeys[n].offset],
          +				      _nc_tinfo_fkeys[n].code);
           	    }
           	}
           #if NCURSES_XNAMES
          @@ -96,9 +96,9 @@
           		    && *name == 'k'
           		    && value != 0
           		    && key_defined(value) == 0) {
          -		    _nc_add_to_try(&(SP->_keytry),
          -				   value,
          -				   n - STRCOUNT + KEY_MAX);
          +		    (void) _nc_add_to_try(&(SP->_keytry),
          +					  value,
          +					  n - STRCOUNT + KEY_MAX);
           		}
           	    }
           	}
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_acs.c ncurses-5.6/ncurses/tinfo/lib_acs.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_acs.c	2006-01-07 16:27:15.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/lib_acs.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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,18 @@
           #include 
           #include 		/* ena_acs, acs_chars */
           
          -MODULE_ID("$Id: lib_acs.c,v 1.30 2006/01/07 21:27:15 tom Exp $")
          +MODULE_ID("$Id: lib_acs.c,v 1.34 2007/09/29 20:37:13 tom Exp $")
           
          -#if BROKEN_LINKER
          +#if BROKEN_LINKER || USE_REENTRANT
          +#define MyBuffer _nc_prescreen.real_acs_map
           NCURSES_EXPORT_VAR(chtype *)
           _nc_acs_map(void)
           {
          -    static chtype *the_map = 0;
          -    if (the_map == 0)
          -	the_map = typeCalloc(chtype, ACS_LEN);
          -    return the_map;
          +    if (MyBuffer == 0)
          +	MyBuffer = typeCalloc(chtype, ACS_LEN);
          +    return MyBuffer;
           }
          +#undef MyBuffer
           #else
           NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
           {
          @@ -117,16 +118,6 @@
               real_map['|'] = '!';	/* should be not-equal */
               real_map['}'] = 'f';	/* should be pound-sterling symbol */
           
          -#if !USE_WIDEC_SUPPORT
          -    if (_nc_unicode_locale() && _nc_locale_breaks_acs()) {
          -	acs_chars = NULL;
          -	ena_acs = NULL;
          -	enter_alt_charset_mode = NULL;
          -	exit_alt_charset_mode = NULL;
          -	set_attributes = NULL;
          -    }
          -#endif
          -
               if (ena_acs != NULL) {
           	TPUTS_TRACE("ena_acs");
           	putp(ena_acs);
          @@ -175,7 +166,7 @@
               /* Show the equivalent mapping, noting if it does not match the
                * given attribute, whether by re-ordering or duplication.
                */
          -    if (_nc_tracing & TRACE_CALLS) {
          +    if (USE_TRACEF(TRACE_CALLS)) {
           	size_t n, m;
           	char show[ACS_LEN * 2 + 1];
           	for (n = 1, m = 0; n < ACS_LEN; n++) {
          @@ -196,6 +187,7 @@
           		   ? "DIFF"
           		   : "SAME"),
           		_nc_visbuf(show));
          +	_nc_unlock_global(tracef);
               }
           #endif /* TRACE */
           }
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_baudrate.c ncurses-5.6/ncurses/tinfo/lib_baudrate.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_baudrate.c	2002-01-19 18:07:53.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/lib_baudrate.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998,2000,2002 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -29,6 +29,7 @@
           /****************************************************************************
            *  Author: Zeyd M. Ben-Halim  1992,1995               *
            *     and: Eric S. Raymond                          *
          + *     and: Thomas E. Dickey                        1996-on                 *
            ****************************************************************************/
           
           /*
          @@ -39,6 +40,9 @@
           #include 
           #include 		/* cur_term, pad_char */
           #include 		/* ospeed */
          +#if defined(__FreeBSD__)
          +#include 
          +#endif
           
           /*
            * These systems use similar header files, which define B1200 as 1200, etc.,
          @@ -46,7 +50,7 @@
            * of the indices up to B115200 fit nicely in a 'short', allowing us to retain
            * ospeed's type for compatibility.
            */
          -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
          +#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__)
           #undef B0
           #undef B50
           #undef B75
          @@ -76,7 +80,7 @@
           #undef USE_OLD_TTY
           #endif /* USE_OLD_TTY */
           
          -MODULE_ID("$Id: lib_baudrate.c,v 1.22 2002/01/19 23:07:53 Andrey.A.Chernov Exp $")
          +MODULE_ID("$Id: lib_baudrate.c,v 1.25 2007/10/20 15:00:41 Rong-En.Fan Exp $")
           
           /*
            *	int
          @@ -141,16 +145,20 @@
           NCURSES_EXPORT(int)
           _nc_baudrate(int OSpeed)
           {
          +#if !USE_REENTRANT
               static int last_OSpeed;
               static int last_baudrate;
          +#endif
           
          -    int result;
          +    int result = ERR;
               unsigned i;
           
          +#if !USE_REENTRANT
               if (OSpeed == last_OSpeed) {
           	result = last_baudrate;
          -    } else {
          -	result = ERR;
          +    }
          +#endif
          +    if (result == ERR) {
           	if (OSpeed >= 0) {
           	    for (i = 0; i < SIZEOF(speeds); i++) {
           		if (speeds[i].s == OSpeed) {
          @@ -159,7 +167,12 @@
           		}
           	    }
           	}
          -	last_baudrate = result;
          +#if !USE_REENTRANT
          +	if (OSpeed == last_OSpeed) {
          +	    last_OSpeed = OSpeed;
          +	    last_baudrate = result;
          +	}
          +#endif
               }
               return (result);
           }
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_data.c ncurses-5.6/ncurses/tinfo/lib_data.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_data.c	2005-01-22 12:39:22.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/lib_data.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2005,2007 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            *
          @@ -41,15 +41,33 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_data.c,v 1.17 2005/01/22 17:39:22 tom Exp $")
          +MODULE_ID("$Id: lib_data.c,v 1.34 2007/10/20 21:49:10 tom Exp $")
           
           /*
            * OS/2's native linker complains if we don't initialize public data when
            * constructing a dll (reported by J.J.G.Ripoll).
            */
          +#if USE_REENTRANT
          +NCURSES_EXPORT(WINDOW *)
          +NCURSES_PUBLIC_VAR(stdscr) (void)
          +{
          +    return SP ? SP->_stdscr : 0;
          +}
          +NCURSES_EXPORT(WINDOW *)
          +NCURSES_PUBLIC_VAR(curscr) (void)
          +{
          +    return SP ? SP->_curscr : 0;
          +}
          +NCURSES_EXPORT(WINDOW *)
          +NCURSES_PUBLIC_VAR(newscr) (void)
          +{
          +    return SP ? SP->_newscr : 0;
          +}
          +#else
           NCURSES_EXPORT_VAR(WINDOW *) stdscr = 0;
           NCURSES_EXPORT_VAR(WINDOW *) curscr = 0;
           NCURSES_EXPORT_VAR(WINDOW *) newscr = 0;
          +#endif
           
           NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain = 0;
           
          @@ -87,3 +105,129 @@
           #else
           NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */
           #endif
          +/* *INDENT-OFF* */
          +#define CHARS_0s { '\0' }
          +
          +#define TGETENT_0 { 0L, FALSE, NULL, NULL, NULL }
          +#define TGETENT_0s { TGETENT_0, TGETENT_0, TGETENT_0, TGETENT_0 } 
          +
          +NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
          +    0,				/* have_sigwinch */
          +    0,				/* cleanup_nested */
          +
          +    FALSE,			/* init_signals */
          +    FALSE,			/* init_screen */
          +
          +    NULL,			/* comp_sourcename */
          +    NULL,			/* comp_termtype */
          +
          +    FALSE,			/* have_tic_directory */
          +    FALSE,			/* keep_tic_directory */
          +    TERMINFO,			/* tic_directory */
          +
          +    NULL,			/* dbi_list */
          +    0,				/* dbi_size */
          +
          +    NULL,			/* first_name */
          +    NULL,			/* keyname_table */
          +
          +    NULL,			/* safeprint_buf */
          +    0,				/* safeprint_used */
          +
          +    TGETENT_0s,			/* tgetent_cache */
          +    0,				/* tgetent_index */
          +    0,				/* tgetent_sequence */
          +
          +#if USE_HOME_TERMINFO
          +    NULL,			/* home_terminfo */
          +#endif
          +
          +#if !USE_SAFE_SPRINTF
          +    0,				/* safeprint_cols */
          +    0,				/* safeprint_rows */
          +#endif
          +
          +#ifdef TRACE
          +    FALSE,			/* init_trace */
          +    CHARS_0s,			/* trace_fname */
          +    0,				/* trace_level */
          +    NULL,			/* trace_fp */
          +
          +    NULL,			/* tracearg_buf */
          +    0,				/* tracearg_used */
          +
          +    NULL,			/* tracebuf_ptr */
          +    0,				/* tracebuf_used */
          +
          +    CHARS_0s,			/* tracechr_buf */
          +
          +    NULL,			/* tracedmp_buf */
          +    0,				/* tracedmp_used */
          +
          +    CHARS_0s,			/* tracemse_buf */
          +
          +    NULL,			/* tracetry_buf */
          +    0,				/* tracetry_used */
          +
          +#ifndef USE_TERMLIB
          +    { CHARS_0s, CHARS_0s },	/* traceatr_color_buf */
          +    0,				/* traceatr_color_sel */
          +    -1,				/* traceatr_color_last */
          +#endif /* USE_TERMLIB */
          +
          +#endif /* TRACE */
          +#ifdef USE_PTHREADS
          +    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_set_SP */
          +    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_use_screen */
          +    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_use_window */
          +    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_windowlist */
          +    PTHREAD_MUTEX_INITIALIZER,	/* mutex_tst_tracef */
          +    PTHREAD_MUTEX_INITIALIZER,	/* mutex_tracef */
          +    0,				/* nested_tracef */
          +#endif
          +};
          +
          +#define STACK_FRAME_0	{ { 0 }, 0 }
          +#define STACK_FRAME_0s	{ STACK_FRAME_0 }
          +#define NUM_VARS_0s	{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
          +
          +#define RIPOFF_0	{ 0,0 }
          +#define RIPOFF_0s	{ RIPOFF_0 }
          +
          +NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
          +    TRUE,			/* use_env */
          +    FALSE,			/* filter_mode */
          +    A_NORMAL,			/* previous_attr */
          +    RIPOFF_0s,			/* ripoff */
          +    NULL,			/* rsp */
          +    {				/* tparm_state */
          +#ifdef TRACE
          +	NULL,			/* tname */
          +#endif
          +	NULL,			/* tparam_base */
          +
          +	STACK_FRAME_0s,		/* stack */
          +	0,			/* stack_ptr */
          +
          +	NULL,			/* out_buff */
          +	0,			/* out_size */
          +	0,			/* out_used */
          +
          +	NULL,			/* fmt_buff */
          +	0,			/* fmt_size */
          +
          +	NUM_VARS_0s,		/* dynamic_var */
          +	NUM_VARS_0s,		/* static_vars */
          +    },
          +    NULL,			/* saved_tty */
          +#if BROKEN_LINKER || USE_REENTRANT
          +    NULL,			/* real_acs_map */
          +    0,				/* LINES */
          +    0,				/* COLS */
          +#ifdef TRACE
          +    0L,				/* _outchars */
          +    NULL,			/* _tputs_trace */
          +#endif
          +#endif
          +};
          +/* *INDENT-ON* */
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_options.c ncurses-5.6/ncurses/tinfo/lib_options.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_options.c	2006-03-04 14:28:25.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/lib_options.c	2007-12-21 00:02:36.000000000 -0500
          @@ -43,7 +43,7 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_options.c,v 1.49 2006/03/04 19:28:25 tom Exp $")
          +MODULE_ID("$Id: lib_options.c,v 1.50 2006/12/30 16:03:27 tom Exp $")
           
           NCURSES_EXPORT(int)
           idlok(WINDOW *win, bool flag)
          @@ -220,7 +220,7 @@
           
           #if NCURSES_EXT_FUNCS
           static int
          -has_key_internal(int keycode, struct tries *tp)
          +has_key_internal(int keycode, TRIES *tp)
           {
               if (tp == 0)
           	return (FALSE);
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_raw.c ncurses-5.6/ncurses/tinfo/lib_raw.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_raw.c	2002-07-06 18:00:45.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/lib_raw.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2002,2007 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            *
          @@ -49,7 +49,7 @@
           #include 
           #include 		/* cur_term */
           
          -MODULE_ID("$Id: lib_raw.c,v 1.13 2002/07/06 22:00:45 tom Exp $")
          +MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $")
           
           #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
           #define _POSIX_SOURCE
          @@ -69,8 +69,8 @@
           #define COOKED_INPUT	(IXON|BRKINT|PARMRK)
           
           #ifdef TRACE
          -#define BEFORE(N)	if (_nc_tracing&TRACE_BITS) _tracef("%s before bits: %s", N, _nc_tracebits())
          -#define AFTER(N)	if (_nc_tracing&TRACE_BITS) _tracef("%s after bits: %s", N, _nc_tracebits())
          +#define BEFORE(N)	if (USE_TRACEF(TRACE_BITS)) _nc_locked_tracef("%s before bits: %s", N, _nc_tracebits())
          +#define AFTER(N)	if (USE_TRACEF(TRACE_BITS)) _nc_locked_tracef("%s after bits: %s", N, _nc_tracebits())
           #else
           #define BEFORE(s)
           #define AFTER(s)
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_setup.c ncurses-5.6/ncurses/tinfo/lib_setup.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_setup.c	2006-07-28 18:58:13.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/lib_setup.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -29,7 +29,7 @@
           /****************************************************************************
            *  Author: Zeyd M. Ben-Halim  1992,1995               *
            *     and: Eric S. Raymond                          *
          - *     and: Thomas E. Dickey 1996-2003                                      *
          + *     and: Thomas E. Dickey                        1996-on                 *
            ****************************************************************************/
           
           /*
          @@ -53,7 +53,7 @@
           
           #include 		/* lines, columns, cur_term */
           
          -MODULE_ID("$Id: lib_setup.c,v 1.95 2006/07/28 22:58:13 tom Exp $")
          +MODULE_ID("$Id: lib_setup.c,v 1.100 2007/09/01 20:58:26 tom Exp $")
           
           /****************************************************************************
            *
          @@ -99,55 +99,57 @@
           # endif
           #endif
           
          +#if USE_REENTRANT
          +NCURSES_EXPORT(char *)
          +NCURSES_PUBLIC_VAR(ttytype) (void)
          +{
          +    static char empty[] = "";
          +    return cur_term ? cur_term->type.term_names : empty;
          +}
          +NCURSES_EXPORT(int)
          +NCURSES_PUBLIC_VAR(LINES) (void)
          +{
          +    return (SP ? SP->_LINES : _nc_prescreen._LINES);
          +}
          +NCURSES_EXPORT(int)
          +NCURSES_PUBLIC_VAR(COLS) (void)
          +{
          +    return SP ? SP->_COLS : _nc_prescreen._COLS;
          +}
          +NCURSES_EXPORT(int)
          +NCURSES_PUBLIC_VAR(TABSIZE) (void)
          +{
          +    return SP ? SP->_TABSIZE : 8;
          +}
          +#else
           NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
           NCURSES_EXPORT_VAR(int) LINES = 0;
           NCURSES_EXPORT_VAR(int) COLS = 0;
           NCURSES_EXPORT_VAR(int) TABSIZE = 0;
          -
          -static int _use_env = TRUE;
          +#endif
           
           #if USE_SIGWINCH
          -int
          -_nc_handle_sigwinch(int enable)
          +/*
          + * If we have a pending SIGWINCH, set the flag in each screen.
          + */
          +NCURSES_EXPORT(int)
          +_nc_handle_sigwinch(int update)
           {
          -    static int have_sigwinch = 0;	/* initially no SIGWINCH's */
          -    static int can_resizeall = 1;	/* initially enabled */
               SCREEN *scan;
          -    int result;
           
          -    switch (enable) {
          -    default:
          -	/* record a SIGWINCH */
          -	have_sigwinch = 1;
          -	break;
          -    case 0:
          -	/* temporarily disable the next block */
          -	--can_resizeall;
          -	break;
          -    case 1:
          -	/* temporarily enable the next block */
          -	++can_resizeall;
          -	break;
          -    }
          +    (void) update;		/* no longer used */
           
          -    /*
          -     * If we have a pending SIGWINCH, set the flag in each screen.
          -     * But do this only if the block is enabled.
          -     */
          -    if (can_resizeall-- >= 0) {	/* test and disable */
          -	if (have_sigwinch) {
          -	    scan = _nc_screen_chain;
          -	    while (scan) {
          -		scan->_sig_winch = TRUE;
          -		scan = scan->_next_screen;
          -	    }
          -	    have_sigwinch = 0;
          +    if (_nc_globals.have_sigwinch) {
          +	_nc_globals.have_sigwinch = 0;
          +
          +	scan = _nc_screen_chain;
          +	while (scan) {
          +	    scan->_sig_winch = TRUE;
          +	    scan = scan->_next_screen;
           	}
               }
          -    result = can_resizeall + 1;	/* reenable (unless disables are nested) */
          -    can_resizeall = result;
           
          -    return result;
          +    return (SP ? SP->_sig_winch : 0);
           }
           
           #endif
          @@ -156,19 +158,20 @@
           use_env(bool f)
           {
               T((T_CALLED("use_env()")));
          -    _use_env = f;
          +    _nc_prescreen.use_env = f;
               returnVoid;
           }
           
          -static void
          +NCURSES_EXPORT(void)
           _nc_get_screensize(int *linep, int *colp)
           /* Obtain lines/columns values from the environment and/or terminfo entry */
           {
          +    int my_tabsize;
          +
               /* figure out the size of the screen */
               T(("screen size: terminfo lines = %d columns = %d", lines, columns));
           
          -    _nc_handle_sigwinch(0);
          -    if (!_use_env) {
          +    if (!_nc_prescreen.use_env) {
           	*linep = (int) lines;
           	*colp = (int) columns;
               } else {			/* usually want to query LINES and COLUMNS from environment */
          @@ -246,14 +249,20 @@
           	lines = (short) (*linep);
           	columns = (short) (*colp);
               }
          -    _nc_handle_sigwinch(1);
           
               T(("screen size is %dx%d", *linep, *colp));
           
               if (VALID_NUMERIC(init_tabs))
          -	TABSIZE = (int) init_tabs;
          +	my_tabsize = (int) init_tabs;
               else
          -	TABSIZE = 8;
          +	my_tabsize = 8;
          +
          +#if USE_REENTRANT
          +    if (SP != 0)
          +	SP->_TABSIZE = my_tabsize;
          +#else
          +    TABSIZE = my_tabsize;
          +#endif
               T(("TABSIZE = %d", TABSIZE));
           }
           
          @@ -536,8 +545,10 @@
           	if (command_character && getenv("CC"))
           	    do_prototype();
           
          +#if !USE_REENTRANT
           	strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1);
           	ttytype[NAMESIZE - 1] = '\0';
          +#endif
           
           	cur_term->Filedes = Filedes;
           	cur_term->_termname = strdup(tname);
          @@ -557,13 +568,16 @@
               /*
                * We should always check the screensize, just in case.
                */
          +#if USE_REENTRANT
          +    _nc_get_screensize(SP ? &(SP->_LINES) : &(_nc_prescreen._LINES),
          +		       SP ? &(SP->_COLS) : &(_nc_prescreen._COLS));
          +#else
               _nc_get_screensize(&LINES, &COLS);
          +#endif
           
               if (errret)
           	*errret = TGETENT_YES;
           
          -    T((T_CREATE("screen %s %dx%d"), tname, LINES, COLS));
          -
               if (generic_type) {
           	ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
               }
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_termcap.c ncurses-5.6/ncurses/tinfo/lib_termcap.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_termcap.c	2006-09-02 15:39:46.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/lib_termcap.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -45,26 +45,20 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_termcap.c,v 1.58 2006/09/02 19:39:46 Miroslav.Lichvar Exp $")
          +MODULE_ID("$Id: lib_termcap.c,v 1.61 2007/06/02 19:36:03 tom Exp $")
           
           NCURSES_EXPORT_VAR(char *) UP = 0;
           NCURSES_EXPORT_VAR(char *) BC = 0;
           
          -typedef struct {
          -    long sequence;
          -    char *fix_sgr0;		/* this holds the filtered sgr0 string */
          -    char *last_bufp;		/* help with fix_sgr0 leak */
          -    TERMINAL *last_term;
          -} CACHE;
          -
          -#define MAX_CACHE 4
          -static CACHE cache[MAX_CACHE];
          -static int in_cache = 0;
          -
          -#define FIX_SGR0 cache[in_cache].fix_sgr0
          -#define LAST_TRM cache[in_cache].last_term
          -#define LAST_BUF cache[in_cache].last_bufp
          -#define LAST_SEQ cache[in_cache].sequence
          +#define MyCache  _nc_globals.tgetent_cache
          +#define CacheInx _nc_globals.tgetent_index
          +#define CacheSeq _nc_globals.tgetent_sequence
          +
          +#define FIX_SGR0 MyCache[CacheInx].fix_sgr0
          +#define LAST_TRM MyCache[CacheInx].last_term
          +#define LAST_BUF MyCache[CacheInx].last_bufp
          +#define LAST_USE MyCache[CacheInx].last_used
          +#define LAST_SEQ MyCache[CacheInx].sequence
           
           /***************************************************************************
            *
          @@ -84,8 +78,6 @@
           NCURSES_EXPORT(int)
           tgetent(char *bufp, const char *name)
           {
          -    static long sequence;
          -
               int errcode;
               int n;
               bool found_cache = FALSE;
          @@ -100,11 +92,17 @@
                * caller, but if tgetent() is called with the same buffer, that is
                * good enough, since the previous data would be invalidated by the
                * current call.
          +     *
          +     * bufp may be a null pointer, e.g., GNU termcap.  That allocates data,
          +     * which is good until the next tgetent() call.  The conventional termcap
          +     * is inconvenient because of the fixed buffer size, but because it uses
          +     * caller-supplied buffers, can have multiple terminal descriptions in
          +     * use at a given time.
                */
          -    for (n = 0; n < MAX_CACHE; ++n) {
          -	bool same_result = (bufp != 0 && cache[n].last_bufp == bufp);
          +    for (n = 0; n < TGETENT_MAX; ++n) {
          +	bool same_result = (MyCache[n].last_used && MyCache[n].last_bufp == bufp);
           	if (same_result) {
          -	    in_cache = n;
          +	    CacheInx = n;
           	    if (FIX_SGR0 != 0) {
           		FreeAndNull(FIX_SGR0);
           	    }
          @@ -114,10 +112,10 @@
           	    if (LAST_TRM != 0 && LAST_TRM != cur_term) {
           		TERMINAL *trm = LAST_TRM;
           		del_curterm(LAST_TRM);
          -		for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache)
          +		for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
           		    if (LAST_TRM == trm)
           			LAST_TRM = 0;
          -		in_cache = n;
          +		CacheInx = n;
           	    }
           	    found_cache = TRUE;
           	    break;
          @@ -126,15 +124,15 @@
               if (!found_cache) {
           	int best = 0;
           
          -	for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) {
          -	    if (LAST_SEQ < cache[best].sequence) {
          -		best = in_cache;
          +	for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) {
          +	    if (LAST_SEQ < MyCache[best].sequence) {
          +		best = CacheInx;
           	    }
           	}
          -	in_cache = best;
          +	CacheInx = best;
               }
               LAST_TRM = cur_term;
          -    LAST_SEQ = ++sequence;
          +    LAST_SEQ = ++CacheSeq;
           
               PC = 0;
               UP = 0;
          @@ -164,6 +162,7 @@
           	    }
           	}
           	LAST_BUF = bufp;
          +	LAST_USE = TRUE;
           
           	(void) baudrate();	/* sets ospeed as a side-effect */
           
          @@ -282,9 +281,10 @@
           NCURSES_EXPORT(void)
           _nc_tgetent_leaks(void)
           {
          -    for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) {
          +    for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) {
           	FreeIfNeeded(FIX_SGR0);
          -	del_curterm(LAST_TRM);
          +	if (LAST_TRM != 0)
          +	    del_curterm(LAST_TRM);
               }
           }
           #endif
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_tparm.c ncurses-5.6/ncurses/tinfo/lib_tparm.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_tparm.c	2006-11-25 20:12:56.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/lib_tparm.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -43,7 +43,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: lib_tparm.c,v 1.71 2006/11/26 01:12:56 tom Exp $")
          +MODULE_ID("$Id: lib_tparm.c,v 1.74 2007/09/29 20:37:13 tom Exp $")
           
           /*
            *	char *
          @@ -105,43 +105,20 @@
            *	resulting in x mod y, not the reverse.
            */
           
          -#define STACKSIZE	20
          -
          -typedef struct {
          -    union {
          -	int num;
          -	char *str;
          -    } data;
          -    bool num_type;
          -} stack_frame;
          -
           NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
           
          -static stack_frame stack[STACKSIZE];
          -static int stack_ptr;
          -static const char *tparam_base = "";
          -
          -#ifdef TRACE
          -static const char *tname;
          -#endif /* TRACE */
          -
          -static char *out_buff;
          -static size_t out_size;
          -static size_t out_used;
          -
          -static char *fmt_buff;
          -static size_t fmt_size;
          +#define TPS(var) _nc_prescreen.tparm_state.var
           
           #if NO_LEAKS
           NCURSES_EXPORT(void)
           _nc_free_tparm(void)
           {
          -    if (out_buff != 0) {
          -	FreeAndNull(out_buff);
          -	out_size = 0;
          -	out_used = 0;
          -	FreeAndNull(fmt_buff);
          -	fmt_size = 0;
          +    if (TPS(out_buff) != 0) {
          +	FreeAndNull(TPS(out_buff));
          +	TPS(out_size) = 0;
          +	TPS(out_used) = 0;
          +	FreeAndNull(TPS(fmt_buff));
          +	TPS(fmt_size) = 0;
               }
           }
           #endif
          @@ -149,11 +126,11 @@
           static NCURSES_INLINE void
           get_space(size_t need)
           {
          -    need += out_used;
          -    if (need > out_size) {
          -	out_size = need * 2;
          -	out_buff = typeRealloc(char, out_size, out_buff);
          -	if (out_buff == 0)
          +    need += TPS(out_used);
          +    if (need > TPS(out_size)) {
          +	TPS(out_size) = need * 2;
          +	TPS(out_buff) = typeRealloc(char, TPS(out_size), TPS(out_buff));
          +	if (TPS(out_buff) == 0)
           	    _nc_err_abort(MSG_NO_MEMORY);
               }
           }
          @@ -167,8 +144,8 @@
           
               get_space(s_len + 1);
           
          -    (void) sprintf(out_buff + out_used, fmt, s);
          -    out_used += strlen(out_buff + out_used);
          +    (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, s);
          +    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
           }
           
           static NCURSES_INLINE void
          @@ -179,8 +156,8 @@
           
               get_space((unsigned) len + 1);
           
          -    (void) sprintf(out_buff + out_used, fmt, number);
          -    out_used += strlen(out_buff + out_used);
          +    (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, number);
          +    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
           }
           
           static NCURSES_INLINE void
          @@ -189,18 +166,18 @@
               if (c == 0)
           	c = 0200;
               get_space(1);
          -    out_buff[out_used++] = c;
          +    TPS(out_buff)[TPS(out_used)++] = c;
           }
           
           static NCURSES_INLINE void
           npush(int x)
           {
          -    if (stack_ptr < STACKSIZE) {
          -	stack[stack_ptr].num_type = TRUE;
          -	stack[stack_ptr].data.num = x;
          -	stack_ptr++;
          +    if (TPS(stack_ptr) < STACKSIZE) {
          +	TPS(stack)[TPS(stack_ptr)].num_type = TRUE;
          +	TPS(stack)[TPS(stack_ptr)].data.num = x;
          +	TPS(stack_ptr)++;
               } else {
          -	DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(tparam_base)));
          +	DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
           	_nc_tparm_err++;
               }
           }
          @@ -209,12 +186,12 @@
           npop(void)
           {
               int result = 0;
          -    if (stack_ptr > 0) {
          -	stack_ptr--;
          -	if (stack[stack_ptr].num_type)
          -	    result = stack[stack_ptr].data.num;
          +    if (TPS(stack_ptr) > 0) {
          +	TPS(stack_ptr)--;
          +	if (TPS(stack)[TPS(stack_ptr)].num_type)
          +	    result = TPS(stack)[TPS(stack_ptr)].data.num;
               } else {
          -	DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(tparam_base)));
          +	DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
           	_nc_tparm_err++;
               }
               return result;
          @@ -223,12 +200,12 @@
           static NCURSES_INLINE void
           spush(char *x)
           {
          -    if (stack_ptr < STACKSIZE) {
          -	stack[stack_ptr].num_type = FALSE;
          -	stack[stack_ptr].data.str = x;
          -	stack_ptr++;
          +    if (TPS(stack_ptr) < STACKSIZE) {
          +	TPS(stack)[TPS(stack_ptr)].num_type = FALSE;
          +	TPS(stack)[TPS(stack_ptr)].data.str = x;
          +	TPS(stack_ptr)++;
               } else {
          -	DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(tparam_base)));
          +	DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
           	_nc_tparm_err++;
               }
           }
          @@ -238,12 +215,13 @@
           {
               static char dummy[] = "";	/* avoid const-cast */
               char *result = dummy;
          -    if (stack_ptr > 0) {
          -	stack_ptr--;
          -	if (!stack[stack_ptr].num_type && stack[stack_ptr].data.str != 0)
          -	    result = stack[stack_ptr].data.str;
          +    if (TPS(stack_ptr) > 0) {
          +	TPS(stack_ptr)--;
          +	if (!TPS(stack)[TPS(stack_ptr)].num_type
          +	    && TPS(stack)[TPS(stack_ptr)].data.str != 0)
          +	    result = TPS(stack)[TPS(stack_ptr)].data.str;
               } else {
          -	DEBUG(2, ("spop: stack underflow: %s", _nc_visbuf(tparam_base)));
          +	DEBUG(2, ("spop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
           	_nc_tparm_err++;
               }
               return result;
          @@ -369,10 +347,11 @@
               if (cp == 0)
           	return 0;
           
          -    if ((len2 = strlen(cp)) > fmt_size) {
          -	fmt_size = len2 + fmt_size + 2;
          -	if ((fmt_buff = typeRealloc(char, fmt_size, fmt_buff)) == 0)
          -	      return 0;
          +    if ((len2 = strlen(cp)) > TPS(fmt_size)) {
          +	TPS(fmt_size) = len2 + TPS(fmt_size) + 2;
          +	TPS(fmt_buff) = typeRealloc(char, TPS(fmt_size), TPS(fmt_buff));
          +	if (TPS(fmt_buff) == 0)
          +	    return 0;
               }
           
               memset(p_is_s, 0, sizeof(p_is_s[0]) * NUM_PARM);
          @@ -381,7 +360,7 @@
               while ((cp - string) < (int) len2) {
           	if (*cp == '%') {
           	    cp++;
          -	    cp = parse_format(cp, fmt_buff, &len);
          +	    cp = parse_format(cp, TPS(fmt_buff), &len);
           	    switch (*cp) {
           	    default:
           		break;
          @@ -474,7 +453,6 @@
           static NCURSES_INLINE char *
           tparam_internal(const char *string, va_list ap)
           {
          -#define NUM_VARS 26
               char *p_is_s[NUM_PARM];
               TPARM_ARG param[NUM_PARM];
               int popcount;
          @@ -485,13 +463,11 @@
               int i;
               const char *cp = string;
               size_t len2;
          -    static int dynamic_var[NUM_VARS];
          -    static int static_vars[NUM_VARS];
           
               if (cp == NULL)
           	return NULL;
           
          -    out_used = 0;
          +    TPS(out_used) = 0;
               len2 = strlen(cp);
           
               /*
          @@ -500,7 +476,7 @@
                * variable-length argument list.
                */
               number = _nc_tparm_analyze(cp, p_is_s, &popcount);
          -    if (fmt_buff == 0)
          +    if (TPS(fmt_buff) == 0)
           	return NULL;
           
               for (i = 0; i < max(popcount, number); i++) {
          @@ -525,22 +501,23 @@
                * the expansion of (for example) \E[%d;%dH work correctly in termcap
                * style, which means tparam() will expand termcap strings OK.
                */
          -    stack_ptr = 0;
          +    TPS(stack_ptr) = 0;
               if (popcount == 0) {
           	popcount = number;
           	for (i = number - 1; i >= 0; i--)
           	    npush(param[i]);
               }
           #ifdef TRACE
          -    if (_nc_tracing & TRACE_CALLS) {
          +    if (USE_TRACEF(TRACE_CALLS)) {
           	for (i = 0; i < popcount; i++) {
           	    if (p_is_s[i] != 0)
           		save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
           	    else
           		save_number(", %d", param[i], 0);
           	}
          -	_tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(cp), out_buff);
          -	out_used = 0;
          +	_tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff));
          +	TPS(out_used) = 0;
          +	_nc_unlock_global(tracef);
               }
           #endif /* TRACE */
           
          @@ -548,8 +525,8 @@
           	if (*cp != '%') {
           	    save_char(UChar(*cp));
           	} else {
          -	    tparam_base = cp++;
          -	    cp = parse_format(cp, fmt_buff, &len);
          +	    TPS(tparam_base) = cp++;
          +	    cp = parse_format(cp, TPS(fmt_buff), &len);
           	    switch (*cp) {
           	    default:
           		break;
          @@ -561,7 +538,7 @@
           	    case 'o':		/* FALLTHRU */
           	    case 'x':		/* FALLTHRU */
           	    case 'X':		/* FALLTHRU */
          -		save_number(fmt_buff, npop(), len);
          +		save_number(TPS(fmt_buff), npop(), len);
           		break;
           
           	    case 'c':		/* FALLTHRU */
          @@ -573,7 +550,7 @@
           		break;
           
           	    case 's':
          -		save_text(fmt_buff, spop(), len);
          +		save_text(TPS(fmt_buff), spop(), len);
           		break;
           
           	    case 'p':
          @@ -591,10 +568,10 @@
           		cp++;
           		if (isUPPER(*cp)) {
           		    i = (UChar(*cp) - 'A');
          -		    static_vars[i] = npop();
          +		    TPS(static_vars)[i] = npop();
           		} else if (isLOWER(*cp)) {
           		    i = (UChar(*cp) - 'a');
          -		    dynamic_var[i] = npop();
          +		    TPS(dynamic_var)[i] = npop();
           		}
           		break;
           
          @@ -602,10 +579,10 @@
           		cp++;
           		if (isUPPER(*cp)) {
           		    i = (UChar(*cp) - 'A');
          -		    npush(static_vars[i]);
          +		    npush(TPS(static_vars)[i]);
           		} else if (isLOWER(*cp)) {
           		    i = (UChar(*cp) - 'a');
          -		    npush(dynamic_var[i]);
          +		    npush(TPS(dynamic_var)[i]);
           		}
           		break;
           
          @@ -768,10 +745,10 @@
               }				/* endwhile (*cp) */
           
               get_space(1);
          -    out_buff[out_used] = '\0';
          +    TPS(out_buff)[TPS(out_used)] = '\0';
           
          -    T((T_RETURN("%s"), _nc_visbuf(out_buff)));
          -    return (out_buff);
          +    T((T_RETURN("%s"), _nc_visbuf(TPS(out_buff))));
          +    return (TPS(out_buff));
           }
           
           #if NCURSES_TPARM_VARARGS
          @@ -789,7 +766,7 @@
               _nc_tparm_err = 0;
               va_start(ap, string);
           #ifdef TRACE
          -    tname = "tparm";
          +    TPS(tname) = "tparm";
           #endif /* TRACE */
               result = tparam_internal(string, ap);
               va_end(ap);
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_tputs.c ncurses-5.6/ncurses/tinfo/lib_tputs.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_tputs.c	2003-08-23 17:39:20.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/lib_tputs.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2003,2007 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            *
          @@ -45,12 +45,12 @@
           #include 		/* ospeed */
           #include 
           
          -MODULE_ID("$Id: lib_tputs.c,v 1.62 2003/08/23 21:39:20 tom Exp $")
          +MODULE_ID("$Id: lib_tputs.c,v 1.64 2007/09/29 20:37:13 tom Exp $")
           
          -NCURSES_EXPORT_VAR(char) PC = 0;		/* used by termcap library */
          -NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;	/* used by termcap library */
          +NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
          +NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
           
          -NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0;	/* used by 'tack' program */
          +NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0;   /* used by 'tack' program */
           
           static int (*my_outch) (int c) = _nc_outch;
           
          @@ -84,7 +84,7 @@
           NCURSES_EXPORT(int)
           _nc_outch(int ch)
           {
          -    TRACE_OUTCHARS(1);
          +    COUNT_OUTCHARS(1);
           
               if (SP != 0
           	&& SP->_cleanup) {
          @@ -119,7 +119,7 @@
           #ifdef TRACE
               char addrbuf[32];
           
          -    if (_nc_tracing & TRACE_TPUTS) {
          +    if (USE_TRACEF(TRACE_TPUTS)) {
           	if (outc == _nc_outch)
           	    (void) strcpy(addrbuf, "_nc_outch");
           	else
          @@ -130,7 +130,8 @@
           	} else {
           	    _tracef("tputs(%s, %d, %s) called", _nc_visbuf(string), affcnt, addrbuf);
           	}
          -	_nc_tputs_trace = (char *) NULL;
          +	TPUTS_TRACE(NULL);
          +	_nc_unlock_global(tracef);
               }
           #endif /* TRACE */
           
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/lib_ttyflags.c ncurses-5.6/ncurses/tinfo/lib_ttyflags.c
          --- ncurses-5.6.orig/ncurses/tinfo/lib_ttyflags.c	2006-12-09 20:31:54.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/lib_ttyflags.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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,31 +38,35 @@
           #include 
           #include 		/* cur_term */
           
          -MODULE_ID("$Id: lib_ttyflags.c,v 1.13 2006/12/10 01:31:54 tom Exp $")
          +MODULE_ID("$Id: lib_ttyflags.c,v 1.15 2007/05/26 18:54:25 tom Exp $")
           
           NCURSES_EXPORT(int)
           _nc_get_tty_mode(TTY * buf)
           {
               int result = OK;
           
          -    if (cur_term == 0) {
          +    if (buf == 0) {
           	result = ERR;
               } else {
          -	for (;;) {
          -	    if (GET_TTY(cur_term->Filedes, buf) != 0) {
          -		if (errno == EINTR)
          -		    continue;
          -		result = ERR;
          +	if (cur_term == 0) {
          +	    result = ERR;
          +	} else {
          +	    for (;;) {
          +		if (GET_TTY(cur_term->Filedes, buf) != 0) {
          +		    if (errno == EINTR)
          +			continue;
          +		    result = ERR;
          +		}
          +		break;
           	    }
          -	    break;
           	}
          -    }
           
          -    if (result == ERR)
          -	memset(buf, 0, sizeof(*buf));
          +	if (result == ERR)
          +	    memset(buf, 0, sizeof(*buf));
           
          -    TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
          -		    cur_term->Filedes, _nc_trace_ttymode(buf)));
          +	TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
          +			cur_term->Filedes, _nc_trace_ttymode(buf)));
          +    }
               return (result);
           }
           
          @@ -71,22 +75,26 @@
           {
               int result = OK;
           
          -    if (cur_term == 0) {
          +    if (buf == 0) {
           	result = ERR;
               } else {
          -	for (;;) {
          -	    if (SET_TTY(cur_term->Filedes, buf) != 0) {
          -		if (errno == EINTR)
          -		    continue;
          -		if ((errno == ENOTTY) && (SP != 0))
          -		    SP->_notty = TRUE;
          -		result = ERR;
          +	if (cur_term == 0) {
          +	    result = ERR;
          +	} else {
          +	    for (;;) {
          +		if (SET_TTY(cur_term->Filedes, buf) != 0) {
          +		    if (errno == EINTR)
          +			continue;
          +		    if ((errno == ENOTTY) && (SP != 0))
          +			SP->_notty = TRUE;
          +		    result = ERR;
          +		}
          +		break;
           	    }
          -	    break;
           	}
          +	TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
          +			cur_term->Filedes, _nc_trace_ttymode(buf)));
               }
          -    TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
          -		    cur_term->Filedes, _nc_trace_ttymode(buf)));
               return (result);
           }
           
          @@ -164,19 +172,33 @@
               returnCode(ERR);
           }
           
          +static TTY *
          +saved_tty(void)
          +{
          +    TTY *result = 0;
          +
          +    if (SP != 0) {
          +	result = &(SP->_saved_tty);
          +    } else {
          +	if (_nc_prescreen.saved_tty == 0) {
          +	    _nc_prescreen.saved_tty = typeCalloc(TTY, 1);
          +	}
          +	result = _nc_prescreen.saved_tty;
          +    }
          +    return result;
          +}
          +
           /*
           **	savetty()  and  resetty()
           **
           */
           
          -static TTY buf;
          -
           NCURSES_EXPORT(int)
           savetty(void)
           {
               T((T_CALLED("savetty()")));
           
          -    returnCode(_nc_get_tty_mode(&buf));
          +    returnCode(_nc_get_tty_mode(saved_tty()));
           }
           
           NCURSES_EXPORT(int)
          @@ -184,5 +206,5 @@
           {
               T((T_CALLED("resetty()")));
           
          -    returnCode(_nc_set_tty_mode(&buf));
          +    returnCode(_nc_set_tty_mode(saved_tty()));
           }
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/make_keys.c ncurses-5.6/ncurses/tinfo/make_keys.c
          --- ncurses-5.6.orig/ncurses/tinfo/make_keys.c	2005-08-20 15:58:18.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/make_keys.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2005,2007 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            *
          @@ -39,7 +39,7 @@
           #define USE_TERMLIB 1
           #include 
           
          -MODULE_ID("$Id: make_keys.c,v 1.12 2005/08/20 19:58:18 tom Exp $")
          +MODULE_ID("$Id: make_keys.c,v 1.13 2007/01/07 00:00:14 tom Exp $")
           
           #include 
           
          @@ -113,7 +113,7 @@
           	"#if BROKEN_LINKER",
           	"static",
           	"#endif",
          -	"struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
          +	"const struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
           	0
               };
               static const char *suffix[] =
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/name_match.c ncurses-5.6/ncurses/tinfo/name_match.c
          --- ncurses-5.6.orig/ncurses/tinfo/name_match.c	2005-01-22 16:47:25.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/name_match.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1999-2004,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1999-2005,2007 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,38 +34,38 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: name_match.c,v 1.15 2005/01/22 21:47:25 tom Exp $")
          +MODULE_ID("$Id: name_match.c,v 1.16 2007/04/21 21:28:13 tom Exp $")
           
           /*
            *	_nc_first_name(char *names)
            *
            *	Extract the primary name from a compiled entry.
            */
          +#define FirstName _nc_globals.first_name
           
           NCURSES_EXPORT(char *)
           _nc_first_name(const char *const sp)
           /* get the first name from the given name list */
           {
          -    static char *buf;
          -    register unsigned n;
          +    unsigned n;
           
           #if NO_LEAKS
               if (sp == 0) {
          -	if (buf != 0)
          -	    FreeAndNull(buf);	/* for leak-testing */
          +	if (FirstName != 0)
          +	    FreeAndNull(FirstName);
           	return 0;
               }
           #endif
           
          -    if (buf == 0)
          -	buf = typeMalloc(char, MAX_NAME_SIZE + 1);
          +    if (FirstName == 0)
          +	FirstName = typeMalloc(char, MAX_NAME_SIZE + 1);
               for (n = 0; n < MAX_NAME_SIZE; n++) {
          -	if ((buf[n] = sp[n]) == '\0'
          -	    || (buf[n] == '|'))
          +	if ((FirstName[n] = sp[n]) == '\0'
          +	    || (FirstName[n] == '|'))
           	    break;
               }
          -    buf[n] = '\0';
          -    return (buf);
          +    FirstName[n] = '\0';
          +    return (FirstName);
           }
           
           /*
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/parse_entry.c ncurses-5.6/ncurses/tinfo/parse_entry.c
          --- ncurses-5.6.orig/ncurses/tinfo/parse_entry.c	2006-06-17 13:57:50.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/parse_entry.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -48,7 +48,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: parse_entry.c,v 1.63 2006/06/17 17:57:50 tom Exp $")
          +MODULE_ID("$Id: parse_entry.c,v 1.65 2007/08/11 16:19:02 tom Exp $")
           
           #ifdef LINT
           static short const parametrized[] =
          @@ -283,7 +283,7 @@
           	} else {
           	    /* normal token lookup */
           	    entry_ptr = _nc_find_entry(_nc_curr_token.tk_name,
          -				       _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table);
          +				       _nc_get_hash_table(_nc_syntax));
           
           	    /*
           	     * Our kluge to handle aliasing.  The reason it's done
          @@ -300,7 +300,7 @@
           		    if (entryp->nuses != 0) {
           			BAD_TC_USAGE
           		    }
          -		    for (ap = _nc_capalias_table; ap->from; ap++)
          +		    for (ap = _nc_get_alias_table(TRUE); ap->from; ap++)
           			if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
           			    if (ap->to == (char *) 0) {
           				_nc_warning("%s (%s termcap extension) ignored",
          @@ -308,14 +308,15 @@
           				goto nexttok;
           			    }
           
          -			    entry_ptr = _nc_find_entry(ap->to, _nc_cap_hash_table);
          +			    entry_ptr = _nc_find_entry(ap->to,
          +						       _nc_get_hash_table(TRUE));
           			    if (entry_ptr && !silent)
           				_nc_warning("%s (%s termcap extension) aliased to %s",
           					    ap->from, ap->source, ap->to);
           			    break;
           			}
           		} else {	/* if (_nc_syntax == SYN_TERMINFO) */
          -		    for (ap = _nc_infoalias_table; ap->from; ap++)
          +		    for (ap = _nc_get_alias_table(FALSE); ap->from; ap++)
           			if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
           			    if (ap->to == (char *) 0) {
           				_nc_warning("%s (%s terminfo extension) ignored",
          @@ -323,7 +324,8 @@
           				goto nexttok;
           			    }
           
          -			    entry_ptr = _nc_find_entry(ap->to, _nc_info_hash_table);
          +			    entry_ptr = _nc_find_entry(ap->to,
          +						       _nc_get_hash_table(FALSE));
           			    if (entry_ptr && !silent)
           				_nc_warning("%s (%s terminfo extension) aliased to %s",
           					    ap->from, ap->source, ap->to);
          @@ -796,8 +798,8 @@
           
           	    /* now we know we found a match in ko_table, so... */
           
          -	    from_ptr = _nc_find_entry(ap->from, _nc_cap_hash_table);
          -	    to_ptr = _nc_find_entry(ap->to, _nc_info_hash_table);
          +	    from_ptr = _nc_find_entry(ap->from, _nc_get_hash_table(TRUE));
          +	    to_ptr = _nc_find_entry(ap->to, _nc_get_hash_table(FALSE));
           
           	    if (!from_ptr || !to_ptr)	/* should never happen! */
           		_nc_err_abort("ko translation table is invalid, I give up");
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/read_entry.c ncurses-5.6/ncurses/tinfo/read_entry.c
          --- ncurses-5.6.orig/ncurses/tinfo/read_entry.c	2006-08-19 11:58:50.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/read_entry.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -42,7 +42,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: read_entry.c,v 1.99 2006/08/19 15:58:50 tom Exp $")
          +MODULE_ID("$Id: read_entry.c,v 1.100 2007/11/17 23:56:50 tom Exp $")
           
           #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
           
          @@ -409,7 +409,7 @@
           	unsigned need = 4 + strlen(path) + strlen(name);
           
           	if (need <= limit) {
          -	    (void) sprintf(filename, "%s/%c/%s", path, *name, name);
          +	    (void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
           	    result = _nc_read_file_entry(filename, tp);
           	}
               }
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/setbuf.c ncurses-5.6/ncurses/tinfo/setbuf.c
          --- ncurses-5.6.orig/ncurses/tinfo/setbuf.c	2003-11-15 18:55:34.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/setbuf.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2003,2007 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            *
          @@ -40,7 +40,7 @@
           
           #include 
           
          -MODULE_ID("$Id: setbuf.c,v 1.12 2003/11/15 23:55:34 tom Exp $")
          +MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $")
           
           /*
            * If the output file descriptor is connected to a tty (the typical case) it
          @@ -102,7 +102,7 @@
           {
               /* optional optimization hack -- do before any output to ofp */
           #if HAVE_SETVBUF || HAVE_SETBUFFER
          -    if (SP->_buffered != (int)buffered) {
          +    if (SP->_buffered != buffered) {
           	unsigned buf_len;
           	char *buf_ptr;
           
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/strings.c ncurses-5.6/ncurses/tinfo/strings.c
          --- ncurses-5.6.orig/ncurses/tinfo/strings.c	2003-08-16 19:46:00.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/strings.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2000,2003 Free Software Foundation, Inc.                   *
          + * Copyright (c) 2000-2003,2007 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,7 +36,7 @@
           
           #include 
           
          -MODULE_ID("$Id: strings.c,v 1.5 2003/08/16 23:46:00 tom Exp $")
          +MODULE_ID("$Id: strings.c,v 1.6 2007/08/11 17:12:17 tom Exp $")
           
           /****************************************************************************
            * Useful string functions (especially for mvcur)
          @@ -52,7 +52,7 @@
           
               while ((len1 != 0) && (len1-- >= len2)) {
           	if (!strncmp(haystack, needle, len2)) {
          -	    result = haystack;
          +	    result = (char *) haystack;
           	    break;
           	}
           	haystack++;
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/trim_sgr0.c ncurses-5.6/ncurses/tinfo/trim_sgr0.c
          --- ncurses-5.6.orig/ncurses/tinfo/trim_sgr0.c	2006-12-02 14:37:57.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/trim_sgr0.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2005 Free Software Foundation, Inc.                        *
          + * Copyright (c) 2005-2006,2007 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,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: trim_sgr0.c,v 1.7 2006/12/02 19:37:57 tom Exp $")
          +MODULE_ID("$Id: trim_sgr0.c,v 1.8 2007/04/07 17:14:11 tom Exp $")
           
           #undef CUR
           #define CUR tp->
          @@ -247,9 +247,7 @@
           	if (!rewrite_sgr(on, enter_alt_charset_mode)
           	    || !rewrite_sgr(off, exit_alt_charset_mode)
           	    || !rewrite_sgr(end, exit_alt_charset_mode)) {
          -	    FreeIfNeeded(on);
           	    FreeIfNeeded(off);
          -	    FreeIfNeeded(end);
           	} else if (similar_sgr(off, end)
           		   && !similar_sgr(off, on)) {
           	    TR(TRACE_DATABASE, ("adjusting sgr(9:off) : %s", _nc_visbuf(off)));
          @@ -315,8 +313,8 @@
           	     */
           	    free(off);
           	}
          -	free(end);
          -	free(on);
          +	FreeIfNeeded(end);
          +	FreeIfNeeded(on);
               } else {
           	/*
           	 * Possibly some applications are confused if sgr0 contains rmacs,
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/use_screen.c ncurses-5.6/ncurses/tinfo/use_screen.c
          --- ncurses-5.6.orig/ncurses/tinfo/use_screen.c	1969-12-31 19:00:00.000000000 -0500
          +++ ncurses-5.6/ncurses/tinfo/use_screen.c	2007-12-21 00:02:36.000000000 -0500
          @@ -0,0 +1,60 @@
          +/****************************************************************************
          + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
          + * without limitation the rights to use, copy, modify, merge, publish,      *
          + * distribute, distribute with modifications, sublicense, and/or sell       *
          + * copies of the Software, and to permit persons to whom the Software is    *
          + * furnished to do so, subject to the following conditions:                 *
          + *                                                                          *
          + * The above copyright notice and this permission notice shall be included  *
          + * in all copies or substantial portions of the Software.                   *
          + *                                                                          *
          + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
          + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
          + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
          + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
          + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
          + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
          + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
          + *                                                                          *
          + * Except as contained in this notice, the name(s) of the above copyright   *
          + * holders shall not be used in advertising or otherwise to promote the     *
          + * sale, use or other dealings in this Software without prior written       *
          + * authorization.                                                           *
          + ****************************************************************************/
          +
          +/****************************************************************************
          + *     Author: Thomas E. Dickey                        2007                 *
          + ****************************************************************************/
          +
          +#include 
          +
          +MODULE_ID("$Id: use_screen.c,v 1.2 2007/09/08 21:46:48 tom Exp $")
          +
          +NCURSES_EXPORT(int)
          +use_screen(SCREEN *screen, NCURSES_CALLBACK func, void *data)
          +{
          +    SCREEN *save_SP;
          +    int code = OK;
          +
          +    T((T_CALLED("use_screen(%p,%p,%p)"), screen, func, data));
          +
          +    /*
          +     * FIXME - add a flag so a given thread can check if _it_ has already
          +     * recurred through this point, return an error if so.
          +     */
          +    _nc_lock_global(use_screen);
          +    save_SP = SP;
          +    set_term(screen);
          +
          +    code = func(screen->_stdscr, data);
          +
          +    set_term(save_SP);
          +    _nc_unlock_global(use_screen);
          +    returnCode(code);
          +
          +    return 0;
          +}
          diff -Naur ncurses-5.6.orig/ncurses/tinfo/write_entry.c ncurses-5.6/ncurses/tinfo/write_entry.c
          --- ncurses-5.6.orig/ncurses/tinfo/write_entry.c	2006-10-14 16:45:16.000000000 -0400
          +++ ncurses-5.6/ncurses/tinfo/write_entry.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -54,7 +54,7 @@
           #define TRACE_OUT(p)		/*nothing */
           #endif
           
          -MODULE_ID("$Id: write_entry.c,v 1.68 2006/10/14 20:45:16 tom Exp $")
          +MODULE_ID("$Id: write_entry.c,v 1.70 2007/11/17 23:38:28 tom Exp $")
           
           static int total_written;
           
          @@ -97,17 +97,16 @@
               static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
               static bool verified[sizeof(dirnames)];
           
          -    char dir[2];
          +    char dir[sizeof(LEAF_FMT)];
               char *s = 0;
           
               if (code == 0 || (s = strchr(dirnames, code)) == 0)
          -	_nc_err_abort("Illegal terminfo subdirectory \"%c\"", code);
          +	_nc_err_abort("Illegal terminfo subdirectory \"" LEAF_FMT "\"", code);
           
               if (verified[s - dirnames])
           	return;
           
          -    dir[0] = code;
          -    dir[1] = '\0';
          +    sprintf(dir, LEAF_FMT, code);
               if (make_db_root(dir) < 0) {
           	_nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir);
               }
          @@ -358,7 +357,7 @@
               if (strlen(first_name) > sizeof(filename) - 3)
           	_nc_warning("terminal name too long.");
           
          -    sprintf(filename, "%c/%s", first_name[0], first_name);
          +    sprintf(filename, LEAF_FMT "/%s", first_name[0], first_name);
           
               /*
                * Has this primary name been written since the first call to
          @@ -399,7 +398,7 @@
           	}
           
           	check_writeable(ptr[0]);
          -	sprintf(linkname, "%c/%s", ptr[0], ptr);
          +	sprintf(linkname, LEAF_FMT "/%s", ptr[0], ptr);
           
           	if (strcmp(filename, linkname) == 0) {
           	    _nc_warning("self-synonym ignored");
          @@ -502,7 +501,8 @@
           	} else {
           	    offsets[i] = nextfree;
           	    nextfree += strlen(Strings[i]) + 1;
          -	    TRACE_OUT(("put Strings[%d]=%s(%d)", i, _nc_visbuf(Strings[i]), nextfree));
          +	    TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
          +		       _nc_visbuf(Strings[i]), nextfree));
           	}
               }
               return nextfree;
          @@ -740,7 +740,7 @@
           	 */
           	for (i = 0; i < tp->ext_Strings; i++) {
           	    if (VALID_STRING(tp->Strings[i + STRCOUNT])) {
          -		TRACE_OUT(("WRITE ext_Strings[%d]=%s", i,
          +		TRACE_OUT(("WRITE ext_Strings[%d]=%s", (int) i,
           			   _nc_visbuf(tp->Strings[i + STRCOUNT])));
           		if (!WRITE_STRING(tp->Strings[i + STRCOUNT]))
           		    return (ERR);
          @@ -751,7 +751,7 @@
           	 * Write the extended names
           	 */
           	for (i = 0; i < extcnt; i++) {
          -	    TRACE_OUT(("WRITE ext_Names[%d]=%s", i, tp->ext_Names[i]));
          +	    TRACE_OUT(("WRITE ext_Names[%d]=%s", (int) i, tp->ext_Names[i]));
           	    if (!WRITE_STRING(tp->ext_Names[i]))
           		return (ERR);
           	}
          diff -Naur ncurses-5.6.orig/ncurses/trace/lib_trace.c ncurses-5.6/ncurses/trace/lib_trace.c
          --- ncurses-5.6.orig/ncurses/trace/lib_trace.c	2006-08-19 08:05:25.000000000 -0400
          +++ ncurses-5.6/ncurses/trace/lib_trace.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -46,37 +46,69 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_trace.c,v 1.59 2006/08/19 12:05:25 tom Exp $")
          +MODULE_ID("$Id: lib_trace.c,v 1.65 2007/09/29 21:47:46 tom Exp $")
           
           NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
           
           #ifdef TRACE
          +
          +#if USE_REENTRANT
          +NCURSES_EXPORT(const char *)
          +NCURSES_PUBLIC_VAR(_nc_tputs_trace) (void)
          +{
          +    return SP ? SP->_tputs_trace : _nc_prescreen._tputs_trace;
          +}
          +NCURSES_EXPORT(long)
          +NCURSES_PUBLIC_VAR(_nc_outchars) (void)
          +{
          +    return SP ? SP->_outchars : _nc_prescreen._outchars;
          +}
          +NCURSES_EXPORT(void)
          +_nc_set_tputs_trace(const char *s)
          +{
          +    if (SP)
          +	SP->_tputs_trace = s;
          +    else
          +	_nc_prescreen._tputs_trace = s;
          +}
          +NCURSES_EXPORT(void)
          +_nc_count_outchars(long increment)
          +{
          +    if (SP)
          +	SP->_outchars += increment;
          +    else
          +	_nc_prescreen._outchars += increment;
          +}
          +#else
           NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace = "";
           NCURSES_EXPORT_VAR(long) _nc_outchars = 0;
          +#endif
           
          -static FILE *tracefp = 0;	/* default to writing to stderr */
          +#define TraceFP		_nc_globals.trace_fp
          +#define TracePath	_nc_globals.trace_fname
          +#define TraceLevel	_nc_globals.trace_level
           
           NCURSES_EXPORT(void)
           trace(const unsigned int tracelevel)
           {
          -    static bool been_here = FALSE;
          -    static char my_name[PATH_MAX];
          -
          -    if ((tracefp == 0) && tracelevel) {
          -	const char *mode = been_here ? "ab" : "wb";
          +    if ((TraceFP == 0) && tracelevel) {
          +	const char *mode = _nc_globals.init_trace ? "ab" : "wb";
           
          -	if (*my_name == '\0') {
          -	    if (getcwd(my_name, sizeof(my_name) - 10) == 0) {
          +	if (TracePath[0] == '\0') {
          +	    if (getcwd(TracePath, sizeof(TracePath) - 12) == 0) {
           		perror("curses: Can't get working directory");
           		exit(EXIT_FAILURE);
           	    }
          -	    strcat(my_name, "/trace");
          +	    strcat(TracePath, "/trace");
          +	    if (_nc_is_dir_path(TracePath)) {
          +		strcat(TracePath, ".log");
          +	    }
           	}
           
          -	been_here = TRUE;
          +	_nc_globals.init_trace = TRUE;
           	_nc_tracing = tracelevel;
          -	if (_nc_access(my_name, W_OK) < 0
          -	    || (tracefp = fopen(my_name, mode)) == 0) {
          +	if (_nc_access(TracePath, W_OK) < 0
          +	    || (TraceFP = fopen(TracePath, mode)) == 0) {
           	    perror("curses: Can't open 'trace' file");
           	    exit(EXIT_FAILURE);
           	}
          @@ -85,18 +117,18 @@
           	 * end of each line.  This is useful in case the program dies. 
           	 */
           #if HAVE_SETVBUF		/* ANSI */
          -	(void) setvbuf(tracefp, (char *) 0, _IOLBF, 0);
          +	(void) setvbuf(TraceFP, (char *) 0, _IOLBF, 0);
           #elif HAVE_SETBUF		/* POSIX */
          -	(void) setbuffer(tracefp, (char *) 0);
          +	(void) setbuffer(TraceFP, (char *) 0);
           #endif
           	_tracef("TRACING NCURSES version %s.%d (tracelevel=%#x)",
           		NCURSES_VERSION,
           		NCURSES_VERSION_PATCH,
           		tracelevel);
               } else if (tracelevel == 0) {
          -	if (tracefp != 0) {
          -	    fclose(tracefp);
          -	    tracefp = 0;
          +	if (TraceFP != 0) {
          +	    fclose(TraceFP);
          +	    TraceFP = 0;
           	}
           	_nc_tracing = tracelevel;
               } else if (_nc_tracing != tracelevel) {
          @@ -105,13 +137,12 @@
               }
           }
           
          -NCURSES_EXPORT(void)
          -_tracef(const char *fmt,...)
          +static void
          +_nc_va_tracef(const char *fmt, va_list ap)
           {
               static const char Called[] = T_CALLED("");
               static const char Return[] = T_RETURN("");
          -    static int level;
          -    va_list ap;
          +
               bool before = FALSE;
               bool after = FALSE;
               unsigned doit = _nc_tracing;
          @@ -120,12 +151,12 @@
               if (strlen(fmt) >= sizeof(Called) - 1) {
           	if (!strncmp(fmt, Called, sizeof(Called) - 1)) {
           	    before = TRUE;
          -	    level++;
          +	    TraceLevel++;
           	} else if (!strncmp(fmt, Return, sizeof(Return) - 1)) {
           	    after = TRUE;
           	}
           	if (before || after) {
          -	    if ((level <= 1)
          +	    if ((TraceLevel <= 1)
           		|| (doit & TRACE_ICALLS) != 0)
           		doit &= (TRACE_CALLS | TRACE_CCALLS);
           	    else
          @@ -134,25 +165,34 @@
               }
           
               if (doit != 0) {
          -	if (tracefp == 0)
          -	    tracefp = stderr;
          +	if (TraceFP == 0)
          +	    TraceFP = stderr;
           	if (before || after) {
           	    int n;
          -	    for (n = 1; n < level; n++)
          -		fputs("+ ", tracefp);
          +	    for (n = 1; n < TraceLevel; n++)
          +		fputs("+ ", TraceFP);
           	}
          -	va_start(ap, fmt);
          -	vfprintf(tracefp, fmt, ap);
          -	fputc('\n', tracefp);
          -	va_end(ap);
          -	fflush(tracefp);
          +	vfprintf(TraceFP, fmt, ap);
          +	fputc('\n', TraceFP);
          +	fflush(TraceFP);
               }
           
          -    if (after && level)
          -	level--;
          +    if (after && TraceLevel)
          +	TraceLevel--;
          +
               errno = save_err;
           }
           
          +NCURSES_EXPORT(void)
          +_tracef(const char *fmt,...)
          +{
          +    va_list ap;
          +
          +    va_start(ap, fmt);
          +    _nc_va_tracef(fmt, ap);
          +    va_end(ap);
          +}
          +
           /* Trace 'bool' return-values */
           NCURSES_EXPORT(NCURSES_BOOL)
           _nc_retrace_bool(NCURSES_BOOL code)
          @@ -224,4 +264,53 @@
               T((T_RETURN("%p"), code));
               return code;
           }
          +
          +#if USE_REENTRANT
          +/*
          + * Check if the given trace-mask is enabled.
          + *
          + * This function may be called from within one of the functions that fills
          + * in parameters for _tracef(), but in that case we do not want to lock the
          + * mutex, since it is already locked.
          + */
          +NCURSES_EXPORT(int)
          +_nc_use_tracef(unsigned mask)
          +{
          +    bool result = FALSE;
          +
          +    _nc_lock_global(tst_tracef);
          +    if (!_nc_globals.nested_tracef++) {
          +	if ((result = (_nc_tracing & (mask))) != 0) {
          +	    /* we will call _nc_locked_tracef(), no nesting so far */
          +	    _nc_lock_global(tracef);
          +	} else {
          +	    /* we will not call _nc_locked_tracef() */
          +	    _nc_globals.nested_tracef = 0;
          +	}
          +    } else {
          +	/* we may call _nc_locked_tracef(), but with nested_tracef > 0 */
          +	result = (_nc_tracing & (mask));
          +    }
          +    _nc_unlock_global(tst_tracef);
          +    return result;
          +}
          +
          +/*
          + * We call this if _nc_use_tracef() returns true, which means we must unlock
          + * the tracef mutex.
          + */
          +NCURSES_EXPORT(void)
          +_nc_locked_tracef(const char *fmt,...)
          +{
          +    va_list ap;
          +
          +    va_start(ap, fmt);
          +    _nc_va_tracef(fmt, ap);
          +    va_end(ap);
          +
          +    if (--(_nc_globals.nested_tracef) == 0)
          +	_nc_unlock_global(tracef);
          +}
          +#endif /* USE_REENTRANT */
          +
           #endif /* TRACE */
          diff -Naur ncurses-5.6.orig/ncurses/trace/lib_traceatr.c ncurses-5.6/ncurses/trace/lib_traceatr.c
          --- ncurses-5.6.orig/ncurses/trace/lib_traceatr.c	2006-12-02 16:18:28.000000000 -0500
          +++ ncurses-5.6/ncurses/trace/lib_traceatr.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -39,33 +39,37 @@
           #include 
           #include 		/* acs_chars */
           
          -MODULE_ID("$Id: lib_traceatr.c,v 1.56 2006/12/02 21:18:28 tom Exp $")
          +MODULE_ID("$Id: lib_traceatr.c,v 1.59 2007/06/09 17:22:10 tom Exp $")
           
           #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
           
           #ifdef TRACE
           
          -static const char l_brace[] = {L_BRACE, 0};
          -static const char r_brace[] = {R_BRACE, 0};
          +static const char l_brace[] = StringOf(L_BRACE);
          +static const char r_brace[] = StringOf(R_BRACE);
           
           #ifndef USE_TERMLIB
          +
          +#define my_buffer _nc_globals.traceatr_color_buf
          +#define my_select _nc_globals.traceatr_color_sel
          +#define my_cached _nc_globals.traceatr_color_last
          +
           static char *
           color_of(int c)
           {
          -    static char buffer[2][80];
          -    static int sel;
          -    static int last = -1;
          -
          -    if (c != last) {
          -	last = c;
          -	sel = !sel;
          +    if (c != my_cached) {
          +	my_cached = c;
          +	my_select = !my_select;
           	if (c == COLOR_DEFAULT)
          -	    strcpy(buffer[sel], "default");
          +	    strcpy(my_buffer[my_select], "default");
           	else
          -	    sprintf(buffer[sel], "color%d", c);
          +	    sprintf(my_buffer[my_select], "color%d", c);
               }
          -    return buffer[sel];
          +    return my_buffer[my_select];
           }
          +
          +#undef my_buffer
          +#undef my_select
           #endif /* !USE_TERMLIB */
           
           NCURSES_EXPORT(char *)
          @@ -173,17 +177,19 @@
           const char *
           _nc_altcharset_name(attr_t attr, chtype ch)
           {
          +    typedef struct {
          +	unsigned int val;
          +	const char *name;
          +    } ALT_NAMES;
          +
               const char *result = 0;
           
               if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
           	char *cp;
           	char *found = 0;
          -	static const struct {
          -	    unsigned int val;
          -	    const char *name;
          -	} names[] =
          +	/* *INDENT-OFF* */
          +	static const ALT_NAMES names[] =
           	{
          -	    /* *INDENT-OFF* */
           	    { 'l', "ACS_ULCORNER" },	/* upper left corner */
           	    { 'm', "ACS_LLCORNER" },	/* lower left corner */
           	    { 'k', "ACS_URCORNER" },	/* upper right corner */
          @@ -217,9 +223,9 @@
           	    { '|', "ACS_NEQUAL" },	/* not equal */
           	    { '}', "ACS_STERLING" },	/* UK pound sign */
           	    { '\0', (char *) 0 }
          -		/* *INDENT-OFF* */
          -	},
          -	    *sp;
          +	};
          +	/* *INDENT-OFF* */
          +	const ALT_NAMES *sp;
           
           	for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
           	    if (ChCharOf(cp[1]) == ChCharOf(ch)) {
          diff -Naur ncurses-5.6.orig/ncurses/trace/lib_tracebits.c ncurses-5.6/ncurses/trace/lib_tracebits.c
          --- ncurses-5.6.orig/ncurses/trace/lib_tracebits.c	2006-12-09 20:33:00.000000000 -0500
          +++ ncurses-5.6/ncurses/trace/lib_tracebits.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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 @@
           #include 
           #include 		/* cur_term */
           
          -MODULE_ID("$Id: lib_tracebits.c,v 1.13 2006/12/10 01:33:00 tom Exp $")
          +MODULE_ID("$Id: lib_tracebits.c,v 1.15 2007/06/30 16:14:20 tom Exp $")
           
           #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
           #define _POSIX_SOURCE
          @@ -53,10 +53,27 @@
           #ifndef TOSTOP
           #define TOSTOP 0
           #endif
          +
           #ifndef IEXTEN
           #define IEXTEN 0
           #endif
           
          +#ifndef ONLCR
          +#define ONLCR 0
          +#endif
          +
          +#ifndef OCRNL
          +#define OCRNL 0
          +#endif
          +
          +#ifndef ONOCR
          +#define ONOCR 0
          +#endif
          +
          +#ifndef ONLRET
          +#define ONLRET 0
          +#endif
          +
           #ifdef TRACE
           
           typedef struct {
          @@ -108,8 +125,12 @@
               {
           	{OPOST, "OPOST"},
           	{OFLAGS_TABS, "XTABS"},
          +	{ONLCR, "ONLCR"},
          +	{OCRNL, "OCRNL"},
          +	{ONOCR, "ONOCR"},
          +	{ONLRET, "ONLRET"},
           	{0, NULL}
          -#define ALLOUT	(OPOST)
          +#define ALLOUT	(OPOST|OFLAGS_TABS|ONLCR|OCRNL|ONOCR|ONLRET)
               }, cflags[] =
               {
           	{CLOCAL, "CLOCAL"},
          diff -Naur ncurses-5.6.orig/ncurses/trace/lib_tracechr.c ncurses-5.6/ncurses/trace/lib_tracechr.c
          --- ncurses-5.6.orig/ncurses/trace/lib_tracechr.c	2005-04-16 12:55:46.000000000 -0400
          +++ ncurses-5.6/ncurses/trace/lib_tracechr.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2005,2007 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            *
          @@ -39,34 +39,35 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_tracechr.c,v 1.12 2005/04/16 16:55:46 tom Exp $")
          +MODULE_ID("$Id: lib_tracechr.c,v 1.13 2007/04/21 23:16:37 tom Exp $")
           
           #ifdef TRACE
          +#define MyBuffer _nc_globals.tracechr_buf
          +
           NCURSES_EXPORT(char *)
           _tracechar(int ch)
           {
          -    static char result[40];
               NCURSES_CONST char *name;
           
               if (ch > KEY_MIN || ch < 0) {
           	name = keyname(ch);
           	if (name == 0 || *name == '\0')
           	    name = "NULL";
          -	(void) sprintf(result, "'%.30s' = %#03o", name, ch);
          +	(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
               } else if (!is8bits(ch) || !isprint(UChar(ch))) {
           	/*
           	 * workaround for glibc bug:
           	 * sprintf changes the result from unctrl() to an empty string if it
           	 * does not correspond to a valid multibyte sequence.
           	 */
          -	(void) sprintf(result, "%#03o", ch);
          +	(void) sprintf(MyBuffer, "%#03o", ch);
               } else {
           	name = unctrl((chtype) ch);
           	if (name == 0 || *name == 0)
           	    name = "null";	/* shouldn't happen */
          -	(void) sprintf(result, "'%.30s' = %#03o", name, ch);
          +	(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
               }
          -    return (result);
          +    return (MyBuffer);
           }
           #else
           empty_module(_nc_lib_tracechr)
          diff -Naur ncurses-5.6.orig/ncurses/trace/lib_tracedmp.c ncurses-5.6/ncurses/trace/lib_tracedmp.c
          --- ncurses-5.6.orig/ncurses/trace/lib_tracedmp.c	2006-10-14 16:43:31.000000000 -0400
          +++ ncurses-5.6/ncurses/trace/lib_tracedmp.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -39,15 +39,16 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: lib_tracedmp.c,v 1.27 2006/10/14 20:43:31 tom Exp $")
          +MODULE_ID("$Id: lib_tracedmp.c,v 1.29 2007/06/30 23:01:19 tom Exp $")
           
           #ifdef TRACE
          +
          +#define my_buffer _nc_globals.tracedmp_buf
          +#define my_length _nc_globals.tracedmp_used
          +
           NCURSES_EXPORT(void)
           _tracedump(const char *name, WINDOW *win)
           {
          -    static char *buf = 0;
          -    static size_t used = 0;
          -
               int i, j, n, width;
           
               /* compute narrowest possible display width */
          @@ -66,13 +67,13 @@
               }
               if (width < win->_maxx)
           	++width;
          -    if (++width + 1 > (int) used) {
          -	used = 2 * (width + 1);
          -	buf = typeRealloc(char, used, buf);
          +    if (++width + 1 > (int) my_length) {
          +	my_length = 2 * (width + 1);
          +	my_buffer = typeRealloc(char, my_length, my_buffer);
               }
           
               for (n = 0; n <= win->_maxy; ++n) {
          -	char *ep = buf;
          +	char *ep = my_buffer;
           	bool haveattrs, havecolors;
           
           	/*
          @@ -99,6 +100,30 @@
           		(long) win->_line[n].lastchar,
           		ep);
           
          +	/* if there are multi-column characters on the line, print them now */
          +	if_WIDEC({
          +	    bool multicolumn = FALSE;
          +	    for (j = 0; j < width; ++j)
          +		if (WidecExt(win->_line[n].text[j]) != 0) {
          +		    multicolumn = TRUE;
          +		    break;
          +		}
          +	    if (multicolumn) {
          +		ep = my_buffer;
          +		for (j = 0; j < width; ++j) {
          +		    int test = WidecExt(win->_line[n].text[j]);
          +		    if (test) {
          +			ep[j] = test + '0';
          +		    } else {
          +			ep[j] = ' ';
          +		    }
          +		}
          +		ep[j] = '\0';
          +		_tracef("%*s[%2d]%*s='%s'", (int) strlen(name),
          +			"widec", n, 8, " ", my_buffer);
          +	    }
          +	});
          +
           	/* dump A_COLOR part, will screw up if there are more than 96 */
           	havecolors = FALSE;
           	for (j = 0; j < width; ++j)
          @@ -107,7 +132,7 @@
           		break;
           	    }
           	if (havecolors) {
          -	    ep = buf;
          +	    ep = my_buffer;
           	    for (j = 0; j < width; ++j) {
           		int pair = GetPair(win->_line[n].text[j]);
           		if (pair >= 52)
          @@ -123,7 +148,7 @@
           	    }
           	    ep[j] = '\0';
           	    _tracef("%*s[%2d]%*s='%s'", (int) strlen(name),
          -		    "colors", n, 8, " ", buf);
          +		    "colors", n, 8, " ", my_buffer);
           	}
           
           	for (i = 0; i < 4; ++i) {
          @@ -137,20 +162,20 @@
           		    break;
           		}
           	    if (haveattrs) {
          -		ep = buf;
          +		ep = my_buffer;
           		for (j = 0; j < width; ++j)
           		    ep[j] = hex[(AttrOf(win->_line[n].text[j]) & mask) >>
           				((i + 4) * 4)];
           		ep[j] = '\0';
           		_tracef("%*s%d[%2d]%*s='%s'", (int) strlen(name) -
          -			1, "attrs", i, n, 8, " ", buf);
          +			1, "attrs", i, n, 8, " ", my_buffer);
           	    }
           	}
               }
           #if NO_LEAKS
          -    free(buf);
          -    buf = 0;
          -    used = 0;
          +    free(my_buffer);
          +    my_buffer = 0;
          +    my_length = 0;
           #endif
           }
           
          diff -Naur ncurses-5.6.orig/ncurses/trace/lib_tracemse.c ncurses-5.6/ncurses/trace/lib_tracemse.c
          --- ncurses-5.6.orig/ncurses/trace/lib_tracemse.c	2005-06-11 15:53:50.000000000 -0400
          +++ ncurses-5.6/ncurses/trace/lib_tracemse.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2005,2007 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,30 +38,23 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_tracemse.c,v 1.12 2005/06/11 19:53:50 tom Exp $")
          +MODULE_ID("$Id: lib_tracemse.c,v 1.13 2007/04/21 21:23:00 tom Exp $")
           
           #ifdef TRACE
           
          +#define my_buffer _nc_globals.tracemse_buf
          +
           NCURSES_EXPORT(char *)
           _tracemouse(MEVENT const *ep)
           {
          -    /*
          -     * hmm - format is no longer than 80 columns, there are 5 numbers that
          -     * could at most have 10 digits, and the mask contains no more than 32 bits
          -     * with each bit representing less than 15 characters.  Usually the whole
          -     * string is less than 80 columns, but this buffer size is an absolute
          -     * limit.
          -     */
          -    static char buf[80 + (5 * 10) + (32 * 15)];
          -
          -    (void) sprintf(buf, "id %2d  at (%2d, %2d, %2d) state %4lx = {",
          +    (void) sprintf(my_buffer, TRACEMSE_FMT,
           		   ep->id,
           		   ep->x,
           		   ep->y,
           		   ep->z,
           		   (unsigned long) ep->bstate);
           
          -#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(buf, s), ", ")
          +#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(my_buffer, s), ", ")
           
               SHOW(BUTTON1_RELEASED, "release-1");
               SHOW(BUTTON1_PRESSED, "press-1");
          @@ -115,10 +108,10 @@
           
           #undef SHOW
           
          -    if (buf[strlen(buf) - 1] == ' ')
          -	buf[strlen(buf) - 2] = '\0';
          -    (void) strcat(buf, "}");
          -    return (buf);
          +    if (my_buffer[strlen(my_buffer) - 1] == ' ')
          +	my_buffer[strlen(my_buffer) - 2] = '\0';
          +    (void) strcat(my_buffer, "}");
          +    return (my_buffer);
           }
           
           #else /* !TRACE */
          diff -Naur ncurses-5.6.orig/ncurses/trace/trace_buf.c ncurses-5.6/ncurses/trace/trace_buf.c
          --- ncurses-5.6.orig/ncurses/trace/trace_buf.c	2003-03-15 16:21:36.000000000 -0500
          +++ ncurses-5.6/ncurses/trace/trace_buf.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2003,2007 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,46 +35,42 @@
           
           #include 
           
          -MODULE_ID("$Id: trace_buf.c,v 1.12 2003/03/15 21:21:36 tom Exp $")
          +MODULE_ID("$Id: trace_buf.c,v 1.13 2007/04/21 22:50:08 tom Exp $")
           
          -typedef struct {
          -    char *text;
          -    size_t size;
          -} LIST;
          +#define MyList _nc_globals.tracebuf_ptr
          +#define MySize _nc_globals.tracebuf_used
           
           static char *
           _nc_trace_alloc(int bufnum, size_t want)
           {
               char *result = 0;
          -    static LIST *list;
          -    static size_t have;
           
               if (bufnum >= 0) {
          -	if ((size_t) (bufnum + 1) > have) {
          +	if ((size_t) (bufnum + 1) > MySize) {
           	    size_t need = (bufnum + 1) * 2;
          -	    if ((list = typeRealloc(LIST, need, list)) == 0)
          +	    if ((MyList = typeRealloc(TRACEBUF, need, MyList)) == 0)
           		return (0);
          -	    while (need > have)
          -		list[have++].text = 0;
          +	    while (need > MySize)
          +		MyList[MySize++].text = 0;
           	}
           
          -	if (list[bufnum].text == 0
          -	    || want > list[bufnum].size) {
          -	    if ((list[bufnum].text = typeRealloc(char, want, list[bufnum].text))
          -		!= 0)
          -		  list[bufnum].size = want;
          +	if (MyList[bufnum].text == 0
          +	    || want > MyList[bufnum].size) {
          +	    MyList[bufnum].text = typeRealloc(char, want, MyList[bufnum].text);
          +	    if (MyList[bufnum].text != 0)
          +		MyList[bufnum].size = want;
           	}
           
          -	result = list[bufnum].text;
          +	result = MyList[bufnum].text;
               }
           #if NO_LEAKS
               else {
          -	if (have) {
          -	    while (have--) {
          -		if (list[have].text != 0)
          -		    free(list[have].text);
          +	if (MySize) {
          +	    while (MySize--) {
          +		if (MyList[MySize].text != 0)
          +		    free(MyList[MySize].text);
           	    }
          -	    free(list);
          +	    free(MyList);
           	}
               }
           #endif
          diff -Naur ncurses-5.6.orig/ncurses/trace/trace_tries.c ncurses-5.6/ncurses/trace/trace_tries.c
          --- ncurses-5.6.orig/ncurses/trace/trace_tries.c	2001-10-20 18:42:51.000000000 -0400
          +++ ncurses-5.6/ncurses/trace/trace_tries.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1999,2000,2001 Free Software Foundation, Inc.              *
          + * Copyright (c) 1999-2006,2007 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,25 +35,27 @@
           
           #include 
           
          -MODULE_ID("$Id: trace_tries.c,v 1.10 2001/10/20 22:42:51 tom Exp $")
          +MODULE_ID("$Id: trace_tries.c,v 1.12 2007/04/21 21:55:41 tom Exp $")
           
           #ifdef TRACE
          -static unsigned char *buffer;
          -static unsigned len;
          +#define my_buffer _nc_globals.tracetry_buf
          +#define my_length _nc_globals.tracetry_used
           
           static void
          -recur_tries(struct tries *tree, unsigned level)
          +recur_tries(TRIES * tree, unsigned level)
           {
          -    if (level > len)
          -	buffer = (unsigned char *) realloc(buffer, len = (level + 1) * 4);
          +    if (level > my_length) {
          +	my_length = (level + 1) * 4;
          +	my_buffer = (unsigned char *) realloc(my_buffer, my_length);
          +    }
           
               while (tree != 0) {
          -	if ((buffer[level] = tree->ch) == 0)
          -	    buffer[level] = 128;
          -	buffer[level + 1] = 0;
          +	if ((my_buffer[level] = tree->ch) == 0)
          +	    my_buffer[level] = 128;
          +	my_buffer[level + 1] = 0;
           	if (tree->value != 0) {
           	    _tracef("%5d: %s (%s)", tree->value,
          -		    _nc_visbuf((char *) buffer), keyname(tree->value));
          +		    _nc_visbuf((char *) my_buffer), keyname(tree->value));
           	}
           	if (tree->child)
           	    recur_tries(tree->child, level + 1);
          @@ -62,13 +64,13 @@
           }
           
           NCURSES_EXPORT(void)
          -_nc_trace_tries(struct tries *tree)
          +_nc_trace_tries(TRIES * tree)
           {
          -    buffer = typeMalloc(unsigned char, len = 80);
          +    my_buffer = typeMalloc(unsigned char, my_length = 80);
               _tracef("BEGIN tries %p", tree);
               recur_tries(tree, 0);
               _tracef(". . . tries %p", tree);
          -    free(buffer);
          +    free(my_buffer);
           }
           
           #else
          diff -Naur ncurses-5.6.orig/ncurses/trace/varargs.c ncurses-5.6/ncurses/trace/varargs.c
          --- ncurses-5.6.orig/ncurses/trace/varargs.c	2003-05-24 17:10:28.000000000 -0400
          +++ ncurses-5.6/ncurses/trace/varargs.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2001-2002,2003 Free Software Foundation, Inc.              *
          + * Copyright (c) 2001-2003,2007 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 @@
           
           #include 
           
          -MODULE_ID("$Id: varargs.c,v 1.4 2003/05/24 21:10:28 tom Exp $")
          +MODULE_ID("$Id: varargs.c,v 1.6 2007/07/14 15:51:27 tom Exp $")
           
           #ifdef TRACE
           
          @@ -49,6 +49,9 @@
           #define VA_PTR(type) pval = (char *)va_arg(ap, type)
           #define VA_STR(type) sval = va_arg(ap, type)
           
          +#define MyBuffer _nc_globals.tracearg_buf
          +#define MyLength _nc_globals.tracearg_used
          +
           /*
            * Returns a string that represents the parameter list of a printf-style call.
            */
          @@ -56,8 +59,6 @@
           _nc_varargs(const char *fmt, va_list ap)
           {
               static char dummy[] = "";
          -    static char *result_buf;
          -    static size_t result_len;
           
               char buffer[BUFSIZ];
               const char *param;
          @@ -65,11 +66,11 @@
           
               if (fmt == 0 || *fmt == '\0')
           	return dummy;
          -    if (result_len == 0)
          -	result_buf = typeMalloc(char, result_len = BUFSIZ);
          -    if (result_buf == 0)
          +    if (MyLength == 0)
          +	MyBuffer = typeMalloc(char, MyLength = BUFSIZ);
          +    if (MyBuffer == 0)
           	return dummy;
          -    *result_buf = '\0';
          +    *MyBuffer = '\0';
           
               while (*fmt != '\0') {
           	if (*fmt == '%') {
          @@ -159,13 +160,14 @@
           			case atString:
           			    param = _nc_visbuf2(1, sval);
           			    break;
          +			case atUnknown:
           			default:
           			    strcpy(buffer, "?");
           			    break;
           			}
          -			result_len += strlen(param) + 2;
          -			result_buf = typeRealloc(char, result_len, result_buf);
          -			sprintf(result_buf + strlen(result_buf), ", %s", param);
          +			MyLength += strlen(param) + 2;
          +			MyBuffer = typeRealloc(char, MyLength, MyBuffer);
          +			sprintf(MyBuffer + strlen(MyBuffer), ", %s", param);
           		    }
           		}
           		used = atUnknown;
          @@ -175,7 +177,7 @@
           	}
               }
           
          -    return (result_buf);
          +    return (MyBuffer);
           }
           #else
           empty_module(_nc_varargs)
          diff -Naur ncurses-5.6.orig/ncurses/trace/visbuf.c ncurses-5.6/ncurses/trace/visbuf.c
          --- ncurses-5.6.orig/ncurses/trace/visbuf.c	2006-12-02 16:20:28.000000000 -0500
          +++ ncurses-5.6/ncurses/trace/visbuf.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2001-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 2001-2006,2007 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            *
          @@ -42,11 +42,16 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: visbuf.c,v 1.21 2006/12/02 21:20:28 tom Exp $")
          +MODULE_ID("$Id: visbuf.c,v 1.26 2007/06/09 17:21:53 tom Exp $")
           
          -static const char d_quote[] = {D_QUOTE, 0};
          -static const char l_brace[] = {L_BRACE, 0};
          -static const char r_brace[] = {R_BRACE, 0};
          +#define NormalLen(len) (unsigned) ((len + 1) * 4)
          +#define WideLen(len)   (unsigned) ((len + 1) * 4 * MB_CUR_MAX)
          +
          +#ifdef TRACE
          +static const char d_quote[] = StringOf(D_QUOTE);
          +static const char l_brace[] = StringOf(L_BRACE);
          +static const char r_brace[] = StringOf(R_BRACE);
          +#endif
           
           static char *
           _nc_vischar(char *tp, unsigned c)
          @@ -68,6 +73,10 @@
               } else if (c == '\033') {
           	*tp++ = '\\';
           	*tp++ = 'e';
          +    } else if (UChar(c) == 0x7f) {
          +	*tp++ = '\\';
          +	*tp++ = '^';
          +	*tp++ = '?';
               } else if (is7bits(c) && iscntrl(UChar(c))) {
           	*tp++ = '\\';
           	*tp++ = '^';
          @@ -96,11 +105,11 @@
           	len = strlen(buf);
           
           #ifdef TRACE
          -    tp = vbuf = _nc_trace_buf(bufnum, (unsigned) (len * 4) + 5);
          +    tp = vbuf = _nc_trace_buf(bufnum, NormalLen(len));
           #else
               {
          -	static char *mybuf[2];
          -	mybuf[bufnum] = typeRealloc(char, (unsigned) (len * 4) + 5, mybuf[bufnum]);
          +	static char *mybuf[4];
          +	mybuf[bufnum] = typeRealloc(char, NormalLen(len), mybuf[bufnum]);
           	tp = vbuf = mybuf[bufnum];
               }
           #endif
          @@ -161,11 +170,11 @@
           	len = wcslen(buf);
           
           #ifdef TRACE
          -    tp = vbuf = _nc_trace_buf(bufnum, (unsigned) (len * 4) + 5);
          +    tp = vbuf = _nc_trace_buf(bufnum, WideLen(len));
           #else
               {
           	static char *mybuf[2];
          -	mybuf[bufnum] = typeRealloc(char, (unsigned) (len * 4) + 5, mybuf[bufnum]);
          +	mybuf[bufnum] = typeRealloc(char, WideLen(len), mybuf[bufnum]);
           	tp = vbuf = mybuf[bufnum];
               }
           #endif
          @@ -259,7 +268,8 @@
           	result = _nc_trace_bufcat(bufnum, l_brace);
           	result = _nc_trace_bufcat(bufnum, d_quote);
           	for (j = first; j <= last; ++j) {
          -	    if ((found = _nc_altcharset_name(attr, (chtype) CharOf(buf[j]))) != 0) {
          +	    found = _nc_altcharset_name(attr, (chtype) CharOf(buf[j]));
          +	    if (found != 0) {
           		result = _nc_trace_bufcat(bufnum, found);
           		attr &= ~A_ALTCHARSET;
           	    } else
          diff -Naur ncurses-5.6.orig/ncurses/tty/hardscroll.c ncurses-5.6/ncurses/tty/hardscroll.c
          --- ncurses-5.6.orig/ncurses/tty/hardscroll.c	2001-01-13 19:17:28.000000000 -0500
          +++ ncurses-5.6/ncurses/tty/hardscroll.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -145,7 +145,7 @@
           
           #include 
           
          -MODULE_ID("$Id: hardscroll.c,v 1.36 2001/01/14 00:17:28 tom Exp $")
          +MODULE_ID("$Id: hardscroll.c,v 1.41 2007/09/29 21:48:36 tom Exp $")
           
           #if defined(SCROLLDEBUG) || defined(HASHDEBUG)
           
          @@ -158,22 +158,25 @@
           # undef TR
           # define TR(n, a)	if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
           
          +extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
          +
           #else /* no debug */
           
           /* OLDNUM(n) indicates which line will be shifted to the position n.
              if OLDNUM(n) == _NEWINDEX, then the line n in new, not shifted from
              somewhere. */
           NCURSES_EXPORT_VAR(int *)
          -_nc_oldnums = 0;
          +_nc_oldnums = 0;		/* obsolete: keep for ABI compat */
           
           # if USE_HASHMAP
          -     static int oldnums_allocated = 0;
          -#  define oldnums       _nc_oldnums
          +#  define oldnums       SP->_oldnum_list
           #  define OLDNUM(n)	oldnums[n]
           # else				/* !USE_HASHMAP */
           #  define OLDNUM(n)	newscr->_line[n].oldindex
           # endif				/* !USE_HASHMAP */
           
          +#define OLDNUM_SIZE     SP->_oldnum_size
          +
           #endif /* defined(SCROLLDEBUG) || defined(HASHDEBUG) */
           
           NCURSES_EXPORT(void)
          @@ -183,17 +186,17 @@
               int i;
               int start, end, shift;
           
          -    TR(TRACE_ICALLS, ("_nc_scroll_optimize() begins"));
          +    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize")));
           
           #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
           #if USE_HASHMAP
               /* get enough storage */
          -    if (oldnums_allocated < screen_lines) {
          +    if (OLDNUM_SIZE < screen_lines) {
           	int *new_oldnums = typeRealloc(int, screen_lines, oldnums);
           	if (!new_oldnums)
           	    return;
           	oldnums = new_oldnums;
          -	oldnums_allocated = screen_lines;
          +	OLDNUM_SIZE = screen_lines;
               }
               /* calculate the indices */
               _nc_hash_map();
          @@ -201,8 +204,10 @@
           #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
           
           #ifdef TRACE
          -    if (_nc_tracing & (TRACE_UPDATE | TRACE_MOVE))
          +    if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) {
           	_nc_linedump();
          +	_nc_unlock_global(tracef);
          +    }
           #endif /* TRACE */
           
               /* pass 1 - from top to bottom scrolling up */
          @@ -253,6 +258,7 @@
           	}
           #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
               }
          +    TR(TRACE_ICALLS, (T_RETURN("")));
           }
           
           #if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
          @@ -260,23 +266,17 @@
           _nc_linedump(void)
           /* dump the state of the real and virtual oldnum fields */
           {
          -    static size_t have;
          -    static char *buf;
          -
               int n;
          +    char *buf = 0;
               size_t want = (screen_lines + 1) * 4;
           
          -    if (have < want)
          -	buf = typeMalloc(char, have = want);
          +    buf = typeMalloc(char, want);
           
               (void) strcpy(buf, "virt");
               for (n = 0; n < screen_lines; n++)
           	(void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n));
               TR(TRACE_UPDATE | TRACE_MOVE, (buf));
          -#if NO_LEAKS
               free(buf);
          -    have = 0;
          -#endif
           }
           #endif /* defined(TRACE) || defined(SCROLLDEBUG) */
           
          diff -Naur ncurses-5.6.orig/ncurses/tty/hashmap.c ncurses-5.6/ncurses/tty/hashmap.c
          --- ncurses-5.6.orig/ncurses/tty/hashmap.c	2006-03-11 14:33:49.000000000 -0500
          +++ ncurses-5.6/ncurses/tty/hashmap.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                   *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -70,7 +70,7 @@
           #include 
           #include 		/* for back_color_erase */
           
          -MODULE_ID("$Id: hashmap.c,v 1.49 2006/03/11 19:33:49 tom Exp $")
          +MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $")
           
           #ifdef HASHDEBUG
           
          @@ -81,7 +81,8 @@
           # define screen_lines MAXLINES
           # define TEXTWIDTH	1
           int oldnums[MAXLINES], reallines[MAXLINES];
          -static chtype oldtext[MAXLINES][TEXTWIDTH], newtext[MAXLINES][TEXTWIDTH];
          +static NCURSES_CH_T oldtext[MAXLINES][TEXTWIDTH];
          +static NCURSES_CH_T newtext[MAXLINES][TEXTWIDTH];
           # define OLDNUM(n)	oldnums[n]
           # define OLDTEXT(n)	oldtext[n]
           # define NEWTEXT(m)	newtext[m]
          @@ -89,7 +90,7 @@
           
           #else /* !HASHDEBUG */
           
          -# define OLDNUM(n)	_nc_oldnums[n]
          +# define OLDNUM(n)	SP->_oldnum_list[n]
           # define OLDTEXT(n)	curscr->_line[n].text
           # define NEWTEXT(m)	newscr->_line[m].text
           # define TEXTWIDTH	(curscr->_maxx+1)
          @@ -130,8 +131,8 @@
               int cost = 0;
               int i;
           
          -    for (i = TEXTWIDTH; i > 0; i--)
          -	if (!(CharEq(*from++, *to++)))
          +    for (i = TEXTWIDTH; i > 0; i--, from++, to++)
          +	if (!(CharEq(*from, *to)))
           	    cost++;
           
               return cost;
          @@ -147,8 +148,8 @@
               if (back_color_erase)
           	SetPair(blank, GetPair(stdscr->_nc_bkgd));
           
          -    for (i = TEXTWIDTH; i > 0; i--)
          -	if (!(CharEq(blank, *to++)))
          +    for (i = TEXTWIDTH; i > 0; i--, to++)
          +	if (!(CharEq(blank, *to)))
           	    cost++;
           
               return cost;
          @@ -446,11 +447,14 @@
               char line[BUFSIZ], *st;
               int n;
           
          -    SP = typeCalloc(SCREEN, 1);
          +    if (setupterm(NULL, fileno(stdout), (int *) 0) == ERR)
          +	return EXIT_FAILURE;
          +    (void) _nc_alloc_screen();
          +
               for (n = 0; n < screen_lines; n++) {
           	reallines[n] = n;
           	oldnums[n] = _NEWINDEX;
          -	oldtext[n][0] = newtext[n][0] = '.';
          +	CharOf(oldtext[n][0]) = CharOf(newtext[n][0]) = '.';
               }
           
               if (isatty(fileno(stdin)))
          @@ -462,7 +466,7 @@
               for (;;) {
           	/* grab a test command */
           	if (fgets(line, sizeof(line), stdin) == (char *) NULL)
          -	    exit(EXIT_SUCCESS);
          +	    break;
           
           	switch (line[0]) {
           	case '#':		/* comment */
          @@ -484,22 +488,22 @@
           
           	case 'n':		/* use following letters as text of new lines */
           	    for (n = 0; n < screen_lines; n++)
          -		newtext[n][0] = '.';
          +		CharOf(newtext[n][0]) = '.';
           	    for (n = 0; n < screen_lines; n++)
           		if (line[n + 1] == '\n')
           		    break;
           		else
          -		    newtext[n][0] = line[n + 1];
          +		    CharOf(newtext[n][0]) = line[n + 1];
           	    break;
           
           	case 'o':		/* use following letters as text of old lines */
           	    for (n = 0; n < screen_lines; n++)
          -		oldtext[n][0] = '.';
          +		CharOf(oldtext[n][0]) = '.';
           	    for (n = 0; n < screen_lines; n++)
           		if (line[n + 1] == '\n')
           		    break;
           		else
          -		    oldtext[n][0] = line[n + 1];
          +		    CharOf(oldtext[n][0]) = line[n + 1];
           	    break;
           
           	case 'd':		/* dump state of test arrays */
          @@ -508,12 +512,12 @@
           #endif
           	    (void) fputs("Old lines: [", stdout);
           	    for (n = 0; n < screen_lines; n++)
          -		putchar(oldtext[n][0]);
          +		putchar(CharOf(oldtext[n][0]));
           	    putchar(']');
           	    putchar('\n');
           	    (void) fputs("New lines: [", stdout);
           	    for (n = 0; n < screen_lines; n++)
          -		putchar(newtext[n][0]);
          +		putchar(CharOf(newtext[n][0]));
           	    putchar(']');
           	    putchar('\n');
           	    break;
          @@ -527,12 +531,17 @@
           	    _nc_scroll_optimize();
           	    (void) fputs("Done.\n", stderr);
           	    break;
          +	default:
           	case '?':
           	    usage();
           	    break;
           	}
               }
          +#if NO_LEAKS
          +    _nc_free_and_exit(EXIT_SUCCESS);
          +#else
               return EXIT_SUCCESS;
          +#endif
           }
           
           #endif /* HASHDEBUG */
          diff -Naur ncurses-5.6.orig/ncurses/tty/lib_mvcur.c ncurses-5.6/ncurses/tty/lib_mvcur.c
          --- ncurses-5.6.orig/ncurses/tty/lib_mvcur.c	2006-11-25 17:31:59.000000000 -0500
          +++ ncurses-5.6/ncurses/tty/lib_mvcur.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -155,7 +155,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: lib_mvcur.c,v 1.107 2006/11/25 22:31:59 tom Exp $")
          +MODULE_ID("$Id: lib_mvcur.c,v 1.110 2007/08/11 16:15:57 tom Exp $")
           
           #define WANT_CHAR(y, x)	SP->_newscr->_line[y].text[x]	/* desired state */
           #define BAUDRATE	cur_term->_baudrate	/* bits per second */
          @@ -959,6 +959,7 @@
           
           #include 
           #include 
          +#include 
           
           NCURSES_EXPORT_VAR(const char *) _nc_progname = "mvcur";
           
          @@ -1017,7 +1018,7 @@
           int
           main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
           {
          -    (void) strcpy(tname, termname());
          +    strcpy(tname, getenv("TERM"));
               load_term();
               _nc_setupscreen(lines, columns, stdout, FALSE, 0);
               baudrate();
          @@ -1088,7 +1089,7 @@
           	    load_term();
           	} else if (sscanf(buf, "d %s", capname) == 1) {
           	    struct name_table_entry const *np = _nc_find_entry(capname,
          -							       _nc_info_hash_table);
          +							       _nc_get_hash_table(FALSE));
           
           	    if (np == NULL)
           		(void) printf("No such capability as \"%s\"\n", capname);
          @@ -1116,7 +1117,7 @@
           	    }
           	} else if (buf[0] == 'i') {
           	    dump_init((char *) NULL, F_TERMINFO, S_TERMINFO, 70, 0, FALSE);
          -	    dump_entry(&cur_term->type, FALSE, TRUE, 0, 0, 0);
          +	    dump_entry(&cur_term->type, FALSE, TRUE, 0, 0);
           	    putchar('\n');
           	} else if (buf[0] == 'o') {
           	    if (_nc_optimize_enable & OPTIMIZE_MVCUR) {
          diff -Naur ncurses-5.6.orig/ncurses/tty/lib_tstp.c ncurses-5.6/ncurses/tty/lib_tstp.c
          --- ncurses-5.6.orig/ncurses/tty/lib_tstp.c	2006-04-01 14:31:34.000000000 -0500
          +++ ncurses-5.6/ncurses/tty/lib_tstp.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -46,7 +46,7 @@
           #define _POSIX_SOURCE
           #endif
           
          -MODULE_ID("$Id: lib_tstp.c,v 1.32 2006/04/01 19:31:34 tom Exp $")
          +MODULE_ID("$Id: lib_tstp.c,v 1.36 2007/04/21 19:51:29 tom Exp $")
           
           #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
           #define USE_SIGTSTP 1
          @@ -234,14 +234,12 @@
           static void
           cleanup(int sig)
           {
          -    static int nested;
          -
               /*
                * Actually, doing any sort of I/O from within an signal handler is
                * "unsafe".  But we'll _try_ to clean up the screen and terminal
                * settings on the way out.
                */
          -    if (!nested++
          +    if (!_nc_globals.cleanup_nested++
           	&& (sig == SIGINT
           	    || sig == SIGQUIT)) {
           #if HAVE_SIGACTION || HAVE_SIGVEC
          @@ -277,7 +275,7 @@
           static void
           sigwinch(int sig GCC_UNUSED)
           {
          -    _nc_handle_sigwinch(-1);
          +    _nc_globals.have_sigwinch = 1;
           }
           #endif /* USE_SIGWINCH */
           
          @@ -351,29 +349,27 @@
           NCURSES_EXPORT(void)
           _nc_signal_handler(bool enable)
           {
          -    static bool initialized = FALSE;
          -
               T((T_CALLED("_nc_signal_handler(%d)"), enable));
           #if USE_SIGTSTP			/* Xenix 2.x doesn't have SIGTSTP, for example */
               {
           	static bool ignore_tstp = FALSE;
           
           	if (!ignore_tstp) {
          -	    static sigaction_t act, oact;
          +	    static sigaction_t new_sigaction, old_sigaction;
           
           	    if (!enable) {
          -		act.sa_handler = SIG_IGN;
          -		sigaction(SIGTSTP, &act, &oact);
          -	    } else if (act.sa_handler != SIG_DFL) {
          -		sigaction(SIGTSTP, &oact, NULL);
          -	    } else if (sigaction(SIGTSTP, NULL, &oact) == 0
          -		       && (oact.sa_handler == SIG_DFL)) {
          -		sigemptyset(&act.sa_mask);
          +		new_sigaction.sa_handler = SIG_IGN;
          +		sigaction(SIGTSTP, &new_sigaction, &old_sigaction);
          +	    } else if (new_sigaction.sa_handler != SIG_DFL) {
          +		sigaction(SIGTSTP, &old_sigaction, NULL);
          +	    } else if (sigaction(SIGTSTP, NULL, &old_sigaction) == 0
          +		       && (old_sigaction.sa_handler == SIG_DFL)) {
          +		sigemptyset(&new_sigaction.sa_mask);
           #ifdef SA_RESTART
          -		act.sa_flags |= SA_RESTART;
          +		new_sigaction.sa_flags |= SA_RESTART;
           #endif /* SA_RESTART */
          -		act.sa_handler = tstp;
          -		(void) sigaction(SIGTSTP, &act, NULL);
          +		new_sigaction.sa_handler = tstp;
          +		(void) sigaction(SIGTSTP, &new_sigaction, NULL);
           	    } else {
           		ignore_tstp = TRUE;
           	    }
          @@ -381,14 +377,14 @@
               }
           #endif /* !USE_SIGTSTP */
           
          -    if (!initialized) {
          +    if (!_nc_globals.init_signals) {
           	if (enable) {
           	    CatchIfDefault(SIGINT, cleanup);
           	    CatchIfDefault(SIGTERM, cleanup);
           #if USE_SIGWINCH
           	    CatchIfDefault(SIGWINCH, sigwinch);
           #endif
          -	    initialized = TRUE;
          +	    _nc_globals.init_signals = TRUE;
           	}
               }
               returnVoid;
          diff -Naur ncurses-5.6.orig/ncurses/tty/lib_twait.c ncurses-5.6/ncurses/tty/lib_twait.c
          --- ncurses-5.6.orig/ncurses/tty/lib_twait.c	2006-05-27 17:57:43.000000000 -0400
          +++ ncurses-5.6/ncurses/tty/lib_twait.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -29,6 +29,7 @@
           /****************************************************************************
            *  Author: Zeyd M. Ben-Halim  1992,1995               *
            *     and: Eric S. Raymond                          *
          + *     and: Thomas E. Dickey                        1996-on                 *
            ****************************************************************************/
           
           /*
          @@ -61,38 +62,42 @@
           # endif
           #endif
           
          -MODULE_ID("$Id: lib_twait.c,v 1.51 2006/05/27 21:57:43 tom Exp $")
          +MODULE_ID("$Id: lib_twait.c,v 1.54 2007/08/11 16:32:48 tom Exp $")
          +
          +#if HAVE_GETTIMEOFDAY
          +# define PRECISE_GETTIME 1
          +# define TimeType struct timeval
          +#else
          +# define PRECISE_GETTIME 0
          +# define TimeType time_t
          +#endif
           
           static long
          -_nc_gettime(bool first)
          +_nc_gettime(TimeType * t0, bool first)
           {
               long res;
           
          -#if HAVE_GETTIMEOFDAY
          -# define PRECISE_GETTIME 1
          -    static struct timeval t0;
          -    struct timeval t1;
          +#if PRECISE_GETTIME
          +    TimeType t1;
               gettimeofday(&t1, (struct timezone *) 0);
               if (first) {
          -	t0 = t1;
          +	*t0 = t1;
           	res = 0;
               } else {
           	/* .tv_sec and .tv_usec are unsigned, be careful when subtracting */
          -	if (t0.tv_usec > t1.tv_usec) {	/* Convert 1s in 1e6 microsecs */
          -	    t1.tv_usec += 1000000;
          +	if (t0->tv_usec > t1.tv_usec) {
          +	    t1.tv_usec += 1000000;	/* Convert 1s in 1e6 microsecs */
           	    t1.tv_sec--;
           	}
          -	res = (t1.tv_sec - t0.tv_sec) * 1000
          -	    + (t1.tv_usec - t0.tv_usec) / 1000;
          +	res = (t1.tv_sec - t0->tv_sec) * 1000
          +	    + (t1.tv_usec - t0->tv_usec) / 1000;
               }
           #else
          -# define PRECISE_GETTIME 0
          -    static time_t t0;
               time_t t1 = time((time_t *) 0);
               if (first) {
          -	t0 = t1;
          +	*t0 = t1;
               }
          -    res = (t1 - t0) * 1000;
          +    res = (t1 - *t0) * 1000;
           #endif
               TR(TRACE_IEVENT, ("%s time: %ld msec", first ? "get" : "elapsed", res));
               return res;
          @@ -147,7 +152,8 @@
           {
               int fd;
               int count;
          -    int result;
          +    int result = 0;
          +    TimeType t0;
           
           #ifdef NCURSES_WGETCH_EVENTS
               int timeout_is_event = 0;
          @@ -160,7 +166,7 @@
               struct pollfd *fds = fd_list;
           #elif defined(__BEOS__)
           #elif HAVE_SELECT
          -    static fd_set set;
          +    fd_set set;
           #endif
           
               long starttime, returntime;
          @@ -180,10 +186,10 @@
               }
           #endif
           
          -#if PRECISE_GETTIME
          +#if PRECISE_GETTIME && HAVE_NANOSLEEP
             retry:
           #endif
          -    starttime = _nc_gettime(TRUE);
          +    starttime = _nc_gettime(&t0, TRUE);
           
               count = 0;
           
          @@ -362,7 +368,7 @@
           
           #endif /* USE_FUNC_POLL, etc */
           
          -    returntime = _nc_gettime(FALSE);
          +    returntime = _nc_gettime(&t0, FALSE);
           
               if (milliseconds >= 0)
           	milliseconds -= (returntime - starttime);
          diff -Naur ncurses-5.6.orig/ncurses/tty/lib_vidattr.c ncurses-5.6/ncurses/tty/lib_vidattr.c
          --- ncurses-5.6.orig/ncurses/tty/lib_vidattr.c	2006-01-21 18:39:40.000000000 -0500
          +++ ncurses-5.6/ncurses/tty/lib_vidattr.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -65,7 +65,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: lib_vidattr.c,v 1.46 2006/01/21 23:39:40 tom Exp $")
          +MODULE_ID("$Id: lib_vidattr.c,v 1.49 2007/06/30 21:58:04 tom Exp $")
           
           #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
           
          @@ -87,10 +87,11 @@
           		} \
           	}
           
          +#define PreviousAttr _nc_prescreen.previous_attr
          +
           NCURSES_EXPORT(int)
           vidputs(chtype newmode, int (*outc) (int))
           {
          -    static attr_t previous_attr = A_NORMAL;
               attr_t turn_on, turn_off;
               int pair;
               bool reverse = FALSE;
          @@ -101,18 +102,19 @@
           #define fix_pair0 FALSE
           #endif
           
          +    newmode &= A_ATTRIBUTES;
               T((T_CALLED("vidputs(%s)"), _traceattr(newmode)));
           
               /* this allows us to go on whether or not newterm() has been called */
               if (SP)
          -	previous_attr = AttrOf(SCREEN_ATTRS(SP));
          +	PreviousAttr = AttrOf(SCREEN_ATTRS(SP));
           
          -    TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(previous_attr)));
          +    TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(PreviousAttr)));
           
               if ((SP != 0)
           	&& (magic_cookie_glitch > 0)) {
           #if USE_XMC_SUPPORT
          -	static chtype table[] =
          +	static const chtype table[] =
           	{
           	    A_STANDOUT,
           	    A_UNDERLINE,
          @@ -183,7 +185,7 @@
           	newmode &= ~mask;
               }
           
          -    if (newmode == previous_attr)
          +    if (newmode == PreviousAttr)
           	returnCode(OK);
           
               pair = PAIR_NUMBER(newmode);
          @@ -192,17 +194,17 @@
           	newmode &= ~A_REVERSE;
               }
           
          -    turn_off = (~newmode & previous_attr) & ALL_BUT_COLOR;
          -    turn_on = (newmode & ~previous_attr) & ALL_BUT_COLOR;
          +    turn_off = (~newmode & PreviousAttr) & ALL_BUT_COLOR;
          +    turn_on = (newmode & ~PreviousAttr) & ALL_BUT_COLOR;
           
          -    SetColorsIf(((pair == 0) && !fix_pair0), previous_attr);
          +    SetColorsIf(((pair == 0) && !fix_pair0), PreviousAttr);
           
               if (newmode == A_NORMAL) {
          -	if ((previous_attr & A_ALTCHARSET) && exit_alt_charset_mode) {
          +	if ((PreviousAttr & A_ALTCHARSET) && exit_alt_charset_mode) {
           	    doPut(exit_alt_charset_mode);
          -	    previous_attr &= ~A_ALTCHARSET;
          +	    PreviousAttr &= ~A_ALTCHARSET;
           	}
          -	if (previous_attr) {
          +	if (PreviousAttr) {
           	    if (exit_attribute_mode) {
           		doPut(exit_attribute_mode);
           	    } else {
          @@ -213,10 +215,10 @@
           		    TurnOff(A_STANDOUT, exit_standout_mode);
           		}
           	    }
          -	    previous_attr &= ALL_BUT_COLOR;
          +	    PreviousAttr &= ALL_BUT_COLOR;
           	}
           
          -	SetColorsIf((pair != 0) || fix_pair0, previous_attr);
          +	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
               } else if (set_attributes) {
           	if (turn_on || turn_off) {
           	    TPUTS_TRACE("set_attributes");
          @@ -230,9 +232,9 @@
           			(newmode & A_INVIS) != 0,
           			(newmode & A_PROTECT) != 0,
           			(newmode & A_ALTCHARSET) != 0), 1, outc);
          -	    previous_attr &= ALL_BUT_COLOR;
          +	    PreviousAttr &= ALL_BUT_COLOR;
           	}
          -	SetColorsIf((pair != 0) || fix_pair0, previous_attr);
          +	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
               } else {
           
           	TR(TRACE_ATTRS, ("turning %s off", _traceattr(turn_off)));
          @@ -250,9 +252,9 @@
           	if (turn_off && exit_attribute_mode) {
           	    doPut(exit_attribute_mode);
           	    turn_on |= (newmode & ALL_BUT_COLOR);
          -	    previous_attr &= ALL_BUT_COLOR;
          +	    PreviousAttr &= ALL_BUT_COLOR;
           	}
          -	SetColorsIf((pair != 0) || fix_pair0, previous_attr);
          +	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
           
           	TR(TRACE_ATTRS, ("turning %s on", _traceattr(turn_on)));
           	/* *INDENT-OFF* */
          @@ -283,7 +285,7 @@
               if (SP)
           	SetAttr(SCREEN_ATTRS(SP), newmode);
               else
          -	previous_attr = newmode;
          +	PreviousAttr = newmode;
           
               returnCode(OK);
           }
          diff -Naur ncurses-5.6.orig/ncurses/tty/tty_update.c ncurses-5.6/ncurses/tty/tty_update.c
          --- ncurses-5.6.orig/ncurses/tty/tty_update.c	2006-11-25 17:33:21.000000000 -0500
          +++ ncurses-5.6/ncurses/tty/tty_update.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 1998-2006,2007 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            *
          @@ -74,7 +74,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: tty_update.c,v 1.238 2006/11/25 22:33:21 tom Exp $")
          +MODULE_ID("$Id: tty_update.c,v 1.243 2007/10/13 20:03:32 tom Exp $")
           
           /*
            * This define controls the line-breakout optimization.  Every once in a
          @@ -289,7 +289,7 @@
           #endif
               {
           	PUTC(CHDEREF(ch), SP->_ofp);	/* macro's fastest... */
          -	TRACE_OUTCHARS(1);
          +	COUNT_OUTCHARS(1);
               }
               SP->_curscol += chlen;
               if (char_padding) {
          @@ -624,13 +624,18 @@
           
               T((T_CALLED("doupdate()")));
           
          +    if (curscr == 0
          +	|| newscr == 0)
          +	returnCode(ERR);
          +
           #ifdef TRACE
          -    if (_nc_tracing & TRACE_UPDATE) {
          +    if (USE_TRACEF(TRACE_UPDATE)) {
           	if (curscr->_clear)
           	    _tracef("curscr is clear");
           	else
           	    _tracedump("curscr", curscr);
           	_tracedump("newscr", newscr);
          +	_nc_unlock_global(tracef);
               }
           #endif /* TRACE */
           
          @@ -640,7 +645,7 @@
           	SP->_fifohold--;
           
           #if USE_SIZECHANGE
          -    if (SP->_endwin || SP->_sig_winch) {
          +    if (SP->_endwin || _nc_handle_sigwinch(FALSE)) {
           	/*
           	 * This is a transparent extension:  XSI does not address it,
           	 * and applications need not know that ncurses can do it.
          @@ -666,7 +671,7 @@
               }
           #if USE_TRACE_TIMES
               /* zero the metering machinery */
          -    _nc_outchars = 0;
          +    RESET_OUTCHARS();
               (void) times(&before);
           #endif /* USE_TRACE_TIMES */
           
          @@ -826,9 +831,10 @@
           
           #ifdef TRACE
           	/* show altered highlights after magic-cookie check */
          -	if (_nc_tracing & TRACE_UPDATE) {
          +	if (USE_TRACEF(TRACE_UPDATE)) {
           	    _tracef("After magic-cookie check...");
           	    _tracedump("newscr", newscr);
          +	    _nc_unlock_global(tracef);
           	}
           #endif /* TRACE */
               }
          @@ -836,7 +842,6 @@
           
               nonempty = 0;
               if (curscr->_clear || newscr->_clear) {	/* force refresh ? */
          -	TR(TRACE_UPDATE, ("clearing and updating from scratch"));
           	ClrUpdate();
           	curscr->_clear = FALSE;	/* reset flag */
           	newscr->_clear = FALSE;	/* reset flag */
          @@ -967,7 +972,7 @@
               NCURSES_CH_T blank = ClrBlank(stdscr);
               int nonempty = min(screen_lines, newscr->_maxy + 1);
           
          -    TR(TRACE_UPDATE, ("ClrUpdate() called"));
          +    TR(TRACE_UPDATE, (T_CALLED("ClrUpdate")));
           
               ClearScreen(blank);
           
          @@ -977,6 +982,8 @@
           
               for (i = 0; i < nonempty; i++)
           	TransformLine(i);
          +
          +    TR(TRACE_UPDATE, (T_RETURN("")));
           }
           
           /*
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_cchar.c ncurses-5.6/ncurses/widechar/lib_cchar.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_cchar.c	2005-01-29 16:29:16.000000000 -0500
          +++ ncurses-5.6/ncurses/widechar/lib_cchar.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2001-2004,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 2001-2005,2007 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 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_cchar.c,v 1.11 2005/01/29 21:29:16 tom Exp $")
          +MODULE_ID("$Id: lib_cchar.c,v 1.12 2007/05/12 19:03:06 tom Exp $")
           
           /* 
            * The SuSv2 description leaves some room for interpretation.  We'll assume wch
          @@ -54,8 +54,9 @@
               int len;
               int code = OK;
           
          -    TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%ld,%d,%p)"),
          -		      wcval, _nc_viswbuf(wch), attrs, color_pair, opts));
          +    TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
          +		      wcval, _nc_viswbuf(wch),
          +		      (unsigned long) attrs, color_pair, opts));
           
               len = wcslen(wch);
               if (opts != NULL
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_get_wch.c ncurses-5.6/ncurses/widechar/lib_get_wch.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_get_wch.c	2006-06-03 13:27:57.000000000 -0400
          +++ ncurses-5.6/ncurses/widechar/lib_get_wch.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 2002-2006,2007 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            *
          @@ -40,7 +40,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: lib_get_wch.c,v 1.13 2006/06/03 17:27:57 tom Exp $")
          +MODULE_ID("$Id: lib_get_wch.c,v 1.14 2007/05/12 19:03:16 tom Exp $")
           
           #if HAVE_MBTOWC && HAVE_MBLEN
           #define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
          @@ -77,7 +77,7 @@
                * _nc_wgetch(), while we want to return a wide character or KEY_xxx code.
                */
               for (;;) {
          -	T(("reading %d of %d", count + 1, sizeof(buffer)));
          +	T(("reading %d of %d", (int) count + 1, (int) sizeof(buffer)));
           	code = _nc_wgetch(win, &value, TRUE EVENTLIST_2nd((_nc_eventlist *) 0));
           	if (code == ERR) {
           	    break;
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_in_wchnstr.c ncurses-5.6/ncurses/widechar/lib_in_wchnstr.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_in_wchnstr.c	2004-05-15 20:12:30.000000000 -0400
          +++ ncurses-5.6/ncurses/widechar/lib_in_wchnstr.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2002,2004 Free Software Foundation, Inc.                   *
          + * Copyright (c) 2002-2004-2007 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 @@
            ****************************************************************************/
           
           /****************************************************************************
          - * Author: Thomas Dickey 2002,2004                                          *
          + * Author: Thomas Dickey                                                    *
            ****************************************************************************/
           
           /*
          @@ -39,27 +39,35 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_in_wchnstr.c,v 1.3 2004/05/16 00:12:30 tom Exp $")
          +MODULE_ID("$Id: lib_in_wchnstr.c,v 1.7 2007/02/11 01:00:00 tom Exp $")
           
           NCURSES_EXPORT(int)
          -win_wchnstr(WINDOW *win, cchar_t * wchstr, int n)
          +win_wchnstr(WINDOW *win, cchar_t *wchstr, int n)
           {
               int code = OK;
           
          -    TR(TRACE_CALLS, (T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
          +    T((T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
               if (win != 0
           	&& wchstr != 0) {
          +	NCURSES_CH_T *src;
           	int row, col;
          -	int j;
          +	int j, k, limit;
           
           	getyx(win, row, col);
          +	limit = getmaxx(win) - col;
          +	src = &(win->_line[row].text[col]);
           
           	if (n < 0) {
          -	    n = getmaxx(win) + 1 - getcurx(win);
          +	    n = limit;
          +	} else if (n > limit) {
          +	    n = limit;
           	}
          -	for (j = 0; j < n; ++j) {
          -	    wchstr[j] = win->_line[row].text[col + j];
          +	for (j = k = 0; j < n; ++j) {
          +	    if (j == 0 || !WidecExt(src[j]) || isWidecBase(src[j])) {
          +		wchstr[k++] = src[j];
          +	    }
           	}
          +	memset(&(wchstr[k]), 0, sizeof(*wchstr));
           	T(("result = %s", _nc_viscbuf(wchstr, n)));
               } else {
           	code = ERR;
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_key_name.c ncurses-5.6/ncurses/widechar/lib_key_name.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_key_name.c	1969-12-31 19:00:00.000000000 -0500
          +++ ncurses-5.6/ncurses/widechar/lib_key_name.c	2007-12-21 00:02:36.000000000 -0500
          @@ -0,0 +1,62 @@
          +/****************************************************************************
          + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
          + * without limitation the rights to use, copy, modify, merge, publish,      *
          + * distribute, distribute with modifications, sublicense, and/or sell       *
          + * copies of the Software, and to permit persons to whom the Software is    *
          + * furnished to do so, subject to the following conditions:                 *
          + *                                                                          *
          + * The above copyright notice and this permission notice shall be included  *
          + * in all copies or substantial portions of the Software.                   *
          + *                                                                          *
          + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
          + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
          + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
          + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
          + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
          + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
          + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
          + *                                                                          *
          + * Except as contained in this notice, the name(s) of the above copyright   *
          + * holders shall not be used in advertising or otherwise to promote the     *
          + * sale, use or other dealings in this Software without prior written       *
          + * authorization.                                                           *
          + ****************************************************************************/
          +
          +/*
          +**	lib_key_name.c
          +**
          +**	The routine key_name().
          +**
          +*/
          +
          +#include 
          +
          +MODULE_ID("$Id: lib_key_name.c,v 1.2 2007/06/12 21:01:13 tom Exp $")
          +
          +NCURSES_EXPORT(NCURSES_CONST char *)
          +key_name(wchar_t c)
          +{
          +    cchar_t my_cchar;
          +    wchar_t *my_wchars;
          +    size_t len;
          +
          +    /* FIXME: move to _nc_globals */
          +    static char result[MB_LEN_MAX + 1];
          +
          +    memset(&my_cchar, 0, sizeof(my_cchar));
          +    my_cchar.chars[0] = c;
          +    my_cchar.chars[1] = L'\0';
          +
          +    my_wchars = wunctrl(&my_cchar);
          +    len = wcstombs(result, my_wchars, sizeof(result) - 1);
          +    if (isEILSEQ(len) || (len == 0)) {
          +	return "UNKNOWN KEY";
          +    }
          +
          +    result[len] = '\0';
          +    return result;
          +}
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_unget_wch.c ncurses-5.6/ncurses/widechar/lib_unget_wch.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_unget_wch.c	2004-12-04 20:21:31.000000000 -0500
          +++ ncurses-5.6/ncurses/widechar/lib_unget_wch.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2002-2003,2004 Free Software Foundation, Inc.              *
          + * Copyright (c) 2002-2004,2007 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            *
          @@ -39,26 +39,30 @@
           
           #include 
           
          -MODULE_ID("$Id: lib_unget_wch.c,v 1.7 2004/12/05 01:21:31 tom Exp $")
          +MODULE_ID("$Id: lib_unget_wch.c,v 1.9 2007/11/25 00:57:00 tom Exp $")
           
          -#ifdef linux
           /*
          - * glibc's wcrtomb() function is broken - does not return the proper value
          - * when target is null (noted for glibc 2.3.2).  This is a workaround.
          + * Wrapper for wcrtomb() which obtains the length needed for the given
          + * wide-character 'source'.
            */
           NCURSES_EXPORT(size_t)
           _nc_wcrtomb(char *target, wchar_t source, mbstate_t * state)
           {
          +    int result;
          +
               if (target == 0) {
           	wchar_t temp[2];
           	const wchar_t *tempp = temp;
           	temp[0] = source;
           	temp[1] = 0;
          -	return wcsrtombs(NULL, &tempp, 0, state);
          +	result = wcsrtombs(NULL, &tempp, 0, state);
          +    } else {
          +	result = wcrtomb(target, source, state);
               }
          -    return wcrtomb(target, source, state);
          +    if (!isEILSEQ(result) && (result == 0))
          +	result = 1;
          +    return result;
           }
          -#endif
           
           NCURSES_EXPORT(int)
           unget_wch(const wchar_t wch)
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_vid_attr.c ncurses-5.6/ncurses/widechar/lib_vid_attr.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_vid_attr.c	2006-11-25 19:26:00.000000000 -0500
          +++ ncurses-5.6/ncurses/widechar/lib_vid_attr.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
          + * Copyright (c) 2002-2006,2007 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            *
          @@ -33,7 +33,7 @@
           #include 
           #include 
           
          -MODULE_ID("$Id: lib_vid_attr.c,v 1.4 2006/11/26 00:26:00 tom Exp $")
          +MODULE_ID("$Id: lib_vid_attr.c,v 1.5 2007/06/30 22:03:02 tom Exp $")
           
           #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
           
          @@ -72,6 +72,7 @@
           #define fix_pair0 FALSE
           #endif
           
          +    newmode &= A_ATTRIBUTES;
               T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
           
               /* this allows us to go on whether or not newterm() has been called */
          diff -Naur ncurses-5.6.orig/ncurses/widechar/lib_wunctrl.c ncurses-5.6/ncurses/widechar/lib_wunctrl.c
          --- ncurses-5.6.orig/ncurses/widechar/lib_wunctrl.c	2005-04-16 14:10:44.000000000 -0400
          +++ ncurses-5.6/ncurses/widechar/lib_wunctrl.c	2007-12-21 00:02:36.000000000 -0500
          @@ -1,5 +1,5 @@
           /****************************************************************************
          - * Copyright (c) 2001-2003,2005 Free Software Foundation, Inc.              *
          + * Copyright (c) 2001-2005,2007 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,21 @@
           
           #include 
           
          -#if USE_WIDEC_SUPPORT
          -
          -MODULE_ID("$Id: lib_wunctrl.c,v 1.8 2005/04/16 18:10:44 tom Exp $")
          +MODULE_ID("$Id: lib_wunctrl.c,v 1.12 2007/06/12 20:22:32 tom Exp $")
           
           NCURSES_EXPORT(wchar_t *)
           wunctrl(cchar_t *wc)
           {
          -    static wchar_t str[5], *sp;
          +    static wchar_t str[CCHARW_MAX + 1], *sp;
           
               if (Charable(*wc)) {
           	const char *p = unctrl((unsigned) _nc_to_char((wint_t) CharOf(*wc)));
           
          -	for (sp = str; *p;)
          -	    *sp++ = _nc_to_widechar(*p++);
          +	for (sp = str; *p; ++p) {
          +	    *sp++ = _nc_to_widechar(*p);
          +	}
          +	*sp = 0;
           	return str;
               } else
           	return wc->chars;
           }
          -
          -#endif
          diff -Naur ncurses-5.6.orig/ncurses-5.6-20071201-patch.sh ncurses-5.6/ncurses-5.6-20071201-patch.sh
          --- ncurses-5.6.orig/ncurses-5.6-20071201-patch.sh	1969-12-31 19:00:00.000000000 -0500
          +++ ncurses-5.6/ncurses-5.6-20071201-patch.sh	2007-12-21 00:02:35.000000000 -0500
          @@ -0,0 +1,60468 @@
          +#!/bin/sh
          +# Use this script to patch ncurses 5.6 to 5.6 (20071201)
          +# Run this script inside the ncurses 5.6 source directory et voila! Updated.
          +
          +if ( egrep '^NCURSES_MAJOR = 5$' dist.mk >/dev/null 2>&1 \
          +  && egrep '^NCURSES_MINOR = 6$' dist.mk >/dev/null 2>&1 \
          +  && egrep '^NCURSES_PATCH = 20061217$' dist.mk >/dev/null 2>&1 )
          +then
          +        echo patching...
          +else
          +        echo 'This does not look like ncurses 5.6'
          +        exit 1
          +fi
          +
          +rm -rf tack
          +rm -f Ada95/src/terminal_interface-curses.adb
          +rm -f mkinstalldirs
          +
          +patch -p1 -i $0         # shell command = this script = inputfile for patch
          +exit
          +
          +# patch by Thomas E. Dickey 
          +# created  Sat Dec  8 23:18:44 UTC 2007
          +# ------------------------------------------------------------------------------
          +# Ada95/gen/Makefile.in                                                 |  134 
          +# Ada95/gen/gen.c                                                       |  144 
          +# Ada95/gen/html.m4                                                     |    6 
          +# Ada95/gen/terminal_interface-curses-aux.ads.m4                        |    5 
          +# Ada95/gen/terminal_interface-curses-menus.ads.m4                      |    6 
          +# Ada95/gen/terminal_interface-curses.ads.m4                            |   30 
          +# Ada95/samples/ncurses2-attr_test.adb                                  |   18 
          +# Ada95/samples/ncurses2-m.adb                                          |    5 
          +# Ada95/samples/rain.adb                                                |    4 
          +# Ada95/samples/sample.adb                                              |    4 
          +# Ada95/src/Makefile.in                                                 |    8 
          +# INSTALL                                                               |   60 
          +# MANIFEST                                                              |   48 
          +# NEWS                                                                  |  514 +
          +# TO-DO                                                                 |   23 
          +# aclocal.m4                                                            |  642 +
          +# c++/Makefile.in                                                       |   16 
          +# c++/README-first                                                      |   35 
          +# c++/cursesapp.cc                                                      |    9 
          +# c++/cursesmain.cc                                                     |   32 
          +# c++/cursesp.h                                                         |    6 
          +# c++/cursespad.cc                                                      |   10 
          +# c++/cursesw.cc                                                        |  453 -
          +# c++/cursesw.h                                                         |   33 
          +# c++/demo.cc                                                           |  126 
          +# c++/edit_cfg.sh                                                       |   12 
          +# c++/etip.h.in                                                         |   44 
          +# c++/headers                                                           |    5 
          +# c++/internal.h                                                        |    6 
          +# c++/modules                                                           |    8 
          +# config.guess                                                          |   34 
          +# config.sub                                                            |   28 
          +# configure                                                             | 4143 +++++-----
          +# configure.in                                                          |  265 
          +# dist.mk                                                               |    7 
          +# doc/hackguide.doc                                                     |    2 
          +# doc/html/ada/funcs/A.htm                                              |   15 
          +# doc/html/ada/funcs/B.htm                                              |   14 
          +# doc/html/ada/funcs/C.htm                                              |   49 
          +# doc/html/ada/funcs/D.htm                                              |   41 
          +# doc/html/ada/funcs/E.htm                                              |   14 
          +# doc/html/ada/funcs/F.htm                                              |   21 
          +# doc/html/ada/funcs/G.htm                                              |   65 
          +# doc/html/ada/funcs/H.htm                                              |   18 
          +# doc/html/ada/funcs/I.htm                                              |   39 
          +# doc/html/ada/funcs/K.htm                                              |   11 
          +# doc/html/ada/funcs/L.htm                                              |   11 
          +# doc/html/ada/funcs/M.htm                                              |   25 
          +# doc/html/ada/funcs/N.htm                                              |   30 
          +# doc/html/ada/funcs/O.htm                                              |    6 
          +# doc/html/ada/funcs/P.htm                                              |   24 
          +# doc/html/ada/funcs/Q.htm                                              |    2 
          +# doc/html/ada/funcs/R.htm                                              |   34 
          +# doc/html/ada/funcs/S.htm                                              |  153 
          +# doc/html/ada/funcs/T.htm                                              |   19 
          +# doc/html/ada/funcs/U.htm                                              |   19 
          +# doc/html/ada/funcs/V.htm                                              |    5 
          +# doc/html/ada/funcs/W.htm                                              |   90 
          +# doc/html/ada/table.html                                               |  334 
          +# doc/html/ada/terminal_interface-curses-aux__ads.htm                   |   99 
          +# doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm     |  181 
          +# doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm |   23 
          +# doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm  |   23 
          +# doc/html/ada/terminal_interface-curses-forms__ads.htm                 |  717 -
          +# doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm  |   23 
          +# doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm  |   23 
          +# doc/html/ada/terminal_interface-curses-menus__ads.htm                 |  525 -
          +# doc/html/ada/terminal_interface-curses-mouse__adb.htm                 |   12 
          +# doc/html/ada/terminal_interface-curses-mouse__ads.htm                 |  213 
          +# doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm      |   23 
          +# doc/html/ada/terminal_interface-curses-panels__ads.htm                |   69 
          +# doc/html/ada/terminal_interface-curses-terminfo__adb.htm              |    4 
          +# doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm           |    4 
          +# doc/html/ada/terminal_interface-curses-text_io__adb.htm               |   34 
          +# doc/html/ada/terminal_interface-curses-trace__ads.htm                 |   65 
          +# doc/html/ada/terminal_interface-curses__adb.htm                       | 2936 +++----
          +# doc/html/ada/terminal_interface-curses__ads.htm                       | 2019 ++--
          +# doc/html/man/captoinfo.1m.html                                        |   14 
          +# doc/html/man/clear.1.html                                             |    4 
          +# doc/html/man/curs_add_wch.3x.html                                     |   10 
          +# doc/html/man/curs_addch.3x.html                                       |    4 
          +# doc/html/man/curs_border.3x.html                                      |    8 
          +# doc/html/man/curs_extend.3x.html                                      |    8 
          +# doc/html/man/curs_getcchar.3x.html                                    |    6 
          +# doc/html/man/curs_insstr.3x.html                                      |    4 
          +# doc/html/man/curs_mouse.3x.html                                       |  129 
          +# doc/html/man/curs_printw.3x.html                                      |    8 
          +# doc/html/man/curs_scanw.3x.html                                       |    6 
          +# doc/html/man/curs_scr_dump.3x.html                                    |    4 
          +# doc/html/man/curs_termcap.3x.html                                     |    4 
          +# doc/html/man/curs_terminfo.3x.html                                    |    8 
          +# doc/html/man/curs_trace.3x.html                                       |    6 
          +# doc/html/man/curs_util.3x.html                                        |   10 
          +# doc/html/man/default_colors.3x.html                                   |    4 
          +# doc/html/man/form.3x.html                                             |    2 
          +# doc/html/man/form_field_new.3x.html                                   |    8 
          +# doc/html/man/form_field_opts.3x.html                                  |   12 
          +# doc/html/man/form_field_validation.3x.html                            |   22 
          +# doc/html/man/form_hook.3x.html                                        |   20 
          +# doc/html/man/form_opts.3x.html                                        |   12 
          +# doc/html/man/index.html                                               |    3 
          +# doc/html/man/infocmp.1m.html                                          |    4 
          +# doc/html/man/infotocap.1m.html                                        |    6 
          +# doc/html/man/legacy_coding.3x.html                                    |   17 
          +# doc/html/man/menu.3x.html                                             |    2 
          +# doc/html/man/menu_hook.3x.html                                        |   20 
          +# doc/html/man/menu_opts.3x.html                                        |   12 
          +# doc/html/man/mitem_opts.3x.html                                       |   12 
          +# doc/html/man/ncurses.3x.html                                          |   10 
          +# doc/html/man/panel.3x.html                                            |    2 
          +# doc/html/man/term.5.html                                              |   12 
          +# doc/html/man/term.7.html                                              |   12 
          +# doc/html/man/terminfo.5.html                                          |   26 
          +# doc/html/man/tic.1m.html                                              |    4 
          +# doc/html/man/toe.1m.html                                              |    6 
          +# doc/html/man/tput.1.html                                              |    8 
          +# doc/html/man/tset.1.html                                              |    6 
          +# doc/html/ncurses-intro.html                                           |   38 
          +# doc/ncurses-intro.doc                                                 |   33 
          +# form/Makefile.in                                                      |   12 
          +# form/fld_def.c                                                        |   13 
          +# form/fld_dup.c                                                        |    7 
          +# form/fld_ftlink.c                                                     |    7 
          +# form/fld_link.c                                                       |    7 
          +# form/fld_newftyp.c                                                    |    7 
          +# form/frm_def.c                                                        |   10 
          +# form/frm_driver.c                                                     |  131 
          +# form/fty_alnum.c                                                      |   18 
          +# form/fty_alpha.c                                                      |   18 
          +# form/fty_enum.c                                                       |   14 
          +# form/fty_int.c                                                        |   14 
          +# form/fty_num.c                                                        |   14 
          +# form/fty_regex.c                                                      |   19 
          +# form/headers                                                          |    3 
          +# form/modules                                                          |    8 
          +# include/MKterm.h.awk.in                                               |   51 
          +# include/curses.h.in                                                   |  237 
          +# include/curses.tail                                                   |    3 
          +# include/curses.wide                                                   |    9 
          +# include/headers                                                       |   11 
          +# include/nc_alloc.h                                                    |   10 
          +# include/ncurses_defs                                                  |   12 
          +# include/ncurses_dll.h                                                 |   11 
          +# include/tic.h                                                         |   29 
          +# install-sh                                                            |  139 
          +# man/Makefile.in                                                       |    8 
          +# man/captoinfo.1m                                                      |   28 
          +# man/clear.1                                                           |   12 
          +# man/curs_add_wch.3x                                                   |    6 
          +# man/curs_addch.3x                                                     |    8 
          +# man/curs_attr.3x                                                      |    7 
          +# man/curs_border.3x                                                    |    8 
          +# man/curs_deleteln.3x                                                  |    6 
          +# man/curs_extend.3x                                                    |    6 
          +# man/curs_getcchar.3x                                                  |    8 
          +# man/curs_getyx.3x                                                     |   27 
          +# man/curs_insstr.3x                                                    |    4 
          +# man/curs_mouse.3x                                                     |   42 
          +# man/curs_outopts.3x                                                   |    6 
          +# man/curs_printw.3x                                                    |    8 
          +# man/curs_scanw.3x                                                     |    6 
          +# man/curs_scr_dump.3x                                                  |    4 
          +# man/curs_slk.3x                                                       |    6 
          +# man/curs_termattrs.3x                                                 |    6 
          +# man/curs_termcap.3x                                                   |    8 
          +# man/curs_terminfo.3x                                                  |   26 
          +# man/curs_trace.3x                                                     |    6 
          +# man/curs_util.3x                                                      |   47 
          +# man/default_colors.3x                                                 |    7 
          +# man/form_driver.3x                                                    |   57 
          +# man/form_field_new.3x                                                 |    8 
          +# man/form_field_opts.3x                                                |   12 
          +# man/form_field_validation.3x                                          |    4 
          +# man/form_hook.3x                                                      |   20 
          +# man/form_opts.3x                                                      |   12 
          +# man/infocmp.1m                                                        |   30 
          +# man/infotocap.1m                                                      |   18 
          +# man/legacy_coding.3x                                                  |    4 
          +# man/man_db.renames                                                    |   23 
          +# man/menu_driver.3x                                                    |   61 
          +# man/menu_hook.3x                                                      |   20 
          +# man/menu_opts.3x                                                      |   12 
          +# man/mitem_opts.3x                                                     |   12 
          +# man/ncurses.3x                                                        |  269 
          +# man/panel.3x                                                          |   37 
          +# man/term.5                                                            |    6 
          +# man/term.7                                                            |   16 
          +# man/terminfo.head                                                     |   14 
          +# man/terminfo.tail                                                     |   22 
          +# man/tic.1m                                                            |    6 
          +# man/toe.1m                                                            |    6 
          +# man/tput.1                                                            |   76 
          +# man/tset.1                                                            |    4 
          +# menu/Makefile.in                                                      |   12 
          +# menu/headers                                                          |    3 
          +# menu/menu.h                                                           |   12 
          +# menu/modules                                                          |    8 
          +# misc/Makefile.in                                                      |   15 
          +# misc/ncurses-config.in                                                |    9 
          +# misc/shlib                                                            |    3 
          +# misc/terminfo.src                                                     |  430 -
          +# mk-1st.awk                                                            |  183 
          +# ncurses-5.6-20071201/Ada95/gen/adacurses-config.in                    |   35 
          +# ncurses-5.6-20071201/Ada95/gen/terminal_interface-curses.adb.m4       | 2501 ++++++
          +# ncurses-5.6-20071201/man/curs_legacy.3x                               |   93 
          +# ncurses-5.6-20071201/man/curs_opaque.3x                               |  133 
          +# ncurses-5.6-20071201/mk-hdr.awk                                       |  107 
          +# ncurses-5.6-20071201/mkdirs.sh                                        |   51 
          +# ncurses-5.6-20071201/ncurses/base/use_window.c                        |   80 
          +# ncurses-5.6-20071201/ncurses/tinfo/MKcaptab.sh                        |  149 
          +# ncurses-5.6-20071201/ncurses/tinfo/MKcodes.awk                        |  161 
          +# ncurses-5.6-20071201/ncurses/tinfo/entries.c                          |  144 
          +# ncurses-5.6-20071201/ncurses/tinfo/use_screen.c                       |   60 
          +# ncurses-5.6-20071201/ncurses/widechar/lib_key_name.c                  |   62 
          +# ncurses-5.6-20071201/test/dots_mvcur.c                                |  171 
          +# ncurses-5.6-20071201/test/inch_wide.c                                 |  279 
          +# ncurses-5.6-20071201/test/inchs.c                                     |  272 
          +# ncurses-5.6-20071201/test/key_names.c                                 |   56 
          +# ncurses-5.6-20071201/test/savescreen.sh                               |   55 
          +# ncurses-5.6-20071201/test/test_arrays.c                               |   79 
          +# ncurses-5.6-20071201/test/test_get_wstr.c                             |  361 
          +# ncurses-5.6-20071201/test/test_getstr.c                               |  351 
          +# ncurses-5.6-20071201/test/test_instr.c                                |  260 
          +# ncurses-5.6-20071201/test/test_inwstr.c                               |  269 
          +# ncurses-5.6-20071201/test/test_opaque.c                               |  421 +
          +# ncurses/Makefile.in                                                   |   51 
          +# ncurses/base/MKkeyname.awk                                            |   83 
          +# ncurses/base/MKlib_gen.sh                                             |   12 
          +# ncurses/base/MKunctrl.awk                                             |   92 
          +# ncurses/base/define_key.c                                             |   13 
          +# ncurses/base/key_defined.c                                            |   22 
          +# ncurses/base/keyok.c                                                  |   14 
          +# ncurses/base/lib_addstr.c                                             |   15 
          +# ncurses/base/lib_color.c                                              |   48 
          +# ncurses/base/lib_delwin.c                                             |   27 
          +# ncurses/base/lib_freeall.c                                            |   41 
          +# ncurses/base/lib_getch.c                                              |   39 
          +# ncurses/base/lib_initscr.c                                            |    9 
          +# ncurses/base/lib_instr.c                                              |   10 
          +# ncurses/base/lib_mouse.c                                              |   24 
          +# ncurses/base/lib_newterm.c                                            |   34 
          +# ncurses/base/lib_newwin.c                                             |   31 
          +# ncurses/base/lib_overlay.c                                            |   11 
          +# ncurses/base/lib_redrawln.c                                           |   10 
          +# ncurses/base/lib_refresh.c                                            |  144 
          +# ncurses/base/lib_restart.c                                            |   18 
          +# ncurses/base/lib_screen.c                                             |   19 
          +# ncurses/base/lib_set_term.c                                           |  147 
          +# ncurses/base/lib_slkinit.c                                            |   15 
          +# ncurses/base/lib_slkset.c                                             |   13 
          +# ncurses/base/lib_ungetch.c                                            |    8 
          +# ncurses/base/lib_window.c                                             |    6 
          +# ncurses/base/memmove.c                                                |    6 
          +# ncurses/base/resizeterm.c                                             |  106 
          +# ncurses/base/safe_sprintf.c                                           |   56 
          +# ncurses/base/tries.c                                                  |   22 
          +# ncurses/base/wresize.c                                                |   14 
          +# ncurses/curses.priv.h                                                 |  369 
          +# ncurses/llib-lncurses                                                 |  549 -
          +# ncurses/llib-lncursesw                                                |  573 -
          +# ncurses/modules                                                       |   31 
          +# ncurses/tinfo/MKcaptab.awk                                            |  134 
          +# ncurses/tinfo/MKnames.awk                                             |  226 
          +# ncurses/tinfo/access.c                                                |   10 
          +# ncurses/tinfo/add_tries.c                                             |   39 
          +# ncurses/tinfo/comp_error.c                                            |   34 
          +# ncurses/tinfo/comp_hash.c                                             |  111 
          +# ncurses/tinfo/comp_parse.c                                            |   96 
          +# ncurses/tinfo/db_iterator.c                                           |   52 
          +# ncurses/tinfo/home_terminfo.c                                         |   21 
          +# ncurses/tinfo/init_keytry.c                                           |   16 
          +# ncurses/tinfo/lib_acs.c                                               |   28 
          +# ncurses/tinfo/lib_baudrate.c                                          |   27 
          +# ncurses/tinfo/lib_data.c                                              |  148 
          +# ncurses/tinfo/lib_options.c                                           |    4 
          +# ncurses/tinfo/lib_raw.c                                               |    8 
          +# ncurses/tinfo/lib_setup.c                                             |  110 
          +# ncurses/tinfo/lib_termcap.c                                           |   62 
          +# ncurses/tinfo/lib_tparm.c                                             |  153 
          +# ncurses/tinfo/lib_tputs.c                                             |   17 
          +# ncurses/tinfo/lib_ttyflags.c                                          |   80 
          +# ncurses/tinfo/make_keys.c                                             |    6 
          +# ncurses/tinfo/name_match.c                                            |   24 
          +# ncurses/tinfo/parse_entry.c                                           |   20 
          +# ncurses/tinfo/read_entry.c                                            |    6 
          +# ncurses/tinfo/setbuf.c                                                |    6 
          +# ncurses/tinfo/strings.c                                               |    6 
          +# ncurses/tinfo/trim_sgr0.c                                             |   10 
          +# ncurses/tinfo/write_entry.c                                           |   22 
          +# ncurses/trace/lib_trace.c                                             |  161 
          +# ncurses/trace/lib_traceatr.c                                          |   50 
          +# ncurses/trace/lib_tracebits.c                                         |   27 
          +# ncurses/trace/lib_tracechr.c                                          |   15 
          +# ncurses/trace/lib_tracedmp.c                                          |   57 
          +# ncurses/trace/lib_tracemse.c                                          |   27 
          +# ncurses/trace/trace_buf.c                                             |   42 
          +# ncurses/trace/trace_tries.c                                           |   30 
          +# ncurses/trace/varargs.c                                               |   26 
          +# ncurses/trace/visbuf.c                                                |   32 
          +# ncurses/tty/hardscroll.c                                              |   34 
          +# ncurses/tty/hashmap.c                                                 |   43 
          +# ncurses/tty/lib_mvcur.c                                               |   11 
          +# ncurses/tty/lib_tstp.c                                                |   38 
          +# ncurses/tty/lib_twait.c                                               |   48 
          +# ncurses/tty/lib_vidattr.c                                             |   42 
          +# ncurses/tty/tty_update.c                                              |   25 
          +# ncurses/widechar/lib_cchar.c                                          |    9 
          +# ncurses/widechar/lib_get_wch.c                                        |    6 
          +# ncurses/widechar/lib_in_wchnstr.c                                     |   26 
          +# ncurses/widechar/lib_unget_wch.c                                      |   20 
          +# ncurses/widechar/lib_vid_attr.c                                       |    5 
          +# ncurses/widechar/lib_wunctrl.c                                        |   16 
          +# panel/Makefile.in                                                     |   12 
          +# panel/headers                                                         |    3 
          +# panel/modules                                                         |    6 
          +# progs/Makefile.in                                                     |   35 
          +# progs/clear.c                                                         |    5 
          +# progs/dump_entry.c                                                    |   21 
          +# progs/infocmp.c                                                       |  161 
          +# progs/modules                                                         |    8 
          +# progs/progs.priv.h                                                    |   13 
          +# progs/tic.c                                                           |   38 
          +# progs/toe.c                                                           |   11 
          +# progs/tput.c                                                          |    8 
          +# progs/tset.c                                                          |   24 
          +# test/Makefile.in                                                      |   14 
          +# test/README                                                           |  363 
          +# test/aclocal.m4                                                       |   92 
          +# test/bs.c                                                             |    6 
          +# test/cardfile.c                                                       |   18 
          +# test/chgat.c                                                          |   27 
          +# test/configure                                                        | 1224 +-
          +# test/configure.in                                                     |   42 
          +# test/demo_defkey.c                                                    |    7 
          +# test/demo_forms.c                                                     |   14 
          +# test/demo_menus.c                                                     |    6 
          +# test/demo_panels.c                                                    |  777 +
          +# test/demo_termcap.c                                                   |    5 
          +# test/ditto.c                                                          |   42 
          +# test/dots.c                                                           |    5 
          +# test/echochar.c                                                       |   12 
          +# test/gdc.c                                                            |    6 
          +# test/hashtest.c                                                       |    6 
          +# test/ins_wide.c                                                       |   14 
          +# test/inserts.c                                                        |   14 
          +# test/mk-test.awk                                                      |   12 
          +# test/modules                                                          |   24 
          +# test/movewindow.c                                                     |   16 
          +# test/ncurses.c                                                        |  391 
          +# test/programs                                                         |   16 
          +# test/railroad.c                                                       |    5 
          +# test/redraw.c                                                         |    6 
          +# test/savescreen.c                                                     |  292 
          +# test/test.priv.h                                                      |   14 
          +# test/view.c                                                           |   10 
          +# test/worm.c                                                           |  278 
          +# 356 files changed, 22567 insertions(+), 10675 deletions(-)
          +# ------------------------------------------------------------------------------
          +# Please remove the following files before applying this patch.
          +# (You can feed this patch to 'sh' to do so.)
          +
          +rm -f Ada95/src/terminal_interface-curses.adb
          +rm -f mkinstalldirs
          +rm -f tack/COPYING
          +rm -f tack/HISTORY
          +rm -f tack/Makefile.in
          +rm -f tack/README
          +rm -f tack/ansi.c
          +rm -f tack/charset.c
          +rm -f tack/color.c
          +rm -f tack/control.c
          +rm -f tack/crum.c
          +rm -f tack/edit.c
          +rm -f tack/fun.c
          +rm -f tack/init.c
          +rm -f tack/menu.c
          +rm -f tack/modes.c
          +rm -f tack/modules
          +rm -f tack/output.c
          +rm -f tack/pad.c
          +rm -f tack/scan.c
          +rm -f tack/sync.c
          +rm -f tack/sysdep.c
          +rm -f tack/tack.1
          +rm -f tack/tack.c
          +rm -f tack/tack.h
          +exit
          +
          +Index: Ada95/gen/Makefile.in
          +Prereq:  1.51 
          +--- ncurses-5.6/Ada95/gen/Makefile.in	2006-12-17 16:53:33.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/Makefile.in	2007-09-15 17:55:33.000000000 +0000
          +@@ -1,5 +1,5 @@
          + ##############################################################################
          +-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
          ++# Copyright (c) 1998-2006,2007 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,7 +28,7 @@
          + #
          + #  Author:  Juergen Pfeifer, 1996
          + #
          +-#  $Id: Makefile.in,v 1.51 2006/12/17 16:53:33 tom Exp $
          ++#  $Id: Makefile.in,v 1.60 2007/09/15 17:55:33 tom Exp $
          + #
          + .SUFFIXES:
          + 
          +@@ -42,10 +42,13 @@
          + srcdir		= @srcdir@
          + prefix		= @prefix@
          + exec_prefix	= @exec_prefix@
          ++bindir		= @bindir@
          ++
          + ADA_INCLUDE	= $(DESTDIR)@ADA_INCLUDE@
          + ADA_OBJECTS	= $(DESTDIR)@ADA_OBJECTS@
          + 
          + INSTALL		= @INSTALL@
          ++INSTALL_PROG	= @INSTALL_PROGRAM@
          + INSTALL_DATA	= @INSTALL_DATA@
          + 
          + AWK		= @AWK@
          +@@ -78,6 +81,9 @@
          + M4		= m4
          + M4FLAGS		=
          + 
          ++ADACURSES_CONFIG = adacurses-config
          ++
          ++WRAPPER		= sh $(top_srcdir)/misc/shlib
          + GENERATE	= ./gen$x '@DFT_ARG_SUFFIX@'
          + DEL_ADAMODE	= sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
          + 
          +@@ -92,17 +98,18 @@
          + 
          + GEN_FILES0      = Base_Defs
          + 
          +-GEN_FILES1      = Key_Definitions              		\
          +-		  Old_Keys                     		\
          +-		  Character_Attribute_Set_Rep  		\
          ++GEN_FILES1      = ACS_Map                      		\
          + 		  AC_Rep                       		\
          ++		  Base_Defs			        \
          ++		  Character_Attribute_Set_Rep  		\
          + 		  Color_Defs                   		\
          +-		  ACS_Map                      		\
          ++		  Key_Definitions              		\
          + 		  Linker_Options               		\
          +-		  Base_Defs			        \
          +-		  Window_Offsets                        \
          ++		  Old_Keys                     		\
          ++		  Public_Variables                      \
          ++		  Trace_Defs				\
          + 		  Version_Info				\
          +-		  Trace_Defs
          ++		  Window_Offsets
          + 
          + GEN_FILES2      = Menu_Opt_Rep        		    	\
          + 		  Menu_Base_Defs               		\
          +@@ -123,6 +130,7 @@
          + 		  Eti_Defs
          + 
          + GEN_TARGETS     = $(ADA_SRCDIR)/$(ABASE).ads         			\
          ++		  $(ADA_SRCDIR)/$(ABASE).adb         			\
          + 	          $(ADA_SRCDIR)/$(ABASE)-aux.ads   			\
          + 	          $(ADA_SRCDIR)/$(ABASE)-trace.ads   			\
          + 	          $(ADA_SRCDIR)/$(ABASE)-menus.ads   			\
          +@@ -137,6 +145,7 @@
          + 	          $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads
          + 
          + GEN_SRC		= $(srcdir)/$(ABASE).ads.m4				\
          ++		  $(srcdir)/$(ABASE).adb.m4				\
          + 	          $(srcdir)/$(ABASE)-aux.ads.m4 	  		\
          + 	          $(srcdir)/$(ABASE)-trace.ads.m4 	  		\
          + 	          $(srcdir)/$(ABASE)-menus.ads.m4 	  		\
          +@@ -159,7 +168,7 @@
          + 
          + $(ADA_INCLUDE) \
          + $(ADA_OBJECTS) :
          +-	$(top_srcdir)/mkinstalldirs $@
          ++	sh $(top_srcdir)/mkdirs.sh $@
          + 
          + install \
          + install.libs :: $(ADA_INCLUDE)
          +@@ -177,6 +186,10 @@
          + 	@$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS)
          + 	@-chmod u+x $(ADA_SRCDIR)/*.ali
          + 
          ++install \
          ++install.libs :: $(DESTDIR)$(bindir) adacurses-config
          ++	$(INSTALL_PROG) adacurses-config $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
          ++
          + uninstall \
          + uninstall.libs ::
          + 	@echo removing package $(ALIB) from $(ADA_INCLUDE)
          +@@ -187,93 +200,106 @@
          + 	@echo removing package $(ALIB) from $(ADA_OBJECTS)
          + 	-@cd $(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
          + 
          ++uninstall \
          ++uninstall.libs ::
          ++	-rm -f $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
          ++
          + gen$x:	gen.o
          + 	@ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
          + 
          + gen.o:	$(srcdir)/gen.c
          + 	$(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
          +-
          ++################################################################################
          + Character_Attribute_Set_Rep: gen$x
          +-	$(GENERATE) B A >$@
          ++	$(WRAPPER) "$(GENERATE) B A" >$@
          + 
          + Base_Defs: gen$x
          +-	$(GENERATE) B B >$@
          ++	$(WRAPPER) "$(GENERATE) B B" >$@
          + 
          + Color_Defs: gen$x
          +-	$(GENERATE) B C >$@
          ++	$(WRAPPER) "$(GENERATE) B C" >$@
          ++
          ++Window_Offsets: gen$x
          ++	$(WRAPPER) "$(GENERATE) B D" >$@
          + 
          + Key_Definitions: gen$x
          +-	$(GENERATE) B K >$@
          ++	$(WRAPPER) "$(GENERATE) B K" >$@
          + 
          +-Old_Keys: gen$x
          +-	$(GENERATE) B O >$@
          ++Linker_Options: gen$x
          ++	$(WRAPPER) "$(GENERATE) B L" >$@
          + 
          + ACS_Map: gen$x
          +-	$(GENERATE) B M >$@
          ++	$(WRAPPER) "$(GENERATE) B M" >$@
          + 
          +-AC_Rep: gen$x
          +-	$(GENERATE) B R >$@
          ++Old_Keys: gen$x
          ++	$(WRAPPER) "$(GENERATE) B O" >$@
          + 
          +-Linker_Options: gen$x
          +-	$(GENERATE) B L >$@
          ++Public_Variables: gen$x
          ++	$(WRAPPER) "$(GENERATE) B P" >$@
          + 
          +-Version_Info: gen$x
          +-	$(GENERATE) B V >$@
          ++AC_Rep: gen$x
          ++	$(WRAPPER) "$(GENERATE) B R" >$@
          + 
          +-Window_Offsets: gen$x
          +-	$(GENERATE) B D >$@
          ++Version_Info: gen$x
          ++	$(WRAPPER) "$(GENERATE) B V" >$@
          + 
          + Trace_Defs: gen$x
          +-	$(GENERATE) B T >$@
          +-
          ++	$(WRAPPER) "$(GENERATE) B T" >$@
          ++################################################################################
          + Menu_Opt_Rep: gen$x
          +-	$(GENERATE) M R >$@
          ++	$(WRAPPER) "$(GENERATE) M R" >$@
          + 
          + Menu_Base_Defs: gen$x
          +-	$(GENERATE) M B >$@
          ++	$(WRAPPER) "$(GENERATE) M B" >$@
          + 
          + Menu_Linker_Options: gen$x
          +-	$(GENERATE) M L >$@
          ++	$(WRAPPER) "$(GENERATE) M L" >$@
          + 
          + Item_Rep: gen$x
          +-	$(GENERATE) M I >$@
          +-
          ++	$(WRAPPER) "$(GENERATE) M I" >$@
          ++################################################################################
          + Form_Opt_Rep: gen$x
          +-	$(GENERATE) F R >$@
          ++	$(WRAPPER) "$(GENERATE) F R" >$@
          + 
          + Form_Base_Defs: gen$x
          +-	$(GENERATE) F B >$@
          ++	$(WRAPPER) "$(GENERATE) F B" >$@
          + 
          + Form_Linker_Options: gen$x
          +-	$(GENERATE) F L >$@
          ++	$(WRAPPER) "$(GENERATE) F L" >$@
          + 
          + Field_Rep: gen$x
          +-	$(GENERATE) F I >$@
          +-
          ++	$(WRAPPER) "$(GENERATE) F I" >$@
          ++################################################################################
          + Mouse_Base_Defs: gen$x
          +-	$(GENERATE) P B >$@
          ++	$(WRAPPER) "$(GENERATE) P B" >$@
          + 
          + Mouse_Event_Rep: gen$x
          +-	$(GENERATE) P M >$@
          ++	$(WRAPPER) "$(GENERATE) P M" >$@
          + 
          + Mouse_Events: gen$x
          +-	$(GENERATE) B E >$@
          ++	$(WRAPPER) "$(GENERATE) B E" >$@
          + 
          + Panel_Linker_Options: gen$x
          +-	$(GENERATE) P L >$@
          ++	$(WRAPPER) "$(GENERATE) P L" >$@
          + 
          + Chtype_Def: gen$x
          +-	$(GENERATE) E C >$@
          ++	$(WRAPPER) "$(GENERATE) E C" >$@
          + 
          + Eti_Defs: gen$x
          +-	$(GENERATE) E E >$@
          +-
          ++	$(WRAPPER) "$(GENERATE) E E" >$@
          ++################################################################################
          + $(ADA_SRCDIR)/$(ABASE).ads: 	$(srcdir)/$(ABASE).ads.m4 \
          + 				$(GEN_FILES1) $(srcdir)/normal.m4
          + 	$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
          + 	$(srcdir)/$(ABASE).ads.m4 |\
          + 	$(DEL_ADAMODE) >$@
          + 
          ++$(ADA_SRCDIR)/$(ABASE).adb: 	$(srcdir)/$(ABASE).adb.m4 \
          ++				$(GEN_FILES1) $(srcdir)/normal.m4
          ++	$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
          ++	$(srcdir)/$(ABASE).adb.m4 |\
          ++	$(DEL_ADAMODE) >$@
          ++
          + $(ADA_SRCDIR)/$(ABASE)-aux.ads: $(srcdir)/$(ABASE)-aux.ads.m4 \
          + 				$(GEN_FILES5) $(srcdir)/normal.m4
          + 	$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
          +@@ -357,8 +383,8 @@
          + tags:
          + 	ctags *.[ch]
          + 
          +-TAGS:
          +-	etags *.[ch]
          ++@MAKE_UPPER_TAGS@TAGS:
          ++@MAKE_UPPER_TAGS@	etags *.[ch]
          + 
          + mostlyclean ::
          + 	-rm -f a.out core gen$x *.o
          +@@ -372,7 +398,8 @@
          + 	-rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp
          + 
          + distclean :: clean
          +-	rm -f Makefile
          ++	-rm -f adacurses-config
          ++	-rm -f Makefile
          + 
          + realclean :: distclean
          + 
          +@@ -408,9 +435,14 @@
          + 	@mkdir -p $(HTML_DIR)
          + 	cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb]
          + 	ln -sf ../src/*.ali .
          +-	for f in $(GEN_SRC); do \
          ++	@echo "Filtering generated files"
          ++	@for f in $(GEN_SRC); do \
          ++	   h=`basename $$f` ;\
          + 	   g=`basename $$f .ads.m4` ;\
          +-	   $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\
          ++	   if test "$$g" != "$$h" ; then \
          ++	      $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\
          ++	      echo "... $$g.ads" ;\
          ++	   fi \
          + 	done
          + 	@-rm -f $(HTML_DIR)/$(ALIB)*.htm*
          + 	$(GNATHTML) -d -f $(ALIB)*.ads
          +@@ -423,7 +455,7 @@
          + 	   sed -e 's/3X/3x/g' |\
          + 	   sed -e 's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\
          + 	   sed -e 's%</A>%%g' > $$a.tmp ;\
          +-           mv $$a.tmp $$f ;\
          ++	   mv $$a.tmp $$f ;\
          + 	done
          + 	@rm -f *.ad[sb] *.ali *.tmp
          + 	@for f in funcs.htm main.htm ; do \
          +Index: Ada95/gen/adacurses-config.in
          +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/adacurses-config.in	2007-04-07 21:06:50.000000000 +0000
          +@@ -0,0 +1,35 @@
          ++#! /bin/sh
          ++# $Id: adacurses-config.in,v 1.2 2007/04/07 21:06:50 tom Exp $
          ++#
          ++# This script will return the option to add to `gnatmake' for using
          ++# AdaCurses.
          ++#
          ++
          ++prefix="@prefix@"
          ++exec_prefix="@exec_prefix@"
          ++libdir="@libdir@"
          ++
          ++VERSION="@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@"
          ++
          ++CFLAGS="-I$libdir/adacurses -L$libdir/adacurses"
          ++LIBS="-L$prefix/lib -lAdaCurses"
          ++
          ++case "x$1" in
          ++    x--version)
          ++        echo AdaCurses $VERSION
          ++        ;;
          ++    x--cflags)
          ++        echo $CFLAGS
          ++        ;;
          ++    x--libs)
          ++        echo $LIBS
          ++        ;;
          ++    x)
          ++    	# if no parameter is given, give what gnatmake needs
          ++        echo $CFLAGS -largs $LIBS
          ++        ;;
          ++    *)
          ++        echo 'Usage: adacurses-config [--version | --cflags | --libs]' >&2
          ++        exit 1
          ++        ;;
          ++esac
          +Index: Ada95/gen/gen.c
          +Prereq:  1.40 
          +--- ncurses-5.6/Ada95/gen/gen.c	2005-01-22 17:03:48.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/gen.c	2007-05-05 17:24:36.000000000 +0000
          +@@ -1,5 +1,5 @@
          + /****************************************************************************
          +- * Copyright (c) 1998,2004,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998,2005,2007 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
          +-    $Id: gen.c,v 1.40 2005/01/22 17:03:48 tom Exp $
          ++    $Id: gen.c,v 1.48 2007/05/05 17:24:36 tom Exp $
          +   --------------------------------------------------------------------------*/
          + /*
          +   This program generates various record structures and constants from the
          +@@ -41,6 +41,8 @@
          +   to produce the real source.
          +   */
          + 
          ++#include 
          ++
          + #include 
          + #include 
          + #include 
          +@@ -771,6 +773,23 @@
          + static void
          + gen_acs(void)
          + {
          ++  printf("   type C_ACS_Map is array (Character'Val (0) .. Character'Val (127))\n");
          ++  printf("        of Attributed_Character;\n");
          ++#if USE_REENTRANT || BROKEN_LINKER
          ++  printf("   type C_ACS_Ptr is access C_ACS_Map;\n");
          ++  printf("   function ACS_Map return C_ACS_Ptr;\n");
          ++  printf("   pragma Import (C, ACS_Map, \"_nc_acs_map\");\n");
          ++#else
          ++  printf("   ACS_Map : C_ACS_Map;\n");
          ++  printf("   pragma Import (C, ACS_Map, \"acs_map\");\n");
          ++#endif
          ++  printf("   --\n");
          ++  printf("   --\n");
          ++  printf("   --  Constants for several characters from the Alternate Character Set\n");
          ++  printf("   --  You must use these constants as indices into the ACS_Map array\n");
          ++  printf("   --  to get the corresponding attributed character at runtime.\n");
          ++  printf("   --\n");
          ++
          + #ifdef ACS_ULCORNER
          +   acs_def("ACS_Upper_Left_Corner", &ACS_ULCORNER);
          + #endif
          +@@ -877,8 +896,7 @@
          +    printf("   %-25s : constant Event_Mask := 8#%011lo#;\n", \
          +           #name, name)
          + 
          +-static
          +-void
          ++static void
          + gen_mouse_events(void)
          + {
          +   mmask_t all1 = 0;
          +@@ -1004,6 +1022,56 @@
          +   GEN_EVENT(BUTTON4_EVENTS, all4);
          + }
          + 
          ++static void
          ++wrap_one_var(const char *c_var,
          ++	     const char *c_type,
          ++	     const char *ada_func,
          ++	     const char *ada_type)
          ++{
          ++#if USE_REENTRANT
          ++  /* must wrap variables */
          ++  printf("\n");
          ++  printf("   function %s return %s\n", ada_func, ada_type);
          ++  printf("   is\n");
          ++  printf("      function Result return %s;\n", c_type);
          ++  printf("      pragma Import (C, Result, \"_nc_%s\");\n", c_var);
          ++  printf("   begin\n");
          ++  if (strcmp(c_type, ada_type))
          ++    printf("      return %s (Result);\n", ada_type);
          ++  else
          ++    printf("      return Result;\n");
          ++  printf("   end %s;\n", ada_func);
          ++#else
          ++  /* global variables are really global */
          ++  printf("\n");
          ++  printf("   function %s return %s\n", ada_func, ada_type);
          ++  printf("   is\n");
          ++  printf("      Result : %s;\n", c_type);
          ++  printf("      pragma Import (C, Result, \"%s\");\n", c_var);
          ++  printf("   begin\n");
          ++  if (strcmp(c_type, ada_type))
          ++    printf("      return %s (Result);\n", ada_type);
          ++  else
          ++    printf("      return Result;\n");
          ++  printf("   end %s;\n", ada_func);
          ++#endif
          ++}
          ++
          ++#define GEN_PUBLIC_VAR(c_var, c_type, ada_func, ada_type) \
          ++	wrap_one_var(#c_var, #c_type, #ada_func, #ada_type)
          ++
          ++static void
          ++gen_public_vars(void)
          ++{
          ++  GEN_PUBLIC_VAR(stdscr, Window, Standard_Window, Window);
          ++  GEN_PUBLIC_VAR(curscr, Window, Current_Window, Window);
          ++  GEN_PUBLIC_VAR(LINES, C_Int, Lines, Line_Count);
          ++  GEN_PUBLIC_VAR(COLS, C_Int, Columns, Column_Count);
          ++  GEN_PUBLIC_VAR(TABSIZE, C_Int, Tab_Size, Natural);
          ++  GEN_PUBLIC_VAR(COLORS, C_Int, Number_Of_Colors, Natural);
          ++  GEN_PUBLIC_VAR(COLOR_PAIRS, C_Int, Number_Of_Color_Pairs, Natural);
          ++}
          ++
          + /*
          +  * Output some comment lines indicating that the file is generated.
          +  * The name parameter is the name of the facility to be used in
          +@@ -1178,70 +1246,21 @@
          +   return strlen(buf);
          + }
          + 
          +-#define GEN_OFFSET(member,itype)                                    \
          +-  if (sizeof(((WINDOW*)0)->member)==sizeof(itype)) {                \
          +-    o = offsetof(WINDOW, member);                                   \
          +-    if ((o%sizeof(itype) == 0)) {                                   \
          +-       printf("   Offset%-*s : constant Natural := %2ld; --  %s\n", \
          +-              12, #member, (long)(o/sizeof(itype)),#itype);         \
          +-    }                                                               \
          +-  }
          +-
          + static void
          + gen_offsets(void)
          + {
          +-  long o;
          +   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";
          +     }
          +   printf("   Sizeof%-*s : constant Natural := %2ld; --  %s\n",
          +@@ -1291,9 +1310,6 @@
          + 	case 'A':		/* chtype translation into Ada95 record type */
          + 	  gen_attr_set("Character_Attribute_Set");
          + 	  break;
          +-	case 'K':		/* translation of keycodes */
          +-	  gen_keydefs(0);
          +-	  break;
          + 	case 'B':		/* write some initial comment lines */
          + 	  basedefs();
          + 	  break;
          +@@ -1306,24 +1322,30 @@
          + 	case 'E':		/* generate Mouse Event codes */
          + 	  gen_mouse_events();
          + 	  break;
          +-	case 'M':		/* generate constants for the ACS characters */
          +-	  gen_acs();
          ++	case 'K':		/* translation of keycodes */
          ++	  gen_keydefs(0);
          + 	  break;
          + 	case 'L':		/* generate the Linker_Options pragma */
          + 	  gen_linkopts();
          + 	  break;
          ++	case 'M':		/* generate constants for the ACS characters */
          ++	  gen_acs();
          ++	  break;
          + 	case 'O':		/* generate definitions of the old key code names */
          + 	  gen_keydefs(1);
          + 	  break;
          ++	case 'P':		/* generate definitions of the public variables */
          ++	  gen_public_vars();
          ++	  break;
          + 	case 'R':		/* generate representation clause for Attributed character */
          + 	  gen_chtype_rep("Attributed_Character");
          + 	  break;
          +-	case 'V':		/* generate version info */
          +-	  gen_version_info();
          +-	  break;
          + 	case 'T':		/* generate the Trace info */
          + 	  gen_trace("Trace_Attribute_Set");
          + 	  break;
          ++	case 'V':		/* generate version info */
          ++	  gen_version_info();
          ++	  break;
          + 	default:
          + 	  break;
          + 	}
          +Index: Ada95/gen/html.m4
          +Prereq:  1.2 
          +--- ncurses-5.6/Ada95/gen/html.m4	2006-04-22 23:16:44.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/html.m4	2007-09-01 23:59:59.000000000 +0000
          +@@ -1,5 +1,5 @@
          + dnl***************************************************************************
          +-dnl Copyright (c) 2000,2006 Free Software Foundation, Inc.                   *
          ++dnl Copyright (c) 2000-2006,2007 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,7 +26,7 @@
          + dnl authorization.                                                           *
          + dnl***************************************************************************
          + dnl
          +-dnl $Id: html.m4,v 1.2 2006/04/22 23:16:44 tom Exp $
          ++dnl $Id: html.m4,v 1.3 2007/09/01 23:59:59 tom Exp $
          + define(`ANCHORIDX',`0')dnl
          + define(`MANPAGE',`define(`MANPG',$1)dnl
          + |=====================================================================
          +@@ -35,6 +35,6 @@
          + define(`ANCHOR',`define(`ANCHORIDX',incr(ANCHORIDX))dnl
          + `#'1A NAME="AFU`_'ANCHORIDX"`#'2dnl
          + define(`CFUNAME',`$1')define(`AFUNAME',`$2')dnl
          +-|')
          ++|')dnl
          + define(`AKA',``AKA': CFUNAME')dnl
          + define(`ALIAS',``AKA': $1')dnl
          +Index: Ada95/gen/terminal_interface-curses-aux.ads.m4
          +--- ncurses-5.6/Ada95/gen/terminal_interface-curses-aux.ads.m4	2003-10-25 15:39:18.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/terminal_interface-curses-aux.ads.m4	2007-09-01 23:49:12.000000000 +0000
          +@@ -1,6 +1,7 @@
          + --  -*- ada -*-
          + define(`HTMLNAME',`terminal_interface-curses-aux__ads.htm')dnl
          +-include(M4MACRO)------------------------------------------------------------------------------
          ++include(M4MACRO)dnl
          ++------------------------------------------------------------------------------
          + --                                                                          --
          + --                           GNAT ncurses Binding                           --
          + --                                                                          --
          +@@ -37,7 +38,7 @@
          + ------------------------------------------------------------------------------
          + --  Author:  Juergen Pfeifer, 1996
          + --  Version Control:
          +---  $Revision: 1.15 $
          ++--  $Revision: 1.16 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + include(`Base_Defs')
          +Index: Ada95/gen/terminal_interface-curses-menus.ads.m4
          +--- ncurses-5.6/Ada95/gen/terminal_interface-curses-menus.ads.m4	2006-06-25 14:30:22.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/terminal_interface-curses-menus.ads.m4	2007-05-05 20:20:52.000000000 +0000
          +@@ -38,8 +38,8 @@
          + ------------------------------------------------------------------------------
          + --  Author:  Juergen Pfeifer, 1996
          + --  Version Control:
          +---  $Revision: 1.26 $
          +---  $Date: 2006/06/25 14:30:22 $
          ++--  $Revision: 1.27 $
          ++--  $Date: 2007/05/05 20:20:52 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + include(`Menu_Base_Defs')
          +@@ -360,7 +360,7 @@
          +    --  Implemented as function
          +    pragma Inline (Mark);
          + 
          +-   --  MANPAGE(`menu_attribs.3x')
          ++   --  MANPAGE(`menu_attributes.3x')
          + 
          +    --  ANCHOR(`set_menu_fore()',`Set_Foreground')
          +    procedure Set_Foreground
          +Index: Ada95/gen/terminal_interface-curses.adb.m4
          +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/terminal_interface-curses.adb.m4	2007-05-05 20:09:10.000000000 +0000
          +@@ -0,0 +1,2501 @@
          ++--  -*- ada -*-
          ++define(`HTMLNAME',`terminal_interface-curses__adb.htm')dnl
          ++include(M4MACRO)------------------------------------------------------------------------------
          ++--                                                                          --
          ++--                           GNAT ncurses Binding                           --
          ++--                                                                          --
          ++--                        Terminal_Interface.Curses                         --
          ++--                                                                          --
          ++--                                 B O D Y                                  --
          ++--                                                                          --
          ++------------------------------------------------------------------------------
          ++-- Copyright (c) 1998-2006,2007 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"), to deal in the Software without restriction, including      --
          ++-- without limitation the rights to use, copy, modify, merge, publish,      --
          ++-- distribute, distribute with modifications, sublicense, and/or sell       --
          ++-- copies of the Software, and to permit persons to whom the Software is    --
          ++-- furnished to do so, subject to the following conditions:                 --
          ++--                                                                          --
          ++-- The above copyright notice and this permission notice shall be included  --
          ++-- in all copies or substantial portions of the Software.                   --
          ++--                                                                          --
          ++-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
          ++-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
          ++-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
          ++-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
          ++-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
          ++-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
          ++-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
          ++--                                                                          --
          ++-- Except as contained in this notice, the name(s) of the above copyright   --
          ++-- holders shall not be used in advertising or otherwise to promote the     --
          ++-- sale, use or other dealings in this Software without prior written       --
          ++-- authorization.                                                           --
          ++------------------------------------------------------------------------------
          ++--  Author: Juergen Pfeifer, 1996
          ++--  Version Control:
          ++--  $Revision: 1.4 $
          ++--  $Date: 2007/05/05 20:09:10 $
          ++--  Binding Version 01.00
          ++------------------------------------------------------------------------------
          ++with System;
          ++
          ++with Terminal_Interface.Curses.Aux;
          ++with Interfaces.C;                  use Interfaces.C;
          ++with Interfaces.C.Strings;          use Interfaces.C.Strings;
          ++with Ada.Characters.Handling;       use Ada.Characters.Handling;
          ++with Ada.Strings.Fixed;
          ++
          ++package body Terminal_Interface.Curses is
          ++
          ++   use Aux;
          ++   use type System.Bit_Order;
          ++
          ++   package ASF renames Ada.Strings.Fixed;
          ++
          ++   type chtype_array is array (size_t range <>)
          ++      of aliased Attributed_Character;
          ++   pragma Convention (C, chtype_array);
          ++
          ++------------------------------------------------------------------------------
          ++   function Key_Name (Key : in Real_Key_Code) return String
          ++   is
          ++      function Keyname (K : C_Int) return chars_ptr;
          ++      pragma Import (C, Keyname, "keyname");
          ++
          ++      Ch : Character;
          ++   begin
          ++      if Key <= Character'Pos (Character'Last) then
          ++         Ch := Character'Val (Key);
          ++         if Is_Control (Ch) then
          ++            return Un_Control (Attributed_Character'(Ch    => Ch,
          ++                                                     Color => Color_Pair'First,
          ++                                                     Attr  => Normal_Video));
          ++         elsif Is_Graphic (Ch) then
          ++            declare
          ++               S : String (1 .. 1);
          ++            begin
          ++               S (1) := Ch;
          ++               return S;
          ++            end;
          ++         else
          ++            return "";
          ++         end if;
          ++      else
          ++         return Fill_String (Keyname (C_Int (Key)));
          ++      end if;
          ++   end Key_Name;
          ++
          ++   procedure Key_Name (Key  : in  Real_Key_Code;
          ++                       Name : out String)
          ++   is
          ++   begin
          ++      ASF.Move (Key_Name (Key), Name);
          ++   end Key_Name;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Init_Screen
          ++   is
          ++      function Initscr return Window;
          ++      pragma Import (C, Initscr, "initscr");
          ++
          ++      W : Window;
          ++   begin
          ++      W := Initscr;
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Init_Screen;
          ++
          ++   procedure End_Windows
          ++   is
          ++      function Endwin return C_Int;
          ++      pragma Import (C, Endwin, "endwin");
          ++   begin
          ++      if Endwin = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end End_Windows;
          ++
          ++   function Is_End_Window return Boolean
          ++   is
          ++      function Isendwin return Curses_Bool;
          ++      pragma Import (C, Isendwin, "isendwin");
          ++   begin
          ++      if Isendwin = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Is_End_Window;
          ++------------------------------------------------------------------------------
          ++   procedure Move_Cursor (Win    : in Window := Standard_Window;
          ++                          Line   : in Line_Position;
          ++                          Column : in Column_Position)
          ++   is
          ++      function Wmove (Win    : Window;
          ++                      Line   : C_Int;
          ++                      Column : C_Int
          ++                     ) return C_Int;
          ++      pragma Import (C, Wmove, "wmove");
          ++   begin
          ++      if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Move_Cursor;
          ++------------------------------------------------------------------------------
          ++   procedure Add (Win : in Window := Standard_Window;
          ++                  Ch  : in Attributed_Character)
          ++   is
          ++      function Waddch (W  : Window;
          ++                       Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, Waddch, "waddch");
          ++   begin
          ++      if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Add;
          ++
          ++   procedure Add (Win : in Window := Standard_Window;
          ++                  Ch  : in Character)
          ++   is
          ++   begin
          ++      Add (Win,
          ++           Attributed_Character'(Ch    => Ch,
          ++                                 Color => Color_Pair'First,
          ++                                 Attr  => Normal_Video));
          ++   end Add;
          ++
          ++   procedure Add
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position;
          ++      Ch     : in Attributed_Character)
          ++   is
          ++      function mvwaddch (W  : Window;
          ++                         Y  : C_Int;
          ++                         X  : C_Int;
          ++                         Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, mvwaddch, "mvwaddch");
          ++   begin
          ++      if mvwaddch (Win, C_Int (Line),
          ++                   C_Int (Column),
          ++                   AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Add;
          ++
          ++   procedure Add
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position;
          ++      Ch     : in Character)
          ++   is
          ++   begin
          ++      Add (Win,
          ++           Line,
          ++           Column,
          ++           Attributed_Character'(Ch    => Ch,
          ++                                 Color => Color_Pair'First,
          ++                                 Attr  => Normal_Video));
          ++   end Add;
          ++
          ++   procedure Add_With_Immediate_Echo
          ++     (Win : in Window := Standard_Window;
          ++      Ch  : in Attributed_Character)
          ++   is
          ++      function Wechochar (W  : Window;
          ++                          Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, Wechochar, "wechochar");
          ++   begin
          ++      if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Add_With_Immediate_Echo;
          ++
          ++   procedure Add_With_Immediate_Echo
          ++     (Win : in Window := Standard_Window;
          ++      Ch  : in Character)
          ++   is
          ++   begin
          ++      Add_With_Immediate_Echo
          ++        (Win,
          ++         Attributed_Character'(Ch    => Ch,
          ++                               Color => Color_Pair'First,
          ++                               Attr  => Normal_Video));
          ++   end Add_With_Immediate_Echo;
          ++------------------------------------------------------------------------------
          ++   function Create (Number_Of_Lines       : Line_Count;
          ++                    Number_Of_Columns     : Column_Count;
          ++                    First_Line_Position   : Line_Position;
          ++                    First_Column_Position : Column_Position) return Window
          ++   is
          ++      function Newwin (Number_Of_Lines       : C_Int;
          ++                       Number_Of_Columns     : C_Int;
          ++                       First_Line_Position   : C_Int;
          ++                       First_Column_Position : C_Int) return Window;
          ++      pragma Import (C, Newwin, "newwin");
          ++
          ++      W : Window;
          ++   begin
          ++      W := Newwin (C_Int (Number_Of_Lines),
          ++                   C_Int (Number_Of_Columns),
          ++                   C_Int (First_Line_Position),
          ++                   C_Int (First_Column_Position));
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++      return W;
          ++   end Create;
          ++
          ++   procedure Delete (Win : in out Window)
          ++   is
          ++      function Wdelwin (W : Window) return C_Int;
          ++      pragma Import (C, Wdelwin, "delwin");
          ++   begin
          ++      if Wdelwin (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++      Win := Null_Window;
          ++   end Delete;
          ++
          ++   function Sub_Window
          ++     (Win                   : Window := Standard_Window;
          ++      Number_Of_Lines       : Line_Count;
          ++      Number_Of_Columns     : Column_Count;
          ++      First_Line_Position   : Line_Position;
          ++      First_Column_Position : Column_Position) return Window
          ++   is
          ++      function Subwin
          ++        (Win                   : Window;
          ++         Number_Of_Lines       : C_Int;
          ++         Number_Of_Columns     : C_Int;
          ++         First_Line_Position   : C_Int;
          ++         First_Column_Position : C_Int) return Window;
          ++      pragma Import (C, Subwin, "subwin");
          ++
          ++      W : Window;
          ++   begin
          ++      W := Subwin (Win,
          ++                   C_Int (Number_Of_Lines),
          ++                   C_Int (Number_Of_Columns),
          ++                   C_Int (First_Line_Position),
          ++                   C_Int (First_Column_Position));
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++      return W;
          ++   end Sub_Window;
          ++
          ++   function Derived_Window
          ++     (Win                   : Window := Standard_Window;
          ++      Number_Of_Lines       : Line_Count;
          ++      Number_Of_Columns     : Column_Count;
          ++      First_Line_Position   : Line_Position;
          ++      First_Column_Position : Column_Position) return Window
          ++   is
          ++      function Derwin
          ++        (Win                   : Window;
          ++         Number_Of_Lines       : C_Int;
          ++         Number_Of_Columns     : C_Int;
          ++         First_Line_Position   : C_Int;
          ++         First_Column_Position : C_Int) return Window;
          ++      pragma Import (C, Derwin, "derwin");
          ++
          ++      W : Window;
          ++   begin
          ++      W := Derwin (Win,
          ++                   C_Int (Number_Of_Lines),
          ++                   C_Int (Number_Of_Columns),
          ++                   C_Int (First_Line_Position),
          ++                   C_Int (First_Column_Position));
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++      return W;
          ++   end Derived_Window;
          ++
          ++   function Duplicate (Win : Window) return Window
          ++   is
          ++      function Dupwin (Win : Window) return Window;
          ++      pragma Import (C, Dupwin, "dupwin");
          ++
          ++      W : constant Window := Dupwin (Win);
          ++   begin
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++      return W;
          ++   end Duplicate;
          ++
          ++   procedure Move_Window (Win    : in Window;
          ++                          Line   : in Line_Position;
          ++                          Column : in Column_Position)
          ++   is
          ++      function Mvwin (Win    : Window;
          ++                      Line   : C_Int;
          ++                      Column : C_Int) return C_Int;
          ++      pragma Import (C, Mvwin, "mvwin");
          ++   begin
          ++      if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Move_Window;
          ++
          ++   procedure Move_Derived_Window (Win    : in Window;
          ++                                  Line   : in Line_Position;
          ++                                  Column : in Column_Position)
          ++   is
          ++      function Mvderwin (Win    : Window;
          ++                         Line   : C_Int;
          ++                         Column : C_Int) return C_Int;
          ++      pragma Import (C, Mvderwin, "mvderwin");
          ++   begin
          ++      if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Move_Derived_Window;
          ++
          ++   procedure Set_Synch_Mode (Win  : in Window  := Standard_Window;
          ++                             Mode : in Boolean := False)
          ++   is
          ++      function Syncok (Win  : Window;
          ++                       Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Syncok, "syncok");
          ++   begin
          ++      if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Synch_Mode;
          ++------------------------------------------------------------------------------
          ++   procedure Add (Win : in Window := Standard_Window;
          ++                  Str : in String;
          ++                  Len : in Integer := -1)
          ++   is
          ++      function Waddnstr (Win : Window;
          ++                         Str : char_array;
          ++                         Len : C_Int := -1) return C_Int;
          ++      pragma Import (C, Waddnstr, "waddnstr");
          ++
          ++      Txt    : char_array (0 .. Str'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Str, Txt, Length);
          ++      if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Add;
          ++
          ++   procedure Add
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position;
          ++      Str    : in String;
          ++      Len    : in Integer := -1)
          ++   is
          ++   begin
          ++      Move_Cursor (Win, Line, Column);
          ++      Add (Win, Str, Len);
          ++   end Add;
          ++------------------------------------------------------------------------------
          ++   procedure Add
          ++     (Win : in Window := Standard_Window;
          ++      Str : in Attributed_String;
          ++      Len : in Integer := -1)
          ++   is
          ++      function Waddchnstr (Win : Window;
          ++                           Str : chtype_array;
          ++                           Len : C_Int := -1) return C_Int;
          ++      pragma Import (C, Waddchnstr, "waddchnstr");
          ++
          ++      Txt : chtype_array (0 .. Str'Length);
          ++   begin
          ++      for Length in 1 .. size_t (Str'Length) loop
          ++         Txt (Length - 1) := Str (Natural (Length));
          ++      end loop;
          ++      Txt (Str'Length) := Default_Character;
          ++      if Waddchnstr (Win,
          ++                     Txt,
          ++                     C_Int (Len)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Add;
          ++
          ++   procedure Add
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position;
          ++      Str    : in Attributed_String;
          ++      Len    : in Integer := -1)
          ++   is
          ++   begin
          ++      Move_Cursor (Win, Line, Column);
          ++      Add (Win, Str, Len);
          ++   end Add;
          ++------------------------------------------------------------------------------
          ++   procedure Border
          ++     (Win                       : in Window := Standard_Window;
          ++      Left_Side_Symbol          : in Attributed_Character := Default_Character;
          ++      Right_Side_Symbol         : in Attributed_Character := Default_Character;
          ++      Top_Side_Symbol           : in Attributed_Character := Default_Character;
          ++      Bottom_Side_Symbol        : in Attributed_Character := Default_Character;
          ++      Upper_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
          ++      Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
          ++      Lower_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
          ++      Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character)
          ++   is
          ++      function Wborder (W   : Window;
          ++                        LS  : C_Chtype;
          ++                        RS  : C_Chtype;
          ++                        TS  : C_Chtype;
          ++                        BS  : C_Chtype;
          ++                        ULC : C_Chtype;
          ++                        URC : C_Chtype;
          ++                        LLC : C_Chtype;
          ++                        LRC : C_Chtype) return C_Int;
          ++      pragma Import (C, Wborder, "wborder");
          ++   begin
          ++      if Wborder (Win,
          ++                  AttrChar_To_Chtype (Left_Side_Symbol),
          ++                  AttrChar_To_Chtype (Right_Side_Symbol),
          ++                  AttrChar_To_Chtype (Top_Side_Symbol),
          ++                  AttrChar_To_Chtype (Bottom_Side_Symbol),
          ++                  AttrChar_To_Chtype (Upper_Left_Corner_Symbol),
          ++                  AttrChar_To_Chtype (Upper_Right_Corner_Symbol),
          ++                  AttrChar_To_Chtype (Lower_Left_Corner_Symbol),
          ++                  AttrChar_To_Chtype (Lower_Right_Corner_Symbol)
          ++                  ) = Curses_Err
          ++      then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Border;
          ++
          ++   procedure Box
          ++     (Win               : in Window := Standard_Window;
          ++      Vertical_Symbol   : in Attributed_Character := Default_Character;
          ++      Horizontal_Symbol : in Attributed_Character := Default_Character)
          ++   is
          ++   begin
          ++      Border (Win,
          ++              Vertical_Symbol, Vertical_Symbol,
          ++              Horizontal_Symbol, Horizontal_Symbol);
          ++   end Box;
          ++
          ++   procedure Horizontal_Line
          ++     (Win         : in Window := Standard_Window;
          ++      Line_Size   : in Natural;
          ++      Line_Symbol : in Attributed_Character := Default_Character)
          ++   is
          ++      function Whline (W   : Window;
          ++                       Ch  : C_Chtype;
          ++                       Len : C_Int) return C_Int;
          ++      pragma Import (C, Whline, "whline");
          ++   begin
          ++      if Whline (Win,
          ++                 AttrChar_To_Chtype (Line_Symbol),
          ++                 C_Int (Line_Size)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Horizontal_Line;
          ++
          ++   procedure Vertical_Line
          ++     (Win         : in Window := Standard_Window;
          ++      Line_Size   : in Natural;
          ++      Line_Symbol : in Attributed_Character := Default_Character)
          ++   is
          ++      function Wvline (W   : Window;
          ++                       Ch  : C_Chtype;
          ++                       Len : C_Int) return C_Int;
          ++      pragma Import (C, Wvline, "wvline");
          ++   begin
          ++      if Wvline (Win,
          ++                 AttrChar_To_Chtype (Line_Symbol),
          ++                 C_Int (Line_Size)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Vertical_Line;
          ++
          ++------------------------------------------------------------------------------
          ++   function Get_Keystroke (Win : Window := Standard_Window)
          ++     return Real_Key_Code
          ++   is
          ++      function Wgetch (W : Window) return C_Int;
          ++      pragma Import (C, Wgetch, "wgetch");
          ++
          ++      C : constant C_Int := Wgetch (Win);
          ++   begin
          ++      if C = Curses_Err then
          ++         return Key_None;
          ++      else
          ++         return Real_Key_Code (C);
          ++      end if;
          ++   end Get_Keystroke;
          ++
          ++   procedure Undo_Keystroke (Key : in Real_Key_Code)
          ++   is
          ++      function Ungetch (Ch : C_Int) return C_Int;
          ++      pragma Import (C, Ungetch, "ungetch");
          ++   begin
          ++      if Ungetch (C_Int (Key)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Undo_Keystroke;
          ++
          ++   function Has_Key (Key : Special_Key_Code) return Boolean
          ++   is
          ++      function Haskey (Key : C_Int) return C_Int;
          ++      pragma Import (C, Haskey, "has_key");
          ++   begin
          ++      if Haskey (C_Int (Key)) = Curses_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Has_Key;
          ++
          ++   function Is_Function_Key (Key : Special_Key_Code) return Boolean
          ++   is
          ++      L : constant Special_Key_Code  := Special_Key_Code (Natural (Key_F0) +
          ++        Natural (Function_Key_Number'Last));
          ++   begin
          ++      if (Key >= Key_F0) and then (Key <= L) then
          ++         return True;
          ++      else
          ++         return False;
          ++      end if;
          ++   end Is_Function_Key;
          ++
          ++   function Function_Key (Key : Real_Key_Code)
          ++                          return Function_Key_Number
          ++   is
          ++   begin
          ++      if Is_Function_Key (Key) then
          ++         return Function_Key_Number (Key - Key_F0);
          ++      else
          ++         raise Constraint_Error;
          ++      end if;
          ++   end Function_Key;
          ++
          ++   function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code
          ++   is
          ++   begin
          ++      return Real_Key_Code (Natural (Key_F0) + Natural (Key));
          ++   end Function_Key_Code;
          ++------------------------------------------------------------------------------
          ++   procedure Standout (Win : Window  := Standard_Window;
          ++                       On  : Boolean := True)
          ++   is
          ++      function wstandout (Win : Window) return C_Int;
          ++      pragma Import (C, wstandout, "wstandout");
          ++      function wstandend (Win : Window) return C_Int;
          ++      pragma Import (C, wstandend, "wstandend");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      if On then
          ++         Err := wstandout (Win);
          ++      else
          ++         Err := wstandend (Win);
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Standout;
          ++
          ++   procedure Switch_Character_Attribute
          ++     (Win  : in Window := Standard_Window;
          ++      Attr : in Character_Attribute_Set := Normal_Video;
          ++      On   : in Boolean := True)
          ++   is
          ++      function Wattron (Win    : Window;
          ++                        C_Attr : C_AttrType) return C_Int;
          ++      pragma Import (C, Wattron, "wattr_on");
          ++      function Wattroff (Win    : Window;
          ++                         C_Attr : C_AttrType) return C_Int;
          ++      pragma Import (C, Wattroff, "wattr_off");
          ++      --  In Ada we use the On Boolean to control whether or not we want to
          ++      --  switch on or off the attributes in the set.
          ++      Err : C_Int;
          ++      AC  : constant Attributed_Character := (Ch    => Character'First,
          ++                                              Color => Color_Pair'First,
          ++                                              Attr  => Attr);
          ++   begin
          ++      if On then
          ++         Err := Wattron  (Win, AttrChar_To_AttrType (AC));
          ++      else
          ++         Err := Wattroff (Win, AttrChar_To_AttrType (AC));
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Switch_Character_Attribute;
          ++
          ++   procedure Set_Character_Attributes
          ++     (Win   : in Window := Standard_Window;
          ++      Attr  : in Character_Attribute_Set := Normal_Video;
          ++      Color : in Color_Pair := Color_Pair'First)
          ++   is
          ++      function Wattrset (Win    : Window;
          ++                         C_Attr : C_AttrType) return C_Int;
          ++      pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set
          ++   begin
          ++      if Wattrset (Win,
          ++                   AttrChar_To_AttrType (Attributed_Character'
          ++                                         (Ch    => Character'First,
          ++                                          Color => Color,
          ++                                          Attr  => Attr))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Character_Attributes;
          ++
          ++   function Get_Character_Attribute (Win : Window := Standard_Window)
          ++                                     return Character_Attribute_Set
          ++   is
          ++      function Wattrget (Win : Window;
          ++                         Atr : access C_AttrType;
          ++                         Col : access C_Short;
          ++                         Opt : System.Address) return C_Int;
          ++      pragma Import (C, Wattrget, "wattr_get");
          ++
          ++      Attr : aliased C_AttrType;
          ++      Col  : aliased C_Short;
          ++      Res  : constant C_Int := Wattrget (Win, Attr'Access, Col'Access,
          ++                                         System.Null_Address);
          ++      Ch   : Attributed_Character;
          ++   begin
          ++      if Res = Curses_Ok then
          ++         Ch := AttrType_To_AttrChar (Attr);
          ++         return Ch.Attr;
          ++      else
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Get_Character_Attribute;
          ++
          ++   function Get_Character_Attribute (Win : Window := Standard_Window)
          ++                                     return Color_Pair
          ++   is
          ++      function Wattrget (Win : Window;
          ++                         Atr : access C_AttrType;
          ++                         Col : access C_Short;
          ++                         Opt : System.Address) return C_Int;
          ++      pragma Import (C, Wattrget, "wattr_get");
          ++
          ++      Attr : aliased C_AttrType;
          ++      Col  : aliased C_Short;
          ++      Res  : constant C_Int := Wattrget (Win, Attr'Access, Col'Access,
          ++                                         System.Null_Address);
          ++      Ch   : Attributed_Character;
          ++   begin
          ++      if Res = Curses_Ok then
          ++         Ch := AttrType_To_AttrChar (Attr);
          ++         return Ch.Color;
          ++      else
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Get_Character_Attribute;
          ++
          ++   procedure Set_Color (Win  : in Window := Standard_Window;
          ++                        Pair : in Color_Pair)
          ++   is
          ++      function Wset_Color (Win   : Window;
          ++                           Color : C_Short;
          ++                           Opts  : C_Void_Ptr) return C_Int;
          ++      pragma Import (C, Wset_Color, "wcolor_set");
          ++   begin
          ++      if Wset_Color (Win,
          ++                     C_Short (Pair),
          ++                     C_Void_Ptr (System.Null_Address)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Color;
          ++
          ++   procedure Change_Attributes
          ++     (Win   : in Window := Standard_Window;
          ++      Count : in Integer := -1;
          ++      Attr  : in Character_Attribute_Set := Normal_Video;
          ++      Color : in Color_Pair := Color_Pair'First)
          ++   is
          ++      function Wchgat (Win   : Window;
          ++                       Cnt   : C_Int;
          ++                       Attr  : C_AttrType;
          ++                       Color : C_Short;
          ++                       Opts  : System.Address := System.Null_Address)
          ++                       return C_Int;
          ++      pragma Import (C, Wchgat, "wchgat");
          ++
          ++      Ch : constant Attributed_Character :=
          ++        (Ch => Character'First, Color => Color_Pair'First, Attr => Attr);
          ++   begin
          ++      if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch),
          ++                 C_Short (Color)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Change_Attributes;
          ++
          ++   procedure Change_Attributes
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position := Line_Position'First;
          ++      Column : in Column_Position := Column_Position'First;
          ++      Count  : in Integer := -1;
          ++      Attr   : in Character_Attribute_Set := Normal_Video;
          ++      Color  : in Color_Pair := Color_Pair'First)
          ++   is
          ++   begin
          ++      Move_Cursor (Win, Line, Column);
          ++      Change_Attributes (Win, Count, Attr, Color);
          ++   end Change_Attributes;
          ++------------------------------------------------------------------------------
          ++   procedure Beep
          ++   is
          ++      function Beeper return C_Int;
          ++      pragma Import (C, Beeper, "beep");
          ++   begin
          ++      if Beeper = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Beep;
          ++
          ++   procedure Flash_Screen
          ++   is
          ++      function Flash return C_Int;
          ++      pragma Import (C, Flash, "flash");
          ++   begin
          ++      if Flash = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Flash_Screen;
          ++------------------------------------------------------------------------------
          ++   procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True)
          ++   is
          ++      function Cbreak return C_Int;
          ++      pragma Import (C, Cbreak, "cbreak");
          ++      function NoCbreak return C_Int;
          ++      pragma Import (C, NoCbreak, "nocbreak");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      if SwitchOn then
          ++         Err := Cbreak;
          ++      else
          ++         Err := NoCbreak;
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Cbreak_Mode;
          ++
          ++   procedure Set_Raw_Mode (SwitchOn : in Boolean := True)
          ++   is
          ++      function Raw return C_Int;
          ++      pragma Import (C, Raw, "raw");
          ++      function NoRaw return C_Int;
          ++      pragma Import (C, NoRaw, "noraw");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      if SwitchOn then
          ++         Err := Raw;
          ++      else
          ++         Err := NoRaw;
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Raw_Mode;
          ++
          ++   procedure Set_Echo_Mode (SwitchOn : in Boolean := True)
          ++   is
          ++      function Echo return C_Int;
          ++      pragma Import (C, Echo, "echo");
          ++      function NoEcho return C_Int;
          ++      pragma Import (C, NoEcho, "noecho");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      if SwitchOn then
          ++         Err := Echo;
          ++      else
          ++         Err := NoEcho;
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Echo_Mode;
          ++
          ++   procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
          ++                            SwitchOn : in Boolean := True)
          ++   is
          ++      function Meta (W : Window; Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Meta, "meta");
          ++   begin
          ++      if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Meta_Mode;
          ++
          ++   procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
          ++                              SwitchOn : in Boolean := True)
          ++   is
          ++      function Keypad (W : Window; Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Keypad, "keypad");
          ++   begin
          ++      if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_KeyPad_Mode;
          ++
          ++   function Get_KeyPad_Mode (Win : in Window := Standard_Window)
          ++                             return Boolean
          ++   is
          ++      function Is_Keypad (W : Window) return Curses_Bool;
          ++      pragma Import (C, Is_Keypad, "is_keypad");
          ++   begin
          ++      return (Is_Keypad (Win) /= Curses_Bool_False);
          ++   end Get_KeyPad_Mode;
          ++
          ++   procedure Half_Delay (Amount : in Half_Delay_Amount)
          ++   is
          ++      function Halfdelay (Amount : C_Int) return C_Int;
          ++      pragma Import (C, Halfdelay, "halfdelay");
          ++   begin
          ++      if Halfdelay (C_Int (Amount)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Half_Delay;
          ++
          ++   procedure Set_Flush_On_Interrupt_Mode
          ++     (Win  : in Window := Standard_Window;
          ++      Mode : in Boolean := True)
          ++   is
          ++      function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Intrflush, "intrflush");
          ++   begin
          ++      if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Flush_On_Interrupt_Mode;
          ++
          ++   procedure Set_Queue_Interrupt_Mode
          ++     (Win   : in Window := Standard_Window;
          ++      Flush : in Boolean := True)
          ++   is
          ++      procedure Qiflush;
          ++      pragma Import (C, Qiflush, "qiflush");
          ++      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
          ++         No_Qiflush;
          ++      end if;
          ++   end Set_Queue_Interrupt_Mode;
          ++
          ++   procedure Set_NoDelay_Mode
          ++     (Win  : in Window := Standard_Window;
          ++      Mode : in Boolean := False)
          ++   is
          ++      function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Nodelay, "nodelay");
          ++   begin
          ++      if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_NoDelay_Mode;
          ++
          ++   procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
          ++                               Mode   : in Timeout_Mode;
          ++                               Amount : in Natural)
          ++   is
          ++      procedure Wtimeout (Win : Window; Amount : C_Int);
          ++      pragma Import (C, Wtimeout, "wtimeout");
          ++
          ++      Time : C_Int;
          ++   begin
          ++      case Mode is
          ++         when Blocking     => Time := -1;
          ++         when Non_Blocking => Time := 0;
          ++         when Delayed      =>
          ++            if Amount = 0 then
          ++               raise Constraint_Error;
          ++            end if;
          ++            Time := C_Int (Amount);
          ++      end case;
          ++      Wtimeout (Win, Time);
          ++   end Set_Timeout_Mode;
          ++
          ++   procedure Set_Escape_Timer_Mode
          ++     (Win       : in Window := Standard_Window;
          ++      Timer_Off : in Boolean := False)
          ++   is
          ++      function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Notimeout, "notimeout");
          ++   begin
          ++      if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off)))
          ++        = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Escape_Timer_Mode;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Set_NL_Mode (SwitchOn : in Boolean := True)
          ++   is
          ++      function NL return C_Int;
          ++      pragma Import (C, NL, "nl");
          ++      function NoNL return C_Int;
          ++      pragma Import (C, NoNL, "nonl");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      if SwitchOn then
          ++         Err := NL;
          ++      else
          ++         Err := NoNL;
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_NL_Mode;
          ++
          ++   procedure Clear_On_Next_Update
          ++     (Win      : in Window := Standard_Window;
          ++      Do_Clear : in Boolean := True)
          ++   is
          ++      function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int;
          ++      pragma Import (C, Clear_Ok, "clearok");
          ++   begin
          ++      if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Clear_On_Next_Update;
          ++
          ++   procedure Use_Insert_Delete_Line
          ++     (Win    : in Window := Standard_Window;
          ++      Do_Idl : in Boolean := True)
          ++   is
          ++      function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int;
          ++      pragma Import (C, IDL_Ok, "idlok");
          ++   begin
          ++      if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Use_Insert_Delete_Line;
          ++
          ++   procedure Use_Insert_Delete_Character
          ++     (Win    : in Window := Standard_Window;
          ++      Do_Idc : in Boolean := True)
          ++   is
          ++      procedure IDC_Ok (W : Window; Flag : Curses_Bool);
          ++      pragma Import (C, IDC_Ok, "idcok");
          ++   begin
          ++      IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc)));
          ++   end Use_Insert_Delete_Character;
          ++
          ++   procedure Leave_Cursor_After_Update
          ++     (Win      : in Window := Standard_Window;
          ++      Do_Leave : in Boolean := True)
          ++   is
          ++      function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int;
          ++      pragma Import (C, Leave_Ok, "leaveok");
          ++   begin
          ++      if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Leave_Cursor_After_Update;
          ++
          ++   procedure Immediate_Update_Mode
          ++     (Win  : in Window := Standard_Window;
          ++      Mode : in Boolean := False)
          ++   is
          ++      procedure Immedok (Win : Window; Mode : Curses_Bool);
          ++      pragma Import (C, Immedok, "immedok");
          ++   begin
          ++      Immedok (Win, Curses_Bool (Boolean'Pos (Mode)));
          ++   end Immediate_Update_Mode;
          ++
          ++   procedure Allow_Scrolling
          ++     (Win  : in Window  := Standard_Window;
          ++      Mode : in Boolean := False)
          ++   is
          ++      function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int;
          ++      pragma Import (C, Scrollok, "scrollok");
          ++   begin
          ++      if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Allow_Scrolling;
          ++
          ++   function Scrolling_Allowed (Win : Window := Standard_Window)
          ++                               return Boolean
          ++   is
          ++      function Is_Scroll_Ok (W : Window) return Curses_Bool;
          ++      pragma Import (C, Is_Scroll_Ok, "is_scrollok");
          ++   begin
          ++      return (Is_Scroll_Ok (Win) /= Curses_Bool_False);
          ++   end Scrolling_Allowed;
          ++
          ++   procedure Set_Scroll_Region
          ++     (Win         : in Window := Standard_Window;
          ++      Top_Line    : in Line_Position;
          ++      Bottom_Line : in Line_Position)
          ++   is
          ++      function Wsetscrreg (Win : Window;
          ++                           Lin : C_Int;
          ++                           Col : C_Int) return C_Int;
          ++      pragma Import (C, Wsetscrreg, "wsetscrreg");
          ++   begin
          ++      if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line))
          ++        = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Scroll_Region;
          ++------------------------------------------------------------------------------
          ++   procedure Update_Screen
          ++   is
          ++      function Do_Update return C_Int;
          ++      pragma Import (C, Do_Update, "doupdate");
          ++   begin
          ++      if Do_Update = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Update_Screen;
          ++
          ++   procedure Refresh (Win : in Window := Standard_Window)
          ++   is
          ++      function Wrefresh (W : Window) return C_Int;
          ++      pragma Import (C, Wrefresh, "wrefresh");
          ++   begin
          ++      if Wrefresh (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Refresh;
          ++
          ++   procedure Refresh_Without_Update
          ++     (Win : in Window := Standard_Window)
          ++   is
          ++      function Wnoutrefresh (W : Window) return C_Int;
          ++      pragma Import (C, Wnoutrefresh, "wnoutrefresh");
          ++   begin
          ++      if Wnoutrefresh (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Refresh_Without_Update;
          ++
          ++   procedure Redraw (Win : in Window := Standard_Window)
          ++   is
          ++      function Redrawwin (Win : Window) return C_Int;
          ++      pragma Import (C, Redrawwin, "redrawwin");
          ++   begin
          ++      if Redrawwin (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Redraw;
          ++
          ++   procedure Redraw
          ++     (Win        : in Window := Standard_Window;
          ++      Begin_Line : in Line_Position;
          ++      Line_Count : in Positive)
          ++   is
          ++      function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int)
          ++                          return C_Int;
          ++      pragma Import (C, Wredrawln, "wredrawln");
          ++   begin
          ++      if Wredrawln (Win,
          ++                    C_Int (Begin_Line),
          ++                    C_Int (Line_Count)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Redraw;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Erase (Win : in Window := Standard_Window)
          ++   is
          ++      function Werase (W : Window) return C_Int;
          ++      pragma Import (C, Werase, "werase");
          ++   begin
          ++      if Werase (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Erase;
          ++
          ++   procedure Clear (Win : in Window := Standard_Window)
          ++   is
          ++      function Wclear (W : Window) return C_Int;
          ++      pragma Import (C, Wclear, "wclear");
          ++   begin
          ++      if Wclear (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Clear;
          ++
          ++   procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window)
          ++   is
          ++      function Wclearbot (W : Window) return C_Int;
          ++      pragma Import (C, Wclearbot, "wclrtobot");
          ++   begin
          ++      if Wclearbot (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Clear_To_End_Of_Screen;
          ++
          ++   procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window)
          ++   is
          ++      function Wcleareol (W : Window) return C_Int;
          ++      pragma Import (C, Wcleareol, "wclrtoeol");
          ++   begin
          ++      if Wcleareol (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Clear_To_End_Of_Line;
          ++------------------------------------------------------------------------------
          ++   procedure Set_Background
          ++     (Win : in Window := Standard_Window;
          ++      Ch  : in Attributed_Character)
          ++   is
          ++      procedure WBackground (W : in Window; Ch : in C_Chtype);
          ++      pragma Import (C, WBackground, "wbkgdset");
          ++   begin
          ++      WBackground (Win, AttrChar_To_Chtype (Ch));
          ++   end Set_Background;
          ++
          ++   procedure Change_Background
          ++     (Win : in Window := Standard_Window;
          ++      Ch  : in Attributed_Character)
          ++   is
          ++      function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, WChangeBkgd, "wbkgd");
          ++   begin
          ++      if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Change_Background;
          ++
          ++   function Get_Background (Win : Window := Standard_Window)
          ++     return Attributed_Character
          ++   is
          ++      function Wgetbkgd (Win : Window) return C_Chtype;
          ++      pragma Import (C, Wgetbkgd, "getbkgd");
          ++   begin
          ++      return Chtype_To_AttrChar (Wgetbkgd (Win));
          ++   end Get_Background;
          ++------------------------------------------------------------------------------
          ++   procedure Change_Lines_Status (Win   : in Window := Standard_Window;
          ++                                  Start : in Line_Position;
          ++                                  Count : in Positive;
          ++                                  State : in Boolean)
          ++   is
          ++      function Wtouchln (Win : Window;
          ++                         Sta : C_Int;
          ++                         Cnt : C_Int;
          ++                         Chg : C_Int) return C_Int;
          ++      pragma Import (C, Wtouchln, "wtouchln");
          ++   begin
          ++      if Wtouchln (Win, C_Int (Start), C_Int (Count),
          ++                   C_Int (Boolean'Pos (State))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Change_Lines_Status;
          ++
          ++   procedure Touch (Win : in Window := Standard_Window)
          ++   is
          ++      Y : Line_Position;
          ++      X : Column_Position;
          ++   begin
          ++      Get_Size (Win, Y, X);
          ++      Change_Lines_Status (Win, 0, Positive (Y), True);
          ++   end Touch;
          ++
          ++   procedure Untouch (Win : in Window := Standard_Window)
          ++   is
          ++      Y : Line_Position;
          ++      X : Column_Position;
          ++   begin
          ++      Get_Size (Win, Y, X);
          ++      Change_Lines_Status (Win, 0, Positive (Y), False);
          ++   end Untouch;
          ++
          ++   procedure Touch (Win   : in Window := Standard_Window;
          ++                    Start : in Line_Position;
          ++                    Count : in Positive)
          ++   is
          ++   begin
          ++      Change_Lines_Status (Win, Start, Count, True);
          ++   end Touch;
          ++
          ++   function Is_Touched
          ++     (Win  : Window := Standard_Window;
          ++      Line : Line_Position) return Boolean
          ++   is
          ++      function WLineTouched (W : Window; L : C_Int) return Curses_Bool;
          ++      pragma Import (C, WLineTouched, "is_linetouched");
          ++   begin
          ++      if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Is_Touched;
          ++
          ++   function Is_Touched
          ++     (Win : Window := Standard_Window) return Boolean
          ++   is
          ++      function WWinTouched (W : Window) return Curses_Bool;
          ++      pragma Import (C, WWinTouched, "is_wintouched");
          ++   begin
          ++      if WWinTouched (Win) = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Is_Touched;
          ++------------------------------------------------------------------------------
          ++   procedure Copy
          ++     (Source_Window            : in Window;
          ++      Destination_Window       : in Window;
          ++      Source_Top_Row           : in Line_Position;
          ++      Source_Left_Column       : in Column_Position;
          ++      Destination_Top_Row      : in Line_Position;
          ++      Destination_Left_Column  : in Column_Position;
          ++      Destination_Bottom_Row   : in Line_Position;
          ++      Destination_Right_Column : in Column_Position;
          ++      Non_Destructive_Mode     : in Boolean := True)
          ++   is
          ++      function Copywin (Src : Window;
          ++                        Dst : Window;
          ++                        Str : C_Int;
          ++                        Slc : C_Int;
          ++                        Dtr : C_Int;
          ++                        Dlc : C_Int;
          ++                        Dbr : C_Int;
          ++                        Drc : C_Int;
          ++                        Ndm : C_Int) return C_Int;
          ++      pragma Import (C, Copywin, "copywin");
          ++   begin
          ++      if Copywin (Source_Window,
          ++                  Destination_Window,
          ++                  C_Int (Source_Top_Row),
          ++                  C_Int (Source_Left_Column),
          ++                  C_Int (Destination_Top_Row),
          ++                  C_Int (Destination_Left_Column),
          ++                  C_Int (Destination_Bottom_Row),
          ++                  C_Int (Destination_Right_Column),
          ++                  Boolean'Pos (Non_Destructive_Mode)
          ++                ) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Copy;
          ++
          ++   procedure Overwrite
          ++     (Source_Window      : in Window;
          ++      Destination_Window : in Window)
          ++   is
          ++      function Overwrite (Src : Window; Dst : Window) return C_Int;
          ++      pragma Import (C, Overwrite, "overwrite");
          ++   begin
          ++      if Overwrite (Source_Window, Destination_Window) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Overwrite;
          ++
          ++   procedure Overlay
          ++     (Source_Window      : in Window;
          ++      Destination_Window : in Window)
          ++   is
          ++      function Overlay (Src : Window; Dst : Window) return C_Int;
          ++      pragma Import (C, Overlay, "overlay");
          ++   begin
          ++      if Overlay (Source_Window, Destination_Window) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Overlay;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Insert_Delete_Lines
          ++     (Win   : in Window := Standard_Window;
          ++      Lines : in Integer       := 1) -- default is to insert one line above
          ++   is
          ++      function Winsdelln (W : Window; N : C_Int) return C_Int;
          ++      pragma Import (C, Winsdelln, "winsdelln");
          ++   begin
          ++      if Winsdelln (Win, C_Int (Lines)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Insert_Delete_Lines;
          ++
          ++   procedure Delete_Line (Win : in Window := Standard_Window)
          ++   is
          ++   begin
          ++      Insert_Delete_Lines (Win, -1);
          ++   end Delete_Line;
          ++
          ++   procedure Insert_Line (Win : in Window := Standard_Window)
          ++   is
          ++   begin
          ++      Insert_Delete_Lines (Win, 1);
          ++   end Insert_Line;
          ++------------------------------------------------------------------------------
          ++
          ++   procedure Get_Size
          ++     (Win               : in Window := Standard_Window;
          ++      Number_Of_Lines   : out Line_Count;
          ++      Number_Of_Columns : out Column_Count)
          ++   is
          ++      function GetMaxY (W : Window) return C_Int;
          ++      pragma Import (C, GetMaxY, "getmaxy");
          ++
          ++      function GetMaxX (W : Window) return C_Int;
          ++      pragma Import (C, GetMaxX, "getmaxx");
          ++
          ++      Y : constant C_Int := GetMaxY (Win)
          ++                          + C_Int (Offset_XY);
          ++      X : constant C_Int := GetMaxX (Win)
          ++                          + C_Int (Offset_XY);
          ++   begin
          ++      Number_Of_Lines   := Line_Count (Y);
          ++      Number_Of_Columns := Column_Count (X);
          ++   end Get_Size;
          ++
          ++   procedure Get_Window_Position
          ++     (Win             : in Window := Standard_Window;
          ++      Top_Left_Line   : out Line_Position;
          ++      Top_Left_Column : out Column_Position)
          ++   is
          ++      function GetBegY (W : Window) return C_Int;
          ++      pragma Import (C, GetBegY, "getbegy");
          ++
          ++      function GetBegX (W : Window) return C_Int;
          ++      pragma Import (C, GetBegX, "getbegx");
          ++
          ++      Y : constant C_Short := C_Short (GetBegY (Win));
          ++      X : constant C_Short := C_Short (GetBegX (Win));
          ++   begin
          ++      Top_Left_Line   := Line_Position (Y);
          ++      Top_Left_Column := Column_Position (X);
          ++   end Get_Window_Position;
          ++
          ++   procedure Get_Cursor_Position
          ++     (Win    : in  Window := Standard_Window;
          ++      Line   : out Line_Position;
          ++      Column : out Column_Position)
          ++   is
          ++      function GetCurY (W : Window) return C_Int;
          ++      pragma Import (C, GetCurY, "getcury");
          ++
          ++      function GetCurX (W : Window) return C_Int;
          ++      pragma Import (C, GetCurX, "getcurx");
          ++
          ++      Y : constant C_Short := C_Short (GetCurY (Win));
          ++      X : constant C_Short := C_Short (GetCurX (Win));
          ++   begin
          ++      Line   := Line_Position (Y);
          ++      Column := Column_Position (X);
          ++   end Get_Cursor_Position;
          ++
          ++   procedure Get_Origin_Relative_To_Parent
          ++     (Win                : in  Window;
          ++      Top_Left_Line      : out Line_Position;
          ++      Top_Left_Column    : out Column_Position;
          ++      Is_Not_A_Subwindow : out Boolean)
          ++   is
          ++      function GetParY (W : Window) return C_Int;
          ++      pragma Import (C, GetParY, "getpary");
          ++
          ++      function GetParX (W : Window) return C_Int;
          ++      pragma Import (C, GetParX, "getparx");
          ++
          ++      Y : constant C_Int := GetParY (Win);
          ++      X : constant C_Int := GetParX (Win);
          ++   begin
          ++      if Y = -1 then
          ++         Top_Left_Line   := Line_Position'Last;
          ++         Top_Left_Column := Column_Position'Last;
          ++         Is_Not_A_Subwindow := True;
          ++      else
          ++         Top_Left_Line   := Line_Position (Y);
          ++         Top_Left_Column := Column_Position (X);
          ++         Is_Not_A_Subwindow := False;
          ++      end if;
          ++   end Get_Origin_Relative_To_Parent;
          ++------------------------------------------------------------------------------
          ++   function New_Pad (Lines   : Line_Count;
          ++                     Columns : Column_Count) return Window
          ++   is
          ++      function Newpad (Lines : C_Int; Columns : C_Int) return Window;
          ++      pragma Import (C, Newpad, "newpad");
          ++
          ++      W : Window;
          ++   begin
          ++      W := Newpad (C_Int (Lines), C_Int (Columns));
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++      return W;
          ++   end New_Pad;
          ++
          ++   function Sub_Pad
          ++     (Pad                   : Window;
          ++      Number_Of_Lines       : Line_Count;
          ++      Number_Of_Columns     : Column_Count;
          ++      First_Line_Position   : Line_Position;
          ++      First_Column_Position : Column_Position) return Window
          ++   is
          ++      function Subpad
          ++        (Pad                   : Window;
          ++         Number_Of_Lines       : C_Int;
          ++         Number_Of_Columns     : C_Int;
          ++         First_Line_Position   : C_Int;
          ++         First_Column_Position : C_Int) return Window;
          ++      pragma Import (C, Subpad, "subpad");
          ++
          ++      W : Window;
          ++   begin
          ++      W := Subpad (Pad,
          ++                   C_Int (Number_Of_Lines),
          ++                   C_Int (Number_Of_Columns),
          ++                   C_Int (First_Line_Position),
          ++                   C_Int (First_Column_Position));
          ++      if W = Null_Window then
          ++         raise Curses_Exception;
          ++      end if;
          ++      return W;
          ++   end Sub_Pad;
          ++
          ++   procedure Refresh
          ++     (Pad                      : in Window;
          ++      Source_Top_Row           : in Line_Position;
          ++      Source_Left_Column       : in Column_Position;
          ++      Destination_Top_Row      : in Line_Position;
          ++      Destination_Left_Column  : in Column_Position;
          ++      Destination_Bottom_Row   : in Line_Position;
          ++      Destination_Right_Column : in Column_Position)
          ++   is
          ++      function Prefresh
          ++        (Pad                      : Window;
          ++         Source_Top_Row           : C_Int;
          ++         Source_Left_Column       : C_Int;
          ++         Destination_Top_Row      : C_Int;
          ++         Destination_Left_Column  : C_Int;
          ++         Destination_Bottom_Row   : C_Int;
          ++         Destination_Right_Column : C_Int) return C_Int;
          ++      pragma Import (C, Prefresh, "prefresh");
          ++   begin
          ++      if Prefresh (Pad,
          ++                   C_Int (Source_Top_Row),
          ++                   C_Int (Source_Left_Column),
          ++                   C_Int (Destination_Top_Row),
          ++                   C_Int (Destination_Left_Column),
          ++                   C_Int (Destination_Bottom_Row),
          ++                   C_Int (Destination_Right_Column)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Refresh;
          ++
          ++   procedure Refresh_Without_Update
          ++     (Pad                      : in Window;
          ++      Source_Top_Row           : in Line_Position;
          ++      Source_Left_Column       : in Column_Position;
          ++      Destination_Top_Row      : in Line_Position;
          ++      Destination_Left_Column  : in Column_Position;
          ++      Destination_Bottom_Row   : in Line_Position;
          ++      Destination_Right_Column : in Column_Position)
          ++   is
          ++      function Pnoutrefresh
          ++        (Pad                      : Window;
          ++         Source_Top_Row           : C_Int;
          ++         Source_Left_Column       : C_Int;
          ++         Destination_Top_Row      : C_Int;
          ++         Destination_Left_Column  : C_Int;
          ++         Destination_Bottom_Row   : C_Int;
          ++         Destination_Right_Column : C_Int) return C_Int;
          ++      pragma Import (C, Pnoutrefresh, "pnoutrefresh");
          ++   begin
          ++      if Pnoutrefresh (Pad,
          ++                       C_Int (Source_Top_Row),
          ++                       C_Int (Source_Left_Column),
          ++                       C_Int (Destination_Top_Row),
          ++                       C_Int (Destination_Left_Column),
          ++                       C_Int (Destination_Bottom_Row),
          ++                       C_Int (Destination_Right_Column)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Refresh_Without_Update;
          ++
          ++   procedure Add_Character_To_Pad_And_Echo_It
          ++     (Pad : in Window;
          ++      Ch  : in Attributed_Character)
          ++   is
          ++      function Pechochar (Pad : Window; Ch : C_Chtype)
          ++                          return C_Int;
          ++      pragma Import (C, Pechochar, "pechochar");
          ++   begin
          ++      if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Add_Character_To_Pad_And_Echo_It;
          ++
          ++   procedure Add_Character_To_Pad_And_Echo_It
          ++     (Pad : in Window;
          ++      Ch  : in Character)
          ++   is
          ++   begin
          ++      Add_Character_To_Pad_And_Echo_It
          ++        (Pad,
          ++         Attributed_Character'(Ch    => Ch,
          ++                               Color => Color_Pair'First,
          ++                               Attr  => Normal_Video));
          ++   end Add_Character_To_Pad_And_Echo_It;
          ++------------------------------------------------------------------------------
          ++   procedure Scroll (Win    : in Window := Standard_Window;
          ++                     Amount : in Integer := 1)
          ++   is
          ++      function Wscrl (Win : Window; N : C_Int) return C_Int;
          ++      pragma Import (C, Wscrl, "wscrl");
          ++
          ++   begin
          ++      if Wscrl (Win, C_Int (Amount)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Scroll;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Delete_Character (Win : in Window := Standard_Window)
          ++   is
          ++      function Wdelch (Win : Window) return C_Int;
          ++      pragma Import (C, Wdelch, "wdelch");
          ++   begin
          ++      if Wdelch (Win) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Delete_Character;
          ++
          ++   procedure Delete_Character
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position)
          ++   is
          ++      function Mvwdelch (Win : Window;
          ++                         Lin : C_Int;
          ++                         Col : C_Int) return C_Int;
          ++      pragma Import (C, Mvwdelch, "mvwdelch");
          ++   begin
          ++      if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Delete_Character;
          ++------------------------------------------------------------------------------
          ++   function Peek (Win : Window := Standard_Window)
          ++     return Attributed_Character
          ++   is
          ++      function Winch (Win : Window) return C_Chtype;
          ++      pragma Import (C, Winch, "winch");
          ++   begin
          ++      return Chtype_To_AttrChar (Winch (Win));
          ++   end Peek;
          ++
          ++   function Peek
          ++     (Win    : Window := Standard_Window;
          ++      Line   : Line_Position;
          ++      Column : Column_Position) return Attributed_Character
          ++   is
          ++      function Mvwinch (Win : Window;
          ++                        Lin : C_Int;
          ++                        Col : C_Int) return C_Chtype;
          ++      pragma Import (C, Mvwinch, "mvwinch");
          ++   begin
          ++      return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column)));
          ++   end Peek;
          ++------------------------------------------------------------------------------
          ++   procedure Insert (Win : in Window := Standard_Window;
          ++                     Ch  : in Attributed_Character)
          ++   is
          ++      function Winsch (Win : Window; Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, Winsch, "winsch");
          ++   begin
          ++      if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Insert;
          ++
          ++   procedure Insert
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position;
          ++      Ch     : in Attributed_Character)
          ++   is
          ++      function Mvwinsch (Win : Window;
          ++                         Lin : C_Int;
          ++                         Col : C_Int;
          ++                         Ch  : C_Chtype) return C_Int;
          ++      pragma Import (C, Mvwinsch, "mvwinsch");
          ++   begin
          ++      if Mvwinsch (Win,
          ++                   C_Int (Line),
          ++                   C_Int (Column),
          ++                   AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Insert;
          ++------------------------------------------------------------------------------
          ++   procedure Insert (Win : in Window := Standard_Window;
          ++                     Str : in String;
          ++                     Len : in Integer := -1)
          ++   is
          ++      function Winsnstr (Win : Window;
          ++                         Str : char_array;
          ++                         Len : Integer := -1) return C_Int;
          ++      pragma Import (C, Winsnstr, "winsnstr");
          ++
          ++      Txt    : char_array (0 .. Str'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Str, Txt, Length);
          ++      if Winsnstr (Win, Txt, Len) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Insert;
          ++
          ++   procedure Insert
          ++     (Win    : in Window := Standard_Window;
          ++      Line   : in Line_Position;
          ++      Column : in Column_Position;
          ++      Str    : in String;
          ++      Len    : in Integer := -1)
          ++   is
          ++      function Mvwinsnstr (Win    : Window;
          ++                           Line   : C_Int;
          ++                           Column : C_Int;
          ++                           Str    : char_array;
          ++                           Len    : C_Int) return C_Int;
          ++      pragma Import (C, Mvwinsnstr, "mvwinsnstr");
          ++
          ++      Txt    : char_array (0 .. Str'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Str, Txt, Length);
          ++      if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len))
          ++        = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Insert;
          ++------------------------------------------------------------------------------
          ++   procedure Peek (Win : in  Window := Standard_Window;
          ++                   Str : out String;
          ++                   Len : in  Integer := -1)
          ++   is
          ++      function Winnstr (Win : Window;
          ++                        Str : char_array;
          ++                        Len : C_Int) return C_Int;
          ++      pragma Import (C, Winnstr, "winnstr");
          ++
          ++      N   : Integer := Len;
          ++      Txt : char_array (0 .. Str'Length);
          ++      Cnt : Natural;
          ++   begin
          ++      if N < 0 then
          ++         N := Str'Length;
          ++      end if;
          ++      if N > Str'Length then
          ++         raise Constraint_Error;
          ++      end if;
          ++      Txt (0) := Interfaces.C.char'First;
          ++      if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++      To_Ada (Txt, Str, Cnt, True);
          ++      if Cnt < Str'Length then
          ++         Str ((Str'First + Cnt) .. Str'Last) := (others => ' ');
          ++      end if;
          ++   end Peek;
          ++
          ++   procedure Peek
          ++     (Win    : in  Window := Standard_Window;
          ++      Line   : in  Line_Position;
          ++      Column : in  Column_Position;
          ++      Str    : out String;
          ++      Len    : in  Integer := -1)
          ++   is
          ++   begin
          ++      Move_Cursor (Win, Line, Column);
          ++      Peek (Win, Str, Len);
          ++   end Peek;
          ++------------------------------------------------------------------------------
          ++   procedure Peek
          ++     (Win : in  Window := Standard_Window;
          ++      Str : out Attributed_String;
          ++      Len : in  Integer := -1)
          ++   is
          ++      function Winchnstr (Win : Window;
          ++                          Str : chtype_array;             -- out
          ++                          Len : C_Int) return C_Int;
          ++      pragma Import (C, Winchnstr, "winchnstr");
          ++
          ++      N   : Integer := Len;
          ++      Txt : constant chtype_array (0 .. Str'Length)
          ++          := (0 => Default_Character);
          ++      Cnt : Natural := 0;
          ++   begin
          ++      if N < 0 then
          ++         N := Str'Length;
          ++      end if;
          ++      if N > Str'Length then
          ++         raise Constraint_Error;
          ++      end if;
          ++      if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++      for To in Str'Range loop
          ++         exit when Txt (size_t (Cnt)) = Default_Character;
          ++         Str (To) := Txt (size_t (Cnt));
          ++         Cnt := Cnt + 1;
          ++      end loop;
          ++      if Cnt < Str'Length then
          ++         Str ((Str'First + Cnt) .. Str'Last) :=
          ++           (others => (Ch => ' ',
          ++                       Color => Color_Pair'First,
          ++                       Attr => Normal_Video));
          ++      end if;
          ++   end Peek;
          ++
          ++   procedure Peek
          ++     (Win    : in  Window := Standard_Window;
          ++      Line   : in  Line_Position;
          ++      Column : in  Column_Position;
          ++      Str    : out Attributed_String;
          ++      Len    : in Integer := -1)
          ++   is
          ++   begin
          ++      Move_Cursor (Win, Line, Column);
          ++      Peek (Win, Str, Len);
          ++   end Peek;
          ++------------------------------------------------------------------------------
          ++   procedure Get (Win : in  Window := Standard_Window;
          ++                  Str : out String;
          ++                  Len : in  Integer := -1)
          ++   is
          ++      function Wgetnstr (Win : Window;
          ++                         Str : char_array;
          ++                         Len : C_Int) return C_Int;
          ++      pragma Import (C, Wgetnstr, "wgetnstr");
          ++
          ++      N   : Integer := Len;
          ++      Txt : char_array (0 .. Str'Length);
          ++      Cnt : Natural;
          ++   begin
          ++      if N < 0 then
          ++         N := Str'Length;
          ++      end if;
          ++      if N > Str'Length then
          ++         raise Constraint_Error;
          ++      end if;
          ++      Txt (0) := Interfaces.C.char'First;
          ++      if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++      To_Ada (Txt, Str, Cnt, True);
          ++      if Cnt < Str'Length then
          ++         Str ((Str'First + Cnt) .. Str'Last) := (others => ' ');
          ++      end if;
          ++   end Get;
          ++
          ++   procedure Get
          ++     (Win    : in  Window := Standard_Window;
          ++      Line   : in  Line_Position;
          ++      Column : in  Column_Position;
          ++      Str    : out String;
          ++      Len    : in  Integer := -1)
          ++   is
          ++   begin
          ++      Move_Cursor (Win, Line, Column);
          ++      Get (Win, Str, Len);
          ++   end Get;
          ++------------------------------------------------------------------------------
          ++   procedure Init_Soft_Label_Keys
          ++     (Format : in Soft_Label_Key_Format := Three_Two_Three)
          ++   is
          ++      function Slk_Init (Fmt : C_Int) return C_Int;
          ++      pragma Import (C, Slk_Init, "slk_init");
          ++   begin
          ++      if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Init_Soft_Label_Keys;
          ++
          ++   procedure Set_Soft_Label_Key (Label : in Label_Number;
          ++                                 Text  : in String;
          ++                                 Fmt   : in Label_Justification := Left)
          ++   is
          ++      function Slk_Set (Label : C_Int;
          ++                        Txt   : char_array;
          ++                        Fmt   : C_Int) return C_Int;
          ++      pragma Import (C, Slk_Set, "slk_set");
          ++
          ++      Txt : char_array (0 .. Text'Length);
          ++      Len : size_t;
          ++   begin
          ++      To_C (Text, Txt, Len);
          ++      if Slk_Set (C_Int (Label), Txt,
          ++                  C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Soft_Label_Key;
          ++
          ++   procedure Refresh_Soft_Label_Keys
          ++   is
          ++      function Slk_Refresh return C_Int;
          ++      pragma Import (C, Slk_Refresh, "slk_refresh");
          ++   begin
          ++      if Slk_Refresh = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Refresh_Soft_Label_Keys;
          ++
          ++   procedure Refresh_Soft_Label_Keys_Without_Update
          ++   is
          ++      function Slk_Noutrefresh return C_Int;
          ++      pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh");
          ++   begin
          ++      if Slk_Noutrefresh = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Refresh_Soft_Label_Keys_Without_Update;
          ++
          ++   procedure Get_Soft_Label_Key (Label : in Label_Number;
          ++                                 Text  : out String)
          ++   is
          ++      function Slk_Label (Label : C_Int) return chars_ptr;
          ++      pragma Import (C, Slk_Label, "slk_label");
          ++   begin
          ++      Fill_String (Slk_Label (C_Int (Label)), Text);
          ++   end Get_Soft_Label_Key;
          ++
          ++   function Get_Soft_Label_Key (Label : in Label_Number) return String
          ++   is
          ++      function Slk_Label (Label : C_Int) return chars_ptr;
          ++      pragma Import (C, Slk_Label, "slk_label");
          ++   begin
          ++      return Fill_String (Slk_Label (C_Int (Label)));
          ++   end Get_Soft_Label_Key;
          ++
          ++   procedure Clear_Soft_Label_Keys
          ++   is
          ++      function Slk_Clear return C_Int;
          ++      pragma Import (C, Slk_Clear, "slk_clear");
          ++   begin
          ++      if Slk_Clear = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Clear_Soft_Label_Keys;
          ++
          ++   procedure Restore_Soft_Label_Keys
          ++   is
          ++      function Slk_Restore return C_Int;
          ++      pragma Import (C, Slk_Restore, "slk_restore");
          ++   begin
          ++      if Slk_Restore = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Restore_Soft_Label_Keys;
          ++
          ++   procedure Touch_Soft_Label_Keys
          ++   is
          ++      function Slk_Touch return C_Int;
          ++      pragma Import (C, Slk_Touch, "slk_touch");
          ++   begin
          ++      if Slk_Touch = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Touch_Soft_Label_Keys;
          ++
          ++   procedure Switch_Soft_Label_Key_Attributes
          ++     (Attr : in Character_Attribute_Set;
          ++      On   : in Boolean := True)
          ++   is
          ++      function Slk_Attron (Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, Slk_Attron, "slk_attron");
          ++      function Slk_Attroff (Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, Slk_Attroff, "slk_attroff");
          ++
          ++      Err : C_Int;
          ++      Ch  : constant Attributed_Character := (Ch    => Character'First,
          ++                                              Attr  => Attr,
          ++                                              Color => Color_Pair'First);
          ++   begin
          ++      if On then
          ++         Err := Slk_Attron  (AttrChar_To_Chtype (Ch));
          ++      else
          ++         Err := Slk_Attroff (AttrChar_To_Chtype (Ch));
          ++      end if;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Switch_Soft_Label_Key_Attributes;
          ++
          ++   procedure Set_Soft_Label_Key_Attributes
          ++     (Attr  : in Character_Attribute_Set := Normal_Video;
          ++      Color : in Color_Pair := Color_Pair'First)
          ++   is
          ++      function Slk_Attrset (Ch : C_Chtype) return C_Int;
          ++      pragma Import (C, Slk_Attrset, "slk_attrset");
          ++
          ++      Ch : constant Attributed_Character := (Ch    => Character'First,
          ++                                             Attr  => Attr,
          ++                                             Color => Color);
          ++   begin
          ++      if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Soft_Label_Key_Attributes;
          ++
          ++   function Get_Soft_Label_Key_Attributes return Character_Attribute_Set
          ++   is
          ++      function Slk_Attr return C_Chtype;
          ++      pragma Import (C, Slk_Attr, "slk_attr");
          ++
          ++      Attr : constant C_Chtype := Slk_Attr;
          ++   begin
          ++      return Chtype_To_AttrChar (Attr).Attr;
          ++   end Get_Soft_Label_Key_Attributes;
          ++
          ++   function Get_Soft_Label_Key_Attributes return Color_Pair
          ++   is
          ++      function Slk_Attr return C_Chtype;
          ++      pragma Import (C, Slk_Attr, "slk_attr");
          ++
          ++      Attr : constant C_Chtype := Slk_Attr;
          ++   begin
          ++      return Chtype_To_AttrChar (Attr).Color;
          ++   end Get_Soft_Label_Key_Attributes;
          ++
          ++   procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair)
          ++   is
          ++      function Slk_Color (Color : in C_Short) return C_Int;
          ++      pragma Import (C, Slk_Color, "slk_color");
          ++   begin
          ++      if Slk_Color (C_Short (Pair)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Set_Soft_Label_Key_Color;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Enable_Key (Key    : in Special_Key_Code;
          ++                         Enable : in Boolean := True)
          ++   is
          ++      function Keyok (Keycode : C_Int;
          ++                      On_Off  : Curses_Bool) return C_Int;
          ++      pragma Import (C, Keyok, "keyok");
          ++   begin
          ++      if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable)))
          ++        = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Enable_Key;
          ++------------------------------------------------------------------------------
          ++   procedure Define_Key (Definition : in String;
          ++                         Key        : in Special_Key_Code)
          ++   is
          ++      function Defkey (Def : char_array;
          ++                       Key : C_Int) return C_Int;
          ++      pragma Import (C, Defkey, "define_key");
          ++
          ++      Txt    : char_array (0 .. Definition'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Definition, Txt, Length);
          ++      if Defkey (Txt, C_Int (Key)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Define_Key;
          ++------------------------------------------------------------------------------
          ++   procedure Un_Control (Ch  : in Attributed_Character;
          ++                         Str : out String)
          ++   is
          ++      function Unctrl (Ch : C_Chtype) return chars_ptr;
          ++      pragma Import (C, Unctrl, "unctrl");
          ++   begin
          ++      Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str);
          ++   end Un_Control;
          ++
          ++   function Un_Control (Ch : in Attributed_Character) return String
          ++   is
          ++      function Unctrl (Ch : C_Chtype) return chars_ptr;
          ++      pragma Import (C, Unctrl, "unctrl");
          ++   begin
          ++      return Fill_String (Unctrl (AttrChar_To_Chtype (Ch)));
          ++   end Un_Control;
          ++
          ++   procedure Delay_Output (Msecs : in Natural)
          ++   is
          ++      function Delayoutput (Msecs : C_Int) return C_Int;
          ++      pragma Import (C, Delayoutput, "delay_output");
          ++   begin
          ++      if Delayoutput (C_Int (Msecs)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Delay_Output;
          ++
          ++   procedure Flush_Input
          ++   is
          ++      function Flushinp return C_Int;
          ++      pragma Import (C, Flushinp, "flushinp");
          ++   begin
          ++      if Flushinp = Curses_Err then  -- docu says that never happens, but...
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Flush_Input;
          ++------------------------------------------------------------------------------
          ++   function Baudrate return Natural
          ++   is
          ++      function Baud return C_Int;
          ++      pragma Import (C, Baud, "baudrate");
          ++   begin
          ++      return Natural (Baud);
          ++   end Baudrate;
          ++
          ++   function Erase_Character return Character
          ++   is
          ++      function Erasechar return C_Int;
          ++      pragma Import (C, Erasechar, "erasechar");
          ++   begin
          ++      return Character'Val (Erasechar);
          ++   end Erase_Character;
          ++
          ++   function Kill_Character return Character
          ++   is
          ++      function Killchar return C_Int;
          ++      pragma Import (C, Killchar, "killchar");
          ++   begin
          ++      return Character'Val (Killchar);
          ++   end Kill_Character;
          ++
          ++   function Has_Insert_Character return Boolean
          ++   is
          ++      function Has_Ic return Curses_Bool;
          ++      pragma Import (C, Has_Ic, "has_ic");
          ++   begin
          ++      if Has_Ic = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Has_Insert_Character;
          ++
          ++   function Has_Insert_Line return Boolean
          ++   is
          ++      function Has_Il return Curses_Bool;
          ++      pragma Import (C, Has_Il, "has_il");
          ++   begin
          ++      if Has_Il = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Has_Insert_Line;
          ++
          ++   function Supported_Attributes return Character_Attribute_Set
          ++   is
          ++      function Termattrs return C_Chtype;
          ++      pragma Import (C, Termattrs, "termattrs");
          ++
          ++      Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs);
          ++   begin
          ++      return Ch.Attr;
          ++   end Supported_Attributes;
          ++
          ++   procedure Long_Name (Name : out String)
          ++   is
          ++      function Longname return chars_ptr;
          ++      pragma Import (C, Longname, "longname");
          ++   begin
          ++      Fill_String (Longname, Name);
          ++   end Long_Name;
          ++
          ++   function Long_Name return String
          ++   is
          ++      function Longname return chars_ptr;
          ++      pragma Import (C, Longname, "longname");
          ++   begin
          ++      return Fill_String (Longname);
          ++   end Long_Name;
          ++
          ++   procedure Terminal_Name (Name : out String)
          ++   is
          ++      function Termname return chars_ptr;
          ++      pragma Import (C, Termname, "termname");
          ++   begin
          ++      Fill_String (Termname, Name);
          ++   end Terminal_Name;
          ++
          ++   function Terminal_Name return String
          ++   is
          ++      function Termname return chars_ptr;
          ++      pragma Import (C, Termname, "termname");
          ++   begin
          ++      return Fill_String (Termname);
          ++   end Terminal_Name;
          ++------------------------------------------------------------------------------
          ++   procedure Init_Pair (Pair : in Redefinable_Color_Pair;
          ++                        Fore : in Color_Number;
          ++                        Back : in Color_Number)
          ++   is
          ++      function Initpair (Pair : C_Short;
          ++                         Fore : C_Short;
          ++                         Back : C_Short) return C_Int;
          ++      pragma Import (C, Initpair, "init_pair");
          ++   begin
          ++      if Integer (Pair) >= Number_Of_Color_Pairs then
          ++         raise Constraint_Error;
          ++      end if;
          ++      if Integer (Fore) >= Number_Of_Colors or else
          ++        Integer (Back) >= Number_Of_Colors then raise Constraint_Error;
          ++      end if;
          ++      if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back))
          ++        = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Init_Pair;
          ++
          ++   procedure Pair_Content (Pair : in Color_Pair;
          ++                           Fore : out Color_Number;
          ++                           Back : out Color_Number)
          ++   is
          ++      type C_Short_Access is access all C_Short;
          ++      function Paircontent (Pair : C_Short;
          ++                            Fp   : C_Short_Access;
          ++                            Bp   : C_Short_Access) return C_Int;
          ++      pragma Import (C, Paircontent, "pair_content");
          ++
          ++      F, B : aliased C_Short;
          ++   begin
          ++      if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then
          ++         raise Curses_Exception;
          ++      else
          ++         Fore := Color_Number (F);
          ++         Back := Color_Number (B);
          ++      end if;
          ++   end Pair_Content;
          ++
          ++   function Has_Colors return Boolean
          ++   is
          ++      function Hascolors return Curses_Bool;
          ++      pragma Import (C, Hascolors, "has_colors");
          ++   begin
          ++      if Hascolors = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Has_Colors;
          ++
          ++   procedure Init_Color (Color : in Color_Number;
          ++                         Red   : in RGB_Value;
          ++                         Green : in RGB_Value;
          ++                         Blue  : in RGB_Value)
          ++   is
          ++      function Initcolor (Col   : C_Short;
          ++                          Red   : C_Short;
          ++                          Green : C_Short;
          ++                          Blue  : C_Short) return C_Int;
          ++      pragma Import (C, Initcolor, "init_color");
          ++   begin
          ++      if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green),
          ++                    C_Short (Blue)) = Curses_Err then
          ++            raise Curses_Exception;
          ++      end if;
          ++   end Init_Color;
          ++
          ++   function Can_Change_Color return Boolean
          ++   is
          ++      function Canchangecolor return Curses_Bool;
          ++      pragma Import (C, Canchangecolor, "can_change_color");
          ++   begin
          ++      if Canchangecolor = Curses_Bool_False then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Can_Change_Color;
          ++
          ++   procedure Color_Content (Color : in  Color_Number;
          ++                            Red   : out RGB_Value;
          ++                            Green : out RGB_Value;
          ++                            Blue  : out RGB_Value)
          ++   is
          ++      type C_Short_Access is access all C_Short;
          ++
          ++      function Colorcontent (Color : C_Short; R, G, B : C_Short_Access)
          ++                             return C_Int;
          ++      pragma Import (C, Colorcontent, "color_content");
          ++
          ++      R, G, B : aliased C_Short;
          ++   begin
          ++      if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) =
          ++        Curses_Err then
          ++         raise Curses_Exception;
          ++      else
          ++         Red   := RGB_Value (R);
          ++         Green := RGB_Value (G);
          ++         Blue  := RGB_Value (B);
          ++      end if;
          ++   end Color_Content;
          ++
          ++------------------------------------------------------------------------------
          ++   procedure Save_Curses_Mode (Mode : in Curses_Mode)
          ++   is
          ++      function Def_Prog_Mode return C_Int;
          ++      pragma Import (C, Def_Prog_Mode, "def_prog_mode");
          ++      function Def_Shell_Mode return C_Int;
          ++      pragma Import (C, Def_Shell_Mode, "def_shell_mode");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      case Mode is
          ++         when Curses => Err := Def_Prog_Mode;
          ++         when Shell  => Err := Def_Shell_Mode;
          ++      end case;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Save_Curses_Mode;
          ++
          ++   procedure Reset_Curses_Mode (Mode : in Curses_Mode)
          ++   is
          ++      function Reset_Prog_Mode return C_Int;
          ++      pragma Import (C, Reset_Prog_Mode, "reset_prog_mode");
          ++      function Reset_Shell_Mode return C_Int;
          ++      pragma Import (C, Reset_Shell_Mode, "reset_shell_mode");
          ++
          ++      Err : C_Int;
          ++   begin
          ++      case Mode is
          ++         when Curses => Err := Reset_Prog_Mode;
          ++         when Shell  => Err := Reset_Shell_Mode;
          ++      end case;
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Reset_Curses_Mode;
          ++
          ++   procedure Save_Terminal_State
          ++   is
          ++      function Savetty return C_Int;
          ++      pragma Import (C, Savetty, "savetty");
          ++   begin
          ++      if Savetty = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Save_Terminal_State;
          ++
          ++   procedure Reset_Terminal_State
          ++   is
          ++      function Resetty return C_Int;
          ++      pragma Import (C, Resetty, "resetty");
          ++   begin
          ++      if Resetty = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Reset_Terminal_State;
          ++
          ++   procedure Rip_Off_Lines (Lines : in Integer;
          ++                            Proc  : in Stdscr_Init_Proc)
          ++   is
          ++      function Ripoffline (Lines : C_Int;
          ++                           Proc  : Stdscr_Init_Proc) return C_Int;
          ++      pragma Import (C, Ripoffline, "_nc_ripoffline");
          ++   begin
          ++      if Ripoffline (C_Int (Lines), Proc) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Rip_Off_Lines;
          ++
          ++   procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility)
          ++   is
          ++      function Curs_Set (Curs : C_Int) return C_Int;
          ++      pragma Import (C, Curs_Set, "curs_set");
          ++
          ++      Res : C_Int;
          ++   begin
          ++      Res := Curs_Set (Cursor_Visibility'Pos (Visibility));
          ++      if Res /= Curses_Err then
          ++         Visibility := Cursor_Visibility'Val (Res);
          ++      end if;
          ++   end Set_Cursor_Visibility;
          ++
          ++   procedure Nap_Milli_Seconds (Ms : in Natural)
          ++   is
          ++      function Napms (Ms : C_Int) return C_Int;
          ++      pragma Import (C, Napms, "napms");
          ++   begin
          ++      if Napms (C_Int (Ms)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Nap_Milli_Seconds;
          ++------------------------------------------------------------------------------
          ++include(`Public_Variables')
          ++------------------------------------------------------------------------------
          ++   procedure Transform_Coordinates
          ++     (W      : in Window := Standard_Window;
          ++      Line   : in out Line_Position;
          ++      Column : in out Column_Position;
          ++      Dir    : in Transform_Direction := From_Screen)
          ++   is
          ++      type Int_Access is access all C_Int;
          ++      function Transform (W    : Window;
          ++                          Y, X : Int_Access;
          ++                          Dir  : Curses_Bool) return C_Int;
          ++      pragma Import (C, Transform, "wmouse_trafo");
          ++
          ++      X : aliased C_Int := C_Int (Column);
          ++      Y : aliased C_Int := C_Int (Line);
          ++      D : Curses_Bool := Curses_Bool_False;
          ++      R : C_Int;
          ++   begin
          ++      if Dir = To_Screen then
          ++         D := 1;
          ++      end if;
          ++      R := Transform (W, Y'Access, X'Access, D);
          ++      if R = Curses_False then
          ++         raise Curses_Exception;
          ++      else
          ++         Line   := Line_Position (Y);
          ++         Column := Column_Position (X);
          ++      end if;
          ++   end Transform_Coordinates;
          ++------------------------------------------------------------------------------
          ++   procedure Use_Default_Colors is
          ++      function C_Use_Default_Colors return C_Int;
          ++      pragma Import (C, C_Use_Default_Colors, "use_default_colors");
          ++      Err : constant C_Int := C_Use_Default_Colors;
          ++   begin
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Use_Default_Colors;
          ++
          ++   procedure Assume_Default_Colors (Fore : Color_Number := Default_Color;
          ++                                    Back : Color_Number := Default_Color)
          ++   is
          ++      function C_Assume_Default_Colors (Fore : C_Int;
          ++                                        Back : C_Int) return C_Int;
          ++      pragma Import (C, C_Assume_Default_Colors, "assume_default_colors");
          ++
          ++      Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore),
          ++                                                       C_Int (Back));
          ++   begin
          ++      if Err = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Assume_Default_Colors;
          ++------------------------------------------------------------------------------
          ++   function Curses_Version return String
          ++   is
          ++      function curses_versionC return chars_ptr;
          ++      pragma Import (C, curses_versionC, "curses_version");
          ++      Result : constant chars_ptr := curses_versionC;
          ++   begin
          ++      return Fill_String (Result);
          ++   end Curses_Version;
          ++------------------------------------------------------------------------------
          ++   procedure Curses_Free_All is
          ++      procedure curses_freeall;
          ++      pragma Import (C, curses_freeall, "_nc_freeall");
          ++   begin
          ++      --  Use this only for testing: you cannot use curses after calling it,
          ++      --  so it has to be the "last" thing done before exiting the program.
          ++      --  This will not really free ALL of memory used by curses.  That is
          ++      --  because it cannot free the memory used for stdout's setbuf.  The
          ++      --  _nc_free_and_exit() procedure can do that, but it can be invoked
          ++      --  safely only from C - and again, that only as the "last" thing done
          ++      --  before exiting the program.
          ++      curses_freeall;
          ++   end Curses_Free_All;
          ++------------------------------------------------------------------------------
          ++   function Use_Extended_Names (Enable : Boolean) return Boolean
          ++   is
          ++      function use_extended_namesC (e : Curses_Bool) return C_Int;
          ++      pragma Import (C, use_extended_namesC, "use_extended_names");
          ++
          ++      Res : constant C_Int :=
          ++         use_extended_namesC (Curses_Bool (Boolean'Pos (Enable)));
          ++   begin
          ++      if Res = C_Int (Curses_Bool_False) then
          ++         return False;
          ++      else
          ++         return True;
          ++      end if;
          ++   end Use_Extended_Names;
          ++------------------------------------------------------------------------------
          ++   procedure Screen_Dump_To_File (Filename : in String)
          ++   is
          ++      function scr_dump (f : char_array) return C_Int;
          ++      pragma Import (C, scr_dump, "scr_dump");
          ++      Txt    : char_array (0 .. Filename'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Filename, Txt, Length);
          ++      if Curses_Err = scr_dump (Txt) then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Screen_Dump_To_File;
          ++
          ++   procedure Screen_Restore_From_File (Filename : in String)
          ++   is
          ++      function scr_restore (f : char_array) return C_Int;
          ++      pragma Import (C, scr_restore, "scr_restore");
          ++      Txt    : char_array (0 .. Filename'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Filename, Txt, Length);
          ++      if Curses_Err = scr_restore (Txt)  then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Screen_Restore_From_File;
          ++
          ++   procedure Screen_Init_From_File (Filename : in String)
          ++   is
          ++      function scr_init (f : char_array) return C_Int;
          ++      pragma Import (C, scr_init, "scr_init");
          ++      Txt    : char_array (0 .. Filename'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Filename, Txt, Length);
          ++      if Curses_Err = scr_init (Txt) then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Screen_Init_From_File;
          ++
          ++   procedure Screen_Set_File (Filename : in String)
          ++   is
          ++      function scr_set (f : char_array) return C_Int;
          ++      pragma Import (C, scr_set, "scr_set");
          ++      Txt    : char_array (0 .. Filename'Length);
          ++      Length : size_t;
          ++   begin
          ++      To_C (Filename, Txt, Length);
          ++      if Curses_Err = scr_set (Txt) then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Screen_Set_File;
          ++------------------------------------------------------------------------------
          ++   procedure Resize (Win               : Window := Standard_Window;
          ++                     Number_Of_Lines   : Line_Count;
          ++                     Number_Of_Columns : Column_Count) is
          ++      function wresize (win     : Window;
          ++                        lines   : C_Int;
          ++                        columns : C_Int) return C_Int;
          ++      pragma Import (C, wresize);
          ++   begin
          ++      if wresize (Win,
          ++                  C_Int (Number_Of_Lines),
          ++                  C_Int (Number_Of_Columns)) = Curses_Err then
          ++         raise Curses_Exception;
          ++      end if;
          ++   end Resize;
          ++------------------------------------------------------------------------------
          ++
          ++end Terminal_Interface.Curses;
          +Index: Ada95/gen/terminal_interface-curses.ads.m4
          +--- ncurses-5.6/Ada95/gen/terminal_interface-curses.ads.m4	2006-06-25 14:30:22.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/gen/terminal_interface-curses.ads.m4	2007-05-05 20:33:52.000000000 +0000
          +@@ -9,7 +9,7 @@
          + --                                 S P E C                                  --
          + --                                                                          --
          + ------------------------------------------------------------------------------
          +--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              --
          ++-- Copyright (c) 1998-2006,2007 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,8 +37,8 @@
          + ------------------------------------------------------------------------------
          + --  Author:  Juergen Pfeifer, 1996
          + --  Version Control:
          +---  $Revision: 1.37 $
          +---  $Date: 2006/06/25 14:30:22 $
          ++--  $Revision: 1.41 $
          ++--  $Date: 2007/05/05 20:33:52 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + include(`Base_Defs')
          +@@ -188,25 +188,21 @@
          +    function Number_Of_Color_Pairs return Natural;
          +    pragma Inline (Number_Of_Color_Pairs);
          + 
          +-   ACS_Map : array (Character'Val (0) .. Character'Val (127)) of
          +-     Attributed_Character;
          +-   pragma Import (C, ACS_Map, "acs_map");
          +-   --
          +-   --
          +-   --  Constants for several characters from the Alternate Character Set
          +-   --  You must use this constants as indices into the ACS_Map array
          +-   --  to get the corresponding attributed character at runtime.
          +-   --
          + include(`ACS_Map')dnl
          + 
          +    --  MANPAGE(`curs_initscr.3x')
          +-   --  | Not implemented: newterm, set_term, delscreen, curscr
          ++   --  | Not implemented: newterm, set_term, delscreen
          + 
          +    --  ANCHOR(`stdscr',`Standard_Window')
          +    function Standard_Window return Window;
          +    --  AKA
          +    pragma Inline (Standard_Window);
          + 
          ++   --  ANCHOR(`curscr',`Current_Window')
          ++   function Current_Window return Window;
          ++   --  AKA
          ++   pragma Inline (Current_Window);
          ++
          +    --  ANCHOR(`initscr()',`Init_Screen')
          +    procedure Init_Screen;
          + 
          +@@ -1478,7 +1474,7 @@
          +    --  Window or if you pass the Null_Window as argument.
          +    --  We don't inline this procedure
          + 
          +-   --  MANPAGE(`dft_fgbg.3x')
          ++   --  MANPAGE(`default_colors.3x')
          + 
          +    --  ANCHOR(`use_default_colors()',`Use_Default_Colors')
          +    procedure Use_Default_Colors;
          +@@ -1502,6 +1498,12 @@
          +    function Use_Extended_Names (Enable : Boolean) return Boolean;
          +    --  AKA
          + 
          ++   --  MANPAGE(`curs_trace.3x')
          ++
          ++   --  ANCHOR(`_nc_freeall()',`Curses_Free_All')
          ++   procedure Curses_Free_All;
          ++   --  AKA
          ++
          +    --  MANPAGE(`curs_scr_dump.3x')
          + 
          +    --  ANCHOR(`scr_dump()',`Screen_Dump_To_File')
          +Index: Ada95/samples/ncurses2-attr_test.adb
          +--- ncurses-5.6/Ada95/samples/ncurses2-attr_test.adb	2006-06-25 14:24:40.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/samples/ncurses2-attr_test.adb	2007-05-05 21:28:18.000000000 +0000
          +@@ -7,7 +7,7 @@
          + --                                 B O D Y                                  --
          + --                                                                          --
          + ------------------------------------------------------------------------------
          +--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc.              --
          ++-- Copyright (c) 2000-2006,2007 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,8 +35,8 @@
          + ------------------------------------------------------------------------------
          + --  Author: Eugene V. Melaragno  2000
          + --  Version Control
          +---  $Revision: 1.6 $
          +---  $Date: 2006/06/25 14:24:40 $
          ++--  $Revision: 1.8 $
          ++--  $Date: 2007/05/05 21:28:18 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + with ncurses2.util; use ncurses2.util;
          +@@ -56,7 +56,7 @@
          +                         attr : Character_Attribute_Set;
          +                         name : String;
          +                         once : Boolean) return Line_Position;
          +-   procedure attr_getc (skip : out Integer;
          ++   procedure attr_getc (skip : in out Integer;
          +                         fg, bg : in out Color_Number;
          +                         result : out Boolean);
          + 
          +@@ -233,20 +233,18 @@
          +       return row + 2;
          +    end show_attr;
          + 
          +-   procedure attr_getc (skip : out Integer; fg, bg : in out Color_Number;
          +-                                            result : out Boolean) is
          ++   procedure attr_getc (skip : in out Integer;
          ++                        fg, bg : in out Color_Number;
          ++                        result : out Boolean) is
          +       ch : constant Key_Code := Getchar;
          +       nc : constant Color_Number := Color_Number (Number_Of_Colors);
          +-      curscr : Window;
          +-      pragma Import (C, curscr, "curscr");
          +-      --  curscr is not implemented in the Ada binding
          +    begin
          +       result := True;
          +       if Ada.Characters.Handling.Is_Digit (Character'Val (ch)) then
          +          skip := ctoi (Code_To_Char (ch));
          +       elsif ch = CTRL ('L') then
          +          Touch;
          +-         Touch (curscr);
          ++         Touch (Current_Window);
          +          Refresh;
          +       elsif Has_Colors then
          +          case ch is
          +Index: Ada95/samples/ncurses2-m.adb
          +--- ncurses-5.6/Ada95/samples/ncurses2-m.adb	2006-06-25 14:24:40.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/samples/ncurses2-m.adb	2007-05-05 18:02:40.000000000 +0000
          +@@ -35,8 +35,8 @@
          + ------------------------------------------------------------------------------
          + --  Author: Eugene V. Melaragno  2000
          + --  Version Control
          +---  $Revision: 1.6 $
          +---  $Date: 2006/06/25 14:24:40 $
          ++--  $Revision: 1.7 $
          ++--  $Date: 2007/05/05 18:02:40 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + --  TODO use Default_Character where appropriate
          +@@ -442,6 +442,7 @@
          + 
          +          exit when command = 'q';
          +       end loop;
          ++      Curses_Free_All;
          +       return 0; -- TODO ExitProgram(EXIT_SUCCESS);
          +    end main;
          + 
          +Index: Ada95/samples/rain.adb
          +--- ncurses-5.6/Ada95/samples/rain.adb	2003-10-25 15:39:18.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/samples/rain.adb	2007-05-05 18:54:03.000000000 +0000
          +@@ -36,7 +36,8 @@
          + --  Author:  Laurent Pautet 
          + --  Modified by:  Juergen Pfeifer, 1997
          + --  Version Control
          +---  $Revision: 1.6 $
          ++--  $Revision: 1.7 $
          ++--  $Date: 2007/05/05 18:54:03 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + --                                                                          --
          +@@ -158,5 +159,6 @@
          +    Visibility := Normal;
          +    Set_Cursor_Visibility (Visibility);
          +    End_Windows;
          ++   Curses_Free_All;
          + 
          + end Rain;
          +Index: Ada95/samples/sample.adb
          +--- ncurses-5.6/Ada95/samples/sample.adb	2003-10-25 15:39:18.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/samples/sample.adb	2007-05-05 18:46:21.000000000 +0000
          +@@ -35,7 +35,8 @@
          + ------------------------------------------------------------------------------
          + --  Author:  Juergen Pfeifer, 1996
          + --  Version Control
          +---  $Revision: 1.14 $
          ++--  $Revision: 1.15 $
          ++--  $Date: 2007/05/05 18:46:21 $
          + --  Binding Version 01.00
          + ------------------------------------------------------------------------------
          + with Text_IO;
          +@@ -204,6 +205,7 @@
          +       --  We have some fixed key throughout this sample
          +       Main_Menu;
          +       End_Windows;
          ++      Curses_Free_All;
          + 
          +    exception
          +       when Event : others =>
          +Index: Ada95/src/Makefile.in
          +Prereq:  1.30 
          +--- ncurses-5.6/Ada95/src/Makefile.in	2004-08-21 21:29:50.000000000 +0000
          ++++ ncurses-5.6-20071201/Ada95/src/Makefile.in	2007-09-15 18:22:24.000000000 +0000
          +@@ -28,7 +28,7 @@
          + #
          + #  Author:  Juergen Pfeifer, 1996
          + #
          +-#  $Id: Makefile.in,v 1.30 2004/08/21 21:29:50 tom Exp $
          ++#  $Id: Makefile.in,v 1.31 2007/09/15 18:22:24 tom Exp $
          + #
          + .SUFFIXES:
          + 
          +@@ -197,7 +197,7 @@
          + 
          + realclean :: distclean
          + 
          +-BASEDEPS=$(ABASE).ads $(ABASE)-aux.ads $(srcdir)/$(ABASE).adb
          ++BASEDEPS=$(ABASE).ads $(ABASE)-aux.ads $(ABASE).adb
          + 
          + $(ALIB).o: $(srcdir)/$(ALIB).ads
          + 	$(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ALIB).ads
          +@@ -207,8 +207,8 @@
          + 	$(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-aux.adb
          + 
          + 
          +-$(ABASE).o: $(srcdir)/$(ABASE).adb $(BASEDEPS)
          +-	$(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE).adb
          ++$(ABASE).o: $(ABASE).adb $(BASEDEPS)
          ++	$(ADA) $(ADAFLAGS) -c -o $@ $(ABASE).adb
          + 
          + 
          + $(ABASE)-terminfo.o: \
          +Index: INSTALL
          +Prereq:  1.114 
          +--- ncurses-5.6/INSTALL	2006-12-17 19:58:19.000000000 +0000
          ++++ ncurses-5.6-20071201/INSTALL	2007-12-01 19:37:47.000000000 +0000
          +@@ -25,7 +25,7 @@
          + -- sale, use or other dealings in this Software without prior written        --
          + -- authorization.                                                            --
          + -------------------------------------------------------------------------------
          +--- $Id: INSTALL,v 1.114 2006/12/17 19:58:19 tom Exp $
          ++-- $Id: INSTALL,v 1.122 2007/12/01 19:37:47 tom Exp $
          + ---------------------------------------------------------------------
          +              How to install Ncurses/Terminfo on your system
          + ---------------------------------------------------------------------
          +@@ -304,6 +304,11 @@
          + 	return deceptive results, so you may have to override the configure
          + 	script.  Or you may be building tic for a smaller machine.
          + 
          ++    --disable-big-strings
          ++	Disable compile-time optimization of predefined tables which puts
          ++	all of their strings into a very long string, to reduce relocation
          ++	overhead.
          ++
          +     --disable-database
          + 	Use only built-in data.  The ncurses libraries normally read terminfo
          + 	and termcap data from disk.  You can configure ncurses to have a
          +@@ -334,6 +339,16 @@
          + 	For testing, compile-in code that frees memory that normally would not
          + 	be freed, to simplify analysis of memory-leaks.
          + 
          ++	Any implementation of curses must not free the memory associated with
          ++	a screen, since (even after calling endwin()), it must be available
          ++	for use in the next call to refresh().  There are also chunks of
          ++	memory held for performance reasons.  That makes it hard to analyze
          ++	curses applications for memory leaks.  To work around this, build
          ++	a debugging version of the ncurses library which frees those chunks
          ++	which it can, and provides the _nc_free_and_exit() function to free
          ++	the remainder on exit.  The ncurses utility and test programs use this
          ++	feature, e.g., via the ExitProgram() macro.
          ++
          +     --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
          +@@ -358,6 +373,13 @@
          + 	rather than the include directory.  This makes it simpler to avoid
          + 	compile-time conflicts with other versions of curses.h
          + 
          ++    --disable-relink
          ++	If --enable-rpath is given, the generated makefiles normally will
          ++	rebuild the libraries during install.  Use this option to simply
          ++	copy whatever the linked produced.
          ++
          ++	This option is ignored if --enable-rpath is not given.
          ++
          +     --disable-root-environ
          + 	Compile with environment restriction, so certain environment variables
          + 	are not available when running as root, or via a setuid/setgid
          +@@ -476,12 +498,22 @@
          + 	may not be accurate, or that your stty settings have disabled the use
          + 	of tabs.
          + 
          ++    --enable-mixed-case
          ++	Controls whether the filesystem on which the terminfo database resides
          ++	supports mixed-case filenames (normal for UNIX, but not on other
          ++	systems).  If you do not specify this option, the configure script
          ++	checks the current filesystem.
          ++
          +     --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
          + 	terminfo entries.  This is the default, unless you have disabled the
          + 	extended functions.
          + 
          ++    --enable-reentrant
          ++	Compile experimental configuration which improves reentrant use of the
          ++	library by reducing global and static variables.
          ++
          +     --enable-rpath
          + 	Use rpath option when generating shared libraries, and (with some
          + 	restrictions) when linking the corresponding programs.  This originally
          +@@ -495,6 +527,9 @@
          + 	environment variable, they do not work with setuid applications since
          + 	the LD_LIBRARY_PATH variable would be unset in that situation.
          + 
          ++	This option does not apply to --with-libtool, since libtool makes
          ++	extra assumptions about rpath.
          ++
          +     --enable-safe-sprintf
          + 	Compile with experimental safe-sprintf code.  You may consider using
          + 	this if you are building ncurses for a system that has neither
          +@@ -659,10 +694,16 @@
          + 
          + 	See also --without-dlsym
          + 
          +-    --with-hashed-db
          ++    --with-hashed-db[=XXX]
          + 	Use a hashed database for storing terminfo data rather than storing
          + 	each compiled entry in a separate binary file within a directory
          + 	tree.
          ++	
          ++	In particular, this uses the Berkeley database 1.8.5 interface, as
          ++	provided by that and its successors db 2, 3, and 4.  The actual
          ++	interface is slightly different in the successor versions of the
          ++	Berkeley database.  The database should have been configured using
          ++	"--enable-compat185".
          + 
          + 	If you use this option for configuring ncurses, tic will only be able
          + 	to write entries in the hashed database.  infocmp can still read
          +@@ -674,6 +715,12 @@
          + 	You cannot have a directory containing both hashed-database and
          + 	filesystem-based terminfo entries.
          + 
          ++	Use the parameter value to give the install-prefix used for the
          ++	datbase, e.g.,
          ++		--with-hashed-db=/usr/local/BigBase
          ++	to find the corresponding include- and lib-directories under the
          ++	given directory.
          ++
          + 	See also the --enable-getcap option.
          + 
          +     --with-install-prefix=XXX
          +@@ -833,6 +880,15 @@
          + 	Specify a search-list of termcap files which will be compiled into the
          + 	ncurses library (default:  /etc/termcap:/usr/share/misc/termcap)
          + 
          ++    --with-ticlib[=XXX]
          ++	When building the ncurses library, build a separate library for
          ++	the modules that are used only by the utility programs.  Normally
          ++	those would be bundled with the termlib or ncurses libraries.
          ++
          ++	If an option value is given, that overrides the name of the tic
          ++	library.  As in termlib, there is no ABI difference between the
          ++	"wide" libticw.so and libtic.so
          ++
          +     --with-trace
          + 	Configure the trace() function as part of the all models of the ncurses
          + 	library.  Normally it is part of the debug (libncurses_g) library only.
          +Index: MANIFEST
          +--- ncurses-5.6/MANIFEST	2006-11-26 02:21:05.000000000 +0000
          ++++ ncurses-5.6-20071201/MANIFEST	2007-09-08 21:31:21.000000000 +0000
          +@@ -4,6 +4,7 @@
          + ./Ada95/README
          + ./Ada95/TODO
          + ./Ada95/gen/Makefile.in
          ++./Ada95/gen/adacurses-config.in
          + ./Ada95/gen/gen.c
          + ./Ada95/gen/html.m4
          + ./Ada95/gen/normal.m4
          +@@ -20,6 +21,7 @@
          + ./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
          + ./Ada95/gen/terminal_interface-curses-panels.ads.m4
          + ./Ada95/gen/terminal_interface-curses-trace.ads.m4
          ++./Ada95/gen/terminal_interface-curses.adb.m4
          + ./Ada95/gen/terminal_interface-curses.ads.m4
          + ./Ada95/samples/Makefile.in
          + ./Ada95/samples/README
          +@@ -163,7 +165,6 @@
          + ./Ada95/src/terminal_interface-curses-text_io.adb
          + ./Ada95/src/terminal_interface-curses-text_io.ads
          + ./Ada95/src/terminal_interface-curses-trace.adb_p
          +-./Ada95/src/terminal_interface-curses.adb
          + ./Ada95/src/terminal_interface.ads
          + ./INSTALL
          + ./MANIFEST
          +@@ -553,8 +554,10 @@
          + ./man/curs_instr.3x
          + ./man/curs_inwstr.3x
          + ./man/curs_kernel.3x
          ++./man/curs_legacy.3x
          + ./man/curs_mouse.3x
          + ./man/curs_move.3x
          ++./man/curs_opaque.3x
          + ./man/curs_outopts.3x
          + ./man/curs_overlay.3x
          + ./man/curs_pad.3x
          +@@ -709,7 +712,8 @@
          + ./mk-0th.awk
          + ./mk-1st.awk
          + ./mk-2nd.awk
          +-./mkinstalldirs
          ++./mk-hdr.awk
          ++./mkdirs.sh
          + ./ncurses/Makefile.in
          + ./ncurses/README
          + ./ncurses/README.IZ
          +@@ -799,6 +803,7 @@
          + ./ncurses/base/safe_sprintf.c
          + ./ncurses/base/sigaction.c
          + ./ncurses/base/tries.c
          ++./ncurses/base/use_window.c
          + ./ncurses/base/version.c
          + ./ncurses/base/vsscanf.c
          + ./ncurses/base/wresize.c
          +@@ -808,6 +813,8 @@
          + ./ncurses/llib-lncursesw
          + ./ncurses/modules
          + ./ncurses/tinfo/MKcaptab.awk
          ++./ncurses/tinfo/MKcaptab.sh
          ++./ncurses/tinfo/MKcodes.awk
          + ./ncurses/tinfo/MKfallback.sh
          + ./ncurses/tinfo/MKkeys_list.sh
          + ./ncurses/tinfo/MKnames.awk
          +@@ -824,6 +831,7 @@
          + ./ncurses/tinfo/comp_scan.c
          + ./ncurses/tinfo/db_iterator.c
          + ./ncurses/tinfo/doalloc.c
          ++./ncurses/tinfo/entries.c
          + ./ncurses/tinfo/free_ttype.c
          + ./ncurses/tinfo/getenv_num.c
          + ./ncurses/tinfo/hashed_db.c
          +@@ -856,6 +864,7 @@
          + ./ncurses/tinfo/setbuf.c
          + ./ncurses/tinfo/strings.c
          + ./ncurses/tinfo/trim_sgr0.c
          ++./ncurses/tinfo/use_screen.c
          + ./ncurses/tinfo/write_entry.c
          + ./ncurses/trace/README
          + ./ncurses/trace/lib_trace.c
          +@@ -891,6 +900,7 @@
          + ./ncurses/widechar/lib_in_wchnstr.c
          + ./ncurses/widechar/lib_ins_wch.c
          + ./ncurses/widechar/lib_inwstr.c
          ++./ncurses/widechar/lib_key_name.c
          + ./ncurses/widechar/lib_pecho_wchar.c
          + ./ncurses/widechar/lib_slk_wset.c
          + ./ncurses/widechar/lib_unget_wch.c
          +@@ -934,29 +944,6 @@
          + ./progs/toe.c
          + ./progs/tput.c
          + ./progs/tset.c
          +-./tack/COPYING
          +-./tack/HISTORY
          +-./tack/Makefile.in
          +-./tack/README
          +-./tack/ansi.c
          +-./tack/charset.c
          +-./tack/color.c
          +-./tack/control.c
          +-./tack/crum.c
          +-./tack/edit.c
          +-./tack/fun.c
          +-./tack/init.c
          +-./tack/menu.c
          +-./tack/modes.c
          +-./tack/modules
          +-./tack/output.c
          +-./tack/pad.c
          +-./tack/scan.c
          +-./tack/sync.c
          +-./tack/sysdep.c
          +-./tack/tack.1
          +-./tack/tack.c
          +-./tack/tack.h
          + ./tar-copy.sh
          + ./test/Makefile.in
          + ./test/README
          +@@ -981,6 +968,7 @@
          + ./test/demo_termcap.c
          + ./test/ditto.c
          + ./test/dots.c
          ++./test/dots_mvcur.c
          + ./test/echochar.c
          + ./test/edit_field.c
          + ./test/edit_field.h
          +@@ -992,8 +980,11 @@
          + ./test/gdc.c
          + ./test/hanoi.c
          + ./test/hashtest.c
          ++./test/inch_wide.c
          ++./test/inchs.c
          + ./test/ins_wide.c
          + ./test/inserts.c
          ++./test/key_names.c
          + ./test/keynames.c
          + ./test/knight.c
          + ./test/linux-color.dat
          +@@ -1010,8 +1001,15 @@
          + ./test/rain.c
          + ./test/redraw.c
          + ./test/savescreen.c
          ++./test/savescreen.sh
          + ./test/tclock.c
          + ./test/test.priv.h
          ++./test/test_arrays.c
          ++./test/test_get_wstr.c
          ++./test/test_getstr.c
          ++./test/test_instr.c
          ++./test/test_inwstr.c
          ++./test/test_opaque.c
          + ./test/testaddch.c
          + ./test/testcurs.c
          + ./test/testscanw.c
          +Index: NEWS
          +Prereq:  1.1056 
          +--- ncurses-5.6/NEWS	2006-12-17 20:36:26.000000000 +0000
          ++++ ncurses-5.6-20071201/NEWS	2007-12-01 19:38:49.000000000 +0000
          +@@ -1,5 +1,5 @@
          + -------------------------------------------------------------------------------
          +--- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.               --
          ++-- Copyright (c) 1998-2006,2007 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             --
          +@@ -25,7 +25,7 @@
          + -- sale, use or other dealings in this Software without prior written        --
          + -- authorization.                                                            --
          + -------------------------------------------------------------------------------
          +--- $Id: NEWS,v 1.1056 2006/12/17 20:36:26 tom Exp $
          ++-- $Id: NEWS,v 1.1186 2007/12/01 19:38:49 tom Exp $
          + -------------------------------------------------------------------------------
          + 
          + This is a log of changes that ncurses has gone through since Zeyd started
          +@@ -45,9 +45,504 @@
          + Changes through 1.9.9e did not credit all contributions;
          + it is not possible to add this information.
          + 
          ++20071201
          ++	+ add note about configure options needed for Berkeley database to the
          ++	  INSTALL file.
          ++	+ improve checks for version of Berkeley database libraries.
          ++	+ amend fix for rpath to not modify LDFLAGS if the platform has no
          ++	  applicable transformation (report by Christian Ebert, cf: 20071124).
          ++
          ++20071124
          ++	+ modify configure option --with-hashed-db to accept a parameter which
          ++	  is the install-prefix of a given Berkeley Database (prompted by
          ++	  pierre4d2 comments).
          ++	+ rewrite wrapper for wcrtomb(), making it work on Solaris.  This is
          ++	  used in the form library to determine the length of the buffer needed
          ++	  by field_buffer (report by Alfred Fung).
          ++	+ remove unneeded window-parameter from C++ binding for wresize (report
          ++	  by Chris Lee).
          ++
          ++20071117
          ++	+ modify the support for filesystems which do not support mixed-case to
          ++	  generate 2-character (hexadecimal) codes for the lower-level of the
          ++	  filesystem terminfo database (request by Michail Vidiassov).
          ++	+ add configure option --enable-mixed-case, to allow overriding the
          ++	  configure script's check if the filesystem supports mixed-case
          ++	  filenames.
          ++	+ add wresize() to C++ binding (request by Chris Lee).
          ++	+ define NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS in curses.h to make
          ++	  it simpler to tell if the extended functions and/or colors are
          ++	  declared.
          ++
          ++20071103
          ++	+ update memory-leak checks for changes to names.c and codes.c
          ++	+ correct acsc strings in h19, z100 (patch by Benjamin C W Sittler).
          ++
          ++20071020
          ++	+ continue implementing support for threading demo by adding mutex
          ++	  for use_window().
          ++	+ add mrxvt terminfo entry, add/fix xterm building blocks for modified
          ++	  cursor keys -TD
          ++	+ compile with FreeBSD "contemporary" TTY interface (patch by
          ++	  Rong-En Fan).
          ++
          ++20071013
          ++	+ modify makefile rules to allow clear, tput and tset to be built
          ++	  without libtic.  The other programs (infocmp, tic and toe) rely on
          ++	  that library.
          ++	+ add/modify null-pointer checks in several functions for SP and/or
          ++	  the WINDOW* parameter (report by Thorben Krueger).
          ++	+ fixes for field_buffer() in formw library (see Redhat Bugzilla
          ++	  #310071, patches by Miroslav Lichvar).
          ++	+ improve performance of NCURSES_CHAR_EQ code (patch by Miroslav
          ++	  Lichvar).
          ++	+ update/improve mlterm and rxvt terminfo entries, e.g., for
          ++	  the modified cursor- and keypad-keys -TD
          ++
          ++20071006
          ++	+ add code to curses.priv.h ifdef'd with NCURSES_CHAR_EQ, which
          ++	  changes the CharEq() macro to an inline function to allow comparing
          ++	  cchar_t struct's without comparing gaps in a possibly unpacked
          ++	  memory layout (report by Miroslav Lichvar).
          ++
          ++20070929
          ++	+ add new functions to lib_trace.c to setup mutex's for the _tracef()
          ++	  calls within the ncurses library.
          ++	+ for the reentrant model, move _nc_tputs_trace and _nc_outchars into
          ++	  the SCREEN.
          ++	+ start modifying test/worm.c to provide threading demo (incomplete).
          ++	+ separated ifdef's for some BSD-related symbols in tset.c, to make
          ++	  it compile on LynxOS (report by Greg Gemmer).
          ++20070915
          ++	+ modify Ada95/gen/Makefile to use shlib script, to simplify building
          ++	  shared-library configuration on platforms lacking rpath support.
          ++	+ build-fix for Ada95/src/Makefile to reflect changed dependency for
          ++	  the terminal-interface-curses-aux.adb file which is now generated.
          ++	+ restructuring test/worm.c, for use_window() example.
          ++
          ++20070908
          ++	+ add use_window() and use_screen() functions, to develop into support
          ++	  for threaded library (incomplete).
          ++	+ fix typos in man/curs_opaque.3x which kept the install script from
          ++	  creating symbolic links to two aliases created in 20070818 (report by
          ++	  Rong-En Fan).
          ++
          ++20070901
          ++	+ remove a spurious newline from output of html.m4, which caused links
          ++	  for Ada95 html to be incorrect for the files generated using m4.
          ++	+ start investigating mutex's for SCREEN manipulation (incomplete).
          ++	+ minor cleanup of codes.c/names.c for --enable-const
          ++	+ expand/revise "Routine and Argument Names" section of ncurses manpage
          ++	  to address report by David Givens in newsgroup discussion.
          ++	+ fix interaction between --without-progs/--with-termcap configure
          ++	  options (report by Michail Vidiassov).
          ++	+ fix typo in "--disable-relink" option (report by Michail Vidiassov).
          ++
          ++20070825
          ++	+ fix a sign-extension bug in infocmp's repair_acsc() function
          ++	  (cf: 971004).
          ++	+ fix old configure script bug which prevented "--disable-warnings"
          ++	  option from working (patch by Mike Frysinger).
          ++
          ++20070818
          ++	+ add 9term terminal description (request by Juhapekka Tolvanen) -TD
          ++	+ modify comp_hash.c's string output to avoid misinterpreting a null
          ++	  "\0" followed by a digit.
          ++	+ modify MKnames.awk and MKcodes.awk to support big-strings.
          ++	  This only applies to the cases (broken linker, reentrant) where
          ++	  the corresponding arrays are accessed via wrapper functions.
          ++	+ split MKnames.awk into two scripts, eliminating the shell redirection
          ++	  which complicated the make process and also the bogus timestamp file
          ++	  which was introduced to fix "make -j".
          ++	+ add test/test_opaque.c, test/test_arrays.c
          ++	+ add wgetscrreg() and wgetparent() for applications that may need it
          ++	  when NCURSES_OPAQUE is defined (prompted by Bryan Christ).
          ++
          ++20070812
          ++	+ amend treatment of infocmp "-r" option to retain the 1023-byte limit
          ++	  unless "-T" is given (cf: 981017).
          ++	+ modify comp_captab.c generation to use big-strings.
          ++	+ make _nc_capalias_table and _nc_infoalias_table private accessed via
          ++	  _nc_get_alias_table() since the tables are used only within the tic
          ++	  library.
          ++	+ modify configure script to skip Intel compiler in CF_C_INLINE.
          ++	+ make _nc_info_hash_table and _nc_cap_hash_table private accessed via
          ++	  _nc_get_hash_table() since the tables are used only within the tic
          ++	  library.
          ++
          ++20070728
          ++	+ make _nc_capalias_table and _nc_infoalias_table private, accessed via
          ++	  _nc_get_alias_table() since they are used only by parse_entry.c
          ++	+ make _nc_key_names private since it is used only by lib_keyname.c
          ++	+ add --disable-big-strings configure option to control whether
          ++	  unctrl.c is generated using the big-string optimization - which may
          ++	  use strings longer than supported by a given compiler.
          ++	+ reduce relocation tables for tic, infocmp by changing type of
          ++	  internal hash tables to short, and make those private symbols.
          ++	+ eliminate large fixed arrays from progs/infocmp.c
          ++
          ++20070721
          ++	+ change winnstr() to stop at the end of the line (cf: 970315).
          ++	+ add test/test_get_wstr.c
          ++	+ add test/test_getstr.c
          ++	+ add test/test_inwstr.c
          ++	+ add test/test_instr.c
          ++
          ++20070716
          ++	+ restore a call to obtain screen-size in _nc_setupterm(), which
          ++	  is used in tput and other non-screen applications via setupterm()
          ++	  (Debian #433357, reported by Florent Bayle, Christian Ohm,
          ++	  cf: 20070310).
          ++
          ++20070714
          ++	+ add test/savescreen.c test-program
          ++	+ add check to trace-file open, if the given name is a directory, add
          ++	  ".log" to the name and try again.
          ++	+ add konsole-256color entry -TD
          ++	+ add extra gcc warning options from xterm.
          ++	+ minor fixes for ncurses/hashmap test-program.
          ++	+ modify configure script to quiet c++ build with libtool when the
          ++	  --disable-echo option is used.
          ++	+ modify configure script to disable ada95 if libtool is selected,
          ++	  writing a warning message (addresses FreeBSD ports/114493).
          ++	+ update config.guess, config.sub
          ++
          ++20070707
          ++	+ add continuous-move "M" to demo_panels to help test refresh changes.
          ++	+ improve fix for refresh of window on top of multi-column characters,
          ++	  taking into account some split characters on left/right window
          ++	  boundaries.
          ++
          ++20070630
          ++	+ add "widec" row to _tracedump() output to help diagnose remaining
          ++	  problems with multi-column characters.
          ++	+ partial fix for refresh of window on top of multi-column characters
          ++	  which are partly overwritten (report by Sadrul H Chowdhury).
          ++	+ ignore A_CHARTEXT bits in vidattr() and vid_attr(), in case
          ++	  multi-column extension bits are passed there.
          ++	+ add setlocale() call to demo_panels.c, needed for wide-characters.
          ++	+ add some output flags to _nc_trace_ttymode to help diagnose a bug
          ++	  report by Larry Virden, i.e., ONLCR, OCRNL, ONOCR and ONLRET,
          ++
          ++20070623
          ++	+ add test/demo_panels.c
          ++	+ implement opaque version of setsyx() and getsyx().
          ++
          ++20070612
          ++	+ corrected xterm+pcf2 terminfo modifiers for F1-F4, to match xterm
          ++	  #226 -TD
          ++	+ split-out key_name() from MKkeyname.awk since it now depends upon
          ++	  wunctrl() which is not in libtinfo (report by Rong-En Fan).
          ++
          ++20070609
          ++	+ add test/key_name.c
          ++	+ add stdscr cases to test/inchs.c and test_inch_wide.c
          ++	+ update test/configure
          ++	+ correct formatting of DEL (0x7f) in _nc_vischar().
          ++	+ null-terminate result of wunctrl().
          ++	+ add null-pointer check in key_name() (report by Andreas Krennmair,
          ++	  cf: 20020901).
          ++
          ++20070602
          ++	+ adapt mouse-handling code from menu library in form-library
          ++	  (discussion with Clive Nicolson).
          ++	+ add a modification of test/dots.c, i.e., test/dots_mvcur.c to
          ++	  illustrate how to use mvcur().
          ++	+ modify wide-character flavor of SetAttr() to preserve the
          ++	  WidecExt() value stored in the .attr field, e.g., in case it
          ++	  is overwritten by chgat (report by Aleksi Torhamo).
          ++	+ correct buffer-size for _nc_viswbuf2n() (report by Aleksi Torhamo).
          ++	+ build-fixes for Solaris 2.6 and 2.7 (patch by Peter O'Gorman).
          ++
          ++20070526
          ++	+ modify keyname() to use "^X" form only if meta() has been called, or
          ++	  if keyname() is called without initializing curses, e.g., via
          ++	  initscr() or newterm() (prompted by LinuxBase #1604).
          ++	+ document some portability issues in man/curs_util.3x
          ++	+ add a shadow copy of TTY buffer to _nc_prescreen to fix applications
          ++	  broken by moving that data into SCREEN (cf: 20061230).
          ++
          ++20070512
          ++	+ add 'O' (wide-character panel test) in ncurses.c to demonstrate a
          ++	  problem reported by Sadrul H Chowdhury with repainting parts of
          ++	  a fullwidth cell.
          ++	+ modify slk_init() so that if there are preceding calls to
          ++	  ripoffline(), those affect the available lines for soft-keys (adapted
          ++	  from patch by Clive Nicolson).
          ++	+ document some portability issues in man/curs_getyx.3x
          ++
          ++20070505
          ++	+ fix a bug in Ada95/samples/ncurses which caused a variable to
          ++	  become uninitialized in the "b" test.
          ++	+ fix Ada95/gen/Makefile.in adahtml rule to account for recent
          ++	  movement of files, fix a few incorrect manpage references in the
          ++	  generated html.
          ++	+ add Ada95 binding to _nc_freeall() as Curses_Free_All to help with
          ++	  memory-checking.
          ++	+ correct some functions in Ada95 binding which were using return value
          ++	  from C where none was returned:  idcok(), immedok() and wtimeout().
          ++	+ amend recent changes for Ada95 binding to make it build with
          ++	  Cygwin's linker, e.g., with configure options
          ++		--enable-broken-linker --with-ticlib
          ++
          ++20070428
          ++	+ add a configure check for gcc's options for inlining, use that to
          ++	  quiet a warning message where gcc's default behavior changed from
          ++	  3.x to 4.x.
          ++	+ improve warning message when checking if GPM is linked to curses
          ++	  library by not warning if its use of "wgetch" is via a weak symbol.
          ++	+ add loader options when building with static libraries to ensure that
          ++	  an installed shared library for ncurses does not conflict.  This is
          ++	  reported as problem with Tru64, but could affect other platforms
          ++	  (report Martin Mokrejs, analysis by Tim Mooney).
          ++	+ fix build on cygwin after recent ticlib/termlib changes, i.e.,
          ++	  + adjust TINFO_SUFFIX value to work with cygwin's dll naming
          ++	  + revert a change from 20070303 which commented out dependency of
          ++	    SHLIB_LIST in form/menu/panel/c++ libraries.
          ++	+ fix initialization of ripoff stack pointer (cf: 20070421).
          ++
          ++20070421
          ++	+ move most static variables into structures _nc_globals and
          ++	  _nc_prescreen, to simplify storage.
          ++	+ add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding
          ++	  type for data manipulated by signal handlers (prompted by comments
          ++	  in mailing.openbsd.bugs newsgroup).
          ++	+ modify CF_WITH_LIBTOOL to allow one to pass options such as -static
          ++	  to the libtool create- and link-operations.
          ++
          ++20070414
          ++	+ fix whitespace in curs_opaque.3x which caused a spurious ';' in
          ++	  the installed aliases (report by Peter Santoro).
          ++	+ fix configure script to not try to generate adacurses-config when
          ++	  Ada95 tree is not built.
          ++
          ++20070407
          ++	+ add man/curs_legacy.3x, man/curs_opaque.3x
          ++	+ fix acs_map binding for Ada95 when --enable-reentrant is used.
          ++	+ add adacurses-config to the Ada95 install, based on version from
          ++	  FreeBSD port, in turn by Juergen Pfeifer in 2000 (prompted by
          ++	  comment on comp.lang.ada newsgroup).
          ++	+ fix includes in c++ binding to build with Intel compiler
          ++	  (cf: 20061209).
          ++	+ update install rule in Ada95 to use mkdirs.sh
          ++	> other fixes prompted by inspection for Coverity report:
          ++	+ modify ifdef's for c++ binding to use try/catch/throw statements
          ++	+ add a null-pointer check in tack/ansi.c request_cfss()
          ++	+ fix a memory leak in ncurses/base/wresize.c
          ++	+ corrected check for valid memu/meml capabilities in
          ++	  progs/dump_entry.c when handling V_HPUX case.
          ++	> fixes based on Coverity report:
          ++	+ remove dead code in test/bs.c
          ++	+ remove dead code in test/demo_defkey.c
          ++	+ remove an unused assignment in progs/infocmp.c
          ++	+ fix a limit check in tack/ansi.c tools_charset()
          ++	+ fix tack/ansi.c tools_status() to perform the VT320/VT420
          ++	  tests in request_cfss().  The function had exited too soon.
          ++	+ fix a memory leak in tic.c's make_namelist()
          ++	+ fix a couple of places in tack/output.c which did not check for EOF.
          ++	+ fix a loop-condition in test/bs.c
          ++	+ add index checks in lib_color.c for color palettes
          ++	+ add index checks in progs/dump_entry.c for version_filter() handling
          ++	  of V_BSD case.
          ++	+ fix a possible null-pointer dereference in copywin()
          ++	+ fix a possible null-pointer dereference in waddchnstr()
          ++	+ add a null-pointer check in _nc_expand_try()
          ++	+ add a null-pointer check in tic.c's make_namelist()
          ++	+ add a null-pointer check in _nc_expand_try()
          ++	+ add null-pointer checks in test/cardfile.c
          ++	+ fix a double-free in ncurses/tinfo/trim_sgr0.c
          ++	+ fix a double-free in ncurses/base/wresize.c
          ++	+ add try/catch block to c++/cursesmain.cc
          ++
          ++20070331
          ++	+ modify Ada95 binding to build with --enable-reentrant by wrapping
          ++	  global variables (bug: acs_map does not yet work).
          ++	+ modify Ada95 binding to use the new access-functions, allowing it
          ++	  to build/run when NCURSES_OPAQUE is set.
          ++	+ add access-functions and macros to return properties of the WINDOW
          ++	  structure, e.g., when NCURSES_OPAQUE is set.
          ++	+ improved install-sh's quoting.
          ++	+ use mkdirs.sh rather than mkinstalldirs, e.g., to use fixes from
          ++	  other programs.
          ++
          ++20070324
          ++	+ eliminate part of the direct use of WINDOW data from Ada95 interface.
          ++	+ fix substitutions for termlib filename to make configure option
          ++	  --enable-reentrant work with --with-termlib.
          ++	+ change a constructor for NCursesWindow to allow compiling with
          ++	  NCURSES_OPAQUE set, since we cannot pass a reference to
          ++	  an opaque pointer.
          ++
          ++20070317
          ++	+ ignore --with-chtype=unsigned since unsigned is always added to
          ++	  the type in curses.h; do the same for --with-mmask-t.
          ++	+ change warning regarding --enable-ext-colors and wide-character
          ++	  in the configure script to an error.
          ++	+ tweak error message in CF_WITH_LIBTOOL to distinguish other programs
          ++	  such as Darwin's libtool program (report by Michail Vidiassov)
          ++	+ modify edit_man.sh to allow for multiple substitutions per line.
          ++	+ set locale in misc/ncurses-config.in since it uses a range
          ++	+ change permissions libncurses++.a install (report by Michail
          ++	  Vidiassov).
          ++	+ corrected length of temporary buffer in wide-character version
          ++	  of set_field_buffer() (related to report by Bryan Christ).
          ++
          ++20070311
          ++	+ fix mk-1st.awk script install_shlib() function, broken in 20070224
          ++	  changes for cygwin (report by  Michail Vidiassov).
          ++
          ++20070310
          ++	+ increase size of array in _nc_visbuf2n() to make "tic -v" work
          ++	  properly in its similar_sgr() function (report/analysis by Peter
          ++	  Santoro).
          ++	+ add --enable-reentrant configure option for ongoing changes to
          ++	  implement a reentrant version of ncurses:
          ++	  + libraries are suffixed with "t"
          ++	  + wrap several global variables (curscr, newscr, stdscr, ttytype,
          ++	    COLORS, COLOR_PAIRS, COLS, ESCDELAY, LINES and TABSIZE) as
          ++	    functions returning values stored in SCREEN or cur_term.
          ++	  + move some initialization (LINES, COLS) from lib_setup.c,
          ++	    i.e., setupterm() to _nc_setupscreen(), i.e., newterm().
          ++
          ++20070303
          ++	+ regenerated html documentation.
          ++	+ add NCURSES_OPAQUE symbol to curses.h, will use to make structs
          ++	  opaque in selected configurations.
          ++	+ move the chunk in lib_acs.c which resets acs capabilities when
          ++	  running on a terminal whose locale interferes with those into
          ++	  _nc_setupscreen(), so the libtinfo/libtinfow files can be made
          ++	  identical (requested by Miroslav Lichvar).
          ++	+ do not use configure variable SHLIB_LIBS for building libraries
          ++	  outside the ncurses directory, since that symbol is customized
          ++	  only for that directory, and using it introduces an unneeded
          ++	  dependency on libdl (requested by Miroslav Lichvar).
          ++	+ modify mk-1st.awk so the generated makefile rules for linking or
          ++	  installing shared libraries do not first remove the library, in
          ++	  case it is in use, e.g., libncurses.so by /bin/sh (report by Jeff
          ++	  Chua).
          ++	+ revised section "Using NCURSES under XTERM" in ncurses-intro.html
          ++	  (prompted by newsgroup comment by Nick Guenther).
          ++
          ++20070224
          ++	+ change internal return codes of _nc_wgetch() to check for cases
          ++	  where KEY_CODE_YES should be returned, e.g., if a KEY_RESIZE was
          ++	  ungetch'd, and read by wget_wch().
          ++	+ fix static-library build broken in 20070217 changes to remove "-ldl"
          ++	  (report by Miroslav Lichvar).
          ++	+ change makefile/scripts for cygwin to allow building termlib.
          ++	+ use Form_Hook in manpages to match form.h
          ++	+ use Menu_Hook in manpages, as well as a few places in menu.h
          ++	+ correct form- and menu-manpages to use specific Field_Options,
          ++	  Menu_Options and Item_Options types.
          ++	+ correct prototype for _tracechar() in manpage (cf: 20011229).
          ++	+ correct prototype for wunctrl() in manpage.
          ++
          ++20070217
          ++	+ fixes for $(TICS_LIST) in ncurses/Makefile (report by Miroslav
          ++	  Lichvar).
          ++	+ modify relinking of shared libraries to apply only when rpath is
          ++	  enabled, and add --disable-relink option which can be used to
          ++	  disable the feature altogether (reports by Michail Vidiassov,
          ++	  Adam J Richter).
          ++	+ fix --with-termlib option for wide-character configuration, stripping
          ++	  the "w" suffix in one place (report by Miroslav Lichvar).
          ++	+ remove "-ldl" from some library lists to reduce dependencies in
          ++	  programs (report by Miroslav Lichvar).
          ++	+ correct description of --enable-signed-char in configure --help
          ++	  (report by Michail Vidiassov).
          ++	+ add pattern for GNU/kFreeBSD configuration to CF_XOPEN_SOURCE,
          ++	  which matches an earlier change to CF_SHARED_OPTS, from xterm #224
          ++	  fixes.
          ++	+ remove "${DESTDIR}" from -install_name option used for linking
          ++	  shared libraries on Darwin (report by Michail Vidiassov).
          ++
          ++20070210
          ++	+ add test/inchs.c, test_inch_wide.c, to test win_wchnstr().
          ++	+ remove libdl from library list for termlib (report by Miroslav
          ++	  Lichvar).
          ++	+ fix configure.in to allow --without-progs --with-termlib (patch by
          ++	  Miroslav Lichvar).
          ++	+ modify win_wchnstr() to ensure that only a base cell is returned
          ++	  for each multi-column character (prompted by report by Wei Kong
          ++	  regarding change in mvwin_wch() cf: 20041023).
          ++
          ++20070203
          ++	+ modify fix_wchnstr() in form library to strip attributes (and color)
          ++	  from the cchar_t array (field cells) read from a field's window.
          ++	  Otherwise, when copying the field cells back to the window, the
          ++	  associated color overrides the field's background color (report by
          ++	  Ricardo Cantu).
          ++	+ improve tracing for form library, showing created forms, fields, etc.
          ++	+ ignore --enable-rpath configure option if --with-shared was omitted.
          ++	+ add _nc_leaks_tinfo(), _nc_free_tic(), _nc_free_tinfo() entrypoints
          ++	  to allow leak-checking when both tic- and tinfo-libraries are built.
          ++	+ drop CF_CPP_VSCAN_FUNC macro from configure script, since C++ binding
          ++	  no longer relies on it.
          ++	+ disallow combining configure script options --with-ticlib and
          ++	  --enable-termcap (report by Rong-En Fan).
          ++	+ remove tack from ncurses tree.
          ++
          ++20070128
          ++	+ fix typo in configure script that broke --with-termlib option
          ++	  (report by Rong-En Fan).
          ++
          ++20070127
          ++	+ improve fix for FreeBSD gnu/98975, to allow for null pointer passed
          ++	  to tgetent() (report by Rong-en Fan).
          ++	+ update tack/HISTORY and tack/README to tell how to build it after
          ++	  it is removed from the ncurses tree.
          ++	+ fix configure check for libtool's version to trim blank lines
          ++	  (report by sci-fi@hush.ai).
          ++	+ review/eliminate other original-file artifacts in cursesw.cc, making
          ++	  its license consistent with ncurses.
          ++	+ use ncurses vw_scanw() rather than reading into a fixed buffer in
          ++	  the c++ binding for scanw() methods (prompted by report by Nuno Dias).
          ++	+ eliminate fixed-buffer vsprintf() calls in c++ binding.
          ++
          ++20070120
          ++	+ add _nc_leaks_tic() to separate leak-checking of tic library from
          ++	  term/ncurses libraries, and thereby eliminate a library dependency.
          ++	+ fix test/mk-test.awk to ignore blank lines.
          ++	+ correct paths in include/headers, for --srcdir (patch by Miroslav
          ++	  Lichvar).
          ++
          ++20070113
          ++	+ add a break-statement in misc/shlib to ensure that it exits on the
          ++	  _first_ matched directory (report by Paul Novak).
          ++	+ add tack/configure, which can be used to build tack outside the
          ++	  ncurses build-tree.
          ++	+ add --with-ticlib option, to build/install the tic-support functions
          ++	  in a separate library (suggested by Miroslav Lichvar).
          ++
          ++20070106
          ++	+ change MKunctrl.awk to reduce relocation table for unctrl.o
          ++	+ change MKkeyname.awk to reduce relocation table for keyname.o
          ++	  (patch by Miroslav Lichvar).
          ++
          ++20061230
          ++	+ modify configure check for libtool's version to trim blank lines
          ++	  (report by sci-fi@hush.ai).
          ++	+ modify some modules to allow them to be reentrant if _REENTRANT is
          ++	  defined: lib_baudrate.c, resizeterm.c (local data only)
          ++	+ eliminate static data from some modules: add_tries.c, hardscroll.c,
          ++	  lib_ttyflags.c, lib_twait.c
          ++	+ improve manpage install to add aliases for the transformed program
          ++	  names, e.g., from --program-prefix.
          ++	+ used linklint to verify links in the HTML documentation, made fixes
          ++	  to manpages as needed.
          ++	+ fix a typo in curs_mouse.3x (report by William McBrine).
          ++	+ fix install-rule for ncurses5-config to make the bin-directory.
          ++
          ++20061223
          ++	+ modify configure script to omit the tic (terminfo compiler) support
          ++	  from ncurses library if --without-progs option is given.
          ++	+ modify install rule for ncurses5-config to do this via "install.libs"
          ++	+ modify shared-library rules to allow FreeBSD 3.x to use rpath.
          ++	+ update config.guess, config.sub
          ++
          + 20061217 5.6 release for upload to ftp.gnu.org
          + 
          +-20061217 
          ++20061217
          + 	+ add ifdef's for  for HPUX, which has the corresponding
          + 	  definitions in .
          + 	+ revert the va_copy() change from 20061202, since it was neither
          +@@ -62,7 +557,7 @@
          + 	+ modify configure --with-gpm option to allow it to accept a parameter,
          + 	  i.e., the name of the dynamic GPM library to load via dlopen()
          + 	  (requested by Bryan Henderson).
          +-	+ add configure option --with-valgrind (from vile).
          ++	+ add configure option --with-valgrind, changes from vile.
          + 	+ modify configure script AC_TRY_RUN and AC_TRY_LINK checks to use
          + 	  'return' in preference to 'exit()'.
          + 
          +@@ -1524,7 +2019,8 @@
          + 20031108
          + 	+ add DJGPP to special case of DOS-style drive letters potentially
          + 	  appearing in TERMCAP environment variable.
          +-	+ fix some spelling in comments (reports by jmc, Jonathon Gray).
          ++	+ fix some spelling in comments (reports by Jason McIntyre, Jonathon
          ++	  Gray).
          + 	+ update config.guess, config.sub
          + 
          + 20031101
          +@@ -1814,7 +2310,7 @@
          + 	  "--srcdir" work (report by Warren L Dodge).
          + 	+ correct missing definition of $(CC) in Ada95/gen/Makefile.in
          + 	  (reported by Warren L Dodge ).
          +-	+ fix typos and whitespace in manpages (patch by jmc
          ++	+ fix typos and whitespace in manpages (patch by Jason McIntyre
          + 	  ).
          + 
          + 20030503
          +@@ -3449,7 +3945,7 @@
          + 
          + 20000923
          + 	+ modify rs2 capability in xterm-r6 and similar where cursor
          +-	  save/restore bracketed the sequence for resetting video attributes. 
          ++	  save/restore bracketed the sequence for resetting video attributes.
          + 	  The cursor restore would undo that (report by John Hawkinson
          + 	   (see NetBSD misc/11052)).
          + 	+ using parameter check added to tic, corrected 27 typos in
          +@@ -4266,7 +4762,7 @@
          + 	  )).
          + 	+ change renaming of dft_fgbg.3x to use_default_colors.3ncurses in
          + 	  man_db.renames, since Debian is not concerned with 14-character
          +-	  filename limitation (from Debian bug report by Josip Rodin
          ++	  filename limitation (Debian bug report by Josip Rodin
          + 	  ).
          + 	+ corrected scoansi terminfo entry by testing with scoterm and console.
          + 	+ revert change from 990614 to terminal_interface-curses-forms.ads.m4,
          +@@ -5309,7 +5805,7 @@
          + 
          + 980321
          + 	+ revise configure macro CF_SPEED_TYPE so that termcap.h has speed_t
          +-	  declared (from Adam J. Richter )
          ++	  declared (from Adam J Richter )
          + 	+ remove spurious curs_set() call from leaveok() (J T Conklin).
          + 	+ corrected handling leaveok() in doupdate() (patch by Alexander V.
          + 	  Lukyanov).
          +Index: TO-DO
          +Prereq:  1.48 
          +--- ncurses-5.6/TO-DO	2006-10-28 19:49:16.000000000 +0000
          ++++ ncurses-5.6-20071201/TO-DO	2007-02-03 16:29:17.000000000 +0000
          +@@ -1,5 +1,5 @@
          + -------------------------------------------------------------------------------
          +--- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.               --
          ++-- Copyright (c) 1998-2006,2007 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             --
          +@@ -25,7 +25,7 @@
          + -- sale, use or other dealings in this Software without prior written        --
          + -- authorization.                                                            --
          + -------------------------------------------------------------------------------
          +--- $Id: TO-DO,v 1.48 2006/10/28 19:49:16 tom Exp $
          ++-- $Id: TO-DO,v 1.49 2007/02/03 16:29:17 tom Exp $
          + -------------------------------------------------------------------------------
          + 
          + SHORT-TERM TO-DO ITEMS:
          +@@ -58,9 +58,6 @@
          + + The window classes defined in the c++ subdirectory need documentation.  Some
          +   C++ programmer could earn a lot of good karma by doing this...
          + 
          +-+ The resizeterm() function does not handle ripped-off lines such as that done
          +-  for the slk_XXX functions.
          +-
          + + vid_attr() should support the set_a_attributes (sgr1) string, but does not. 
          +   There appear to be no terminals that require that functionality.
          + 
          +@@ -75,19 +72,19 @@
          +   ncurses/tty/lib_tstp.c .
          + 
          + + In theory, vwprintw and vwscanf are supposed to use the older varargs.h
          +-  interface for handling variadic argument lists.  Linux doesn't have
          +-  varargs.h, it has the newer X/Open-standard stdargs.h equivalent.  So these
          +-  functions use stdargs instead.  This is unlikely to be a problem unless
          +-  you're building ncurses on a System V old enough to only have varargs.h. 
          +-  (Solaris 2.5.1 uses the stdarg.h binding as well).
          ++  interface for handling variadic argument lists (and are deprecated by X/Open
          ++  for that reason).  Linux doesn't have varargs.h, it has the newer
          ++  X/Open-standard stdargs.h equivalent.  So these functions use stdargs
          ++  instead.  This is unlikely to be a problem unless you're building ncurses on
          ++  a System V old enough to only have varargs.h.  (Solaris 2.5.1 used the
          ++  stdarg.h binding as well).
          + 
          + + If you're using a BSD earlier than 4.4BSD, or a Linux old enough not to have
          +   a native vsscanf(3) in its library, vwscanw() will not work.  You lose.  (It
          +   should work on any System V, however).  If you want to fix this, add an
          +   implementation to ncurses/vsscanf.c.
          + 
          +-+ The C++ binding fails to build with a few C++ compilers, mainly with
          +-  configure script problems with vsscanf().
          +++ The C++ binding fails to build with a few C++ compilers.
          + 
          + + terminfo.5 does not format with the SunOS (and most other platform's) tbl
          +   utility because it relies on a diversion for each table entry.  Get the
          +@@ -106,7 +103,7 @@
          + 
          + 1. Extended COSE conformance
          + 
          +-There is an XPG4 standard recently released which describes a superset
          ++There is an XPG4 standard released in 1996 which describes a superset
          + of the SVr4 API.  The library is BASE conformant with this standard.
          + We would like to make ncurses fully conformant at the EXTENDED level
          + supporting internationalization.
          +Index: aclocal.m4
          +Prereq:  1.407 
          +--- ncurses-5.6/aclocal.m4	2006-12-17 16:12:38.000000000 +0000
          ++++ ncurses-5.6-20071201/aclocal.m4	2007-12-01 20:02:42.000000000 +0000
          +@@ -1,5 +1,5 @@
          + dnl***************************************************************************
          +-dnl Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          ++dnl Copyright (c) 1998-2006,2007 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,7 +28,7 @@
          + dnl
          + dnl Author: Thomas E. Dickey 1995-on
          + dnl
          +-dnl $Id: aclocal.m4,v 1.407 2006/12/17 16:12:38 tom Exp $
          ++dnl $Id: aclocal.m4,v 1.442 2007/12/01 20:02:42 tom Exp $
          + dnl Macros used in NCURSES auto-configuration script.
          + dnl
          + dnl These macros are maintained separately from NCURSES.  The copyright on
          +@@ -168,6 +168,99 @@
          + 
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          ++dnl CF_ADD_INCDIR version: 8 updated: 2007/07/30 19:22:58
          ++dnl -------------
          ++dnl Add an include-directory to $CPPFLAGS.  Don't add /usr/include, since it's
          ++dnl redundant.  We don't normally need to add -I/usr/local/include for gcc,
          ++dnl but old versions (and some misinstalled ones) need that.  To make things
          ++dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to
          ++dnl the include-path).
          ++AC_DEFUN([CF_ADD_INCDIR],
          ++[
          ++if test -n "$1" ; then
          ++  for cf_add_incdir in $1
          ++  do
          ++	while test $cf_add_incdir != /usr/include
          ++	do
          ++	  if test -d $cf_add_incdir
          ++	  then
          ++		cf_have_incdir=no
          ++		if test -n "$CFLAGS$CPPFLAGS" ; then
          ++		  # a loop is needed to ensure we can add subdirs of existing dirs
          ++		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
          ++			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
          ++			  cf_have_incdir=yes; break
          ++			fi
          ++		  done
          ++		fi
          ++
          ++		if test "$cf_have_incdir" = no ; then
          ++          if test "$cf_add_incdir" = /usr/local/include ; then
          ++			if test "$GCC" = yes
          ++			then
          ++			  cf_save_CPPFLAGS=$CPPFLAGS
          ++			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
          ++			  AC_TRY_COMPILE([#include ],
          ++				  [printf("Hello")],
          ++				  [],
          ++				  [cf_have_incdir=yes])
          ++			  CPPFLAGS=$cf_save_CPPFLAGS
          ++			fi
          ++		  fi
          ++		fi
          ++
          ++		if test "$cf_have_incdir" = no ; then
          ++		  AC_VERBOSE(adding $cf_add_incdir to include-path)
          ++		  ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
          ++
          ++          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
          ++          test "$cf_top_incdir" = "$cf_add_incdir" && break
          ++          cf_add_incdir="$cf_top_incdir"
          ++		else
          ++		  break
          ++		fi
          ++	  fi
          ++	done
          ++  done
          ++fi
          ++])dnl
          ++dnl ---------------------------------------------------------------------------
          ++dnl CF_ADD_LIBDIR version: 5 updated: 2007/07/30 19:12:03
          ++dnl -------------
          ++dnl	Adds to the library-path
          ++dnl
          ++dnl	Some machines have trouble with multiple -L options.
          ++dnl
          ++dnl $1 is the (list of) directory(s) to add
          ++dnl $2 is the optional name of the variable to update (default LDFLAGS)
          ++dnl
          ++AC_DEFUN([CF_ADD_LIBDIR],
          ++[
          ++if test -n "$1" ; then
          ++  for cf_add_libdir in $1
          ++  do
          ++    if test $cf_add_libdir = /usr/lib ; then
          ++      :
          ++    elif test -d $cf_add_libdir
          ++    then
          ++      cf_have_libdir=no
          ++      if test -n "$LDFLAGS$LIBS" ; then
          ++        # a loop is needed to ensure we can add subdirs of existing dirs
          ++        for cf_test_libdir in $LDFLAGS $LIBS ; do
          ++          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
          ++            cf_have_libdir=yes; break
          ++          fi
          ++        done
          ++      fi
          ++      if test "$cf_have_libdir" = no ; then
          ++        AC_VERBOSE(adding $cf_add_libdir to library-path)
          ++        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"
          ++      fi
          ++    fi
          ++  done
          ++fi
          ++])dnl
          ++dnl ---------------------------------------------------------------------------
          + dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
          + dnl ----------------
          + dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
          +@@ -612,6 +705,50 @@
          + 
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          ++dnl CF_CHECK_GPM_WGETCH version: 1 updated: 2007/04/28 14:38:06
          ++dnl -------------------
          ++dnl Check if GPM is already linked with curses.  If so - and if the linkage
          ++dnl is not "weak" - warn about this because it can create problems linking
          ++dnl applications with ncurses.
          ++AC_DEFUN([CF_CHECK_GPM_WGETCH],[
          ++AC_CHECK_LIB(gpm,Gpm_Wgetch,[
          ++
          ++AC_CACHE_CHECK(if GPM is weakly bound to curses library, cf_cv_check_gpm_wgetch,[
          ++cf_cv_check_gpm_wgetch=unknown
          ++if test "$cross_compiling" != yes ; then
          ++
          ++cat >conftest.$ac_ext <
          ++int main()
          ++{
          ++	Gpm_Wgetch();
          ++	${cf_cv_main_return:-return}(0);
          ++}
          ++CF_EOF
          ++
          ++	cf_save_LIBS="$LIBS"
          ++	# This only works if we can look at the symbol table.  If a shared
          ++	# library is stripped for install, we cannot use that.  So we're forced
          ++	# to rely on the static library, noting that some packagers may not
          ++	# include it.
          ++	LIBS="-static -lgpm -dynamic $LIBS"
          ++	if AC_TRY_EVAL(ac_compile) ; then
          ++		if AC_TRY_EVAL(ac_link) ; then
          ++			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\' | egrep '\<[[vVwW]]\>'`
          ++			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
          ++			test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
          ++		fi
          ++	fi
          ++	rm -f conftest*
          ++	LIBS="$cf_save_LIBS"
          ++fi
          ++])
          ++
          ++if test "$cf_cv_check_gpm_wgetch" != yes ; then
          ++	AC_MSG_WARN(GPM library is already linked with curses - read the FAQ)
          ++fi
          ++])])dnl
          ++dnl ---------------------------------------------------------------------------
          + dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18
          + dnl -----------------
          + dnl Check if the C++ compiler accepts duplicate parameter initialization.  This
          +@@ -703,82 +840,36 @@
          + test "$cf_cv_cpp_static_cast" = yes && AC_DEFINE(CPP_HAS_STATIC_CAST)
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_CPP_VSCAN_FUNC version: 5 updated: 2001/12/02 01:39:28
          +-dnl -----------------
          +-dnl Check if the g++ compiler supports vscan function (not a standard feature).
          +-AC_DEFUN([CF_CPP_VSCAN_FUNC],
          +-[
          +-if test -n "$CXX"; then
          +-
          +-AC_LANG_SAVE
          +-AC_LANG_CPLUSPLUS
          +-AC_CHECK_HEADERS(strstream.h)
          +-
          +-AC_CACHE_CHECK(if $CXX supports vscan function,cf_cv_cpp_vscan_func,[
          +-	for cf_vscan_func in strstream strstream_cast stdio
          +-	do
          +-	case $cf_vscan_func in #(vi
          +-	stdio)		cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
          +-	strstream)	cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
          +-	strstream_cast)	cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
          +-	esac
          +-	AC_TRY_LINK([
          +-#include 
          +-#include 
          +-#define $cf_vscan_defs 1
          +-#if defined(USE_STDIO_VSCAN)
          +-#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
          +-#include 
          +-#endif
          +-
          +-int scanw(const char* fmt, ...)
          +-{
          +-    int result = -1;
          +-    char buf[BUFSIZ];
          +-
          +-    va_list args;
          +-    va_start(args, fmt);
          +-#if defined(USE_STDIO_VSCAN)
          +-    if (::vsscanf(buf, fmt, args) != -1)
          +-	result = 0;
          +-#elif defined(USE_STRSTREAM_VSCAN)
          +-    strstreambuf ss(buf, sizeof(buf));
          +-    if (ss.vscan(fmt, args) != -1)
          +-	result = 0;
          +-#elif defined(USE_STRSTREAM_VSCAN_CAST)
          +-    strstreambuf ss(buf, sizeof(buf));
          +-    if (ss.vscan(fmt, (_IO_va_list)args) != -1)
          +-	result = 0;
          +-#else
          +-#error case $cf_vscan_func failed
          +-#endif
          +-    va_end(args);
          +-    return result;
          +-}
          +-],[int tmp, foo = scanw("%d", &tmp)],
          +-	[cf_cv_cpp_vscan_func=$cf_vscan_func; break],
          +-	[cf_cv_cpp_vscan_func=no])
          +-	test "$cf_cv_cpp_vscan_func" != no && break
          +-	done
          +-])
          +-
          +-AC_LANG_RESTORE
          ++dnl CF_C_INLINE version: 2 updated: 2007/08/11 14:09:50
          ++dnl -----------
          ++dnl Check if the C compiler supports "inline".
          ++dnl $1 is the name of a shell variable to set if inline is supported
          ++dnl $2 is the threshold for gcc 4.x's option controlling maximum inline size
          ++AC_DEFUN([CF_C_INLINE],[
          ++AC_C_INLINE
          ++$1=
          ++if test "$ac_cv_c_inline" != no ; then
          ++  $1=inline
          ++  if test "$INTEL_COMPILER" = yes
          ++  then
          ++    :
          ++  elif test "$GCC" = yes
          ++  then
          ++    AC_CACHE_CHECK(if gcc supports options to tune inlining,cf_cv_gcc_inline,[
          ++      cf_save_CFLAGS=$CFLAGS
          ++      CFLAGS="$CFLAGS --param max-inline-insns-single=$2"
          ++      AC_TRY_COMPILE([inline int foo(void) { return 1; }],
          ++      [${cf_cv_main_return:-return} foo()],
          ++      [cf_cv_gcc_inline=yes],
          ++      [cf_cv_gcc_inline=no])
          ++      CFLAGS=$cf_save_CFLAGS
          ++    ])
          ++    if test "$cf_cv_gcc_inline" = yes ; then
          ++        CF_ADD_CFLAGS([--param max-inline-insns-single=$2])
          ++    fi
          ++  fi
          + fi
          +-
          +-case $cf_cv_cpp_vscan_func in #(vi
          +-stdio) #(vi
          +-	AC_DEFINE(CPP_HAS_VSCAN_FUNC)
          +-	AC_DEFINE(USE_STDIO_VSCAN)
          +-	;;
          +-strstream)
          +-	AC_DEFINE(CPP_HAS_VSCAN_FUNC)
          +-	AC_DEFINE(USE_STRSTREAM_VSCAN)
          +-	;;
          +-strstream_cast)
          +-	AC_DEFINE(CPP_HAS_VSCAN_FUNC)
          +-	AC_DEFINE(USE_STRSTREAM_VSCAN_CAST)
          +-	;;
          +-esac
          ++AC_SUBST($1)
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          + dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
          +@@ -1070,7 +1161,7 @@
          + 
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_GCC_ATTRIBUTES version: 10 updated: 2005/05/28 13:16:28
          ++dnl CF_GCC_ATTRIBUTES version: 11 updated: 2007/07/29 09:55:12
          + dnl -----------------
          + dnl Test for availability of useful gcc __attribute__ directives to quiet
          + dnl compiler warnings.  Though useful, not all are supported -- and contrary
          +@@ -1097,7 +1188,7 @@
          + then
          + 	AC_CHECKING([for $CC __attribute__ directives])
          + cat > conftest.$ac_ext < conftest.$ac_ext <$cf_dir/Makefile.out
          + 		mv $cf_dir/Makefile.out $cf_dir/Makefile
          +@@ -1968,13 +2129,20 @@
          + 				case $cf_subset in
          + 				*base*)
          + 					;;
          +-				termlib*)
          ++				*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
          +-				;;
          ++					;;
          ++				ticlib*)
          ++					cf_libname=$TICS_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
          + 
          +@@ -2015,8 +2183,11 @@
          + 				prefix=$cf_prefix \
          + 				suffix=$cf_suffix \
          + 				subset=$cf_subset \
          ++				TermlibRoot=$TINFO_NAME \
          ++				TermlibSuffix=$TINFO_SUFFIX \
          + 				ShlibVer=$cf_cv_shlib_version \
          + 				ShlibVerInfix=$cf_cv_shlib_version_infix \
          ++				ReLink=${cf_cv_do_relink-no} \
          + 				DoLinks=$cf_cv_do_symlinks \
          + 				rmSoLocs=$cf_cv_rm_so_locs \
          + 				ldconfig="$LDCONFIG" \
          +@@ -2103,8 +2274,8 @@
          + 
          + cat >> Makefile <>$cf_dir/Makefile <>$cf_dir/Makefile
          +-			j=$i
          +-		done
          +-
          +-		echo "		$j" >>$cf_dir/Makefile
          +-
          +-		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
          +-		do
          +-			echo "	@ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile
          +-			test $i = curses.h && test $WITH_CURSES_H = yes && echo "	@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h && \${LN_S} curses.h ncurses.h)" >>$cf_dir/Makefile
          +-		done
          +-
          +-	cat >>$cf_dir/Makefile <>$cf_dir/Makefile
          +-			test $i = curses.h && echo "	-@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile
          +-		done
          ++		$AWK -f $srcdir/mk-hdr.awk \
          ++			subset="$LIB_SUBSETS" \
          ++			compat="$WITH_CURSES_H" \
          ++			$srcdir/$cf_dir/headers >>$cf_dir/Makefile
          + 	fi
          + 
          + 	if test -f $srcdir/$cf_dir/modules; then
          +@@ -2776,7 +2916,7 @@
          + AC_MSG_RESULT($MANPAGE_TBL)
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_MAN_PAGES version: 31 updated: 2006/12/09 12:27:08
          ++dnl CF_MAN_PAGES version: 35 updated: 2007/03/31 11:47:29
          + dnl ------------
          + dnl Try to determine if the man-pages on the system are compressed, and if
          + dnl so, what format is used.  Use this information to construct a script that
          +@@ -2826,6 +2966,7 @@
          + esac
          + 
          + cf_edit_man=./edit_man.sh
          ++cf_man_alias=`pwd`/man_alias.sed
          + 
          + cat >$cf_edit_man <>$cf_man_alias <<-CF_EOF2
          ++		s,@DATADIR@,\$datadir,g
          ++		s,@TERMINFO@,\$TERMINFO,g
          ++		s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
          ++		s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
          ++		s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
          ++		s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
          ++CF_EOF
          ++	ifelse($1,,,[
          ++	for cf_name in $1
          ++	do
          ++		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
          ++		cf_name=`echo $cf_name|sed "$program_transform_name"`
          ++cat >>$cf_edit_man <<-CF_EOF
          ++		s,@$cf_NAME@,$cf_name,
          ++CF_EOF
          ++	done
          ++	])
          ++cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <&AC_FD_CC
          ++echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          + dnl CF_NCURSES_ABI_6 version: 1 updated: 2005/09/17 18:42:49
          +@@ -3680,7 +3828,73 @@
          + 		-e 's/-[[UD]]$3\(=[[^ 	]]*\)\?[$]//g'`
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_SHARED_OPTS version: 41 updated: 2006/12/09 12:32:00
          ++dnl CF_REMOVE_LIB version: 1 updated: 2007/02/17 14:11:52
          ++dnl -------------
          ++dnl Remove the given library from the symbol
          ++dnl
          ++dnl $1 = target (which could be the same as the source variable)
          ++dnl $2 = source (including '$')
          ++dnl $3 = library to remove
          ++define([CF_REMOVE_LIB],
          ++[
          ++# remove $3 library from $2
          ++$1=`echo "$2" | sed -e 's/-l$3[[ 	]]//g' -e 's/-l$3[$]//'`
          ++])dnl
          ++dnl ---------------------------------------------------------------------------
          ++dnl CF_RPATH_HACK version: 3 updated: 2007/12/01 11:14:13
          ++dnl -------------
          ++AC_DEFUN([CF_RPATH_HACK],
          ++[
          ++AC_REQUIRE([CF_SHARED_OPTS])
          ++AC_MSG_CHECKING(for updated LDFLAGS)
          ++if test -n "$LDFLAGS" ; then
          ++AC_MSG_RESULT(maybe)
          ++CF_VERBOSE(...checking LDFLAGS $LDFLAGS)
          ++CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
          ++case "$EXTRA_LDFLAGS" in #(vi
          ++-Wl,-rpath,*) #(vi
          ++    cf_rpath_hack="-Wl,-rpath,"
          ++    ;;
          ++-R\ *)
          ++    cf_rpath_hack="-R "
          ++    ;;
          ++-R*)
          ++    cf_rpath_hack="-R"
          ++    ;;
          ++*)
          ++    cf_rpath_hack=
          ++    ;;
          ++esac
          ++if test -n "$cf_rpath_hack" ; then
          ++    cf_rpath_dst=
          ++    for cf_rpath_src in $LDFLAGS
          ++    do
          ++        CF_VERBOSE(Filtering $cf_rpath_src)
          ++        case $cf_rpath_src in #(vi
          ++        -L*) #(vi
          ++            if test "$cf_rpath_hack" = "-R " ; then
          ++                cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
          ++            else
          ++                cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
          ++            fi
          ++            CF_VERBOSE(...Filter $cf_rpath_tmp)
          ++            EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
          ++            ;;
          ++        *)
          ++            cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
          ++            ;;
          ++        esac
          ++    done
          ++    LDFLAGS=$cf_rpath_dst
          ++    CF_VERBOSE(...checked LDFLAGS $LDFLAGS)
          ++    CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
          ++fi
          ++else
          ++AC_MSG_RESULT(no)
          ++fi
          ++])dnl
          ++dnl ---------------------------------------------------------------------------
          ++dnl CF_SHARED_OPTS version: 46 updated: 2007/02/24 18:58:09
          + dnl --------------
          + dnl --------------
          + dnl Attempt to determine the appropriate CC/LD options for creating a shared
          +@@ -3757,14 +3971,27 @@
          + 		;;
          + 	cygwin*)
          + 		CC_SHARED_OPTS=
          +-		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
          ++		MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
          + 		cf_cv_shlib_version=cygdll
          + 		cf_cv_shlib_version_infix=cygdll
          ++		cat >mk_shared_lib.sh <<-CF_EOF
          ++		#!/bin/sh
          ++		SHARED_LIB=\[$]1
          ++		IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
          ++		shift
          ++		cat <<-EOF
          ++		Linking shared library
          ++		** SHARED_LIB \[$]SHARED_LIB
          ++		** IMPORT_LIB \[$]IMPORT_LIB
          ++EOF
          ++		exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
          ++CF_EOF
          ++		chmod +x mk_shared_lib.sh 
          + 		;;
          + 	darwin*)
          + 		EXTRA_CFLAGS="-no-cpp-precomp"
          + 		CC_SHARED_OPTS="-dynamic"
          +-		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
          ++		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
          + 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
          + 		cf_cv_shlib_version_infix=yes
          + 		AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
          +@@ -3818,11 +4045,11 @@
          + 		CF_SHARED_SONAME
          + 		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $[@]'
          + 		;;
          +-	openbsd2*)
          ++	openbsd[[2-9]].*)
          + 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
          + 		MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $[@].${ABI_VERSION}` -o $[@]'
          + 		;;
          +-	openbsd*|freebsd[[23]]*)
          ++	openbsd*|freebsd[[12]].*)
          + 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
          + 		MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
          + 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
          +@@ -4043,6 +4270,41 @@
          + fi
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          ++dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12
          ++dnl ---------------
          ++dnl signal handler, but there are some gcc depedencies in that recommendation.
          ++dnl Try anyway.
          ++AC_DEFUN([CF_SIG_ATOMIC_T],
          ++[
          ++AC_MSG_CHECKING(for signal global datatype)
          ++AC_CACHE_VAL(cf_cv_sig_atomic_t,[
          ++	for cf_type in \
          ++		"volatile sig_atomic_t" \
          ++		"sig_atomic_t" \
          ++		"int"
          ++	do
          ++	AC_TRY_COMPILE([
          ++#include 
          ++#include 
          ++#include 
          ++
          ++extern $cf_type x;
          ++$cf_type x;
          ++static void handler(int sig)
          ++{
          ++	x = 5;
          ++}],
          ++		[signal(SIGINT, handler);
          ++		 x = 1],
          ++		[cf_cv_sig_atomic_t=$cf_type],
          ++		[cf_cv_sig_atomic_t=no])
          ++		test "$cf_cv_sig_atomic_t" != no && break
          ++	done
          ++	])
          ++AC_MSG_RESULT($cf_cv_sig_atomic_t)
          ++test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t)
          ++])dnl
          ++dnl ---------------------------------------------------------------------------
          + dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16
          + dnl -------------
          + dnl Check for definitions & structures needed for window size-changing
          +@@ -4503,11 +4765,12 @@
          + $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14
          ++dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
          + dnl ----------
          + dnl Use AC_VERBOSE w/o the warnings
          + AC_DEFUN([CF_VERBOSE],
          + [test -n "$verbose" && echo "	$1" 1>&AC_FD_MSG
          ++CF_MSG_LOG([$1])
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          + dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20
          +@@ -4643,7 +4906,7 @@
          + fi
          + ])
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_WITH_LIBTOOL version: 10 updated: 2006/10/14 15:23:15
          ++dnl CF_WITH_LIBTOOL version: 18 updated: 2007/04/08 20:02:38
          + dnl ---------------
          + dnl Provide a configure option to incorporate libtool.  Define several useful
          + dnl symbols for the makefile rules.
          +@@ -4692,7 +4955,7 @@
          + # doing:
          + LIB_CLEAN=
          + LIB_COMPILE=
          +-LIB_LINK=
          ++LIB_LINK='${CC}'
          + LIB_INSTALL=
          + LIB_UNINSTALL=
          + 
          +@@ -4718,12 +4981,12 @@
          +  		AC_MSG_ERROR(Cannot find libtool)
          +  	fi
          + ])dnl
          +-	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
          +-	LIB_OBJECT='${OBJECTS}.o=.lo)'
          ++	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
          ++	LIB_OBJECT='${OBJECTS:.o=.lo}'
          + 	LIB_SUFFIX=.la
          + 	LIB_CLEAN='${LIBTOOL} --mode=clean'
          + 	LIB_COMPILE='${LIBTOOL} --mode=compile'
          +-	LIB_LINK='${LIBTOOL} --mode=link'
          ++	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
          + 	LIB_INSTALL='${LIBTOOL} --mode=install'
          + 	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
          + 	LIB_PREP=:
          +@@ -4734,10 +4997,10 @@
          + 	# 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.]].*//'`
          ++	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
          + 	AC_MSG_RESULT($cf_cv_libtool_version)
          + 	if test -z "$cf_cv_libtool_version" ; then
          +-		AC_MSG_ERROR(This is not libtool)
          ++		AC_MSG_ERROR(This is not GNU libtool)
          + 	fi
          + 
          + 	# special hack to add --tag option for C++ compiler
          +@@ -4758,6 +5021,7 @@
          + 
          + AC_SUBST(LIBTOOL)
          + AC_SUBST(LIBTOOL_CXX)
          ++AC_SUBST(LIBTOOL_OPTS)
          + 
          + AC_SUBST(LIB_CREATE)
          + AC_SUBST(LIB_OBJECT)
          +@@ -4772,7 +5036,7 @@
          + 
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_WITH_PATH version: 7 updated: 2006/08/03 15:20:08
          ++dnl CF_WITH_PATH version: 8 updated: 2007/05/13 13:16:35
          + dnl ------------
          + dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
          + dnl defaulting to yes/no.
          +@@ -4786,7 +5050,9 @@
          + AC_DEFUN([CF_WITH_PATH],
          + [AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
          + ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl
          ++if ifelse($5,,true,[test -n "$5"]) ; then
          + CF_PATH_SYNTAX(withval)
          ++fi
          + $3="$withval"
          + AC_SUBST($3)dnl
          + ])dnl
          +@@ -4896,7 +5162,7 @@
          + 	[USE_VALGRIND])
          + ])dnl
          + dnl ---------------------------------------------------------------------------
          +-dnl CF_XOPEN_SOURCE version: 24 updated: 2006/04/02 16:41:09
          ++dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38
          + 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,
          +@@ -4930,7 +5196,7 @@
          + irix[[56]].*) #(vi
          + 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
          + 	;;
          +-linux*|gnu*) #(vi
          ++linux*|gnu*|k*bsd*-gnu) #(vi
          + 	CF_GNU_SOURCE
          + 	;;
          + mirbsd*) #(vi
          +Index: c++/Makefile.in
          +Prereq:  1.78 
          +--- ncurses-5.6/c++/Makefile.in	2006-10-21 17:07:49.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/Makefile.in	2007-04-28 15:29:12.000000000 +0000
          +@@ -1,6 +1,6 @@
          +-# $Id: Makefile.in,v 1.78 2006/10/21 17:07:49 tom Exp $
          ++# $Id: Makefile.in,v 1.84 2007/04/28 15:29:12 tom Exp $
          + ##############################################################################
          +-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
          ++# Copyright (c) 1998-2006,2007 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"), #
          +@@ -57,6 +57,7 @@
          + LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
          + 
          + INSTALL		= @INSTALL@
          ++INSTALL_LIB	= @INSTALL@ @INSTALL_LIB@
          + INSTALL_DATA	= @INSTALL_DATA@
          + 
          + AR		= @AR@
          +@@ -74,6 +75,7 @@
          + INCDIR		= ../include
          + CPPFLAGS	= -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
          + 
          ++CC		= ${CXX}
          + CCFLAGS		= $(CPPFLAGS) $(CXXFLAGS)
          + 
          + CFLAGS_LIBTOOL	= $(CCFLAGS)
          +@@ -91,7 +93,7 @@
          + 
          + LOCAL_LIBDIR	= @top_builddir@/lib
          + 
          +-LINK		= @LINK_PROGS@ $(LIBTOOL_LINK) $(CXX) @CXXLDFLAGS@
          ++LINK		= @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
          + SHLIB_DIRS	= -L../lib
          + SHLIB_LIST	= $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
          + 
          +@@ -109,7 +111,9 @@
          + LINK_PROFILE	= $(LINK_FLAGS)
          + LINK_SHARED	= $(LINK_FLAGS)
          + 
          +-LDFLAGS		= @TEST_ARGS@ @LDFLAGS@ \
          ++TEST_ARGS	= @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
          ++
          ++LDFLAGS		= $(TEST_ARGS) @LDFLAGS@ \
          + 	@LD_MODEL@ @LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
          + 
          + LDFLAGS_LIBTOOL	= $(LDFLAGS) $(CFLAGS_LIBTOOL)
          +@@ -173,11 +177,11 @@
          + 	sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
          + 
          + $(DESTDIR)$(libdir) :
          +-	sh $(srcdir)/../mkinstalldirs $@
          ++	sh $(srcdir)/../mkdirs.sh $@
          + 
          + install \
          + install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
          +-	$(LIBTOOL_INSTALL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
          ++	$(LIBTOOL_INSTALL) $(INSTALL_LIB) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
          + 
          + uninstall \
          + uninstall.libs::
          +Index: c++/README-first
          +Prereq:  1.8 
          +--- ncurses-5.6/c++/README-first	2006-04-22 22:19:37.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/README-first	2007-01-27 18:27:09.000000000 +0000
          +@@ -1,5 +1,5 @@
          + -------------------------------------------------------------------------------
          +--- Copyright (c) 1998-2003,2006 Free Software Foundation, Inc.               --
          ++-- Copyright (c) 1998-2006,2007 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             --
          +@@ -25,38 +25,38 @@
          + -- sale, use or other dealings in this Software without prior written        --
          + -- authorization.                                                            --
          + -------------------------------------------------------------------------------
          +--- $Id: README-first,v 1.8 2006/04/22 22:19:37 tom Exp $
          ++-- $Id: README-first,v 1.9 2007/01/27 18:27:09 tom Exp $
          + -------------------------------------------------------------------------------
          +                   C++ interface to ncurses routines
          + -----------------------------------------------------------------------
          + 
          + This directory contains the source code for several C++ classes which
          +-ease the use of writing ncurses-based programs.  The code is derived
          +-from the libg++ CursesWindow class but enhanced for ncurses.
          ++ease the use of writing ncurses-based programs.  The code was originally
          ++derived from the libg++ CursesWindow class, but rewritten for ncurses.
          + 
          + The classes simplify the use of window specific functions by
          + encapsulating them in the window object.  Function overloading is
          +-used in order to narrow the interface.  E.g. you don't have the
          ++used in order to narrow the interface.  For example, you do not have the
          + distinction between `printw' and `mvprintw' anymore.
          + 
          + A second benefit is the removal of all #defines which are included in
          + the curses.h file.  This is a steady cause of trouble because many
          + common identifiers are used.  Instead now all #defines are inline
          +-functions which also allows strict type checking of arguments.
          ++functions, which also allows strict type checking of arguments.
          + 
          + The next enhancement is color support. It was originally provided by a 
          +-derived class. This caused some trouble if you think about Panels or
          +-Menus and Forms with colors. We decided to put color support into the
          ++derived class.  This caused some trouble if you think about Panels or
          ++Menus and Forms with colors.  We decided to put color support into the
          + base class so that any derived class may use color support also.
          + The implementation chosen here is directed to unrestricted use
          +-of mixes of color and monochrome windows. The original NCursesColorWindow
          ++of mixes of color and monochrome windows.  The original NCursesColorWindow
          + class is maintained for compatibility reasons.
          + 
          + The last point to mention is the support of other packages that are
          +-distributed with the ncurses package: the panels library, the menu library
          +-and the form library. This support is provided by the NCursesPanel class, 
          ++distributed with the ncurses package:  the panels library, the menu library
          ++and the form library.  This support is provided by the NCursesPanel class,
          + which is also derived from the NCursesWindow class and the NCursesMenu
          +-and NCursesForm classes which are derived from NCursesPanel. This allows 
          ++and NCursesForm classes which are derived from NCursesPanel.  This allows
          + building interfaces with windows.
          + 
          + Please see the example program for a quick introduction.
          +@@ -68,14 +68,6 @@
          + Suggestions for enhancements and contributions of code (and docs) are
          + welcome.  Please let us know which functionality you miss.
          + 
          +-	ATTENTION LINUX USERS:  There is currently some discussion of
          +-	replacing the BSD curses in the Linux libc with ncurses.  If
          +-	this is done we could perhaps include these classes in the Linux
          +-	libg++ replacing the original CursesWindow class (and renaming it
          +-	to CursesWindow).  This could be done because NCursesWindow can
          +-	be made easily to a superset of the CursesWindow class.
          +-
          +-
          + Original author:
          +      Eric Newton          for FSF's libg++
          + 
          +@@ -83,5 +75,6 @@
          +      Ulrich Drepper      
          +  and Anatoly Ivasyuk     
          + 
          +-Author of this release:
          ++Authors of this release:
          +      Juergen Pfeifer
          ++     Thomas E. Dickey
          +Index: c++/cursesapp.cc
          +Prereq:  1.13 
          +--- ncurses-5.6/c++/cursesapp.cc	2005-04-03 12:25:23.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/cursesapp.cc	2007-01-27 20:16:42.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * this is for making emacs happy: -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2005,2007 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 @@
          + #include "internal.h"
          + #include "cursesapp.h"
          + 
          +-MODULE_ID("$Id: cursesapp.cc,v 1.13 2005/04/03 12:25:23 tom Exp $")
          ++MODULE_ID("$Id: cursesapp.cc,v 1.14 2007/01/27 20:16:42 tom Exp $")
          + 
          + void
          + NCursesApplication::init(bool bColors)
          +@@ -72,11 +72,16 @@
          +   Soft_Label_Key_Set* S;
          + 
          +   delete titleWindow;
          ++  titleWindow = 0;
          ++
          +   while( (S=top()) ) {
          +     pop();
          +     delete S;
          +   }
          ++
          +   delete Root_Window;
          ++  Root_Window = 0;
          ++
          +   ::endwin();
          + }
          + 
          +Index: c++/cursesmain.cc
          +Prereq:  1.11 
          +--- ncurses-5.6/c++/cursesmain.cc	2003-10-25 14:53:13.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/cursesmain.cc	2007-04-07 17:10:11.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,2007 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,14 @@
          + #include "internal.h"
          + #include "cursesapp.h"
          + 
          +-MODULE_ID("$Id: cursesmain.cc,v 1.11 2003/10/25 14:53:13 tom Exp $")
          ++#if CPP_HAS_TRY_CATCH && HAVE_IOSTREAM
          ++#include 
          ++#else
          ++#undef CPP_HAS_TRY_CATCH
          ++#define CPP_HAS_TRY_CATCH 0
          ++#endif
          ++
          ++MODULE_ID("$Id: cursesmain.cc,v 1.14 2007/04/07 17:10:11 tom Exp $")
          + 
          + #if HAVE_LOCALE_H
          + #include 
          +@@ -42,6 +49,10 @@
          + #define setlocale(name,string) /* nothing */
          + #endif
          + 
          ++#if NO_LEAKS
          ++#include 
          ++#endif
          ++
          + /* This is the default implementation of main() for a NCursesApplication.
          +  * You only have to instantiate a static NCursesApplication object in your
          +  * main application source file and link this module with your application.
          +@@ -58,8 +69,25 @@
          + 
          +     A->handleArgs(argc,argv);
          +     ::endwin();
          ++#if CPP_HAS_TRY_CATCH
          ++    try {
          ++      res = (*A)();
          ++      ::endwin();
          ++    }
          ++    catch(const NCursesException &e) {
          ++      ::endwin();
          ++      std::cerr << e.message << std::endl;
          ++      res = e.errorno;
          ++    }
          ++#else
          +     res = (*A)();
          +     ::endwin();
          ++#endif
          ++#if NO_LEAKS
          ++    delete A;
          ++    _nc_free_and_exit(res);
          ++#else
          +     return(res);
          ++#endif
          +   }
          + }
          +Index: c++/cursesp.h
          +Prereq:  1.26 
          +--- ncurses-5.6/c++/cursesp.h	2005-08-13 18:09:21.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/cursesp.h	2007-04-07 17:12:54.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * This makes emacs happy -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2005,2007 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.26 2005/08/13 18:09:21 tom Exp $
          ++// $Id: cursesp.h,v 1.27 2007/04/07 17:12:54 tom Exp $
          + 
          + #include 
          + 
          +@@ -83,7 +83,7 @@
          +     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));
          +Index: c++/cursespad.cc
          +Prereq:  1.11 
          +--- ncurses-5.6/c++/cursespad.cc	2005-07-23 20:51:23.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/cursespad.cc	2007-04-07 18:43:54.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * this is for making emacs happy: -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2005,2007 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            *
          +@@ -33,12 +33,10 @@
          + 
          + #include "internal.h"
          + 
          +-#include 
          ++#include 
          ++#include 
          + 
          +-#include "etip.h"
          +-#include "cursesw.h"
          +-
          +-MODULE_ID("$Id: cursespad.cc,v 1.11 2005/07/23 20:51:23 tom Exp $")
          ++MODULE_ID("$Id: cursespad.cc,v 1.12 2007/04/07 18:43:54 tom Exp $")
          + 
          + NCursesPad::NCursesPad(int nlines, int ncols)
          +   : NCursesWindow(),
          +Index: c++/cursesw.cc
          +Prereq:  1.32 
          +--- ncurses-5.6/c++/cursesw.cc	2005-08-13 18:12:17.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/cursesw.cc	2007-03-24 19:00:58.000000000 +0000
          +@@ -1,79 +1,70 @@
          + // * this is for making emacs happy: -*-Mode: C++;-*-
          ++/****************************************************************************
          ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
          ++ * without limitation the rights to use, copy, modify, merge, publish,      *
          ++ * distribute, distribute with modifications, sublicense, and/or sell       *
          ++ * copies of the Software, and to permit persons to whom the Software is    *
          ++ * furnished to do so, subject to the following conditions:                 *
          ++ *                                                                          *
          ++ * The above copyright notice and this permission notice shall be included  *
          ++ * in all copies or substantial portions of the Software.                   *
          ++ *                                                                          *
          ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
          ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
          ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
          ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
          ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
          ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
          ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
          ++ *                                                                          *
          ++ * Except as contained in this notice, the name(s) of the above copyright   *
          ++ * holders shall not be used in advertising or otherwise to promote the     *
          ++ * sale, use or other dealings in this Software without prior written       *
          ++ * authorization.                                                           *
          ++ ****************************************************************************/
          + 
          + /*
          +-  Copyright (C) 1989 Free Software Foundation
          +-  written by Eric Newton (newton@rocky.oswego.edu)
          +-
          +-  This file is part of the GNU C++ Library.  This library is free
          +-  software; you can redistribute it and/or modify it under the terms of
          +-  the GNU Library General Public License as published by the Free
          +-  Software Foundation; either version 2 of the License, or (at your
          +-  option) any later version.  This library is distributed in the hope
          +-  that it will be useful, but WITHOUT ANY WARRANTY; without even the
          +-  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
          +-  PURPOSE.  See the GNU Library General Public License for more details.
          +-  You should have received a copy of the GNU Library General Public
          +-  License along with this library; if not, write to the Free Software
          +-  Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
          +-
          +-  modified by Ulrich Drepper  (drepper@karlsruhe.gmd.de)
          +-          and Anatoly Ivasyuk (anatoly@nick.csh.rit.edu)
          +-
          +-  modified by Juergen Pfeifer
          +-  and Thomas Dickey (noting that more than 70% of this file has been changed)
          +-*/
          ++ * Authors:
          ++ *	Thomas E. Dickey
          ++ *	Juergen Pfeifer
          ++ *
          ++ * The NCursesWindow class was originally based on a file written by
          ++ * Eric Newton, later modified by Ulrich Drepper and Anatoly Ivasyuk.
          ++ * However, aside from the compatible interface definition, no trace
          ++ * of the original code remains in this version: it consists only of
          ++ * changes introduced since 1995.
          ++ */
          + 
          + #include "internal.h"
          + #include "cursesw.h"
          + 
          +-MODULE_ID("$Id: cursesw.cc,v 1.32 2005/08/13 18:12:17 tom Exp $")
          ++MODULE_ID("$Id: cursesw.cc,v 1.48 2007/03/24 19:00:58 tom Exp $")
          + 
          + #define COLORS_NEED_INITIALIZATION  -1
          + #define COLORS_NOT_INITIALIZED       0
          + #define COLORS_MONOCHROME            1
          + #define COLORS_ARE_REALLY_THERE      2
          + 
          ++#define HaveColors() (colorInitialized == COLORS_ARE_REALLY_THERE)
          ++
          + // declare static variables for the class
          + long NCursesWindow::count = 0L;
          + bool NCursesWindow::b_initialized = FALSE;
          + 
          +-/*
          +- * The ncurses library has a fallback for vsscanf(), which may work...
          +- */
          +-#if !(USE_STRSTREAM_VSCAN || USE_STRSTREAM_VSCAN_CAST)
          +-#  undef  USE_STDIO_VSCAN
          +-#  define USE_STDIO_VSCAN 1
          +-#endif
          +-
          +-#if defined(__GNUG__)
          +-#  ifndef _IO_va_list
          +-#    define _IO_va_list char *
          +-#  endif
          +-#endif
          +-
          + int
          + NCursesWindow::scanw(const char* fmt, ...)
          + {
          +     int result = ERR;
          +-    char buf[BUFSIZ];
          + 
          +-    if (::wgetnstr(w, buf, sizeof(buf)) != ERR) {
          +-	va_list args;
          +-	va_start(args, fmt);
          +-#if USE_STDIO_VSCAN
          +-	if (::vsscanf(buf, fmt, args) != -1)
          +-	    result = OK;
          +-#elif USE_STRSTREAM_VSCAN	/* powerpc, os390 */
          +-	strstreambuf ss(buf, sizeof(buf));
          +-	if (ss.vscan(fmt, args) != -1)
          +-	    result = OK;
          +-#elif USE_STRSTREAM_VSCAN_CAST	/* pre-gcc 3.0 */
          +-	strstreambuf ss(buf, sizeof(buf));
          +-	if (ss.vscan(fmt, (_IO_va_list)args) != -1)
          +-	    result = OK;
          +-#endif
          +-	va_end(args);
          +-    }
          ++    va_list args;
          ++    va_start(args, fmt);
          ++    result = ::vw_scanw (w, const_cast(fmt), args);
          ++    va_end(args);
          ++
          +     return result;
          + }
          + 
          +@@ -82,26 +73,12 @@
          + NCursesWindow::scanw(int y, int x, const char* fmt, ...)
          + {
          +     int result = ERR;
          +-    char buf[BUFSIZ];
          + 
          +     if (::wmove(w, y, x) != ERR) {
          +-	if (::wgetnstr(w, buf, sizeof(buf)) != ERR) {
          +-	    va_list args;
          +-	    va_start(args, fmt);
          +-#if USE_STDIO_VSCAN
          +-	    if (::vsscanf(buf, fmt, args) != -1)
          +-		result = OK;
          +-#elif USE_STRSTREAM_VSCAN	/* powerpc, os390 */
          +-	    strstreambuf ss(buf, sizeof(buf));
          +-	    if (ss.vscan(fmt, args) != -1)
          +-		result = OK;
          +-#elif USE_STRSTREAM_VSCAN_CAST	/* pre-gcc 3.0 */
          +-	    strstreambuf ss(buf, sizeof(buf));
          +-	    if (ss.vscan(fmt, (_IO_va_list)args) != -1)
          +-		result = OK;
          +-#endif
          +-	    va_end(args);
          +-	}
          ++	va_list args;
          ++	va_start(args, fmt);
          ++	result = ::vw_scanw (w, const_cast(fmt), args);
          ++	va_end(args);
          +     }
          +     return result;
          + }
          +@@ -112,10 +89,9 @@
          + {
          +     va_list args;
          +     va_start(args, fmt);
          +-    char buf[BUFSIZ];
          +-    ::vsprintf(buf, fmt, args);
          ++    int result = ::vw_printw(w, fmt, args);
          +     va_end(args);
          +-    return waddstr(w, buf);
          ++    return result;
          + }
          + 
          + 
          +@@ -126,9 +102,7 @@
          +     va_start(args, fmt);
          +     int result = ::wmove(w, y, x);
          +     if (result == OK) {
          +-	char buf[BUFSIZ];
          +-	::vsprintf(buf, fmt, args);
          +-	result = waddstr(w, buf);
          ++	result = ::vw_printw(w, fmt, args);
          +     }
          +     va_end(args);
          +     return result;
          +@@ -136,11 +110,10 @@
          + 
          + 
          + void
          +-NCursesWindow::init(void)
          ++NCursesWindow::set_keyboard(void)
          + {
          +-    leaveok(0);
          +-    keypad(1);
          +-    meta(1);
          ++    keypad(TRUE);
          ++    meta(TRUE);
          + }
          + 
          + void
          +@@ -152,73 +125,73 @@
          + void
          + NCursesWindow::initialize()
          + {
          +-  if (!b_initialized) {
          +-    ::initscr();
          +-    b_initialized = TRUE;
          +-    if (colorInitialized==COLORS_NEED_INITIALIZATION) {
          +-      colorInitialized=COLORS_NOT_INITIALIZED;
          +-      useColors();
          +-    }
          +-    ::noecho();
          +-    ::cbreak();
          +-  }
          ++    if (!b_initialized) {
          ++	::initscr();
          ++	b_initialized = TRUE;
          ++	if (colorInitialized == COLORS_NEED_INITIALIZATION) {
          ++	    colorInitialized = COLORS_NOT_INITIALIZED;
          ++	    useColors();
          ++	}
          ++	::noecho();
          ++	::cbreak();
          ++    }
          ++}
          ++
          ++void
          ++NCursesWindow::constructing()
          ++{
          ++    initialize();
          ++    ++count;
          + }
          + 
          + NCursesWindow::NCursesWindow()
          +-  : w(0), alloced(0), par(0), subwins(0), sib(0)
          ++  : w(0), alloced(FALSE), par(0), subwins(0), sib(0)
          + {
          +-  initialize();
          ++    constructing();
          + 
          +-  w = static_cast(0);
          +-  init();
          +-  alloced = FALSE;
          +-  subwins = par = sib = 0;
          +-  count++;
          ++    w = static_cast(0);
          ++    set_keyboard();
          + }
          + 
          + NCursesWindow::NCursesWindow(int nlines, int ncols, int begin_y, int begin_x)
          +-  : w(0), alloced(0), par(0), subwins(0), sib(0)
          ++  : w(0), alloced(TRUE), par(0), subwins(0), sib(0)
          + {
          +-    initialize();
          ++    constructing();
          + 
          +     w = ::newwin(nlines, ncols, begin_y, begin_x);
          +     if (w == 0) {
          + 	err_handler("Cannot construct window");
          +     }
          +-    init();
          +-
          +-    alloced = TRUE;
          +-    subwins = par = sib = 0;
          +-    count++;
          ++    set_keyboard();
          + }
          + 
          +-NCursesWindow::NCursesWindow(WINDOW* &window)
          +-  : w(0), alloced(0), par(0), subwins(0), sib(0)
          ++NCursesWindow::NCursesWindow(WINDOW* window)
          ++  : w(0), alloced(FALSE), par(0), subwins(0), sib(0)
          + {
          +-    initialize();
          ++    constructing();
          + 
          +-    w = window;
          +-    init();
          +-    alloced = FALSE;
          +-    subwins = par = sib = 0;
          +-    count++;
          ++    // We used to use a reference on the "window" parameter, but we cannot do
          ++    // that with an opaque pointer (see NCURSES_OPAQUE).  If the parameter was
          ++    // "::stdscr", that is first set via the "constructing() call, and is null
          ++    // up to that point.  So we allow a null pointer here as meaning the "same"
          ++    // as "::stdscr".
          ++    w = window ? window : ::stdscr;
          ++    set_keyboard();
          + }
          + 
          +-NCursesWindow::NCursesWindow(NCursesWindow& win, int l, int c,
          ++NCursesWindow::NCursesWindow(NCursesWindow& win, int ny, int nx,
          + 			     int begin_y, int begin_x, char absrel)
          +-  : w(0), alloced(0), par(0), subwins(0), sib(0)
          ++  : w(0), alloced(TRUE), par(0), subwins(0), sib(0)
          + {
          +-    initialize();
          +-    if (absrel == 'a') { // absolute origin
          ++    constructing();
          ++    if (absrel == 'a') {	// absolute origin
          + 	begin_y -= win.begy();
          + 	begin_x -= win.begx();
          +     }
          + 
          +-    // Even though we treat subwindows as a tree, the standard curses
          +-    // library needs the `subwin' call to link to the parent in
          +-    // order to correctly perform refreshes, etc.
          +-    // Friendly enough, this also works for pads.
          +-    w = ::derwin(win.w, l, c, begin_y, begin_x);
          ++    // Link this window into its parent's list of subwindows.
          ++    // We use derwin(), since this also works for pads.
          ++    w = ::derwin(win.w, ny, nx, begin_y, begin_x);
          +     if (w == 0) {
          + 	err_handler("Cannot construct subwindow");
          +     }
          +@@ -226,45 +199,40 @@
          +     par = &win;
          +     sib = win.subwins;
          +     win.subwins = this;
          +-    subwins = 0;
          +-    alloced = TRUE;
          +-    count++;
          + }
          + 
          + NCursesWindow::NCursesWindow(NCursesWindow& win,
          + 				bool do_box NCURSES_PARAM_INIT(TRUE))
          +-  : w(0), alloced(0), par(0), subwins(0), sib(0)
          ++  : w(0), alloced(TRUE), par(0), subwins(0), sib(0)
          + {
          +-  initialize();
          +-  int myHeight = win.height();
          +-  int myWidth  = win.width();
          +-  w = :: derwin(win.w, myHeight - 2, myWidth - 2, 1, 1);
          +-  if (w == 0) {
          +-    err_handler("Cannot construct subwindow");
          +-  }
          +-
          +-  par = &win;
          +-  sib = win.subwins;
          +-  win.subwins = this;
          +-  subwins = 0;
          +-  alloced = TRUE;
          +-  count++;
          +-
          +-  if (do_box) {
          +-    win.box();
          +-    win.touchwin();
          +-  }
          ++    constructing();
          ++    int myHeight = win.height();
          ++    int myWidth  = win.width();
          ++    w = :: derwin(win.w, myHeight - 2, myWidth - 2, 1, 1);
          ++    if (w == 0) {
          ++	err_handler("Cannot construct subwindow");
          ++    }
          ++
          ++    par = &win;
          ++    sib = win.subwins;
          ++    win.subwins = this;
          ++    subwins = 0;
          ++
          ++    if (do_box) {
          ++	win.box();
          ++	win.touchwin();
          ++    }
          + }
          + 
          + NCursesWindow NCursesWindow::Clone()
          + {
          +-  WINDOW *d = ::dupwin(w);
          +-  NCursesWindow W(d);
          +-  W.subwins = subwins;
          +-  W.sib = sib;
          +-  W.par = par;
          +-  W.alloced = alloced;
          +-  return W;
          ++    WINDOW *d = ::dupwin(w);
          ++    NCursesWindow W(d);
          ++    W.subwins = subwins;
          ++    W.sib = sib;
          ++    W.par = par;
          ++    W.alloced = alloced;
          ++    return W;
          + }
          + 
          + typedef int (*RIPOFFINIT)(NCursesWindow&);
          +@@ -273,62 +241,64 @@
          + static RIPOFFINIT* prip = R_INIT;
          + 
          + NCursesWindow::NCursesWindow(WINDOW *win, int ncols)
          +-  : w(0), alloced(0), par(0), subwins(0), sib(0)
          ++  : w(0), alloced(FALSE), par(0), subwins(0), sib(0)
          + {
          +-  initialize();
          +-  w = win;
          +-  assert((w->_maxx+1)==ncols);
          +-  alloced = FALSE;
          +-  subwins = par = sib = 0;
          ++    initialize();
          ++    w = win;
          ++    assert((w->_maxx +1 ) == ncols);
          + }
          + 
          + int _nc_xx_ripoff_init(WINDOW *w, int ncols)
          + {
          +-  int res = ERR;
          ++    int res = ERR;
          + 
          +-  RIPOFFINIT init = *prip++;
          +-  if (init) {
          +-    NCursesWindow* W = new NCursesWindow(w,ncols);
          +-    res = init(*W);
          +-  }
          +-  return res;
          ++    RIPOFFINIT init = *prip++;
          ++    if (init) {
          ++	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,_nc_xx_ripoff_init);
          +-  if (code==OK && init && ripoff_lines) {
          +-    R_INIT[r_init_idx++] = init;
          +-  }
          +-  return code;
          ++    int code = ::_nc_ripoffline(ripoff_lines,_nc_xx_ripoff_init);
          ++    if (code == OK && init && ripoff_lines) {
          ++	R_INIT[r_init_idx++] = init;
          ++    }
          ++    return code;
          + }
          + 
          + bool
          + NCursesWindow::isDescendant(NCursesWindow& win)
          + {
          +-  for (NCursesWindow* p = subwins; p != NULL; p = p->sib) {
          +-    if (p==&win)
          +-      return TRUE;
          +-    else {
          +-      if (p->isDescendant(win))
          +-	return TRUE;
          ++    bool result = FALSE;
          ++
          ++    for (NCursesWindow* p = subwins; p != NULL; p = p->sib) {
          ++	if (p == &win || p->isDescendant(win)) {
          ++	    result = TRUE;
          ++	    break;
          ++	}
          +     }
          +-  }
          +-  return FALSE;
          ++    return result;
          + }
          + 
          + void
          + NCursesWindow::kill_subwindows()
          + {
          +-    for (NCursesWindow* p = subwins; p != 0; p = p->sib) {
          ++    NCursesWindow* p = subwins;
          ++
          ++    subwins = 0;
          ++    while (p != 0) {
          ++	NCursesWindow* q = p->sib;
          + 	p->kill_subwindows();
          + 	if (p->alloced) {
          + 	    if (p->w != 0)
          + 		::delwin(p->w);
          +-	    p->alloced = FALSE;
          + 	}
          +-	p->w = 0; // cause a run-time error if anyone attempts to use...
          ++	delete p;
          ++	p = q;
          +     }
          + }
          + 
          +@@ -337,22 +307,21 @@
          + {
          +     kill_subwindows();
          + 
          +-    if (par != 0) {  // Snip us from the parent's list of subwindows.
          +-	NCursesWindow * win = par->subwins;
          +-	NCursesWindow * trail = 0;
          +-	for (;;) {
          +-	    if (win == 0)
          ++    if (par != 0) {
          ++	// Remove this window from the parent's list of subwindows.
          ++	NCursesWindow * next = par->subwins;
          ++	NCursesWindow * prev = 0;
          ++	while (next != 0) {
          ++	    if (next == this) {
          ++		if (prev != 0) {
          ++		    prev->sib = next->sib;
          ++		} else {
          ++		    par->subwins = next->sib;
          ++		}
          + 		break;
          +-	    else if (win == this) {
          +-		if (trail != 0)
          +-		    trail->sib = win->sib;
          +-		else
          +-		    par->subwins = win->sib;
          +-		break;
          +-	    } else {
          +-		trail = win;
          +-		win = win->sib;
          + 	    }
          ++	    prev = next;
          ++	    next = next->sib;
          + 	}
          +     }
          + 
          +@@ -360,13 +329,12 @@
          + 	::delwin(w);
          + 
          +     if (alloced) {
          +-      --count;
          +-      if (count == 0) {
          +-	::endwin();
          +-      }
          +-      else if (count < 0) { // cannot happen!
          +-	err_handler("Too many windows destroyed");
          +-      }
          ++	--count;
          ++	if (count == 0) {
          ++	    ::endwin();
          ++	} else if (count < 0) { // cannot happen!
          ++	    err_handler("Too many windows destroyed");
          ++	}
          +     }
          + }
          + 
          +@@ -379,89 +347,82 @@
          + NCursesWindow::useColors(void)
          + {
          +     if (colorInitialized == COLORS_NOT_INITIALIZED) {
          +-      if (b_initialized) {
          +-	if (::has_colors()) {
          +-	  ::start_color();
          +-	  colorInitialized = COLORS_ARE_REALLY_THERE;
          ++	if (b_initialized) {
          ++	    if (::has_colors()) {
          ++		::start_color();
          ++		colorInitialized = COLORS_ARE_REALLY_THERE;
          ++	    } else {
          ++		colorInitialized = COLORS_MONOCHROME;
          ++	    }
          ++	} else {
          ++	    colorInitialized = COLORS_NEED_INITIALIZATION;
          + 	}
          +-	else
          +-	  colorInitialized = COLORS_MONOCHROME;
          +-      }
          +-      else
          +-	colorInitialized = COLORS_NEED_INITIALIZATION;
          +     }
          + }
          + 
          + short
          ++NCursesWindow::getPair() const
          ++{
          ++    return static_cast(PAIR_NUMBER(getattrs(w)));
          ++}
          ++
          ++short
          + NCursesWindow::getcolor(int getback) const
          + {
          +     short fore, back;
          + 
          +-    if (colorInitialized==COLORS_ARE_REALLY_THERE) {
          +-      if (::pair_content(static_cast(PAIR_NUMBER(w->_attrs)), &fore, &back))
          +-	err_handler("Can't get color pair");
          +-    }
          +-    else {
          +-      // Monochrome means white on black
          +-      back = COLOR_BLACK;
          +-      fore = COLOR_WHITE;
          ++    if (HaveColors()) {
          ++	if (::pair_content(getPair(), &fore, &back) == ERR)
          ++	    err_handler("Can't get color pair");
          ++    } else {
          ++	// Monochrome means white on black
          ++	back = COLOR_BLACK;
          ++	fore = COLOR_WHITE;
          +     }
          +     return getback ? back : fore;
          + }
          + 
          + int NCursesWindow::NumberOfColors()
          + {
          +-  if (colorInitialized==COLORS_ARE_REALLY_THERE)
          +-    return COLORS;
          +-  else
          +-    return 1; // monochrome (actually there are two ;-)
          ++    return (HaveColors()) ? COLORS : 1;
          + }
          + 
          + short
          + NCursesWindow::getcolor() const
          + {
          +-  if (colorInitialized==COLORS_ARE_REALLY_THERE)
          +-    return PAIR_NUMBER(w->_attrs);
          +-  else
          +-    return 0; // we only have pair zero
          ++    return (HaveColors()) ? getPair() : 0;
          + }
          + 
          + int
          + NCursesWindow::setpalette(short fore, short back, short pair)
          + {
          +-  if (colorInitialized==COLORS_ARE_REALLY_THERE)
          +-    return ::init_pair(pair, fore, back);
          +-  else
          +-    return OK;
          ++    return (HaveColors()) ? ::init_pair(pair, fore, back) : OK;
          + }
          + 
          + int
          + NCursesWindow::setpalette(short fore, short back)
          + {
          +-  if (colorInitialized==COLORS_ARE_REALLY_THERE)
          +-    return setpalette(fore, back, static_cast(PAIR_NUMBER(w->_attrs)));
          +-  else
          +-    return OK;
          ++    return setpalette(fore, back, getPair());
          + }
          + 
          + 
          + int
          + NCursesWindow::setcolor(short pair)
          + {
          +-  if (colorInitialized==COLORS_ARE_REALLY_THERE) {
          +-    if ((pair < 1) || (pair > COLOR_PAIRS))
          +-      err_handler("Can't set color pair");
          +-
          +-    attroff(A_COLOR);
          +-    attrset(COLOR_PAIR(pair));
          +-  }
          +-  return OK;
          ++    if (HaveColors()) {
          ++	if ((pair < 1) || (pair > COLOR_PAIRS))
          ++	    err_handler("Can't set color pair");
          ++
          ++	attroff(A_COLOR);
          ++	attrset(COLOR_PAIR(pair));
          ++    }
          ++    return OK;
          + }
          + 
          + #if HAVE_HAS_KEY
          + bool NCursesWindow::has_mouse() const
          + {
          +-  return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse())
          +-	  ? TRUE : FALSE);
          ++    return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse())
          ++	     ? TRUE : FALSE);
          + }
          + #endif
          +Index: c++/cursesw.h
          +Prereq:  1.38 
          +--- ncurses-5.6/c++/cursesw.h	2005-07-23 20:51:39.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/cursesw.h	2007-11-24 19:09:09.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * This makes emacs happy -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2005,2007 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,17 +30,10 @@
          + #ifndef NCURSES_CURSESW_H_incl
          + #define NCURSES_CURSESW_H_incl 1
          + 
          +-// $Id: cursesw.h,v 1.38 2005/07/23 20:51:39 tom Exp $
          +-
          +-#include 
          +-#include 
          ++// $Id: cursesw.h,v 1.46 2007/11/24 19:09:09 tom Exp $
          + 
          + #include 
          + 
          +-#if HAVE_STRSTREAM_H && (USE_STRSTREAM_VSCAN||USE_STRSTREAM_VSCAN_CAST)
          +-#include 
          +-#endif
          +-
          + extern "C" {
          + #  include   
          + }
          +@@ -705,11 +698,13 @@
          + private:
          +   static bool    b_initialized;
          +   static void    initialize();
          ++  void           constructing();
          +   friend int     _nc_xx_ripoff_init(WINDOW *, int);
          + 
          +-  void           init();
          ++  void           set_keyboard();
          + 
          +   short          getcolor(int getback) const;
          ++  short          getPair() const;
          + 
          +   static int     setpalette(short fore, short back, short pair);
          +   static int     colorInitialized;
          +@@ -743,7 +738,7 @@
          +   NCursesWindow();
          + 
          + public:
          +-  NCursesWindow(WINDOW* &window);  // useful only for stdscr
          ++  NCursesWindow(WINDOW* window);   // useful only for stdscr
          + 
          +   NCursesWindow(int nlines,        // number of lines
          + 		int ncols,         // number of columns
          +@@ -823,16 +818,16 @@
          +   int            width() const { return maxx() + 1; }
          +   // Number of columns in this window
          + 
          +-  int            begx() const { return w->_begx; }
          ++  int            begx() const { return getbegx(w); }
          +   // Column of top left corner relative to stdscr
          + 
          +-  int            begy() const { return w->_begy; }
          ++  int            begy() const { return getbegy(w); }
          +   // Line of top left corner relative to stdscr
          + 
          +-  int            maxx() const { return w->_maxx; }
          ++  int            maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
          +   // Largest x coord in window
          + 
          +-  int            maxy() const { return w->_maxy; }
          ++  int            maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
          +   // Largest y coord in window
          + 
          +   short          getcolor() const;
          +@@ -1220,6 +1215,14 @@
          +   // sminrow,smincol.
          + 
          +   // -------------------------------------------------------------------------
          ++  // Extended functions
          ++  // -------------------------------------------------------------------------
          ++#ifdef NCURSES_EXT_FUNCS
          ++  int            wresize(int newLines, int newColumns) {
          ++    return ::wresize(w, newLines, newColumns); }
          ++#endif
          ++
          ++  // -------------------------------------------------------------------------
          +   // Mouse related
          +   // -------------------------------------------------------------------------
          +   bool has_mouse() const;
          +Index: c++/demo.cc
          +Prereq:  1.34 
          +--- ncurses-5.6/c++/demo.cc	2006-04-22 22:38:57.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/demo.cc	2007-04-07 20:24:49.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * This makes emacs happy -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2006,2007 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 @@
          +  *   Demo code for NCursesMenu and NCursesForm written by
          +  *   Juergen Pfeifer
          +  *
          +- * $Id: demo.cc,v 1.34 2006/04/22 22:38:57 tom Exp $
          ++ * $Id: demo.cc,v 1.36 2007/04/07 20:24:49 tom Exp $
          +  */
          + 
          + #include "internal.h"
          +@@ -55,30 +55,30 @@
          +   public:
          +   void run(int sleeptime) {
          + 
          +-    NCursesPanel *std = new NCursesPanel();
          ++    NCursesPanel *mystd = new NCursesPanel();
          + 
          +     //  Make a few small demo panels
          + 
          +-    NCursesPanel *u = new NCursesPanel(8,20,12,4);
          +-    NCursesPanel *v = new NCursesPanel(8,20,10,6);
          +-    NCursesPanel *w = new NCursesPanel(8,20,8,8);
          +-    NCursesPanel *x = new NCursesPanel(8,20,6,10);
          +-    NCursesPanel *y = new NCursesPanel(8,20,4,12);
          +-    NCursesPanel *z = new NCursesPanel(8,30,2,14);
          ++    NCursesPanel *u = new NCursesPanel(8, 20, 12, 4);
          ++    NCursesPanel *v = new NCursesPanel(8, 20, 10, 6);
          ++    NCursesPanel *w = new NCursesPanel(8, 20, 8, 8);
          ++    NCursesPanel *x = new NCursesPanel(8, 20, 6, 10);
          ++    NCursesPanel *y = new NCursesPanel(8, 20, 4, 12);
          ++    NCursesPanel *z = new NCursesPanel(8, 30, 2, 14);
          + 
          +     //  Draw something on the main screen, so we can see what happens
          +     //  when panels get moved or deleted.
          + 
          +-    std->box();
          +-    std->move(std->height()/2,1);
          +-    std->hline(std->width()-2);
          +-    std->move(1,std->width()/2);
          +-    std->vline(std->height()-2);
          +-    std->addch(0,std->width()/2,ACS_TTEE);
          +-    std->addch(std->height()-1,std->width()/2,ACS_BTEE);
          +-    std->addch(std->height()/2,0,ACS_LTEE);
          +-    std->addch(std->height()/2,std->width()-1,ACS_RTEE);
          +-    std->addch(std->height()/2,std->width()/2,ACS_PLUS);
          ++    mystd->box();
          ++    mystd->move(mystd->height()/2, 1);
          ++    mystd->hline(mystd->width()-2);
          ++    mystd->move(1, mystd->width()/2);
          ++    mystd->vline(mystd->height()-2);
          ++    mystd->addch(0, mystd->width()/2, ACS_TTEE);
          ++    mystd->addch(mystd->height()-1, mystd->width()/2, ACS_BTEE);
          ++    mystd->addch(mystd->height()/2, 0, ACS_LTEE);
          ++    mystd->addch(mystd->height()/2, mystd->width()-1, ACS_RTEE);
          ++    mystd->addch(mystd->height()/2, mystd->width()/2, ACS_PLUS);
          + 
          +     //  Draw frames with titles around panels so that we can see where
          +     //  the panels are located.
          +@@ -98,56 +98,56 @@
          +     }
          + 
          +     //  A refresh to any valid panel updates all panels and refreshes
          +-    //  the screen.  Using std is just convenient - We know it's always
          ++    //  the screen.  Using mystd is just convenient - We know it's always
          +     //  valid until the end of the program.
          + 
          +-    std->refresh();
          ++    mystd->refresh();
          +     sleep(sleeptime);
          + 
          +     //  Show what happens when panels are deleted and moved.
          + 
          +     sleep(sleeptime);
          +     delete u;
          +-    std->refresh();
          ++    mystd->refresh();
          + 
          +     sleep(sleeptime);
          +     delete z;
          +-    std->refresh();
          ++    mystd->refresh();
          + 
          +     sleep(sleeptime);
          +     delete v;
          +-    std->refresh();
          ++    mystd->refresh();
          + 
          +     // show how it looks when a panel moves
          +     sleep(sleeptime);
          +-    y->mvwin(5,30);
          +-    std->refresh();
          ++    y->mvwin(5, 30);
          ++    mystd->refresh();
          + 
          +     sleep(sleeptime);
          +     delete y;
          +-    std->refresh();
          ++    mystd->refresh();
          + 
          +     // show how it looks when you raise a panel
          +     sleep(sleeptime);
          +     w->top();
          +-    std->refresh();
          ++    mystd->refresh();
          + 
          +     sleep(sleeptime);
          +     delete w;
          +-    std->refresh();
          ++    mystd->refresh();
          + 
          +     sleep(sleeptime);
          +     delete x;
          + 
          +-    std->clear();
          +-    std->refresh();
          ++    mystd->clear();
          ++    mystd->refresh();
          + 
          +     //  Don't forget to clean up the main screen.  Since this is the
          +     //  last thing using NCursesWindow, this has the effect of
          +     //  shutting down ncurses and restoring the terminal state.
          + 
          +     sleep(sleeptime);
          +-    delete std;
          ++    delete mystd;
          +   }
          + };
          + 
          +@@ -247,21 +247,21 @@
          + 
          +     F     = new NCursesFormField*[10];
          +     mft   = new MyFieldType('X');
          +-    ift   = new Integer_Field(0,1,10);
          ++    ift   = new Integer_Field(0, 1, 10);
          +     eft   = new Enumeration_Field(weekdays);
          + 
          +-    F[0]  = new Label("Demo Entry Form",0,16);
          +-    F[1]  = new Label("Weekday Enum",2,1);
          +-    F[2]  = new Label("Number(1-10)",2,21);
          +-    F[3]  = new Label("Only 'X'",2,35);
          +-    F[4]  = new Label("Multiline Field (Dynamic and Scrollable)",5,1);
          +-    F[5]  = new NCursesFormField(1,18,3,1);
          +-    F[6]  = new NCursesFormField(1,12,3,21);
          +-    F[7]  = new NCursesFormField(1,12,3,35);
          +-    F[8]  = new NCursesFormField(4,46,6,1,2);
          ++    F[0]  = new Label("Demo Entry Form", 0, 16);
          ++    F[1]  = new Label("Weekday Enum", 2, 1);
          ++    F[2]  = new Label("Number(1-10)", 2, 21);
          ++    F[3]  = new Label("Only 'X'", 2, 35);
          ++    F[4]  = new Label("Multiline Field (Dynamic and Scrollable)", 5, 1);
          ++    F[5]  = new NCursesFormField(1, 18, 3, 1);
          ++    F[6]  = new NCursesFormField(1, 12, 3, 21);
          ++    F[7]  = new NCursesFormField(1, 12, 3, 35);
          ++    F[8]  = new NCursesFormField(4, 46, 6, 1, 2);
          +     F[9]  = new NCursesFormField();
          + 
          +-    InitForm(F,TRUE,TRUE);
          ++    InitForm(F, TRUE, TRUE);
          +     boldframe();
          + 
          +     F[5]->set_fieldtype(*eft);
          +@@ -312,7 +312,7 @@
          +     Soft_Label_Key_Set* S = new Soft_Label_Key_Set;
          +     for(int i=1; i <= S->labels(); i++) {
          +       char buf[8];
          +-      ::sprintf(buf,"Frm%02d",i);
          ++      ::sprintf(buf, "Frm%02d", i);
          +       (*S)[i] = buf;                                      // Text
          +       (*S)[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification
          +     }
          +@@ -336,9 +336,9 @@
          +     const int PADSIZE  = 200;
          +     unsigned gridcount = 0;
          + 
          +-    NCursesPanel std;
          +-    NCursesPanel P(std.lines()-2,std.cols()-2,1,1);
          +-    NCursesFramedPad FP(P,PADSIZE,PADSIZE);
          ++    NCursesPanel mystd;
          ++    NCursesPanel P(mystd.lines()-2, mystd.cols()-2, 1, 1);
          ++    NCursesFramedPad FP(P, PADSIZE, PADSIZE);
          + 
          +     for (int i=0; i < PADSIZE; i++) {
          +       for (int j=0; j < PADSIZE; j++) {
          +@@ -357,7 +357,7 @@
          +       }
          +     }
          + 
          +-    P.label("Pad Demo",NULL);
          ++    P.label("Pad Demo", NULL);
          +     FP();
          +     P.clear();
          +     return FALSE;
          +@@ -385,9 +385,9 @@
          +   }
          + 
          +   bool action() {
          +-    NCursesPanel *std = new NCursesPanel();
          ++    NCursesPanel *mystd = new NCursesPanel();
          + 
          +-    NCursesPanel *w = new NCursesPanel(std->lines() - 2, std->cols() - 2, 1, 1);
          ++    NCursesPanel *w = new NCursesPanel(mystd->lines() - 2, mystd->cols() - 2, 1, 1);
          +     w->box();
          +     w->refresh();
          + 
          +@@ -411,7 +411,7 @@
          + 
          +     delete s;
          +     delete w;
          +-    delete std;
          ++    delete mystd;
          +     ::noecho();
          +     return FALSE;
          +   }
          +@@ -444,10 +444,10 @@
          +     I[6] = new QuitItem();
          +     I[7] = new NCursesMenuItem(); // Terminating empty item
          + 
          +-    InitMenu(I,TRUE,TRUE);
          ++    InitMenu(I, TRUE, TRUE);
          + 
          +-    P = new NCursesPanel(1,n_items,LINES-1,1);
          +-    boldframe("Demo","Silly");
          ++    P = new NCursesPanel(1, n_items, LINES-1, 1);
          ++    boldframe("Demo", "Silly");
          +     P->show();
          +   }
          + 
          +@@ -474,7 +474,7 @@
          +   virtual void On_Menu_Init()
          +   {
          +     NCursesWindow W(::stdscr);
          +-    P->move(0,0);
          ++    P->move(0, 0);
          +     P->clrtoeol();
          +     for(int i=1; i<=count(); i++)
          +       P->addch('0' + i);
          +@@ -484,25 +484,25 @@
          + 
          +   virtual void On_Menu_Termination()
          +   {
          +-    P->move(0,0);
          ++    P->move(0, 0);
          +     P->clrtoeol();
          +     refresh();
          +   }
          + 
          +   virtual void On_Item_Init(NCursesMenuItem& item)
          +   {
          +-    P->move(0,item.index());
          ++    P->move(0, item.index());
          +     P->attron(A_REVERSE);
          +-    P->printw("%1d",1+item.index());
          ++    P->printw("%1d", 1+item.index());
          +     P->attroff(A_REVERSE);
          +     refresh();
          +   }
          + 
          +   virtual void On_Item_Termination(NCursesMenuItem& item)
          +   {
          +-    P->move(0,item.index());
          ++    P->move(0, item.index());
          +     P->attroff(A_REVERSE);
          +-    P->printw("%1d",1+item.index());
          ++    P->printw("%1d", 1+item.index());
          +     refresh();
          +   }
          + };
          +@@ -530,7 +530,7 @@
          + {
          +   for(int i=1; i <= S.labels(); i++) {
          +     char buf[8];
          +-    ::sprintf(buf,"Key%02d",i);
          ++    ::sprintf(buf, "Key%02d", i);
          +     S[i] = buf;                                      // Text
          +     S[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification
          +   }
          +@@ -542,7 +542,7 @@
          +   const int len = ::strlen(titleText);
          + 
          +   titleWindow->bkgd(screen_titles());
          +-  titleWindow->addstr(0,(titleWindow->cols() - len)/2, titleText);
          ++  titleWindow->addstr(0, (titleWindow->cols() - len)/2, titleText);
          +   titleWindow->noutrefresh();
          + }
          + 
          +@@ -557,4 +557,4 @@
          + //
          + // -------------------------------------------------------------------------
          + //
          +-static TestApplication Demo;
          ++static TestApplication *Demo = new TestApplication();
          +Index: c++/edit_cfg.sh
          +Prereq:  1.14 
          +--- ncurses-5.6/c++/edit_cfg.sh	2005-04-30 21:00:22.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/edit_cfg.sh	2007-04-07 19:08:49.000000000 +0000
          +@@ -1,7 +1,7 @@
          + #!/bin/sh
          +-# $Id: edit_cfg.sh,v 1.14 2005/04/30 21:00:22 tom Exp $
          ++# $Id: edit_cfg.sh,v 1.16 2007/04/07 19:08:49 tom Exp $
          + ##############################################################################
          +-# Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.                #
          ++# Copyright (c) 1998-2005,2007 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,7 +28,7 @@
          + # authorization.                                                             #
          + ##############################################################################
          + #
          +-# Author: Thomas E. Dickey 1997
          ++# Author: Thomas E. Dickey 1997-on
          + #
          + # Edit the default value of the etip.h file based on the autoconf-generated
          + # values:
          +@@ -45,11 +45,9 @@
          + 	HAVE_BUILTIN_H \
          + 	HAVE_GPP_BUILTIN_H \
          + 	HAVE_GXX_BUILTIN_H \
          +-	HAVE_STRSTREAM_H \
          ++	HAVE_IOSTREAM \
          + 	HAVE_TYPEINFO \
          +-	HAVE_VALUES_H \
          +-	USE_STRSTREAM_VSCAN \
          +-	USE_STRSTREAM_VSCAN_CAST
          ++	HAVE_VALUES_H
          + do
          + 	rm -f $2.bak
          + 	mv $2 $2.bak
          +Index: c++/etip.h.in
          +Prereq:  1.32 
          +--- ncurses-5.6/c++/etip.h.in	2005-08-06 19:55:57.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/etip.h.in	2007-04-07 18:56:32.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * This makes emacs happy -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2005,2007 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.32 2005/08/06 19:55:57 tom Exp $
          ++// $Id: etip.h.in,v 1.36 2007/04/07 18:56:32 tom Exp $
          + 
          + #ifndef NCURSES_ETIP_H_incl
          + #define NCURSES_ETIP_H_incl 1
          +@@ -49,8 +49,8 @@
          + #define HAVE_GPP_BUILTIN_H 0
          + #endif
          + 
          +-#ifndef HAVE_STRSTREAM_H
          +-#define HAVE_STRSTREAM_H 0
          ++#ifndef HAVE_IOSTREAM
          ++#define HAVE_IOSTREAM 0
          + #endif
          + 
          + #ifndef HAVE_TYPEINFO
          +@@ -77,14 +77,6 @@
          + #define CPP_HAS_STATIC_CAST 0	// workaround for g++ 2.95.3
          + #endif
          + 
          +-#ifndef USE_STRSTREAM_VSCAN
          +-#define USE_STRSTREAM_VSCAN 0
          +-#endif
          +-
          +-#ifndef USE_STRSTREAM_VSCAN_CAST
          +-#define USE_STRSTREAM_VSCAN_CAST 0
          +-#endif
          +-
          + #ifdef __GNUG__
          + #  if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
          + #    if HAVE_TYPEINFO
          +@@ -335,30 +327,46 @@
          + };
          + 
          + #if !((defined(__GNUG__) && defined(__EXCEPTIONS)) || defined(__SUNPRO_CC))
          +-#  include 
          ++#  if HAVE_IOSTREAM
          ++#     include 
          ++using std::cerr;
          ++using std::endl;
          ++#  else
          ++#     include 
          ++#  endif
          +    extern "C" void exit(int);
          + #endif
          + 
          + inline void THROW(const NCursesException *e) {
          + #if defined(__GNUG__) && defined(__EXCEPTIONS)
          + #  if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
          +-      (*lib_error_handler)(e?e->classname():"",e?e->message:"");
          ++      (*lib_error_handler)(e ? e->classname() : "", e ? e->message : "");
          + #else
          +-      throw *e;
          ++#define CPP_HAS_TRY_CATCH 1
          + #endif
          + #elif defined(__SUNPRO_CC)
          + #  if !defined(__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT < 5)
          +   genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
          + #else
          +-  throw *e;
          ++#define CPP_HAS_TRY_CATCH 1
          + #endif
          + #else
          +   if (e)
          +     cerr << e->message << endl;
          +   exit(0);
          + #endif
          +-}
          + 
          +-#define THROWS(s)
          ++#ifndef CPP_HAS_TRY_CATCH
          ++#define CPP_HAS_TRY_CATCH 0
          ++#define NCURSES_CPP_TRY		/* nothing */
          ++#define NCURSES_CPP_CATCH(e)	if (false)
          ++#define THROWS(s)		/* nothing */
          ++#elif CPP_HAS_TRY_CATCH
          ++  throw *e;
          ++#define NCURSES_CPP_TRY		try
          ++#define NCURSES_CPP_CATCH(e)	catch(e)
          ++#define THROWS(s)		throw(s)
          ++#endif
          ++}
          + 
          + #endif /* NCURSES_ETIP_H_incl */
          +Index: c++/headers
          +Prereq:  1.2 
          +--- ncurses-5.6/c++/headers	1998-02-11 12:13:40.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/headers	2006-12-24 16:25:45.000000000 +0000
          +@@ -1,7 +1,7 @@
          + # C++ headers
          +-# $Id: headers,v 1.2 1998/02/11 12:13:40 tom Exp $
          ++# $Id: headers,v 1.3 2006/12/24 16:25:45 tom Exp $
          + ##############################################################################
          +-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
          ++# Copyright (c) 1998,2006 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"), #
          +@@ -37,3 +37,4 @@
          + $(srcdir)/cursesw.h
          + $(srcdir)/cursslk.h
          + etip.h
          ++# vile:makemode
          +Index: c++/internal.h
          +Prereq:  1.13 
          +--- ncurses-5.6/c++/internal.h	2006-09-30 21:59:57.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/internal.h	2007-06-02 15:58:00.000000000 +0000
          +@@ -1,6 +1,6 @@
          + // * This makes emacs happy -*-Mode: C++;-*-
          + /****************************************************************************
          +- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
          ++ * Copyright (c) 1998-2005,2007 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,13 +31,15 @@
          +  *   Author: Juergen Pfeifer, 1997                                          *
          +  ****************************************************************************/
          + 
          +-// $Id: internal.h,v 1.13 2006/09/30 21:59:57 tom Exp $
          ++// $Id: internal.h,v 1.15 2007/06/02 15:58:00 tom Exp $
          + 
          + #ifndef NCURSES_CPLUS_INTERNAL_H
          + #define NCURSES_CPLUS_INTERNAL_H 1
          + 
          + #include 
          + 
          ++#include 
          ++
          + #if USE_RCS_IDS
          + #define MODULE_ID(id) static const char Ident[] = id;
          + #else
          +Index: c++/modules
          +Prereq:  1.6 
          +--- ncurses-5.6/c++/modules	1999-07-31 09:46:54.000000000 +0000
          ++++ ncurses-5.6-20071201/c++/modules	2006-12-24 00:53:08.000000000 +0000
          +@@ -1,7 +1,7 @@
          + # Program modules
          +-# $Id: modules,v 1.6 1999/07/31 09:46:54 juergen Exp $
          ++# $Id: modules,v 1.7 2006/12/24 00:53:08 tom Exp $
          + ##############################################################################
          +-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
          ++# Copyright (c) 1998,2006 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,7 +28,7 @@
          + # authorization.                                                             #
          + ##############################################################################
          + #
          +-# Author: Thomas E. Dickey  1995,1997
          ++# Author: Thomas E. Dickey	1995-on
          + #
          + 
          + @ base
          +@@ -41,3 +41,5 @@
          + cursesapp	c++		$(srcdir)	$(cursesapp_h)
          + cursesmain	c++		$(srcdir)	$(cursesapp_h)
          + demo		c++		$(srcdir)	$(cursesf_h) $(cursesm_h) $(cursesapp_h)
          ++
          ++# vile:makemode
          +Index: config.guess
          +--- ncurses-5.6/config.guess	2006-07-22 15:57:37.000000000 +0000
          ++++ ncurses-5.6-20071201/config.guess	2007-07-04 15:02:46.000000000 +0000
          +@@ -4,7 +4,7 @@
          + #   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
          + #   Inc.
          + 
          +-timestamp='2006-07-02'
          ++timestamp='2007-05-17'
          + 
          + # 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
          +@@ -161,6 +161,7 @@
          + 	    arm*) machine=arm-unknown ;;
          + 	    sh3el) machine=shl-unknown ;;
          + 	    sh3eb) machine=sh-unknown ;;
          ++	    sh5el) machine=sh5le-unknown ;;
          + 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
          + 	esac
          + 	# The Operating System including object format, if it has switched
          +@@ -329,7 +330,7 @@
          +     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
          + 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          + 	exit ;;
          +-    i86pc:SunOS:5.*:*)
          ++    i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
          + 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
          + 	exit ;;
          +     sun4*:SunOS:6*:*)
          +@@ -780,7 +781,7 @@
          +     i*:CYGWIN*:*)
          + 	echo ${UNAME_MACHINE}-pc-cygwin
          + 	exit ;;
          +-    i*:MINGW*:*)
          ++    *:MINGW*:*)
          + 	echo ${UNAME_MACHINE}-pc-mingw32
          + 	exit ;;
          +     i*:windows32*:*)
          +@@ -790,12 +791,15 @@
          +     i*:PW*:*)
          + 	echo ${UNAME_MACHINE}-pc-pw32
          + 	exit ;;
          +-    x86:Interix*:[3456]*)
          +-	echo i586-pc-interix${UNAME_RELEASE}
          +-	exit ;;
          +-    EM64T:Interix*:[3456]*)
          +-	echo x86_64-unknown-interix${UNAME_RELEASE}
          +-	exit ;;
          ++    *:Interix*:[3456]*)
          ++    	case ${UNAME_MACHINE} in
          ++	    x86) 
          ++		echo i586-pc-interix${UNAME_RELEASE}
          ++		exit ;;
          ++	    EM64T | authenticamd)
          ++		echo x86_64-unknown-interix${UNAME_RELEASE}
          ++		exit ;;
          ++	esac ;;
          +     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
          + 	echo i${UNAME_MACHINE}-pc-mks
          + 	exit ;;
          +@@ -950,6 +954,9 @@
          +     x86_64:Linux:*:*)
          + 	echo x86_64-unknown-linux-gnu
          + 	exit ;;
          ++    xtensa:Linux:*:*)
          ++    	echo xtensa-unknown-linux-gnu
          ++	exit ;;
          +     i*86:Linux:*:*)
          + 	# The BFD linker knows what the default object file format is, so
          + 	# first see if it will tell us. cd to the root directory to prevent
          +@@ -1208,6 +1215,15 @@
          +     SX-6:SUPER-UX:*:*)
          + 	echo sx6-nec-superux${UNAME_RELEASE}
          + 	exit ;;
          ++    SX-7:SUPER-UX:*:*)
          ++	echo sx7-nec-superux${UNAME_RELEASE}
          ++	exit ;;
          ++    SX-8:SUPER-UX:*:*)
          ++	echo sx8-nec-superux${UNAME_RELEASE}
          ++	exit ;;
          ++    SX-8R:SUPER-UX:*:*)
          ++	echo sx8r-nec-superux${UNAME_RELEASE}
          ++	exit ;;
          +     Power*:Rhapsody:*:*)
          + 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
          + 	exit ;;
          +Index: config.sub
          +--- ncurses-5.6/config.sub	2006-08-14 16:00:00.000000000 +0000
          ++++ ncurses-5.6-20071201/config.sub	2007-07-04 15:03:05.000000000 +0000
          +@@ -4,7 +4,7 @@
          + #   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
          + #   Inc.
          + 
          +-timestamp='2006-08-14'
          ++timestamp='2007-06-28'
          + 
          + # This file is (in principle) common to ALL GNU software.
          + # The presence of a machine in this file suggests that SOME GNU software
          +@@ -245,12 +245,12 @@
          + 	| bfin \
          + 	| c4x | clipper \
          + 	| d10v | d30v | dlx | dsp16xx \
          +-	| fr30 | frv \
          ++	| fido | fr30 | frv \
          + 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
          + 	| i370 | i860 | i960 | ia64 \
          + 	| ip2k | iq2000 \
          + 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
          +-	| maxq | mb | microblaze | mcore \
          ++	| maxq | mb | microblaze | mcore | mep \
          + 	| mips | mipsbe | mipseb | mipsel | mipsle \
          + 	| mips16 \
          + 	| mips64 | mips64el \
          +@@ -276,6 +276,7 @@
          + 	| pdp10 | pdp11 | pj | pjl \
          + 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
          + 	| pyramid \
          ++	| score \
          + 	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
          + 	| sh64 | sh64le \
          + 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
          +@@ -323,7 +324,7 @@
          + 	| clipper-* | craynv-* | cydra-* \
          + 	| d10v-* | d30v-* | dlx-* \
          + 	| elxsi-* \
          +-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
          ++	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
          + 	| h8300-* | h8500-* \
          + 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
          + 	| i*86-* | i860-* | i960-* | ia64-* \
          +@@ -474,8 +475,8 @@
          + 		basic_machine=craynv-cray
          + 		os=-unicosmp
          + 		;;
          +-	cr16c)
          +-		basic_machine=cr16c-unknown
          ++	cr16)
          ++		basic_machine=cr16-unknown
          + 		os=-elf
          + 		;;
          + 	crds | unos)
          +@@ -682,6 +683,10 @@
          + 		basic_machine=i386-pc
          + 		os=-mingw32
          + 		;;
          ++	mingw32ce)
          ++		basic_machine=arm-unknown
          ++		os=-mingw32ce
          ++		;;
          + 	miniframe)
          + 		basic_machine=m68000-convergent
          + 		;;
          +@@ -924,6 +929,9 @@
          + 		basic_machine=sh-hitachi
          + 		os=-hms
          + 		;;
          ++	sh5el)
          ++		basic_machine=sh5le-unknown
          ++		;;
          + 	sh64)
          + 		basic_machine=sh64-unknown
          + 		;;
          +@@ -1218,7 +1226,7 @@
          + 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
          + 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
          + 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
          +-	      | -skyos* | -haiku* | -rdos* | -toppers*)
          ++	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
          + 	# Remember, each alternative MUST END IN *, to match a version number.
          + 		;;
          + 	-qnx*)
          +@@ -1370,6 +1378,9 @@
          + # system, and we'll never get to this point.
          + 
          + case $basic_machine in
          ++        score-*)
          ++		os=-elf
          ++		;;
          +         spu-*)
          + 		os=-elf
          + 		;;
          +@@ -1410,6 +1421,9 @@
          + 	m68*-cisco)
          + 		os=-aout
          + 		;;
          ++        mep-*)
          ++		os=-elf
          ++		;;
          + 	mips*-cisco)
          + 		os=-elf
          + 		;;
          +Index: configure
          +--- ncurses-5.6/configure	2006-12-17 16:33:38.000000000 +0000
          ++++ ncurses-5.6-20071201/configure	2007-12-01 20:43:33.000000000 +0000
          +@@ -1,5 +1,5 @@
          + #! /bin/sh
          +-# From configure.in Revision: 1.383 .
          ++# From configure.in Revision: 1.429 .
          + # Guess values for system-dependent variables and create Makefiles.
          + # Generated by Autoconf 2.52.20061216.
          + #
          +@@ -699,6 +699,7 @@
          +   --without-ada           suppress check for Ada95, don't build demo
          +   --without-progs         suppress build with programs (e.g., tic)
          +   --without-curses-h      install curses.h as ncurses.h only
          ++  --enable-mixed-case     tic should assume mixed-case filenames
          +   --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)
          +@@ -714,10 +715,12 @@
          +   --with-debug            generate debug-libraries (default)
          +   --with-profile          generate profile-libraries
          +   --with-termlib          generate separate terminfo library
          ++  --with-ticlib           generate separate tic library
          +   --with-gpm              use Alessandro Rubini's GPM library
          +   --without-dlsym         do not use dlsym() to load GPM dynamically
          +   --with-sysmouse         use sysmouse (FreeBSD console)
          +   --enable-rpath          use rpath option when generating shared libraries
          ++  --disable-relink        relink shared libraries during install
          +   --with-shlib-version=X  Specify rel or abi version for shared libs
          + Fine-Tuning Your Configuration:
          +   --disable-overwrite     leave out the link to -lcurses
          +@@ -729,6 +732,7 @@
          +   --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
          ++  --disable-big-strings   assume compiler has only standard-size strings
          +   --enable-termcap        compile in termcap fallback support
          +   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
          +   --enable-getcap         fast termcap load, no xrefs to terminfo
          +@@ -759,7 +763,7 @@
          +   --disable-ext-funcs     disable function-extensions
          +   --enable-const          compile with extra/non-standard const
          +   --enable-no-padding     compile with $NCURSES_NO_PADDING code
          +-  --enable-signed-char    compile with SIGWINCH handler
          ++  --enable-signed-char    compile using signed Boolean's in term.h
          +   --enable-sigwinch       compile with SIGWINCH handler
          +   --enable-tcap-names     compile with user-definable terminal capabilities
          + Development Code:
          +@@ -772,6 +776,7 @@
          +   --enable-colorfgbg      compile with $COLORFGBG code
          +   --enable-ext-colors     compile for experimental 256-color support
          +   --enable-ext-mouse      compile for experimental mouse-encoding
          ++  --enable-reentrant      compile with experimental reentrant code
          +   --enable-safe-sprintf   compile with experimental safe-sprintf code
          +   --disable-scroll-hints  compile without scroll-hints code
          +   --enable-wgetch-events  compile with experimental wgetch-events code
          +@@ -986,7 +991,7 @@
          + fi
          + for ac_site_file in $CONFIG_SITE; do
          +   if test -r "$ac_site_file"; then
          +-    { echo "$as_me:989: loading site script $ac_site_file" >&5
          ++    { echo "$as_me:994: 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"
          +@@ -997,7 +1002,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:1000: loading cache $cache_file" >&5
          ++    { echo "$as_me:1005: loading cache $cache_file" >&5
          + echo "$as_me: loading cache $cache_file" >&6;}
          +     case $cache_file in
          +       [\\/]* | ?:[\\/]* ) . $cache_file;;
          +@@ -1005,7 +1010,7 @@
          +     esac
          +   fi
          + else
          +-  { echo "$as_me:1008: creating cache $cache_file" >&5
          ++  { echo "$as_me:1013: creating cache $cache_file" >&5
          + echo "$as_me: creating cache $cache_file" >&6;}
          +   >$cache_file
          + fi
          +@@ -1021,21 +1026,21 @@
          +   eval ac_new_val="\$ac_env_${ac_var}_value"
          +   case $ac_old_set,$ac_new_set in
          +     set,)
          +-      { echo "$as_me:1024: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
          ++      { echo "$as_me:1029: 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:1028: error: \`$ac_var' was not set in the previous run" >&5
          ++      { echo "$as_me:1033: 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:1034: error: \`$ac_var' has changed since the previous run:" >&5
          ++        { echo "$as_me:1039: 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:1036:   former value:  $ac_old_val" >&5
          ++        { echo "$as_me:1041:   former value:  $ac_old_val" >&5
          + echo "$as_me:   former value:  $ac_old_val" >&2;}
          +-        { echo "$as_me:1038:   current value: $ac_new_val" >&5
          ++        { echo "$as_me:1043:   current value: $ac_new_val" >&5
          + echo "$as_me:   current value: $ac_new_val" >&2;}
          +         ac_cache_corrupted=:
          +       fi;;
          +@@ -1054,9 +1059,9 @@
          +   fi
          + done
          + if $ac_cache_corrupted; then
          +-  { echo "$as_me:1057: error: changes in the environment can compromise the build" >&5
          ++  { echo "$as_me:1062: 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:1059: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
          ++  { { echo "$as_me:1064: 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
          +@@ -1077,10 +1082,10 @@
          + echo "#! $SHELL" >conftest.sh
          + echo  "exit 0"   >>conftest.sh
          + chmod +x conftest.sh
          +-if { (echo "$as_me:1080: PATH=\".;.\"; conftest.sh") >&5
          ++if { (echo "$as_me:1085: PATH=\".;.\"; conftest.sh") >&5
          +   (PATH=".;."; conftest.sh) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1083: \$? = $ac_status" >&5
          ++  echo "$as_me:1088: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          +   ac_path_separator=';'
          + else
          +@@ -1093,7 +1098,7 @@
          + 
          + top_builddir=`pwd`
          + 
          +-echo "$as_me:1096: checking for egrep" >&5
          ++echo "$as_me:1101: checking for egrep" >&5
          + echo $ECHO_N "checking for egrep... $ECHO_C" >&6
          + if test "${ac_cv_prog_egrep+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -1103,11 +1108,11 @@
          +     else ac_cv_prog_egrep='egrep'
          +     fi
          + fi
          +-echo "$as_me:1106: result: $ac_cv_prog_egrep" >&5
          ++echo "$as_me:1111: result: $ac_cv_prog_egrep" >&5
          + echo "${ECHO_T}$ac_cv_prog_egrep" >&6
          +  EGREP=$ac_cv_prog_egrep
          + 
          +-test -z "$EGREP" && { { echo "$as_me:1110: error: No egrep program found" >&5
          ++test -z "$EGREP" && { { echo "$as_me:1115: error: No egrep program found" >&5
          + echo "$as_me: error: No egrep program found" >&2;}
          +    { (exit 1); exit 1; }; }
          + 
          +@@ -1117,7 +1122,7 @@
          + cf_cv_abi_version=${NCURSES_MAJOR}
          + cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
          + cf_cv_timestamp=`date`
          +-echo "$as_me:1120: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
          ++echo "$as_me:1125: 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
          +@@ -1125,7 +1130,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:1128: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
          ++  { echo "$as_me:1133: 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;
          +@@ -1138,13 +1143,13 @@
          +   [0-9]*) #(vi
          +  	;;
          +   *)
          +-	{ { echo "$as_me:1141: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
          ++	{ { echo "$as_me:1146: 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:1147: error: Release major-version value is empty" >&5
          ++  { { echo "$as_me:1152: error: Release major-version value is empty" >&5
          + echo "$as_me: error: Release major-version value is empty" >&2;}
          +    { (exit 1); exit 1; }; }
          + fi
          +@@ -1154,13 +1159,13 @@
          +   [0-9]*) #(vi
          +  	;;
          +   *)
          +-	{ { echo "$as_me:1157: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
          ++	{ { echo "$as_me:1162: 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:1163: error: Release minor-version value is empty" >&5
          ++  { { echo "$as_me:1168: error: Release minor-version value is empty" >&5
          + echo "$as_me: error: Release minor-version value is empty" >&2;}
          +    { (exit 1); exit 1; }; }
          + fi
          +@@ -1170,7 +1175,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:1173: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
          ++  { echo "$as_me:1178: 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;
          +@@ -1180,13 +1185,13 @@
          +   [0-9]*) #(vi
          +  	;;
          +   *)
          +-	{ { echo "$as_me:1183: error: ABI version is not a number: $cf_cv_abi_version" >&5
          ++	{ { echo "$as_me:1188: 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:1189: error: ABI version value is empty" >&5
          ++  { { echo "$as_me:1194: error: ABI version value is empty" >&5
          + echo "$as_me: error: ABI version value is empty" >&2;}
          +    { (exit 1); exit 1; }; }
          + fi
          +@@ -1208,7 +1213,7 @@
          +   fi
          + done
          + if test -z "$ac_aux_dir"; then
          +-  { { echo "$as_me:1211: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
          ++  { { echo "$as_me:1216: 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
          +@@ -1218,11 +1223,11 @@
          + 
          + # Make sure we can run config.sub.
          + $ac_config_sub sun4 >/dev/null 2>&1 ||
          +-  { { echo "$as_me:1221: error: cannot run $ac_config_sub" >&5
          ++  { { echo "$as_me:1226: error: cannot run $ac_config_sub" >&5
          + echo "$as_me: error: cannot run $ac_config_sub" >&2;}
          +    { (exit 1); exit 1; }; }
          + 
          +-echo "$as_me:1225: checking build system type" >&5
          ++echo "$as_me:1230: 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
          +@@ -1231,23 +1236,23 @@
          + test -z "$ac_cv_build_alias" &&
          +   ac_cv_build_alias=`$ac_config_guess`
          + test -z "$ac_cv_build_alias" &&
          +-  { { echo "$as_me:1234: error: cannot guess build type; you must specify one" >&5
          ++  { { echo "$as_me:1239: 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:1238: error: $ac_config_sub $ac_cv_build_alias failed." >&5
          ++  { { echo "$as_me:1243: 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:1243: result: $ac_cv_build" >&5
          ++echo "$as_me:1248: 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:1250: checking host system type" >&5
          ++echo "$as_me:1255: 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
          +@@ -1256,12 +1261,12 @@
          + 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:1259: error: $ac_config_sub $ac_cv_host_alias failed" >&5
          ++  { { echo "$as_me:1264: 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:1264: result: $ac_cv_host" >&5
          ++echo "$as_me:1269: 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/'`
          +@@ -1269,7 +1274,7 @@
          + host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
          + 
          + if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
          +-	echo "$as_me:1272: checking target system type" >&5
          ++	echo "$as_me:1277: 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
          +@@ -1278,12 +1283,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:1281: error: $ac_config_sub $ac_cv_target_alias failed" >&5
          ++  { { echo "$as_me:1286: 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:1286: result: $ac_cv_target" >&5
          ++echo "$as_me:1291: 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/'`
          +@@ -1314,13 +1319,13 @@
          + fi
          + 
          + test -z "$system_name" && system_name="$cf_cv_system_name"
          +-test -n "$cf_cv_system_name" && echo "$as_me:1317: result: Configuring for $cf_cv_system_name" >&5
          ++test -n "$cf_cv_system_name" && echo "$as_me:1322: 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:1321: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
          ++	echo "$as_me:1326: 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:1323: error: \"Please remove config.cache and try again.\"" >&5
          ++	{ { echo "$as_me:1328: 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
          +@@ -1328,7 +1333,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:1331: WARNING: overriding system type to $withval" >&5
          ++  { echo "$as_me:1336: WARNING: overriding system type to $withval" >&5
          + echo "$as_me: WARNING: overriding system type to $withval" >&2;}
          +  cf_cv_system_name=$withval
          + fi;
          +@@ -1338,7 +1343,7 @@
          + 
          + ###	Default install-location
          + 
          +-echo "$as_me:1341: checking for prefix" >&5
          ++echo "$as_me:1346: 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
          +@@ -1350,11 +1355,11 @@
          + 		;;
          + 	esac
          + fi
          +-echo "$as_me:1353: result: $prefix" >&5
          ++echo "$as_me:1358: result: $prefix" >&5
          + echo "${ECHO_T}$prefix" >&6
          + 
          + if test "x$prefix" = "xNONE" ; then
          +-echo "$as_me:1357: checking for default include-directory" >&5
          ++echo "$as_me:1362: 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 \
          +@@ -1377,7 +1382,7 @@
          + 	fi
          + 	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
          + done
          +-echo "$as_me:1380: result: $includedir" >&5
          ++echo "$as_me:1385: result: $includedir" >&5
          + echo "${ECHO_T}$includedir" >&6
          + fi
          + 
          +@@ -1391,7 +1396,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:1394: checking for $ac_word" >&5
          ++echo "$as_me:1399: 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
          +@@ -1406,7 +1411,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:1409: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1414: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1414,10 +1419,10 @@
          + fi
          + CC=$ac_cv_prog_CC
          + if test -n "$CC"; then
          +-  echo "$as_me:1417: result: $CC" >&5
          ++  echo "$as_me:1422: result: $CC" >&5
          + echo "${ECHO_T}$CC" >&6
          + else
          +-  echo "$as_me:1420: result: no" >&5
          ++  echo "$as_me:1425: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1426,7 +1431,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:1429: checking for $ac_word" >&5
          ++echo "$as_me:1434: 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
          +@@ -1441,7 +1446,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:1444: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1449: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1449,10 +1454,10 @@
          + fi
          + ac_ct_CC=$ac_cv_prog_ac_ct_CC
          + if test -n "$ac_ct_CC"; then
          +-  echo "$as_me:1452: result: $ac_ct_CC" >&5
          ++  echo "$as_me:1457: result: $ac_ct_CC" >&5
          + echo "${ECHO_T}$ac_ct_CC" >&6
          + else
          +-  echo "$as_me:1455: result: no" >&5
          ++  echo "$as_me:1460: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1465,7 +1470,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:1468: checking for $ac_word" >&5
          ++echo "$as_me:1473: 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
          +@@ -1480,7 +1485,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:1483: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1488: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1488,10 +1493,10 @@
          + fi
          + CC=$ac_cv_prog_CC
          + if test -n "$CC"; then
          +-  echo "$as_me:1491: result: $CC" >&5
          ++  echo "$as_me:1496: result: $CC" >&5
          + echo "${ECHO_T}$CC" >&6
          + else
          +-  echo "$as_me:1494: result: no" >&5
          ++  echo "$as_me:1499: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1500,7 +1505,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:1503: checking for $ac_word" >&5
          ++echo "$as_me:1508: 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
          +@@ -1515,7 +1520,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:1518: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1523: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1523,10 +1528,10 @@
          + fi
          + ac_ct_CC=$ac_cv_prog_ac_ct_CC
          + if test -n "$ac_ct_CC"; then
          +-  echo "$as_me:1526: result: $ac_ct_CC" >&5
          ++  echo "$as_me:1531: result: $ac_ct_CC" >&5
          + echo "${ECHO_T}$ac_ct_CC" >&6
          + else
          +-  echo "$as_me:1529: result: no" >&5
          ++  echo "$as_me:1534: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1539,7 +1544,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:1542: checking for $ac_word" >&5
          ++echo "$as_me:1547: 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
          +@@ -1559,7 +1564,7 @@
          +   continue
          + fi
          + ac_cv_prog_CC="cc"
          +-echo "$as_me:1562: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1567: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1581,10 +1586,10 @@
          + fi
          + CC=$ac_cv_prog_CC
          + if test -n "$CC"; then
          +-  echo "$as_me:1584: result: $CC" >&5
          ++  echo "$as_me:1589: result: $CC" >&5
          + echo "${ECHO_T}$CC" >&6
          + else
          +-  echo "$as_me:1587: result: no" >&5
          ++  echo "$as_me:1592: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1595,7 +1600,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:1598: checking for $ac_word" >&5
          ++echo "$as_me:1603: 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
          +@@ -1610,7 +1615,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:1613: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1618: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1618,10 +1623,10 @@
          + fi
          + CC=$ac_cv_prog_CC
          + if test -n "$CC"; then
          +-  echo "$as_me:1621: result: $CC" >&5
          ++  echo "$as_me:1626: result: $CC" >&5
          + echo "${ECHO_T}$CC" >&6
          + else
          +-  echo "$as_me:1624: result: no" >&5
          ++  echo "$as_me:1629: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1634,7 +1639,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:1637: checking for $ac_word" >&5
          ++echo "$as_me:1642: 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
          +@@ -1649,7 +1654,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:1652: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:1657: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -1657,10 +1662,10 @@
          + fi
          + ac_ct_CC=$ac_cv_prog_ac_ct_CC
          + if test -n "$ac_ct_CC"; then
          +-  echo "$as_me:1660: result: $ac_ct_CC" >&5
          ++  echo "$as_me:1665: result: $ac_ct_CC" >&5
          + echo "${ECHO_T}$ac_ct_CC" >&6
          + else
          +-  echo "$as_me:1663: result: no" >&5
          ++  echo "$as_me:1668: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -1672,32 +1677,32 @@
          + 
          + fi
          + 
          +-test -z "$CC" && { { echo "$as_me:1675: error: no acceptable cc found in \$PATH" >&5
          ++test -z "$CC" && { { echo "$as_me:1680: 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:1680:" \
          ++echo "$as_me:1685:" \
          +      "checking for C compiler version" >&5
          + ac_compiler=`set X $ac_compile; echo $2`
          +-{ (eval echo "$as_me:1683: \"$ac_compiler --version &5\"") >&5
          ++{ (eval echo "$as_me:1688: \"$ac_compiler --version &5\"") >&5
          +   (eval $ac_compiler --version &5) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1686: \$? = $ac_status" >&5
          ++  echo "$as_me:1691: \$? = $ac_status" >&5
          +   (exit $ac_status); }
          +-{ (eval echo "$as_me:1688: \"$ac_compiler -v &5\"") >&5
          ++{ (eval echo "$as_me:1693: \"$ac_compiler -v &5\"") >&5
          +   (eval $ac_compiler -v &5) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1691: \$? = $ac_status" >&5
          ++  echo "$as_me:1696: \$? = $ac_status" >&5
          +   (exit $ac_status); }
          +-{ (eval echo "$as_me:1693: \"$ac_compiler -V &5\"") >&5
          ++{ (eval echo "$as_me:1698: \"$ac_compiler -V &5\"") >&5
          +   (eval $ac_compiler -V &5) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1696: \$? = $ac_status" >&5
          ++  echo "$as_me:1701: \$? = $ac_status" >&5
          +   (exit $ac_status); }
          + 
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 1700 "configure"
          ++#line 1705 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -1713,13 +1718,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:1716: checking for C compiler default output" >&5
          ++echo "$as_me:1721: 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:1719: \"$ac_link_default\"") >&5
          ++if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
          +   (eval $ac_link_default) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1722: \$? = $ac_status" >&5
          ++  echo "$as_me:1727: \$? = $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
          +@@ -1742,34 +1747,34 @@
          + else
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          +-{ { echo "$as_me:1745: error: C compiler cannot create executables" >&5
          ++{ { echo "$as_me:1750: 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:1751: result: $ac_file" >&5
          ++echo "$as_me:1756: 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:1756: checking whether the C compiler works" >&5
          ++echo "$as_me:1761: 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:1762: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:1767: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1765: \$? = $ac_status" >&5
          ++  echo "$as_me:1770: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +     cross_compiling=no
          +   else
          +     if test "$cross_compiling" = maybe; then
          + 	cross_compiling=yes
          +     else
          +-	{ { echo "$as_me:1772: error: cannot run C compiled programs.
          ++	{ { echo "$as_me:1777: 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;}
          +@@ -1777,24 +1782,24 @@
          +     fi
          +   fi
          + fi
          +-echo "$as_me:1780: result: yes" >&5
          ++echo "$as_me:1785: 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:1787: checking whether we are cross compiling" >&5
          ++echo "$as_me:1792: checking whether we are cross compiling" >&5
          + echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
          +-echo "$as_me:1789: result: $cross_compiling" >&5
          ++echo "$as_me:1794: result: $cross_compiling" >&5
          + echo "${ECHO_T}$cross_compiling" >&6
          + 
          +-echo "$as_me:1792: checking for executable suffix" >&5
          ++echo "$as_me:1797: checking for executable suffix" >&5
          + echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
          +-if { (eval echo "$as_me:1794: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1797: \$? = $ac_status" >&5
          ++  echo "$as_me:1802: \$? = $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
          +@@ -1810,25 +1815,25 @@
          +   esac
          + done
          + else
          +-  { { echo "$as_me:1813: error: cannot compute EXEEXT: cannot compile and link" >&5
          ++  { { echo "$as_me:1818: 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:1819: result: $ac_cv_exeext" >&5
          ++echo "$as_me:1824: 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:1825: checking for object suffix" >&5
          ++echo "$as_me:1830: 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 1831 "configure"
          ++#line 1836 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -1840,10 +1845,10 @@
          + }
          + _ACEOF
          + rm -f conftest.o conftest.obj
          +-if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1846: \$? = $ac_status" >&5
          ++  echo "$as_me:1851: \$? = $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
          +@@ -1855,24 +1860,24 @@
          + else
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          +-{ { echo "$as_me:1858: error: cannot compute OBJEXT: cannot compile" >&5
          ++{ { echo "$as_me:1863: 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:1865: result: $ac_cv_objext" >&5
          ++echo "$as_me:1870: result: $ac_cv_objext" >&5
          + echo "${ECHO_T}$ac_cv_objext" >&6
          + OBJEXT=$ac_cv_objext
          + ac_objext=$OBJEXT
          +-echo "$as_me:1869: checking whether we are using the GNU C compiler" >&5
          ++echo "$as_me:1874: 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 1875 "configure"
          ++#line 1880 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -1887,16 +1892,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1893: \$? = $ac_status" >&5
          ++  echo "$as_me:1898: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:1896: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:1901: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1899: \$? = $ac_status" >&5
          ++  echo "$as_me:1904: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_compiler_gnu=yes
          + else
          +@@ -1908,19 +1913,19 @@
          + ac_cv_c_compiler_gnu=$ac_compiler_gnu
          + 
          + fi
          +-echo "$as_me:1911: result: $ac_cv_c_compiler_gnu" >&5
          ++echo "$as_me:1916: 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:1917: checking whether $CC accepts -g" >&5
          ++echo "$as_me:1922: 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 1923 "configure"
          ++#line 1928 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -1932,16 +1937,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:1935: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1938: \$? = $ac_status" >&5
          ++  echo "$as_me:1943: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:1941: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:1946: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1944: \$? = $ac_status" >&5
          ++  echo "$as_me:1949: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_prog_cc_g=yes
          + else
          +@@ -1951,7 +1956,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:1954: result: $ac_cv_prog_cc_g" >&5
          ++echo "$as_me:1959: 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
          +@@ -1978,16 +1983,16 @@
          + #endif
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1984: \$? = $ac_status" >&5
          ++  echo "$as_me:1989: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:1987: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:1992: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:1990: \$? = $ac_status" >&5
          ++  echo "$as_me:1995: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   for ac_declaration in \
          +    ''\
          +@@ -1999,7 +2004,7 @@
          +    'void exit (int);'
          + do
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 2002 "configure"
          ++#line 2007 "configure"
          + #include "confdefs.h"
          + #include 
          + $ac_declaration
          +@@ -2012,16 +2017,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2018: \$? = $ac_status" >&5
          ++  echo "$as_me:2023: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2021: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2026: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2024: \$? = $ac_status" >&5
          ++  echo "$as_me:2029: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   :
          + else
          +@@ -2031,7 +2036,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 2034 "configure"
          ++#line 2039 "configure"
          + #include "confdefs.h"
          + $ac_declaration
          + int
          +@@ -2043,16 +2048,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2046: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2049: \$? = $ac_status" >&5
          ++  echo "$as_me:2054: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2052: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2057: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2055: \$? = $ac_status" >&5
          ++  echo "$as_me:2060: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -2082,11 +2087,11 @@
          + 
          + GCC_VERSION=none
          + if test "$GCC" = yes ; then
          +-	echo "$as_me:2085: checking version of $CC" >&5
          ++	echo "$as_me:2090: 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/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
          + 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
          +-	echo "$as_me:2089: result: $GCC_VERSION" >&5
          ++	echo "$as_me:2094: result: $GCC_VERSION" >&5
          + echo "${ECHO_T}$GCC_VERSION" >&6
          + fi
          + 
          +@@ -2096,7 +2101,7 @@
          + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
          + ac_compiler_gnu=$ac_cv_c_compiler_gnu
          + ac_main_return=return
          +-echo "$as_me:2099: checking how to run the C preprocessor" >&5
          ++echo "$as_me:2104: 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
          +@@ -2117,18 +2122,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 2120 "configure"
          ++#line 2125 "configure"
          + #include "confdefs.h"
          + #include 
          +                      Syntax error
          + _ACEOF
          +-if { (eval echo "$as_me:2125: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:2130: \"$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:2131: \$? = $ac_status" >&5
          ++  echo "$as_me:2136: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -2151,17 +2156,17 @@
          +   # OK, works on sane cases.  Now check whether non-existent headers
          +   # can be detected and how.
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 2154 "configure"
          ++#line 2159 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:2158: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:2163: \"$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:2164: \$? = $ac_status" >&5
          ++  echo "$as_me:2169: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -2198,7 +2203,7 @@
          + else
          +   ac_cv_prog_CPP=$CPP
          + fi
          +-echo "$as_me:2201: result: $CPP" >&5
          ++echo "$as_me:2206: result: $CPP" >&5
          + echo "${ECHO_T}$CPP" >&6
          + ac_preproc_ok=false
          + for ac_c_preproc_warn_flag in '' yes
          +@@ -2208,18 +2213,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 2211 "configure"
          ++#line 2216 "configure"
          + #include "confdefs.h"
          + #include 
          +                      Syntax error
          + _ACEOF
          +-if { (eval echo "$as_me:2216: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:2221: \"$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:2222: \$? = $ac_status" >&5
          ++  echo "$as_me:2227: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -2242,17 +2247,17 @@
          +   # OK, works on sane cases.  Now check whether non-existent headers
          +   # can be detected and how.
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 2245 "configure"
          ++#line 2250 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:2249: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:2254: \"$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:2255: \$? = $ac_status" >&5
          ++  echo "$as_me:2260: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -2280,7 +2285,7 @@
          + if $ac_preproc_ok; then
          +   :
          + else
          +-  { { echo "$as_me:2283: error: C preprocessor \"$CPP\" fails sanity check" >&5
          ++  { { echo "$as_me:2288: error: C preprocessor \"$CPP\" fails sanity check" >&5
          + echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
          +    { (exit 1); exit 1; }; }
          + fi
          +@@ -2293,14 +2298,14 @@
          + ac_main_return=return
          + 
          + if test $ac_cv_c_compiler_gnu = yes; then
          +-    echo "$as_me:2296: checking whether $CC needs -traditional" >&5
          ++    echo "$as_me:2301: 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 2303 "configure"
          ++#line 2308 "configure"
          + #include "confdefs.h"
          + #include 
          + int Autoconf = TIOCGETP;
          +@@ -2315,7 +2320,7 @@
          + 
          +   if test $ac_cv_prog_gcc_traditional = no; then
          +     cat >conftest.$ac_ext <<_ACEOF
          +-#line 2318 "configure"
          ++#line 2323 "configure"
          + #include "confdefs.h"
          + #include 
          + int Autoconf = TCGETA;
          +@@ -2328,14 +2333,14 @@
          + 
          +   fi
          + fi
          +-echo "$as_me:2331: result: $ac_cv_prog_gcc_traditional" >&5
          ++echo "$as_me:2336: 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:2338: checking whether $CC understands -c and -o together" >&5
          ++echo "$as_me:2343: 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
          +@@ -2351,15 +2356,15 @@
          + # 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:2354: \"$ac_try\"") >&5
          ++if { (eval echo "$as_me:2359: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2357: \$? = $ac_status" >&5
          ++  echo "$as_me:2362: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +-  test -f conftest2.$ac_objext && { (eval echo "$as_me:2359: \"$ac_try\"") >&5
          ++  test -f conftest2.$ac_objext && { (eval echo "$as_me:2364: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2362: \$? = $ac_status" >&5
          ++  echo "$as_me:2367: \$? = $ac_status" >&5
          +   (exit $ac_status); };
          + then
          +   eval cf_cv_prog_CC_c_o=yes
          +@@ -2370,19 +2375,19 @@
          + 
          + fi
          + if test $cf_cv_prog_CC_c_o = yes; then
          +-  echo "$as_me:2373: result: yes" >&5
          ++  echo "$as_me:2378: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          + else
          +-  echo "$as_me:2376: result: no" >&5
          ++  echo "$as_me:2381: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +-echo "$as_me:2380: checking for POSIXized ISC" >&5
          ++echo "$as_me:2385: 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:2385: result: yes" >&5
          ++  echo "$as_me:2390: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          +   ISC=yes # If later tests want to check for ISC.
          + 
          +@@ -2396,12 +2401,12 @@
          +     CC="$CC -Xp"
          +   fi
          + else
          +-  echo "$as_me:2399: result: no" >&5
          ++  echo "$as_me:2404: result: no" >&5
          + echo "${ECHO_T}no" >&6
          +   ISC=
          + fi
          + 
          +-echo "$as_me:2404: checking for ${CC-cc} option to accept ANSI C" >&5
          ++echo "$as_me:2409: 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
          +@@ -2495,7 +2500,7 @@
          + fi
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 2498 "configure"
          ++#line 2503 "configure"
          + #include "confdefs.h"
          + 
          + #ifndef CC_HAS_PROTOS
          +@@ -2516,16 +2521,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2519: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2522: \$? = $ac_status" >&5
          ++  echo "$as_me:2527: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2525: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2530: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2528: \$? = $ac_status" >&5
          ++  echo "$as_me:2533: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_ansi_cc="$cf_arg"; break
          + else
          +@@ -2538,7 +2543,7 @@
          + CPPFLAGS="$cf_save_CPPFLAGS"
          + 
          + fi
          +-echo "$as_me:2541: result: $cf_cv_ansi_cc" >&5
          ++echo "$as_me:2546: result: $cf_cv_ansi_cc" >&5
          + echo "${ECHO_T}$cf_cv_ansi_cc" >&6
          + 
          + if test "$cf_cv_ansi_cc" != "no"; then
          +@@ -2621,7 +2626,7 @@
          + fi
          + 
          + if test "$cf_cv_ansi_cc" = "no"; then
          +-	{ { echo "$as_me:2624: error: Your compiler does not appear to recognize prototypes.
          ++	{ { echo "$as_me:2629: 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
          +@@ -2661,7 +2666,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:2664: checking for $ac_word" >&5
          ++echo "$as_me:2669: 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
          +@@ -2678,7 +2683,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:2681: found $ac_dir/$ac_word" >&5
          ++   echo "$as_me:2686: found $ac_dir/$ac_word" >&5
          +    break
          + fi
          + done
          +@@ -2689,10 +2694,10 @@
          + LDCONFIG=$ac_cv_path_LDCONFIG
          + 
          + if test -n "$LDCONFIG"; then
          +-  echo "$as_me:2692: result: $LDCONFIG" >&5
          ++  echo "$as_me:2697: result: $LDCONFIG" >&5
          + echo "${ECHO_T}$LDCONFIG" >&6
          + else
          +-  echo "$as_me:2695: result: no" >&5
          ++  echo "$as_me:2700: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -2700,7 +2705,7 @@
          + esac
          + fi
          + 
          +-echo "$as_me:2703: checking if you want to ensure bool is consistent with C++" >&5
          ++echo "$as_me:2708: 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.
          +@@ -2710,7 +2715,7 @@
          + else
          +   cf_with_cxx=yes
          + fi;
          +-echo "$as_me:2713: result: $cf_with_cxx" >&5
          ++echo "$as_me:2718: result: $cf_with_cxx" >&5
          + echo "${ECHO_T}$cf_with_cxx" >&6
          + if test "X$cf_with_cxx" = Xno ; then
          + 	CXX=""
          +@@ -2728,7 +2733,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:2731: checking for $ac_word" >&5
          ++echo "$as_me:2736: 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
          +@@ -2743,7 +2748,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:2746: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:2751: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -2751,10 +2756,10 @@
          + fi
          + CXX=$ac_cv_prog_CXX
          + if test -n "$CXX"; then
          +-  echo "$as_me:2754: result: $CXX" >&5
          ++  echo "$as_me:2759: result: $CXX" >&5
          + echo "${ECHO_T}$CXX" >&6
          + else
          +-  echo "$as_me:2757: result: no" >&5
          ++  echo "$as_me:2762: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -2767,7 +2772,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:2770: checking for $ac_word" >&5
          ++echo "$as_me:2775: 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
          +@@ -2782,7 +2787,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:2785: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:2790: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -2790,10 +2795,10 @@
          + fi
          + ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
          + if test -n "$ac_ct_CXX"; then
          +-  echo "$as_me:2793: result: $ac_ct_CXX" >&5
          ++  echo "$as_me:2798: result: $ac_ct_CXX" >&5
          + echo "${ECHO_T}$ac_ct_CXX" >&6
          + else
          +-  echo "$as_me:2796: result: no" >&5
          ++  echo "$as_me:2801: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -2805,32 +2810,32 @@
          + fi
          + 
          + # Provide some information about the compiler.
          +-echo "$as_me:2808:" \
          ++echo "$as_me:2813:" \
          +      "checking for C++ compiler version" >&5
          + ac_compiler=`set X $ac_compile; echo $2`
          +-{ (eval echo "$as_me:2811: \"$ac_compiler --version &5\"") >&5
          ++{ (eval echo "$as_me:2816: \"$ac_compiler --version &5\"") >&5
          +   (eval $ac_compiler --version &5) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2814: \$? = $ac_status" >&5
          ++  echo "$as_me:2819: \$? = $ac_status" >&5
          +   (exit $ac_status); }
          +-{ (eval echo "$as_me:2816: \"$ac_compiler -v &5\"") >&5
          ++{ (eval echo "$as_me:2821: \"$ac_compiler -v &5\"") >&5
          +   (eval $ac_compiler -v &5) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2819: \$? = $ac_status" >&5
          ++  echo "$as_me:2824: \$? = $ac_status" >&5
          +   (exit $ac_status); }
          +-{ (eval echo "$as_me:2821: \"$ac_compiler -V &5\"") >&5
          ++{ (eval echo "$as_me:2826: \"$ac_compiler -V &5\"") >&5
          +   (eval $ac_compiler -V &5) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2824: \$? = $ac_status" >&5
          ++  echo "$as_me:2829: \$? = $ac_status" >&5
          +   (exit $ac_status); }
          + 
          +-echo "$as_me:2827: checking whether we are using the GNU C++ compiler" >&5
          ++echo "$as_me:2832: 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 2833 "configure"
          ++#line 2838 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -2845,16 +2850,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2848: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2851: \$? = $ac_status" >&5
          ++  echo "$as_me:2856: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2854: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2859: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2857: \$? = $ac_status" >&5
          ++  echo "$as_me:2862: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_compiler_gnu=yes
          + else
          +@@ -2866,19 +2871,19 @@
          + ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
          + 
          + fi
          +-echo "$as_me:2869: result: $ac_cv_cxx_compiler_gnu" >&5
          ++echo "$as_me:2874: 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:2875: checking whether $CXX accepts -g" >&5
          ++echo "$as_me:2880: 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 2881 "configure"
          ++#line 2886 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -2890,16 +2895,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2893: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2898: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2896: \$? = $ac_status" >&5
          ++  echo "$as_me:2901: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2899: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2904: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2902: \$? = $ac_status" >&5
          ++  echo "$as_me:2907: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_prog_cxx_g=yes
          + else
          +@@ -2909,7 +2914,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:2912: result: $ac_cv_prog_cxx_g" >&5
          ++echo "$as_me:2917: 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
          +@@ -2936,7 +2941,7 @@
          +    'void exit (int);'
          + do
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 2939 "configure"
          ++#line 2944 "configure"
          + #include "confdefs.h"
          + #include 
          + $ac_declaration
          +@@ -2949,16 +2954,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2952: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2955: \$? = $ac_status" >&5
          ++  echo "$as_me:2960: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2958: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2963: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2961: \$? = $ac_status" >&5
          ++  echo "$as_me:2966: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   :
          + else
          +@@ -2968,7 +2973,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 2971 "configure"
          ++#line 2976 "configure"
          + #include "confdefs.h"
          + $ac_declaration
          + int
          +@@ -2980,16 +2985,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:2983: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2986: \$? = $ac_status" >&5
          ++  echo "$as_me:2991: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:2989: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:2994: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:2992: \$? = $ac_status" >&5
          ++  echo "$as_me:2997: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -3016,7 +3021,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:3019: checking for $ac_word" >&5
          ++echo "$as_me:3024: 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
          +@@ -3033,7 +3038,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:3036: found $ac_dir/$ac_word" >&5
          ++   echo "$as_me:3041: found $ac_dir/$ac_word" >&5
          +    break
          + fi
          + done
          +@@ -3044,16 +3049,16 @@
          + CXX=$ac_cv_path_CXX
          + 
          + if test -n "$CXX"; then
          +-  echo "$as_me:3047: result: $CXX" >&5
          ++  echo "$as_me:3052: result: $CXX" >&5
          + echo "${ECHO_T}$CXX" >&6
          + else
          +-  echo "$as_me:3050: result: no" >&5
          ++  echo "$as_me:3055: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          + 	fi
          + 	if test "$CXX" = "g++" ; then
          +-		{ echo "$as_me:3056: WARNING: ignoring hardcoded g++" >&5
          ++		{ echo "$as_me:3061: WARNING: ignoring hardcoded g++" >&5
          + echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
          + 		cf_with_cxx=no; CXX=""; GXX="";
          + 	fi
          +@@ -3061,11 +3066,11 @@
          + 
          + GXX_VERSION=none
          + if test "$GXX" = yes; then
          +-	echo "$as_me:3064: checking version of g++" >&5
          ++	echo "$as_me:3069: checking version of g++" >&5
          + echo $ECHO_N "checking version of g++... $ECHO_C" >&6
          + 	GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
          + 	test -z "$GXX_VERSION" && GXX_VERSION=unknown
          +-	echo "$as_me:3068: result: $GXX_VERSION" >&5
          ++	echo "$as_me:3073: result: $GXX_VERSION" >&5
          + echo "${ECHO_T}$GXX_VERSION" >&6
          + fi
          + 
          +@@ -3073,12 +3078,12 @@
          + 1*|2.[0-6]*)
          + 	# GXX=""; CXX=""; ac_cv_prog_gxx=no
          + 	# cf_cxx_library=no
          +-	{ echo "$as_me:3076: WARNING: templates do not work" >&5
          ++	{ echo "$as_me:3081: WARNING: templates do not work" >&5
          + echo "$as_me: WARNING: templates do not work" >&2;}
          + 	;;
          + esac
          + 
          +-echo "$as_me:3081: checking if you want to build C++ binding and demo" >&5
          ++echo "$as_me:3086: 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.
          +@@ -3088,10 +3093,10 @@
          + else
          +   cf_with_cxx_binding=$cf_with_cxx
          + fi;
          +-echo "$as_me:3091: result: $cf_with_cxx_binding" >&5
          ++echo "$as_me:3096: result: $cf_with_cxx_binding" >&5
          + echo "${ECHO_T}$cf_with_cxx_binding" >&6
          + 
          +-echo "$as_me:3094: checking if you want to build with Ada95" >&5
          ++echo "$as_me:3099: 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.
          +@@ -3101,10 +3106,10 @@
          + else
          +   cf_with_ada=yes
          + fi;
          +-echo "$as_me:3104: result: $cf_with_ada" >&5
          ++echo "$as_me:3109: result: $cf_with_ada" >&5
          + echo "${ECHO_T}$cf_with_ada" >&6
          + 
          +-echo "$as_me:3107: checking if you want to build programs such as tic" >&5
          ++echo "$as_me:3112: 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.
          +@@ -3114,10 +3119,10 @@
          + else
          +   cf_with_progs=yes
          + fi;
          +-echo "$as_me:3117: result: $cf_with_progs" >&5
          ++echo "$as_me:3122: result: $cf_with_progs" >&5
          + echo "${ECHO_T}$cf_with_progs" >&6
          + 
          +-echo "$as_me:3120: checking if you wish to install curses.h" >&5
          ++echo "$as_me:3125: 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.
          +@@ -3127,7 +3132,7 @@
          + else
          +   with_curses_h=yes
          + fi;
          +-echo "$as_me:3130: result: $with_curses_h" >&5
          ++echo "$as_me:3135: result: $with_curses_h" >&5
          + echo "${ECHO_T}$with_curses_h" >&6
          + 
          + modules_to_build="ncurses"
          +@@ -3153,7 +3158,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:3156: checking for $ac_word" >&5
          ++echo "$as_me:3161: 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
          +@@ -3168,7 +3173,7 @@
          +   test -z "$ac_dir" && ac_dir=.
          +   $as_executable_p "$ac_dir/$ac_word" || continue
          + ac_cv_prog_AWK="$ac_prog"
          +-echo "$as_me:3171: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3176: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3176,21 +3181,21 @@
          + fi
          + AWK=$ac_cv_prog_AWK
          + if test -n "$AWK"; then
          +-  echo "$as_me:3179: result: $AWK" >&5
          ++  echo "$as_me:3184: result: $AWK" >&5
          + echo "${ECHO_T}$AWK" >&6
          + else
          +-  echo "$as_me:3182: result: no" >&5
          ++  echo "$as_me:3187: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +   test -n "$AWK" && break
          + done
          + 
          +-test -z "$AWK" && { { echo "$as_me:3189: error: No awk program found" >&5
          ++test -z "$AWK" && { { echo "$as_me:3194: error: No awk program found" >&5
          + echo "$as_me: error: No awk program found" >&2;}
          +    { (exit 1); exit 1; }; }
          + 
          +-echo "$as_me:3193: checking for egrep" >&5
          ++echo "$as_me:3198: checking for egrep" >&5
          + echo $ECHO_N "checking for egrep... $ECHO_C" >&6
          + if test "${ac_cv_prog_egrep+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -3200,11 +3205,11 @@
          +     else ac_cv_prog_egrep='egrep'
          +     fi
          + fi
          +-echo "$as_me:3203: result: $ac_cv_prog_egrep" >&5
          ++echo "$as_me:3208: result: $ac_cv_prog_egrep" >&5
          + echo "${ECHO_T}$ac_cv_prog_egrep" >&6
          +  EGREP=$ac_cv_prog_egrep
          + 
          +-test -z "$EGREP" && { { echo "$as_me:3207: error: No egrep program found" >&5
          ++test -z "$EGREP" && { { echo "$as_me:3212: error: No egrep program found" >&5
          + echo "$as_me: error: No egrep program found" >&2;}
          +    { (exit 1); exit 1; }; }
          + 
          +@@ -3220,7 +3225,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:3223: checking for a BSD compatible install" >&5
          ++echo "$as_me:3228: 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
          +@@ -3269,7 +3274,7 @@
          +     INSTALL=$ac_install_sh
          +   fi
          + fi
          +-echo "$as_me:3272: result: $INSTALL" >&5
          ++echo "$as_me:3277: result: $INSTALL" >&5
          + echo "${ECHO_T}$INSTALL" >&6
          + 
          + # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
          +@@ -3294,7 +3299,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:3297: checking for $ac_word" >&5
          ++echo "$as_me:3302: 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
          +@@ -3309,7 +3314,7 @@
          +   test -z "$ac_dir" && ac_dir=.
          +   $as_executable_p "$ac_dir/$ac_word" || continue
          + ac_cv_prog_LINT="$ac_prog"
          +-echo "$as_me:3312: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3317: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3317,57 +3322,91 @@
          + fi
          + LINT=$ac_cv_prog_LINT
          + if test -n "$LINT"; then
          +-  echo "$as_me:3320: result: $LINT" >&5
          ++  echo "$as_me:3325: result: $LINT" >&5
          + echo "${ECHO_T}$LINT" >&6
          + else
          +-  echo "$as_me:3323: result: no" >&5
          ++  echo "$as_me:3328: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +   test -n "$LINT" && break
          + done
          + 
          +-echo "$as_me:3330: checking whether ln -s works" >&5
          ++echo "$as_me:3335: 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:3334: result: yes" >&5
          ++  echo "$as_me:3339: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          + else
          +-  echo "$as_me:3337: result: no, using $LN_S" >&5
          ++  echo "$as_me:3342: result: no, using $LN_S" >&5
          + echo "${ECHO_T}no, using $LN_S" >&6
          + fi
          + 
          +-echo "$as_me:3341: 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
          ++echo "$as_me:3346: 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
          + else
          +-  cat >conftest.make <<\EOF
          +-all:
          +-	@echo 'ac_maketemp="${MAKE}"'
          +-EOF
          +-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
          +-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
          +-if test -n "$ac_maketemp"; then
          +-  eval ac_cv_prog_make_${ac_make}_set=yes
          ++  ac_cv_sys_long_file_names=yes
          ++# Test for long file names in all the places we know might matter:
          ++#      .		the current directory, where building will happen
          ++#      $prefix/lib	where we will be installing things
          ++#      $exec_prefix/lib	likewise
          ++# eval it to expand exec_prefix.
          ++#      $TMPDIR		if set, where it might want to write temporary files
          ++# if $TMPDIR is not set:
          ++#      /tmp		where it might want to write temporary files
          ++#      /var/tmp		likewise
          ++#      /usr/tmp		likewise
          ++if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
          ++  ac_tmpdirs=$TMPDIR
          + else
          +-  eval ac_cv_prog_make_${ac_make}_set=no
          ++  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
          + fi
          +-rm -f conftest.make
          ++for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
          ++  test -d $ac_dir || continue
          ++  test -w $ac_dir || continue # It is less confusing to not echo anything here.
          ++  ac_xdir=$ac_dir/cf$$
          ++  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
          ++  ac_tf1=$ac_xdir/conftest9012345
          ++  ac_tf2=$ac_xdir/conftest9012346
          ++  (echo 1 >$ac_tf1) 2>/dev/null
          ++  (echo 2 >$ac_tf2) 2>/dev/null
          ++  ac_val=`cat $ac_tf1 2>/dev/null`
          ++  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
          ++    ac_cv_sys_long_file_names=no
          ++    rm -rf $ac_xdir 2>/dev/null
          ++    break
          ++  fi
          ++  rm -rf $ac_xdir 2>/dev/null
          ++done
          + fi
          +-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
          +-  echo "$as_me:3361: result: yes" >&5
          +-echo "${ECHO_T}yes" >&6
          +-  SET_MAKE=
          +-else
          +-  echo "$as_me:3365: result: no" >&5
          +-echo "${ECHO_T}no" >&6
          +-  SET_MAKE="MAKE=${MAKE-make}"
          ++echo "$as_me:3385: 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
          ++
          ++cat >>confdefs.h <<\EOF
          ++#define HAVE_LONG_FILE_NAMES 1
          ++EOF
          ++
          + fi
          + 
          +-echo "$as_me:3370: checking if filesystem supports mixed-case filenames" >&5
          ++echo "$as_me:3395: checking if we should assume mixed-case filenames" >&5
          ++echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
          ++
          ++# Check whether --enable-mixed-case or --disable-mixed-case was given.
          ++if test "${enable_mixed_case+set}" = set; then
          ++  enableval="$enable_mixed_case"
          ++  enable_mixedcase=$enableval
          ++else
          ++  enable_mixedcase=auto
          ++fi;
          ++echo "$as_me:3405: result: $enable_mixedcase" >&5
          ++echo "${ECHO_T}$enable_mixedcase" >&6
          ++if test "$enable_mixedcase" = "auto" ; then
          ++
          ++echo "$as_me:3409: 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
          +@@ -3394,15 +3433,55 @@
          + fi
          + 
          + fi
          +-echo "$as_me:3397: result: $cf_cv_mixedcase" >&5
          ++echo "$as_me:3436: 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
          + 
          ++else
          ++    cf_cv_mixedcase=$enable_mixedcase
          ++    if test "$enable_mixedcase" = "yes" ; then
          ++        cat >>confdefs.h <<\EOF
          ++#define MIXEDCASE_FILENAMES 1
          ++EOF
          ++
          ++    fi
          ++fi
          ++
          ++# do this after mixed-case option (tags/TAGS is not as important as tic).
          ++echo "$as_me:3453: 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
          ++  echo $ECHO_N "(cached) $ECHO_C" >&6
          ++else
          ++  cat >conftest.make <<\EOF
          ++all:
          ++	@echo 'ac_maketemp="${MAKE}"'
          ++EOF
          ++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
          ++eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
          ++if test -n "$ac_maketemp"; then
          ++  eval ac_cv_prog_make_${ac_make}_set=yes
          ++else
          ++  eval ac_cv_prog_make_${ac_make}_set=no
          ++fi
          ++rm -f conftest.make
          ++fi
          ++if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
          ++  echo "$as_me:3473: result: yes" >&5
          ++echo "${ECHO_T}yes" >&6
          ++  SET_MAKE=
          ++else
          ++  echo "$as_me:3477: result: no" >&5
          ++echo "${ECHO_T}no" >&6
          ++  SET_MAKE="MAKE=${MAKE-make}"
          ++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:3405: checking for $ac_word" >&5
          ++echo "$as_me:3484: 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
          +@@ -3417,7 +3496,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:3420: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3499: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3426,17 +3505,17 @@
          + fi
          + MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
          + if test -n "$MAKE_LOWER_TAGS"; then
          +-  echo "$as_me:3429: result: $MAKE_LOWER_TAGS" >&5
          ++  echo "$as_me:3508: result: $MAKE_LOWER_TAGS" >&5
          + echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
          + else
          +-  echo "$as_me:3432: result: no" >&5
          ++  echo "$as_me:3511: 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:3439: checking for $ac_word" >&5
          ++echo "$as_me:3518: 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
          +@@ -3451,7 +3530,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:3454: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3533: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3460,10 +3539,10 @@
          + fi
          + MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
          + if test -n "$MAKE_UPPER_TAGS"; then
          +-  echo "$as_me:3463: result: $MAKE_UPPER_TAGS" >&5
          ++  echo "$as_me:3542: result: $MAKE_UPPER_TAGS" >&5
          + echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
          + else
          +-  echo "$as_me:3466: result: no" >&5
          ++  echo "$as_me:3545: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3483,7 +3562,7 @@
          + 	MAKE_LOWER_TAGS="#"
          + fi
          + 
          +-echo "$as_me:3486: checking for makeflags variable" >&5
          ++echo "$as_me:3565: 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
          +@@ -3517,95 +3596,13 @@
          + 	rm -f cf_makeflags.tmp
          + 
          + fi
          +-echo "$as_me:3520: result: $cf_cv_makeflags" >&5
          ++echo "$as_me:3599: result: $cf_cv_makeflags" >&5
          + echo "${ECHO_T}$cf_cv_makeflags" >&6
          + 
          +-echo "$as_me:3523: 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
          +-else
          +-  ac_cv_sys_long_file_names=yes
          +-# Test for long file names in all the places we know might matter:
          +-#      .		the current directory, where building will happen
          +-#      $prefix/lib	where we will be installing things
          +-#      $exec_prefix/lib	likewise
          +-# eval it to expand exec_prefix.
          +-#      $TMPDIR		if set, where it might want to write temporary files
          +-# if $TMPDIR is not set:
          +-#      /tmp		where it might want to write temporary files
          +-#      /var/tmp		likewise
          +-#      /usr/tmp		likewise
          +-if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
          +-  ac_tmpdirs=$TMPDIR
          +-else
          +-  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
          +-fi
          +-for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
          +-  test -d $ac_dir || continue
          +-  test -w $ac_dir || continue # It is less confusing to not echo anything here.
          +-  ac_xdir=$ac_dir/cf$$
          +-  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
          +-  ac_tf1=$ac_xdir/conftest9012345
          +-  ac_tf2=$ac_xdir/conftest9012346
          +-  (echo 1 >$ac_tf1) 2>/dev/null
          +-  (echo 2 >$ac_tf2) 2>/dev/null
          +-  ac_val=`cat $ac_tf1 2>/dev/null`
          +-  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
          +-    ac_cv_sys_long_file_names=no
          +-    rm -rf $ac_xdir 2>/dev/null
          +-    break
          +-  fi
          +-  rm -rf $ac_xdir 2>/dev/null
          +-done
          +-fi
          +-echo "$as_me:3562: 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
          +-
          +-cat >>confdefs.h <<\EOF
          +-#define HAVE_LONG_FILE_NAMES 1
          +-EOF
          +-
          +-fi
          +-
          +-echo "$as_me:3572: 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
          +-else
          +-
          +-if test "$cross_compiling" = yes ; then
          +-	case $target_alias in #(vi
          +-	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
          +-		cf_cv_mixedcase=no
          +-		;;
          +-	*)
          +-		cf_cv_mixedcase=yes
          +-		;;
          +-	esac
          +-else
          +-	rm -f conftest CONFTEST
          +-	echo test >conftest
          +-	if test -f CONFTEST ; then
          +-		cf_cv_mixedcase=no
          +-	else
          +-		cf_cv_mixedcase=yes
          +-	fi
          +-	rm -f conftest CONFTEST
          +-fi
          +-
          +-fi
          +-echo "$as_me:3599: 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
          +-
          + 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:3608: checking for $ac_word" >&5
          ++echo "$as_me:3605: 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
          +@@ -3620,7 +3617,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:3623: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3620: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3628,10 +3625,10 @@
          + fi
          + RANLIB=$ac_cv_prog_RANLIB
          + if test -n "$RANLIB"; then
          +-  echo "$as_me:3631: result: $RANLIB" >&5
          ++  echo "$as_me:3628: result: $RANLIB" >&5
          + echo "${ECHO_T}$RANLIB" >&6
          + else
          +-  echo "$as_me:3634: result: no" >&5
          ++  echo "$as_me:3631: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3640,7 +3637,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:3643: checking for $ac_word" >&5
          ++echo "$as_me:3640: 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
          +@@ -3655,7 +3652,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:3658: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3655: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3664,10 +3661,10 @@
          + fi
          + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
          + if test -n "$ac_ct_RANLIB"; then
          +-  echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
          ++  echo "$as_me:3664: result: $ac_ct_RANLIB" >&5
          + echo "${ECHO_T}$ac_ct_RANLIB" >&6
          + else
          +-  echo "$as_me:3670: result: no" >&5
          ++  echo "$as_me:3667: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3679,7 +3676,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:3682: checking for $ac_word" >&5
          ++echo "$as_me:3679: 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
          +@@ -3694,7 +3691,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:3697: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3694: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3702,10 +3699,10 @@
          + fi
          + LD=$ac_cv_prog_LD
          + if test -n "$LD"; then
          +-  echo "$as_me:3705: result: $LD" >&5
          ++  echo "$as_me:3702: result: $LD" >&5
          + echo "${ECHO_T}$LD" >&6
          + else
          +-  echo "$as_me:3708: result: no" >&5
          ++  echo "$as_me:3705: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3714,7 +3711,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:3717: checking for $ac_word" >&5
          ++echo "$as_me:3714: 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
          +@@ -3729,7 +3726,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:3732: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3729: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3738,10 +3735,10 @@
          + fi
          + ac_ct_LD=$ac_cv_prog_ac_ct_LD
          + if test -n "$ac_ct_LD"; then
          +-  echo "$as_me:3741: result: $ac_ct_LD" >&5
          ++  echo "$as_me:3738: result: $ac_ct_LD" >&5
          + echo "${ECHO_T}$ac_ct_LD" >&6
          + else
          +-  echo "$as_me:3744: result: no" >&5
          ++  echo "$as_me:3741: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3753,7 +3750,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:3756: checking for $ac_word" >&5
          ++echo "$as_me:3753: 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
          +@@ -3768,7 +3765,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:3771: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3768: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3776,10 +3773,10 @@
          + fi
          + AR=$ac_cv_prog_AR
          + if test -n "$AR"; then
          +-  echo "$as_me:3779: result: $AR" >&5
          ++  echo "$as_me:3776: result: $AR" >&5
          + echo "${ECHO_T}$AR" >&6
          + else
          +-  echo "$as_me:3782: result: no" >&5
          ++  echo "$as_me:3779: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3788,7 +3785,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:3791: checking for $ac_word" >&5
          ++echo "$as_me:3788: 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
          +@@ -3803,7 +3800,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:3806: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3803: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3812,10 +3809,10 @@
          + fi
          + ac_ct_AR=$ac_cv_prog_ac_ct_AR
          + if test -n "$ac_ct_AR"; then
          +-  echo "$as_me:3815: result: $ac_ct_AR" >&5
          ++  echo "$as_me:3812: result: $ac_ct_AR" >&5
          + echo "${ECHO_T}$ac_ct_AR" >&6
          + else
          +-  echo "$as_me:3818: result: no" >&5
          ++  echo "$as_me:3815: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3828,7 +3825,7 @@
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          + else
          + 
          +-echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
          ++echo "$as_me:3828: checking for archiver options (symbol AR_OPTS)" >&5
          + echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
          + 
          + if test -z "$AR_OPTS" ; then
          +@@ -3837,12 +3834,12 @@
          + fi
          + 
          + cf_cv_subst_AR_OPTS=$AR_OPTS
          +-echo "$as_me:3840: result: $AR_OPTS" >&5
          ++echo "$as_me:3837: result: $AR_OPTS" >&5
          + echo "${ECHO_T}$AR_OPTS" >&6
          + 
          + fi
          + 
          +-echo "$as_me:3845: checking if you have specified an install-prefix" >&5
          ++echo "$as_me:3842: 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.
          +@@ -3855,7 +3852,7 @@
          + 		;;
          + 	esac
          + fi;
          +-echo "$as_me:3858: result: $DESTDIR" >&5
          ++echo "$as_me:3855: result: $DESTDIR" >&5
          + echo "${ECHO_T}$DESTDIR" >&6
          + 
          + ###############################################################################
          +@@ -3883,7 +3880,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:3886: checking for $ac_word" >&5
          ++echo "$as_me:3883: 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
          +@@ -3898,7 +3895,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:3901: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:3898: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -3906,10 +3903,10 @@
          + fi
          + BUILD_CC=$ac_cv_prog_BUILD_CC
          + if test -n "$BUILD_CC"; then
          +-  echo "$as_me:3909: result: $BUILD_CC" >&5
          ++  echo "$as_me:3906: result: $BUILD_CC" >&5
          + echo "${ECHO_T}$BUILD_CC" >&6
          + else
          +-  echo "$as_me:3912: result: no" >&5
          ++  echo "$as_me:3909: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -3917,12 +3914,12 @@
          + done
          + 
          + fi;
          +-	echo "$as_me:3920: checking for native build C compiler" >&5
          ++	echo "$as_me:3917: checking for native build C compiler" >&5
          + echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
          +-	echo "$as_me:3922: result: $BUILD_CC" >&5
          ++	echo "$as_me:3919: result: $BUILD_CC" >&5
          + echo "${ECHO_T}$BUILD_CC" >&6
          + 
          +-	echo "$as_me:3925: checking for native build C preprocessor" >&5
          ++	echo "$as_me:3922: checking for native build C preprocessor" >&5
          + echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
          + 
          + # Check whether --with-build-cpp or --without-build-cpp was given.
          +@@ -3932,10 +3929,10 @@
          + else
          +   BUILD_CPP='${BUILD_CC} -E'
          + fi;
          +-	echo "$as_me:3935: result: $BUILD_CPP" >&5
          ++	echo "$as_me:3932: result: $BUILD_CPP" >&5
          + echo "${ECHO_T}$BUILD_CPP" >&6
          + 
          +-	echo "$as_me:3938: checking for native build C flags" >&5
          ++	echo "$as_me:3935: checking for native build C flags" >&5
          + echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
          + 
          + # Check whether --with-build-cflags or --without-build-cflags was given.
          +@@ -3943,10 +3940,10 @@
          +   withval="$with_build_cflags"
          +   BUILD_CFLAGS="$withval"
          + fi;
          +-	echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
          ++	echo "$as_me:3943: result: $BUILD_CFLAGS" >&5
          + echo "${ECHO_T}$BUILD_CFLAGS" >&6
          + 
          +-	echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
          ++	echo "$as_me:3946: checking for native build C preprocessor-flags" >&5
          + echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
          + 
          + # Check whether --with-build-cppflags or --without-build-cppflags was given.
          +@@ -3954,10 +3951,10 @@
          +   withval="$with_build_cppflags"
          +   BUILD_CPPFLAGS="$withval"
          + fi;
          +-	echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
          ++	echo "$as_me:3954: result: $BUILD_CPPFLAGS" >&5
          + echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
          + 
          +-	echo "$as_me:3960: checking for native build linker-flags" >&5
          ++	echo "$as_me:3957: checking for native build linker-flags" >&5
          + echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
          + 
          + # Check whether --with-build-ldflags or --without-build-ldflags was given.
          +@@ -3965,10 +3962,10 @@
          +   withval="$with_build_ldflags"
          +   BUILD_LDFLAGS="$withval"
          + fi;
          +-	echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
          ++	echo "$as_me:3965: result: $BUILD_LDFLAGS" >&5
          + echo "${ECHO_T}$BUILD_LDFLAGS" >&6
          + 
          +-	echo "$as_me:3971: checking for native build linker-libraries" >&5
          ++	echo "$as_me:3968: checking for native build linker-libraries" >&5
          + echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
          + 
          + # Check whether --with-build-libs or --without-build-libs was given.
          +@@ -3976,7 +3973,7 @@
          +   withval="$with_build_libs"
          +   BUILD_LIBS="$withval"
          + fi;
          +-	echo "$as_me:3979: result: $BUILD_LIBS" >&5
          ++	echo "$as_me:3976: result: $BUILD_LIBS" >&5
          + echo "${ECHO_T}$BUILD_LIBS" >&6
          + 
          + 	# this assumes we're on Unix.
          +@@ -3986,7 +3983,7 @@
          + 	: ${BUILD_CC:='${CC}'}
          + 
          + 	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
          +-		{ { echo "$as_me:3989: error: Cross-build requires two compilers.
          ++		{ { echo "$as_me:3986: 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;}
          +@@ -4023,11 +4020,11 @@
          + # doing:
          + LIB_CLEAN=
          + LIB_COMPILE=
          +-LIB_LINK=
          ++LIB_LINK='${CC}'
          + LIB_INSTALL=
          + LIB_UNINSTALL=
          + 
          +-echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
          ++echo "$as_me:4027: 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.
          +@@ -4037,7 +4034,7 @@
          + else
          +   with_libtool=no
          + fi;
          +-echo "$as_me:4040: result: $with_libtool" >&5
          ++echo "$as_me:4037: result: $with_libtool" >&5
          + echo "${ECHO_T}$with_libtool" >&6
          + if test "$with_libtool" != "no"; then
          + 
          +@@ -4068,7 +4065,7 @@
          +   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
          +   ;;
          + *)
          +-  { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
          ++  { { echo "$as_me:4068: error: expected a pathname, not \"$with_libtool\"" >&5
          + echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
          +    { (exit 1); exit 1; }; }
          +   ;;
          +@@ -4078,7 +4075,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:4081: checking for $ac_word" >&5
          ++echo "$as_me:4078: 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
          +@@ -4095,7 +4092,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:4098: found $ac_dir/$ac_word" >&5
          ++   echo "$as_me:4095: found $ac_dir/$ac_word" >&5
          +    break
          + fi
          + done
          +@@ -4106,42 +4103,42 @@
          + LIBTOOL=$ac_cv_path_LIBTOOL
          + 
          + if test -n "$LIBTOOL"; then
          +-  echo "$as_me:4109: result: $LIBTOOL" >&5
          ++  echo "$as_me:4106: result: $LIBTOOL" >&5
          + echo "${ECHO_T}$LIBTOOL" >&6
          + else
          +-  echo "$as_me:4112: result: no" >&5
          ++  echo "$as_me:4109: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +  	fi
          +  	if test -z "$LIBTOOL" ; then
          +- 		{ { echo "$as_me:4118: error: Cannot find libtool" >&5
          ++ 		{ { echo "$as_me:4115: error: Cannot find libtool" >&5
          + echo "$as_me: error: Cannot find libtool" >&2;}
          +    { (exit 1); exit 1; }; }
          +  	fi
          +-	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
          +-	LIB_OBJECT='${OBJECTS}.o=.lo)'
          ++	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
          ++	LIB_OBJECT='${OBJECTS:.o=.lo}'
          + 	LIB_SUFFIX=.la
          + 	LIB_CLEAN='${LIBTOOL} --mode=clean'
          + 	LIB_COMPILE='${LIBTOOL} --mode=compile'
          +-	LIB_LINK='${LIBTOOL} --mode=link'
          ++	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
          + 	LIB_INSTALL='${LIBTOOL} --mode=install'
          + 	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
          + 	LIB_PREP=:
          + 
          + 	# Show the version of libtool
          +-	echo "$as_me:4133: checking version of libtool" >&5
          ++	echo "$as_me:4130: 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:4140: result: $cf_cv_libtool_version" >&5
          ++	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
          ++	echo "$as_me:4137: 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:4143: error: This is not libtool" >&5
          +-echo "$as_me: error: This is not libtool" >&2;}
          ++		{ { echo "$as_me:4140: error: This is not GNU libtool" >&5
          ++echo "$as_me: error: This is not GNU libtool" >&2;}
          +    { (exit 1); exit 1; }; }
          + 	fi
          + 
          +@@ -4167,7 +4164,7 @@
          + 
          + else
          + 
          +-echo "$as_me:4170: checking if you want to build shared libraries" >&5
          ++echo "$as_me:4167: 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.
          +@@ -4177,11 +4174,11 @@
          + else
          +   with_shared=no
          + fi;
          +-echo "$as_me:4180: result: $with_shared" >&5
          ++echo "$as_me:4177: result: $with_shared" >&5
          + echo "${ECHO_T}$with_shared" >&6
          + test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
          + 
          +-echo "$as_me:4184: checking if you want to build static libraries" >&5
          ++echo "$as_me:4181: 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.
          +@@ -4191,11 +4188,11 @@
          + else
          +   with_normal=yes
          + fi;
          +-echo "$as_me:4194: result: $with_normal" >&5
          ++echo "$as_me:4191: result: $with_normal" >&5
          + echo "${ECHO_T}$with_normal" >&6
          + test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
          + 
          +-echo "$as_me:4198: checking if you want to build debug libraries" >&5
          ++echo "$as_me:4195: 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.
          +@@ -4205,11 +4202,11 @@
          + else
          +   with_debug=yes
          + fi;
          +-echo "$as_me:4208: result: $with_debug" >&5
          ++echo "$as_me:4205: result: $with_debug" >&5
          + echo "${ECHO_T}$with_debug" >&6
          + test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
          + 
          +-echo "$as_me:4212: checking if you want to build profiling libraries" >&5
          ++echo "$as_me:4209: 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.
          +@@ -4219,7 +4216,7 @@
          + else
          +   with_profile=no
          + fi;
          +-echo "$as_me:4222: result: $with_profile" >&5
          ++echo "$as_me:4219: result: $with_profile" >&5
          + echo "${ECHO_T}$with_profile" >&6
          + test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
          + 
          +@@ -4227,23 +4224,25 @@
          + 
          + ###############################################################################
          + 
          +-echo "$as_me:4230: checking for specified models" >&5
          ++echo "$as_me:4227: 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:4234: result: $cf_list_models" >&5
          ++echo "$as_me:4231: 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:4239: checking for default model" >&5
          ++echo "$as_me:4236: 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:4242: result: $DFT_LWR_MODEL" >&5
          ++echo "$as_me:4239: result: $DFT_LWR_MODEL" >&5
          + echo "${ECHO_T}$DFT_LWR_MODEL" >&6
          + 
          + DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
          + 
          ++TICS_NAME=tic
          ++
          + TINFO_NAME=tinfo
          + 
          + LIB_NAME=ncurses
          +@@ -4264,7 +4263,7 @@
          + 
          + ###############################################################################
          + 
          +-echo "$as_me:4267: checking if you want to build a separate terminfo library" >&5
          ++echo "$as_me:4266: 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.
          +@@ -4274,13 +4273,26 @@
          + else
          +   with_termlib=no
          + fi;
          +-echo "$as_me:4277: result: $with_termlib" >&5
          ++echo "$as_me:4276: result: $with_termlib" >&5
          + echo "${ECHO_T}$with_termlib" >&6
          + 
          ++echo "$as_me:4279: checking if you want to build a separate tic library" >&5
          ++echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
          ++
          ++# Check whether --with-ticlib or --without-ticlib was given.
          ++if test "${with_ticlib+set}" = set; then
          ++  withval="$with_ticlib"
          ++  with_ticlib=$withval
          ++else
          ++  with_ticlib=no
          ++fi;
          ++echo "$as_me:4289: result: $with_ticlib" >&5
          ++echo "${ECHO_T}$with_ticlib" >&6
          ++
          + ### Checks for special libraries, must be done up-front.
          + SHLIB_LIST=""
          + 
          +-echo "$as_me:4283: checking if you want to link with the GPM mouse library" >&5
          ++echo "$as_me:4295: 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.
          +@@ -4290,27 +4302,27 @@
          + else
          +   with_gpm=maybe
          + fi;
          +-echo "$as_me:4293: result: $with_gpm" >&5
          ++echo "$as_me:4305: result: $with_gpm" >&5
          + echo "${ECHO_T}$with_gpm" >&6
          + 
          + if test "$with_gpm" != no ; then
          +-	echo "$as_me:4297: checking for gpm.h" >&5
          ++	echo "$as_me:4309: 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 4303 "configure"
          ++#line 4315 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:4307: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:4319: \"$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:4313: \$? = $ac_status" >&5
          ++  echo "$as_me:4325: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -4329,7 +4341,7 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:4332: result: $ac_cv_header_gpm_h" >&5
          ++echo "$as_me:4344: 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
          + 
          +@@ -4340,12 +4352,14 @@
          + 		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
          + 			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
          + 
          ++echo "${as_me-configure}:4355: testing assuming we really have GPM library ..." 1>&5
          ++
          + 			cat >>confdefs.h <<\EOF
          + #define HAVE_LIBGPM 1
          + EOF
          + 
          + 		else
          +-			echo "$as_me:4348: checking for Gpm_Open in -lgpm" >&5
          ++			echo "$as_me:4362: 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
          +@@ -4353,7 +4367,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-lgpm  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 4356 "configure"
          ++#line 4370 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -4372,16 +4386,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:4375: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:4389: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4378: \$? = $ac_status" >&5
          ++  echo "$as_me:4392: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:4381: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4395: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4384: \$? = $ac_status" >&5
          ++  echo "$as_me:4398: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_gpm_Gpm_Open=yes
          + else
          +@@ -4392,13 +4406,13 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:4395: result: $ac_cv_lib_gpm_Gpm_Open" >&5
          ++echo "$as_me:4409: 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
          +   :
          + else
          + 
          +-				{ { echo "$as_me:4401: error: Cannot link with GPM library" >&5
          ++				{ { echo "$as_me:4415: error: Cannot link with GPM library" >&5
          + echo "$as_me: error: Cannot link with GPM library" >&2;}
          +    { (exit 1); exit 1; }; }
          + 		fi
          +@@ -4408,7 +4422,7 @@
          + 
          + else
          + 
          +-		test "$with_gpm" != maybe && { echo "$as_me:4411: WARNING: Cannot find GPM header" >&5
          ++		test "$with_gpm" != maybe && { echo "$as_me:4425: WARNING: Cannot find GPM header" >&5
          + echo "$as_me: WARNING: Cannot find GPM header" >&2;}
          + 		with_gpm=no
          + 
          +@@ -4417,7 +4431,7 @@
          + fi
          + 
          + if test "$with_gpm" != no ; then
          +-	echo "$as_me:4420: checking if you want to load GPM dynamically" >&5
          ++	echo "$as_me:4434: checking if you want to load GPM dynamically" >&5
          + echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
          + 
          + # Check whether --with-dlsym or --without-dlsym was given.
          +@@ -4427,18 +4441,18 @@
          + else
          +   with_dlsym=yes
          + fi;
          +-	echo "$as_me:4430: result: $with_dlsym" >&5
          ++	echo "$as_me:4444: result: $with_dlsym" >&5
          + echo "${ECHO_T}$with_dlsym" >&6
          + 	if test "$with_dlsym" = yes ; then
          + 
          + cf_have_dlsym=no
          +-echo "$as_me:4435: checking for dlsym" >&5
          ++echo "$as_me:4449: 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
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 4441 "configure"
          ++#line 4455 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char dlsym (); below.  */
          +@@ -4469,16 +4483,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:4472: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:4486: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4475: \$? = $ac_status" >&5
          ++  echo "$as_me:4489: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:4478: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4492: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4481: \$? = $ac_status" >&5
          ++  echo "$as_me:4495: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_dlsym=yes
          + else
          +@@ -4488,14 +4502,14 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:4491: result: $ac_cv_func_dlsym" >&5
          ++echo "$as_me:4505: 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:4498: checking for dlsym in -ldl" >&5
          ++echo "$as_me:4512: 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
          +@@ -4503,7 +4517,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-ldl  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 4506 "configure"
          ++#line 4520 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -4522,16 +4536,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:4525: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:4539: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4528: \$? = $ac_status" >&5
          ++  echo "$as_me:4542: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:4531: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4545: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4534: \$? = $ac_status" >&5
          ++  echo "$as_me:4548: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_dl_dlsym=yes
          + else
          +@@ -4542,7 +4556,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:4545: result: $ac_cv_lib_dl_dlsym" >&5
          ++echo "$as_me:4559: 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
          + 
          +@@ -4555,10 +4569,10 @@
          + if test "$cf_have_dlsym" = yes ; then
          + 	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
          + 
          +-	echo "$as_me:4558: checking whether able to link to dl*() functions" >&5
          ++	echo "$as_me:4572: 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 4561 "configure"
          ++#line 4575 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -4576,16 +4590,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:4579: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:4593: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4582: \$? = $ac_status" >&5
          ++  echo "$as_me:4596: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:4585: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4599: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4588: \$? = $ac_status" >&5
          ++  echo "$as_me:4602: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          + 
          + 		cat >>confdefs.h <<\EOF
          +@@ -4596,15 +4610,15 @@
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          + 
          +-		{ { echo "$as_me:4599: error: Cannot link test program for libdl" >&5
          ++		{ { echo "$as_me:4613: 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:4604: result: ok" >&5
          ++	echo "$as_me:4618: result: ok" >&5
          + echo "${ECHO_T}ok" >&6
          + else
          +-	{ { echo "$as_me:4607: error: Cannot find dlsym function" >&5
          ++	{ { echo "$as_me:4621: error: Cannot find dlsym function" >&5
          + echo "$as_me: error: Cannot find dlsym function" >&2;}
          +    { (exit 1); exit 1; }; }
          + fi
          +@@ -4612,10 +4626,12 @@
          + 		if test "$with_gpm" != yes ; then
          + 			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
          + 
          ++echo "${as_me-configure}:4629: testing assuming soname for gpm is $with_gpm ..." 1>&5
          ++
          + 			cf_cv_gpm_soname="$with_gpm"
          + 		else
          + 
          +-echo "$as_me:4618: checking for soname of gpm library" >&5
          ++echo "$as_me:4634: checking for soname of gpm library" >&5
          + echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
          + if test "${cf_cv_gpm_soname+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -4633,15 +4649,15 @@
          + CF_EOF
          + cf_save_LIBS="$LIBS"
          + 	LIBS="-lgpm $LIBS"
          +-	if { (eval echo "$as_me:4636: \"$ac_compile\"") >&5
          ++	if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4639: \$? = $ac_status" >&5
          ++  echo "$as_me:4655: \$? = $ac_status" >&5
          +   (exit $ac_status); } ; then
          +-		if { (eval echo "$as_me:4641: \"$ac_link\"") >&5
          ++		if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4644: \$? = $ac_status" >&5
          ++  echo "$as_me:4660: \$? = $ac_status" >&5
          +   (exit $ac_status); } ; then
          + 			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
          + 			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
          +@@ -4652,7 +4668,7 @@
          + fi
          + 
          + fi
          +-echo "$as_me:4655: result: $cf_cv_gpm_soname" >&5
          ++echo "$as_me:4671: result: $cf_cv_gpm_soname" >&5
          + echo "${ECHO_T}$cf_cv_gpm_soname" >&6
          + 
          + 		fi
          +@@ -4668,7 +4684,7 @@
          + #define HAVE_LIBGPM 1
          + EOF
          + 
          +-	echo "$as_me:4671: checking for Gpm_Wgetch in -lgpm" >&5
          ++echo "$as_me:4687: 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
          +@@ -4676,7 +4692,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-lgpm  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 4679 "configure"
          ++#line 4695 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -4695,16 +4711,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:4698: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:4714: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4701: \$? = $ac_status" >&5
          ++  echo "$as_me:4717: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:4704: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4720: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4707: \$? = $ac_status" >&5
          ++  echo "$as_me:4723: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_gpm_Gpm_Wgetch=yes
          + else
          +@@ -4715,12 +4731,61 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:4718: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
          ++echo "$as_me:4734: 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:4722: WARNING: GPM library is already linked with curses - read the FAQ" >&5
          ++echo "$as_me:4738: checking if GPM is weakly bound to curses library" >&5
          ++echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
          ++if test "${cf_cv_check_gpm_wgetch+set}" = set; then
          ++  echo $ECHO_N "(cached) $ECHO_C" >&6
          ++else
          ++
          ++cf_cv_check_gpm_wgetch=unknown
          ++if test "$cross_compiling" != yes ; then
          ++
          ++cat >conftest.$ac_ext <
          ++int main()
          ++{
          ++	Gpm_Wgetch();
          ++	${cf_cv_main_return:-return}(0);
          ++}
          ++CF_EOF
          ++
          ++	cf_save_LIBS="$LIBS"
          ++	# This only works if we can look at the symbol table.  If a shared
          ++	# library is stripped for install, we cannot use that.  So we're forced
          ++	# to rely on the static library, noting that some packagers may not
          ++	# include it.
          ++	LIBS="-static -lgpm -dynamic $LIBS"
          ++	if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
          ++  (eval $ac_compile) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:4765: \$? = $ac_status" >&5
          ++  (exit $ac_status); } ; then
          ++		if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
          ++  (eval $ac_link) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:4770: \$? = $ac_status" >&5
          ++  (exit $ac_status); } ; then
          ++			cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\' | egrep '\<[vVwW]\>'`
          ++			test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
          ++			test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
          ++		fi
          ++	fi
          ++	rm -f conftest*
          ++	LIBS="$cf_save_LIBS"
          ++fi
          ++
          ++fi
          ++echo "$as_me:4782: result: $cf_cv_check_gpm_wgetch" >&5
          ++echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
          ++
          ++if test "$cf_cv_check_gpm_wgetch" != yes ; then
          ++	{ echo "$as_me:4786: 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
          + 
          +@@ -4728,7 +4793,7 @@
          + 
          + # not everyone has "test -c"
          + if test -c /dev/sysmouse 2>/dev/null ; then
          +-echo "$as_me:4731: checking if you want to use sysmouse" >&5
          ++echo "$as_me:4796: 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.
          +@@ -4740,7 +4805,7 @@
          + fi;
          + 	if test "$cf_with_sysmouse" != no ; then
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 4743 "configure"
          ++#line 4808 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -4763,16 +4828,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:4766: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4769: \$? = $ac_status" >&5
          ++  echo "$as_me:4834: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:4772: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4837: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4775: \$? = $ac_status" >&5
          ++  echo "$as_me:4840: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_with_sysmouse=yes
          + else
          +@@ -4782,7 +4847,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 	fi
          +-echo "$as_me:4785: result: $cf_with_sysmouse" >&5
          ++echo "$as_me:4850: 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
          +@@ -4800,7 +4865,7 @@
          + 	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
          + fi
          + 
          +-echo "$as_me:4803: checking for default loader flags" >&5
          ++echo "$as_me:4868: 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=''   ;;
          +@@ -4809,10 +4874,12 @@
          + profile) LD_MODEL='-pg';;
          + shared)  LD_MODEL=''   ;;
          + esac
          +-echo "$as_me:4812: result: $LD_MODEL" >&5
          ++echo "$as_me:4877: result: $LD_MODEL" >&5
          + echo "${ECHO_T}$LD_MODEL" >&6
          + 
          +-echo "$as_me:4815: checking if rpath option should be used" >&5
          ++case $DFT_LWR_MODEL in
          ++shared)
          ++echo "$as_me:4882: 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.
          +@@ -4822,8 +4889,22 @@
          + else
          +   cf_cv_ld_rpath=no
          + fi;
          +-echo "$as_me:4825: result: $cf_cv_ld_rpath" >&5
          ++echo "$as_me:4892: result: $cf_cv_ld_rpath" >&5
          + echo "${ECHO_T}$cf_cv_ld_rpath" >&6
          ++echo "$as_me:4894: checking if shared libraries should be relinked during install" >&5
          ++echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
          ++
          ++# Check whether --enable-relink or --disable-relink was given.
          ++if test "${enable_relink+set}" = set; then
          ++  enableval="$enable_relink"
          ++  cf_cv_do_relink=$enableval
          ++else
          ++  cf_cv_do_relink=yes
          ++fi;
          ++echo "$as_me:4904: result: $cf_cv_do_relink" >&5
          ++echo "${ECHO_T}$cf_cv_do_relink" >&6
          ++	;;
          ++esac
          + 
          + 	LOCAL_LDFLAGS=
          + 	LOCAL_LDFLAGS2=
          +@@ -4832,7 +4913,7 @@
          + 
          + 	cf_cv_do_symlinks=no
          + 
          +-	echo "$as_me:4835: checking if release/abi version should be used for shared libs" >&5
          ++	echo "$as_me:4916: 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.
          +@@ -4847,7 +4928,7 @@
          + 		cf_cv_shlib_version=$withval
          + 		;;
          + 	*)
          +-		{ { echo "$as_me:4850: error: option value must be one of: rel, abi, auto or no" >&5
          ++		{ { echo "$as_me:4931: 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; }; }
          + 		;;
          +@@ -4856,7 +4937,7 @@
          + else
          +   cf_cv_shlib_version=auto
          + fi;
          +-	echo "$as_me:4859: result: $cf_cv_shlib_version" >&5
          ++	echo "$as_me:4940: result: $cf_cv_shlib_version" >&5
          + echo "${ECHO_T}$cf_cv_shlib_version" >&6
          + 
          + 	cf_cv_rm_so_locs=no
          +@@ -4865,14 +4946,14 @@
          + 	CC_SHARED_OPTS=
          + 	if test "$GCC" = yes
          + 	then
          +-		echo "$as_me:4868: checking which $CC option to use" >&5
          ++		echo "$as_me:4949: 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 4875 "configure"
          ++#line 4956 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -4884,16 +4965,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:4887: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4890: \$? = $ac_status" >&5
          ++  echo "$as_me:4971: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:4893: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:4974: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4896: \$? = $ac_status" >&5
          ++  echo "$as_me:4977: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -4902,7 +4983,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 		done
          +-		echo "$as_me:4905: result: $CC_SHARED_OPTS" >&5
          ++		echo "$as_me:4986: result: $CC_SHARED_OPTS" >&5
          + echo "${ECHO_T}$CC_SHARED_OPTS" >&6
          + 		CFLAGS="$cf_save_CFLAGS"
          + 	fi
          +@@ -4915,17 +4996,30 @@
          + 		;;
          + 	cygwin*)
          + 		CC_SHARED_OPTS=
          +-		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
          ++		MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
          + 		cf_cv_shlib_version=cygdll
          + 		cf_cv_shlib_version_infix=cygdll
          ++		cat >mk_shared_lib.sh <<-CF_EOF
          ++		#!/bin/sh
          ++		SHARED_LIB=\$1
          ++		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
          ++		shift
          ++		cat <<-EOF
          ++		Linking shared library
          ++		** SHARED_LIB \$SHARED_LIB
          ++		** IMPORT_LIB \$IMPORT_LIB
          ++EOF
          ++		exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
          ++CF_EOF
          ++		chmod +x mk_shared_lib.sh
          + 		;;
          + 	darwin*)
          + 		EXTRA_CFLAGS="-no-cpp-precomp"
          + 		CC_SHARED_OPTS="-dynamic"
          +-		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
          ++		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
          + 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
          + 		cf_cv_shlib_version_infix=yes
          +-		echo "$as_me:4928: checking if ld -search_paths_first works" >&5
          ++		echo "$as_me:5022: checking if ld -search_paths_first works" >&5
          + echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
          + if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -4934,7 +5028,7 @@
          + 			cf_save_LDFLAGS=$LDFLAGS
          + 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
          + 			cat >conftest.$ac_ext <<_ACEOF
          +-#line 4937 "configure"
          ++#line 5031 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -4946,16 +5040,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:4949: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:5043: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4952: \$? = $ac_status" >&5
          ++  echo "$as_me:5046: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:4955: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:5049: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:4958: \$? = $ac_status" >&5
          ++  echo "$as_me:5052: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_ldflags_search_paths_first=yes
          + else
          +@@ -4966,7 +5060,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + 				LDFLAGS=$cf_save_LDFLAGS
          + fi
          +-echo "$as_me:4969: result: $cf_cv_ldflags_search_paths_first" >&5
          ++echo "$as_me:5063: result: $cf_cv_ldflags_search_paths_first" >&5
          + echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
          + 		if test $cf_cv_ldflags_search_paths_first = yes; then
          + 			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
          +@@ -5021,11 +5115,11 @@
          + 
          + 		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
          + 		;;
          +-	openbsd2*)
          ++	openbsd[2-9].*)
          + 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
          + 		MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
          + 		;;
          +-	openbsd*|freebsd[23]*)
          ++	openbsd*|freebsd[12].*)
          + 		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
          + 		MK_SHARED_LIB='${LD} -Bshareable -o $@'
          + 		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
          +@@ -5162,7 +5256,7 @@
          + 			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
          + 			;;
          + 		*)
          +-			{ echo "$as_me:5165: WARNING: ignored --with-shlib-version" >&5
          ++			{ echo "$as_me:5259: WARNING: ignored --with-shlib-version" >&5
          + echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
          + 			;;
          + 		esac
          +@@ -5170,12 +5264,12 @@
          + 	esac
          + 
          + 	if test -n "$cf_ld_rpath_opt" ; then
          +-		echo "$as_me:5173: checking if we need a space after rpath option" >&5
          ++		echo "$as_me:5267: 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 5178 "configure"
          ++#line 5272 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -5187,16 +5281,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:5190: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5193: \$? = $ac_status" >&5
          ++  echo "$as_me:5287: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:5196: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:5290: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5199: \$? = $ac_status" >&5
          ++  echo "$as_me:5293: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_rpath_space=no
          + else
          +@@ -5206,7 +5300,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + 		LIBS="$cf_save_LIBS"
          +-		echo "$as_me:5209: result: $cf_rpath_space" >&5
          ++		echo "$as_me:5303: 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}"
          +@@ -5215,7 +5309,7 @@
          + if test "$CC_SHARED_OPTS" = "unknown"; then
          + 	for model in $cf_list_models; do
          + 		if test "$model" = "shared"; then
          +-			{ { echo "$as_me:5218: error: Shared libraries are not supported in this version" >&5
          ++			{ { echo "$as_me:5312: 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
          +@@ -5225,7 +5319,7 @@
          + ###############################################################################
          + 
          + ###	use option --disable-overwrite to leave out the link to -lcurses
          +-echo "$as_me:5228: checking if you wish to install ncurses overwriting curses" >&5
          ++echo "$as_me:5322: 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.
          +@@ -5235,10 +5329,10 @@
          + else
          +   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
          + fi;
          +-echo "$as_me:5238: result: $with_overwrite" >&5
          ++echo "$as_me:5332: result: $with_overwrite" >&5
          + echo "${ECHO_T}$with_overwrite" >&6
          + 
          +-echo "$as_me:5241: checking if external terminfo-database is used" >&5
          ++echo "$as_me:5335: 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.
          +@@ -5248,7 +5342,7 @@
          + else
          +   use_database=yes
          + fi;
          +-echo "$as_me:5251: result: $use_database" >&5
          ++echo "$as_me:5345: result: $use_database" >&5
          + echo "${ECHO_T}$use_database" >&6
          + 
          + case $host_os in #(vi
          +@@ -5270,7 +5364,7 @@
          + #define USE_DATABASE 1
          + EOF
          + 
          +-	echo "$as_me:5273: checking which terminfo source-file will be installed" >&5
          ++	echo "$as_me:5367: 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.
          +@@ -5278,10 +5372,10 @@
          +   enableval="$enable_database"
          +   TERMINFO_SRC=$withval
          + fi;
          +-	echo "$as_me:5281: result: $TERMINFO_SRC" >&5
          ++	echo "$as_me:5375: result: $TERMINFO_SRC" >&5
          + echo "${ECHO_T}$TERMINFO_SRC" >&6
          + 
          +-	echo "$as_me:5284: checking whether to use hashed database instead of directory/tree" >&5
          ++	echo "$as_me:5378: checking whether to use hashed database instead of directory/tree" >&5
          + echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
          + 
          + # Check whether --with-hashed-db or --without-hashed-db was given.
          +@@ -5291,11 +5385,11 @@
          + else
          +   with_hashed_db=no
          + fi;
          +-	echo "$as_me:5294: result: $with_hashed_db" >&5
          ++	echo "$as_me:5388: result: $with_hashed_db" >&5
          + echo "${ECHO_T}$with_hashed_db" >&6
          + fi
          + 
          +-echo "$as_me:5298: checking for list of fallback descriptions" >&5
          ++echo "$as_me:5392: 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.
          +@@ -5305,11 +5399,11 @@
          + else
          +   with_fallback=
          + fi;
          +-echo "$as_me:5308: result: $with_fallback" >&5
          ++echo "$as_me:5402: result: $with_fallback" >&5
          + echo "${ECHO_T}$with_fallback" >&6
          + FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
          + 
          +-echo "$as_me:5312: checking if you want modern xterm or antique" >&5
          ++echo "$as_me:5406: 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.
          +@@ -5323,7 +5417,7 @@
          + no)	with_xterm_new=xterm-old;;
          + *)	with_xterm_new=xterm-new;;
          + esac
          +-echo "$as_me:5326: result: $with_xterm_new" >&5
          ++echo "$as_me:5420: result: $with_xterm_new" >&5
          + echo "${ECHO_T}$with_xterm_new" >&6
          + WHICH_XTERM=$with_xterm_new
          + 
          +@@ -5333,7 +5427,7 @@
          + 	MAKE_TERMINFO="#"
          + else
          + 
          +-echo "$as_me:5336: checking for list of terminfo directories" >&5
          ++echo "$as_me:5430: 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.
          +@@ -5373,7 +5467,7 @@
          +   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
          +   ;;
          + *)
          +-  { { echo "$as_me:5376: error: expected a pathname, not \"$cf_src_path\"" >&5
          ++  { { echo "$as_me:5470: 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; }; }
          +   ;;
          +@@ -5386,13 +5480,13 @@
          + 
          + eval 'TERMINFO_DIRS="$cf_dst_path"'
          + 
          +-echo "$as_me:5389: result: $TERMINFO_DIRS" >&5
          ++echo "$as_me:5483: result: $TERMINFO_DIRS" >&5
          + echo "${ECHO_T}$TERMINFO_DIRS" >&6
          + test -n "$TERMINFO_DIRS" && cat >>confdefs.h <&5
          ++echo "$as_me:5489: 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.
          +@@ -5401,7 +5495,8 @@
          + 
          + else
          +   withval="${TERMINFO-${datadir}/terminfo}"
          +-fi;
          ++fi; if test -n "${datadir}/terminfo" ; then
          ++
          + if test "x$prefix" != xNONE; then
          +   cf_path_syntax="$prefix"
          + else
          +@@ -5427,15 +5522,16 @@
          +   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
          +   ;;
          + *)
          +-  { { echo "$as_me:5430: error: expected a pathname, not \"$withval\"" >&5
          ++  { { echo "$as_me:5525: error: expected a pathname, not \"$withval\"" >&5
          + echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
          +    { (exit 1); exit 1; }; }
          +   ;;
          + esac
          + 
          ++fi
          + TERMINFO="$withval"
          + 
          +-echo "$as_me:5438: result: $TERMINFO" >&5
          ++echo "$as_me:5534: result: $TERMINFO" >&5
          + echo "${ECHO_T}$TERMINFO" >&6
          + cat >>confdefs.h <&5
          ++echo "$as_me:5544: 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.
          +@@ -5457,7 +5553,7 @@
          +   with_big_core=no
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 5460 "configure"
          ++#line 5556 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -5471,15 +5567,15 @@
          + }
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:5474: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:5570: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5477: \$? = $ac_status" >&5
          ++  echo "$as_me:5573: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:5479: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:5575: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5482: \$? = $ac_status" >&5
          ++  echo "$as_me:5578: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   with_big_core=yes
          + else
          +@@ -5491,14 +5587,32 @@
          + rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
          + fi
          + fi;
          +-echo "$as_me:5494: result: $with_big_core" >&5
          ++echo "$as_me:5590: 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
          + 
          ++### ISO C only guarantees 512-char strings, we have tables which load faster
          ++### when constructed using "big" strings.
          ++echo "$as_me:5598: checking if big-strings option selected" >&5
          ++echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
          ++
          ++# Check whether --enable-big-strings or --disable-big-strings was given.
          ++if test "${enable_big_strings+set}" = set; then
          ++  enableval="$enable_big_strings"
          ++  with_big_strings=no
          ++else
          ++  with_big_strings=yes
          ++fi;
          ++echo "$as_me:5608: result: $with_big_strings" >&5
          ++echo "${ECHO_T}$with_big_strings" >&6
          ++
          ++USE_BIG_STRINGS=0
          ++test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
          ++
          + ###	use option --enable-termcap to compile in the termcap fallback support
          +-echo "$as_me:5501: checking if you want termcap-fallback support" >&5
          ++echo "$as_me:5615: 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.
          +@@ -5508,13 +5622,13 @@
          + else
          +   with_termcap=no
          + fi;
          +-echo "$as_me:5511: result: $with_termcap" >&5
          ++echo "$as_me:5625: 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:5517: error: You have disabled the database w/o specifying fallbacks" >&5
          ++			{ { echo "$as_me:5631: 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
          +@@ -5525,11 +5639,17 @@
          + 
          + else
          + 
          ++if test "$with_ticlib" != no ; then
          ++	{ { echo "$as_me:5643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
          ++echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
          ++   { (exit 1); exit 1; }; }
          ++fi
          ++
          + cat >>confdefs.h <<\EOF
          + #define USE_TERMCAP 1
          + EOF
          + 
          +-echo "$as_me:5532: checking for list of termcap files" >&5
          ++echo "$as_me:5652: 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.
          +@@ -5569,7 +5689,7 @@
          +   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
          +   ;;
          + *)
          +-  { { echo "$as_me:5572: error: expected a pathname, not \"$cf_src_path\"" >&5
          ++  { { echo "$as_me:5692: 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; }; }
          +   ;;
          +@@ -5582,14 +5702,14 @@
          + 
          + eval 'TERMPATH="$cf_dst_path"'
          + 
          +-echo "$as_me:5585: result: $TERMPATH" >&5
          ++echo "$as_me:5705: result: $TERMPATH" >&5
          + echo "${ECHO_T}$TERMPATH" >&6
          + test -n "$TERMPATH" && cat >>confdefs.h <&5
          ++echo "$as_me:5712: 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.
          +@@ -5599,13 +5719,13 @@
          + else
          +   with_getcap=no
          + fi;
          +-echo "$as_me:5602: result: $with_getcap" >&5
          ++echo "$as_me:5722: 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:5608: checking if translated termcaps will be cached in ~/.terminfo" >&5
          ++echo "$as_me:5728: 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.
          +@@ -5615,7 +5735,7 @@
          + else
          +   with_getcap_cache=no
          + fi;
          +-echo "$as_me:5618: result: $with_getcap_cache" >&5
          ++echo "$as_me:5738: 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
          +@@ -5624,7 +5744,7 @@
          + fi
          + 
          + ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
          +-echo "$as_me:5627: checking if ~/.terminfo is wanted" >&5
          ++echo "$as_me:5747: 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.
          +@@ -5634,13 +5754,13 @@
          + else
          +   with_home_terminfo=yes
          + fi;
          +-echo "$as_me:5637: result: $with_home_terminfo" >&5
          ++echo "$as_me:5757: 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:5643: checking if you want to use restricted environment when running as root" >&5
          ++echo "$as_me:5763: checking if you want to use restricted environment when running as root" >&5
          + echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
          + 
          + # Check whether --enable-root-environ or --disable-root-environ was given.
          +@@ -5650,7 +5770,7 @@
          + else
          +   with_root_environ=yes
          + fi;
          +-echo "$as_me:5653: result: $with_root_environ" >&5
          ++echo "$as_me:5773: 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
          +@@ -5664,13 +5784,13 @@
          + 	unlink
          + do
          + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
          +-echo "$as_me:5667: checking for $ac_func" >&5
          ++echo "$as_me:5787: 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 5673 "configure"
          ++#line 5793 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char $ac_func (); below.  */
          +@@ -5701,16 +5821,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:5704: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:5824: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5707: \$? = $ac_status" >&5
          ++  echo "$as_me:5827: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:5710: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:5830: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5713: \$? = $ac_status" >&5
          ++  echo "$as_me:5833: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   eval "$as_ac_var=yes"
          + else
          +@@ -5720,7 +5840,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:5723: result: `eval echo '${'$as_ac_var'}'`" >&5
          ++echo "$as_me:5843: 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 <&5
          ++echo "$as_me:5860: 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 5746 "configure"
          ++#line 5866 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char $ac_func (); below.  */
          +@@ -5774,16 +5894,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:5777: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5780: \$? = $ac_status" >&5
          ++  echo "$as_me:5900: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:5783: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:5903: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5786: \$? = $ac_status" >&5
          ++  echo "$as_me:5906: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   eval "$as_ac_var=yes"
          + else
          +@@ -5793,7 +5913,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:5796: result: `eval echo '${'$as_ac_var'}'`" >&5
          ++echo "$as_me:5916: 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 <&5
          ++	echo "$as_me:5927: 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
          +@@ -5817,7 +5937,7 @@
          + 			eval 'ac_cv_func_'$cf_func'=error'
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 5820 "configure"
          ++#line 5940 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -5847,15 +5967,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:5850: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:5970: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5853: \$? = $ac_status" >&5
          ++  echo "$as_me:5973: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:5855: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:5975: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:5858: \$? = $ac_status" >&5
          ++  echo "$as_me:5978: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          + 
          + 			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
          +@@ -5873,7 +5993,7 @@
          + 		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
          + 
          + fi
          +-echo "$as_me:5876: result: $cf_cv_link_funcs" >&5
          ++echo "$as_me:5996: 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
          +@@ -5891,7 +6011,7 @@
          + # soft links (symbolic links) are useful for some systems where hard links do
          + # not work, or to make it simpler to copy terminfo trees around.
          + if test "$ac_cv_func_symlink" = yes ; then
          +-    echo "$as_me:5894: checking if tic should use symbolic links" >&5
          ++    echo "$as_me:6014: 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.
          +@@ -5901,21 +6021,21 @@
          + else
          +   with_symlinks=no
          + fi;
          +-    echo "$as_me:5904: result: $with_symlinks" >&5
          ++    echo "$as_me:6024: result: $with_symlinks" >&5
          + echo "${ECHO_T}$with_symlinks" >&6
          + fi
          + 
          + # If we have hard links and did not choose to use soft links instead, there is
          + # no reason to make this choice optional - use the hard links.
          + if test "$with_symlinks" = no ; then
          +-    echo "$as_me:5911: checking if tic should use hard links" >&5
          ++    echo "$as_me:6031: 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:5918: result: $with_links" >&5
          ++    echo "$as_me:6038: result: $with_links" >&5
          + echo "${ECHO_T}$with_links" >&6
          + fi
          + 
          +@@ -5928,7 +6048,7 @@
          + EOF
          + 
          + ###   use option --enable-broken-linker to force on use of broken-linker support
          +-echo "$as_me:5931: checking if you want broken-linker support code" >&5
          ++echo "$as_me:6051: 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.
          +@@ -5938,7 +6058,7 @@
          + else
          +   with_broken_linker=${BROKEN_LINKER-no}
          + fi;
          +-echo "$as_me:5941: result: $with_broken_linker" >&5
          ++echo "$as_me:6061: result: $with_broken_linker" >&5
          + echo "${ECHO_T}$with_broken_linker" >&6
          + 
          + BROKEN_LINKER=0
          +@@ -5958,12 +6078,14 @@
          + 		BROKEN_LINKER=1
          + 		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
          + 
          ++echo "${as_me-configure}:6081: testing cygwin linker is broken anyway ..." 1>&5
          ++
          + 		;;
          + 	esac
          + fi
          + 
          + ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
          +-echo "$as_me:5966: checking if tputs should process BSD-style prefix padding" >&5
          ++echo "$as_me:6088: 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.
          +@@ -5973,7 +6095,7 @@
          + else
          +   with_bsdpad=no
          + fi;
          +-echo "$as_me:5976: result: $with_bsdpad" >&5
          ++echo "$as_me:6098: result: $with_bsdpad" >&5
          + echo "${ECHO_T}$with_bsdpad" >&6
          + test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
          + #define BSD_TPUTS 1
          +@@ -5990,7 +6112,7 @@
          + 
          + # Check to define _XOPEN_SOURCE "automatically"
          + 
          +-echo "$as_me:5993: checking if $CC -U and -D options work together" >&5
          ++echo "$as_me:6115: checking if $CC -U and -D options work together" >&5
          + echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
          + if test "${cf_cv_cc_u_d_options+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -5999,7 +6121,7 @@
          + 	cf_save_CPPFLAGS="$CPPFLAGS"
          + 	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 6002 "configure"
          ++#line 6124 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -6018,16 +6140,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6143: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6024: \$? = $ac_status" >&5
          ++  echo "$as_me:6146: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6027: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6149: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6030: \$? = $ac_status" >&5
          ++  echo "$as_me:6152: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          + 
          + 	cf_cv_cc_u_d_options=yes
          +@@ -6041,7 +6163,7 @@
          + 	CPPFLAGS="$cf_save_CPPFLAGS"
          + 
          + fi
          +-echo "$as_me:6044: result: $cf_cv_cc_u_d_options" >&5
          ++echo "$as_me:6166: result: $cf_cv_cc_u_d_options" >&5
          + echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
          + 
          + cf_XOPEN_SOURCE=500
          +@@ -6065,16 +6187,16 @@
          + irix[56].*) #(vi
          + 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
          + 	;;
          +-linux*|gnu*) #(vi
          ++linux*|gnu*|k*bsd*-gnu) #(vi
          + 
          +-echo "$as_me:6070: checking if we must define _GNU_SOURCE" >&5
          ++echo "$as_me:6192: 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
          + 
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 6077 "configure"
          ++#line 6199 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6089,16 +6211,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6214: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6095: \$? = $ac_status" >&5
          ++  echo "$as_me:6217: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6098: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6220: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6101: \$? = $ac_status" >&5
          ++  echo "$as_me:6223: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_gnu_source=no
          + else
          +@@ -6107,7 +6229,7 @@
          + cf_save="$CPPFLAGS"
          + 	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
          + 	 cat >conftest.$ac_ext <<_ACEOF
          +-#line 6110 "configure"
          ++#line 6232 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6122,16 +6244,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6125: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6247: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6128: \$? = $ac_status" >&5
          ++  echo "$as_me:6250: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6131: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6253: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6134: \$? = $ac_status" >&5
          ++  echo "$as_me:6256: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_gnu_source=no
          + else
          +@@ -6146,7 +6268,7 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:6149: result: $cf_cv_gnu_source" >&5
          ++echo "$as_me:6271: 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"
          + 
          +@@ -6173,14 +6295,14 @@
          + 	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
          + 	;;
          + *)
          +-	echo "$as_me:6176: checking if we should define _XOPEN_SOURCE" >&5
          ++	echo "$as_me:6298: 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
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 6183 "configure"
          ++#line 6305 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6195,16 +6317,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6201: \$? = $ac_status" >&5
          ++  echo "$as_me:6323: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6204: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6326: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6207: \$? = $ac_status" >&5
          ++  echo "$as_me:6329: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_xopen_source=no
          + else
          +@@ -6213,7 +6335,7 @@
          + cf_save="$CPPFLAGS"
          + 	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
          + 	 cat >conftest.$ac_ext <<_ACEOF
          +-#line 6216 "configure"
          ++#line 6338 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6228,16 +6350,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6353: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6234: \$? = $ac_status" >&5
          ++  echo "$as_me:6356: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6237: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6359: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6240: \$? = $ac_status" >&5
          ++  echo "$as_me:6362: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_xopen_source=no
          + else
          +@@ -6252,7 +6374,7 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:6255: result: $cf_cv_xopen_source" >&5
          ++echo "$as_me:6377: result: $cf_cv_xopen_source" >&5
          + echo "${ECHO_T}$cf_cv_xopen_source" >&6
          + 	if test "$cf_cv_xopen_source" != no ; then
          + 
          +@@ -6286,16 +6408,16 @@
          + 	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
          + 		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
          + 
          +-echo "$as_me:6289: checking if we should define _POSIX_C_SOURCE" >&5
          ++echo "$as_me:6411: 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
          + 
          +-echo "(line 6295) testing if the symbol is already defined go no further ..." 1>&5
          ++echo "${as_me-configure}:6417: testing if the symbol is already defined go no further ..." 1>&5
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 6298 "configure"
          ++#line 6420 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6310,16 +6432,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6316: \$? = $ac_status" >&5
          ++  echo "$as_me:6438: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6319: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6441: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6322: \$? = $ac_status" >&5
          ++  echo "$as_me:6444: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_posix_c_source=no
          + else
          +@@ -6340,7 +6462,7 @@
          + 	 esac
          + 	 if test "$cf_want_posix_source" = yes ; then
          + 		cat >conftest.$ac_ext <<_ACEOF
          +-#line 6343 "configure"
          ++#line 6465 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6355,16 +6477,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6358: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6480: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6361: \$? = $ac_status" >&5
          ++  echo "$as_me:6483: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6364: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6486: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6367: \$? = $ac_status" >&5
          ++  echo "$as_me:6489: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   :
          + else
          +@@ -6375,15 +6497,15 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 	 fi
          + 
          +-echo "(line 6378) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
          ++echo "${as_me-configure}:6500: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
          + 
          + 	 CFLAGS="$cf_trim_CFLAGS"
          + 	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
          + 
          +-echo "(line 6383) testing if the second compile does not leave our definition intact error ..." 1>&5
          ++echo "${as_me-configure}:6505: testing if the second compile does not leave our definition intact error ..." 1>&5
          + 
          + 	 cat >conftest.$ac_ext <<_ACEOF
          +-#line 6386 "configure"
          ++#line 6508 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6398,16 +6520,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6401: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6523: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6404: \$? = $ac_status" >&5
          ++  echo "$as_me:6526: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6407: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6529: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6410: \$? = $ac_status" >&5
          ++  echo "$as_me:6532: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   :
          + else
          +@@ -6423,7 +6545,7 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:6426: result: $cf_cv_posix_c_source" >&5
          ++echo "$as_me:6548: result: $cf_cv_posix_c_source" >&5
          + echo "${ECHO_T}$cf_cv_posix_c_source" >&6
          + 
          + if test "$cf_cv_posix_c_source" != no ; then
          +@@ -6442,14 +6564,14 @@
          + 
          + # Work around breakage on OS X
          + 
          +-echo "$as_me:6445: checking if SIGWINCH is defined" >&5
          ++echo "$as_me:6567: checking if SIGWINCH is defined" >&5
          + echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
          + if test "${cf_cv_define_sigwinch+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          + else
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 6452 "configure"
          ++#line 6574 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -6464,23 +6586,23 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6467: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6470: \$? = $ac_status" >&5
          ++  echo "$as_me:6592: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6473: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6595: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6476: \$? = $ac_status" >&5
          ++  echo "$as_me:6598: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_define_sigwinch=yes
          + else
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 6483 "configure"
          ++#line 6605 "configure"
          + #include "confdefs.h"
          + 
          + #undef _XOPEN_SOURCE
          +@@ -6498,16 +6620,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6501: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6623: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6504: \$? = $ac_status" >&5
          ++  echo "$as_me:6626: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6507: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6629: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6510: \$? = $ac_status" >&5
          ++  echo "$as_me:6632: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_define_sigwinch=maybe
          + else
          +@@ -6521,11 +6643,11 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:6524: result: $cf_cv_define_sigwinch" >&5
          ++echo "$as_me:6646: result: $cf_cv_define_sigwinch" >&5
          + echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
          + 
          + if test "$cf_cv_define_sigwinch" = maybe ; then
          +-echo "$as_me:6528: checking for actual SIGWINCH definition" >&5
          ++echo "$as_me:6650: checking for actual SIGWINCH definition" >&5
          + echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
          + if test "${cf_cv_fixup_sigwinch+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -6536,7 +6658,7 @@
          + while test $cf_sigwinch != 1
          + do
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 6539 "configure"
          ++#line 6661 "configure"
          + #include "confdefs.h"
          + 
          + #undef _XOPEN_SOURCE
          +@@ -6558,16 +6680,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6561: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6564: \$? = $ac_status" >&5
          ++  echo "$as_me:6686: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6567: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6689: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6570: \$? = $ac_status" >&5
          ++  echo "$as_me:6692: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_fixup_sigwinch=$cf_sigwinch
          + 	 break
          +@@ -6581,7 +6703,7 @@
          + done
          + 
          + fi
          +-echo "$as_me:6584: result: $cf_cv_fixup_sigwinch" >&5
          ++echo "$as_me:6706: result: $cf_cv_fixup_sigwinch" >&5
          + echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
          + 
          + 	if test "$cf_cv_fixup_sigwinch" != unknown ; then
          +@@ -6591,13 +6713,13 @@
          + 
          + # Checks for CODESET support.
          + 
          +-  echo "$as_me:6594: checking for nl_langinfo and CODESET" >&5
          ++  echo "$as_me:6716: 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 6600 "configure"
          ++#line 6722 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -6609,16 +6731,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:6612: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6615: \$? = $ac_status" >&5
          ++  echo "$as_me:6737: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:6618: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6740: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6621: \$? = $ac_status" >&5
          ++  echo "$as_me:6743: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   am_cv_langinfo_codeset=yes
          + else
          +@@ -6629,7 +6751,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:6632: result: $am_cv_langinfo_codeset" >&5
          ++echo "$as_me:6754: result: $am_cv_langinfo_codeset" >&5
          + echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
          +   if test $am_cv_langinfo_codeset = yes; then
          + 
          +@@ -6643,7 +6765,7 @@
          + NCURSES_OK_WCHAR_T=
          + NCURSES_OK_WINT_T=
          + 
          +-echo "$as_me:6646: checking if you want wide-character code" >&5
          ++echo "$as_me:6768: checking if you want wide-character code" >&5
          + echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
          + 
          + # Check whether --enable-widec or --disable-widec was given.
          +@@ -6653,7 +6775,7 @@
          + else
          +   with_widec=no
          + fi;
          +-echo "$as_me:6656: result: $with_widec" >&5
          ++echo "$as_me:6778: result: $with_widec" >&5
          + echo "${ECHO_T}$with_widec" >&6
          + if test "$with_widec" = yes ; then
          + 	LIB_SUFFIX="w${LIB_SUFFIX}"
          +@@ -6661,10 +6783,10 @@
          + #define USE_WIDEC_SUPPORT 1
          + EOF
          + 
          +-echo "$as_me:6664: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
          ++echo "$as_me:6786: 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 6667 "configure"
          ++#line 6789 "configure"
          + #include "confdefs.h"
          + #include 
          + 
          +@@ -6680,16 +6802,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6805: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6686: \$? = $ac_status" >&5
          ++  echo "$as_me:6808: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6689: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6811: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6692: \$? = $ac_status" >&5
          ++  echo "$as_me:6814: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_result=no
          + else
          +@@ -6698,16 +6820,16 @@
          + cf_result=yes
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +-echo "$as_me:6701: result: $cf_result" >&5
          ++echo "$as_me:6823: 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:6707: checking checking for compatible value versus " >&5
          ++	echo "$as_me:6829: 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 6710 "configure"
          ++#line 6832 "configure"
          + #include "confdefs.h"
          + #include 
          + 
          +@@ -6723,16 +6845,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:6848: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6729: \$? = $ac_status" >&5
          ++  echo "$as_me:6851: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6732: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6854: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6735: \$? = $ac_status" >&5
          ++  echo "$as_me:6857: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_result=yes
          + else
          +@@ -6741,7 +6863,7 @@
          + cf_result=no
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +-	echo "$as_me:6744: result: $cf_result" >&5
          ++	echo "$as_me:6866: result: $cf_result" >&5
          + echo "${ECHO_T}$cf_result" >&6
          + 	if test "$cf_result" = no ; then
          + 		# perhaps we can override it - try...
          +@@ -6755,13 +6877,13 @@
          + 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:6758: checking for $ac_func" >&5
          ++echo "$as_me:6880: 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 6764 "configure"
          ++#line 6886 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char $ac_func (); below.  */
          +@@ -6792,16 +6914,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:6795: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:6917: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6798: \$? = $ac_status" >&5
          ++  echo "$as_me:6920: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:6801: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6923: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6804: \$? = $ac_status" >&5
          ++  echo "$as_me:6926: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   eval "$as_ac_var=yes"
          + else
          +@@ -6811,7 +6933,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:6814: result: `eval echo '${'$as_ac_var'}'`" >&5
          ++echo "$as_me:6936: 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 <&5
          ++echo "$as_me:6948: 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
          +@@ -6832,7 +6954,7 @@
          + 	cf_save_LIBS="$LIBS"
          + 	LIBS="-lutf8 $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 6835 "configure"
          ++#line 6957 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -6845,16 +6967,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:6848: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:6970: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6851: \$? = $ac_status" >&5
          ++  echo "$as_me:6973: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:6854: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:6976: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6857: \$? = $ac_status" >&5
          ++  echo "$as_me:6979: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_libutf8=yes
          + else
          +@@ -6866,7 +6988,7 @@
          + 	LIBS="$cf_save_LIBS"
          + 
          + fi
          +-echo "$as_me:6869: result: $cf_cv_libutf8" >&5
          ++echo "$as_me:6991: result: $cf_cv_libutf8" >&5
          + echo "${ECHO_T}$cf_cv_libutf8" >&6
          + 
          + if test "$cf_cv_libutf8" = yes ; then
          +@@ -6883,14 +7005,14 @@
          + 	fi
          + 
          + # This is needed on Tru64 5.0 to declare mbstate_t
          +-echo "$as_me:6886: checking if we must include wchar.h to declare mbstate_t" >&5
          ++echo "$as_me:7008: 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 6893 "configure"
          ++#line 7015 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -6908,23 +7030,23 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6911: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7033: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6914: \$? = $ac_status" >&5
          ++  echo "$as_me:7036: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6917: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7039: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6920: \$? = $ac_status" >&5
          ++  echo "$as_me:7042: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_mbstate_t=no
          + else
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 6927 "configure"
          ++#line 7049 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -6943,16 +7065,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:6946: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7068: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6949: \$? = $ac_status" >&5
          ++  echo "$as_me:7071: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:6952: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7074: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:6955: \$? = $ac_status" >&5
          ++  echo "$as_me:7077: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_mbstate_t=yes
          + else
          +@@ -6964,7 +7086,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:6967: result: $cf_cv_mbstate_t" >&5
          ++echo "$as_me:7089: result: $cf_cv_mbstate_t" >&5
          + echo "${ECHO_T}$cf_cv_mbstate_t" >&6
          + 
          + if test "$cf_cv_mbstate_t" = yes ; then
          +@@ -6981,14 +7103,14 @@
          + fi
          + 
          + # This is needed on Tru64 5.0 to declare wchar_t
          +-echo "$as_me:6984: checking if we must include wchar.h to declare wchar_t" >&5
          ++echo "$as_me:7106: 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 >conftest.$ac_ext <<_ACEOF
          +-#line 6991 "configure"
          ++#line 7113 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -7006,23 +7128,23 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7009: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7131: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7012: \$? = $ac_status" >&5
          ++  echo "$as_me:7134: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7015: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7137: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7018: \$? = $ac_status" >&5
          ++  echo "$as_me:7140: \$? = $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 7025 "configure"
          ++#line 7147 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -7041,16 +7163,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7044: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7166: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7047: \$? = $ac_status" >&5
          ++  echo "$as_me:7169: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7050: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7172: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7053: \$? = $ac_status" >&5
          ++  echo "$as_me:7175: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_wchar_t=yes
          + else
          +@@ -7062,7 +7184,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:7065: result: $cf_cv_wchar_t" >&5
          ++echo "$as_me:7187: result: $cf_cv_wchar_t" >&5
          + echo "${ECHO_T}$cf_cv_wchar_t" >&6
          + 
          + if test "$cf_cv_wchar_t" = yes ; then
          +@@ -7084,14 +7206,14 @@
          + fi
          + 
          + # This is needed on Tru64 5.0 to declare wint_t
          +-echo "$as_me:7087: checking if we must include wchar.h to declare wint_t" >&5
          ++echo "$as_me:7209: 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
          + 
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 7094 "configure"
          ++#line 7216 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -7109,23 +7231,23 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7112: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7234: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7115: \$? = $ac_status" >&5
          ++  echo "$as_me:7237: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7118: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7240: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7121: \$? = $ac_status" >&5
          ++  echo "$as_me:7243: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_wint_t=no
          + else
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 7128 "configure"
          ++#line 7250 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -7144,16 +7266,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7147: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7269: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7150: \$? = $ac_status" >&5
          ++  echo "$as_me:7272: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7153: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7275: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7156: \$? = $ac_status" >&5
          ++  echo "$as_me:7278: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_wint_t=yes
          + else
          +@@ -7165,7 +7287,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:7168: result: $cf_cv_wint_t" >&5
          ++echo "$as_me:7290: result: $cf_cv_wint_t" >&5
          + echo "${ECHO_T}$cf_cv_wint_t" >&6
          + 
          + if test "$cf_cv_wint_t" = yes ; then
          +@@ -7204,7 +7326,7 @@
          + 	;;
          + esac
          + 
          +-echo "$as_me:7207: checking whether to enable _LP64 definition in curses.h" >&5
          ++echo "$as_me:7329: checking whether to enable _LP64 definition in curses.h" >&5
          + echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
          + 
          + # Check whether --enable-lp64 or --disable-lp64 was given.
          +@@ -7214,7 +7336,7 @@
          + else
          +   with_lp64=$default_with_lp64
          + fi;
          +-echo "$as_me:7217: result: $with_lp64" >&5
          ++echo "$as_me:7339: result: $with_lp64" >&5
          + echo "${ECHO_T}$with_lp64" >&6
          + 
          + if test "$with_lp64" = yes ; then
          +@@ -7230,7 +7352,7 @@
          + fi;
          + if test "$enable_largefile" != no; then
          + 
          +-  echo "$as_me:7233: checking for special C compiler options needed for large files" >&5
          ++  echo "$as_me:7355: 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
          +@@ -7242,7 +7364,7 @@
          +      	 # 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 7245 "configure"
          ++#line 7367 "configure"
          + #include "confdefs.h"
          + #include 
          +  /* Check that off_t can represent 2**63 - 1 correctly.
          +@@ -7262,16 +7384,16 @@
          + }
          + _ACEOF
          +      	 rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7265: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7387: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7268: \$? = $ac_status" >&5
          ++  echo "$as_me:7390: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7271: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7393: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7274: \$? = $ac_status" >&5
          ++  echo "$as_me:7396: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -7281,16 +7403,16 @@
          + rm -f conftest.$ac_objext
          +      	 CC="$CC -n32"
          +      	 rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7284: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7406: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7287: \$? = $ac_status" >&5
          ++  echo "$as_me:7409: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7290: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7412: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7293: \$? = $ac_status" >&5
          ++  echo "$as_me:7415: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_sys_largefile_CC=' -n32'; break
          + else
          +@@ -7304,13 +7426,13 @@
          +        rm -f conftest.$ac_ext
          +     fi
          + fi
          +-echo "$as_me:7307: result: $ac_cv_sys_largefile_CC" >&5
          ++echo "$as_me:7429: 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
          + 
          +-  echo "$as_me:7313: checking for _FILE_OFFSET_BITS value needed for large files" >&5
          ++  echo "$as_me:7435: 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
          +@@ -7318,7 +7440,7 @@
          +   while :; do
          +   ac_cv_sys_file_offset_bits=no
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7321 "configure"
          ++#line 7443 "configure"
          + #include "confdefs.h"
          + #include 
          +  /* Check that off_t can represent 2**63 - 1 correctly.
          +@@ -7338,16 +7460,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7341: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7344: \$? = $ac_status" >&5
          ++  echo "$as_me:7466: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7347: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7469: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7350: \$? = $ac_status" >&5
          ++  echo "$as_me:7472: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -7356,7 +7478,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7359 "configure"
          ++#line 7481 "configure"
          + #include "confdefs.h"
          + #define _FILE_OFFSET_BITS 64
          + #include 
          +@@ -7377,16 +7499,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7380: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7502: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7383: \$? = $ac_status" >&5
          ++  echo "$as_me:7505: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7386: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7508: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7389: \$? = $ac_status" >&5
          ++  echo "$as_me:7511: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_sys_file_offset_bits=64; break
          + else
          +@@ -7397,7 +7519,7 @@
          +   break
          + done
          + fi
          +-echo "$as_me:7400: result: $ac_cv_sys_file_offset_bits" >&5
          ++echo "$as_me:7522: 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
          + 
          +@@ -7407,7 +7529,7 @@
          + 
          + fi
          + rm -f conftest*
          +-  echo "$as_me:7410: checking for _LARGE_FILES value needed for large files" >&5
          ++  echo "$as_me:7532: 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
          +@@ -7415,7 +7537,7 @@
          +   while :; do
          +   ac_cv_sys_large_files=no
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7418 "configure"
          ++#line 7540 "configure"
          + #include "confdefs.h"
          + #include 
          +  /* Check that off_t can represent 2**63 - 1 correctly.
          +@@ -7435,16 +7557,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7438: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7560: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7441: \$? = $ac_status" >&5
          ++  echo "$as_me:7563: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7444: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7566: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7447: \$? = $ac_status" >&5
          ++  echo "$as_me:7569: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -7453,7 +7575,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7456 "configure"
          ++#line 7578 "configure"
          + #include "confdefs.h"
          + #define _LARGE_FILES 1
          + #include 
          +@@ -7474,16 +7596,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7477: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7599: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7480: \$? = $ac_status" >&5
          ++  echo "$as_me:7602: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7483: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7605: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7486: \$? = $ac_status" >&5
          ++  echo "$as_me:7608: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_sys_large_files=1; break
          + else
          +@@ -7494,7 +7616,7 @@
          +   break
          + done
          + fi
          +-echo "$as_me:7497: result: $ac_cv_sys_large_files" >&5
          ++echo "$as_me:7619: 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
          + 
          +@@ -7507,7 +7629,7 @@
          + fi
          + 
          +     if test "$enable_largefile" != no ; then
          +-	echo "$as_me:7510: checking for _LARGEFILE_SOURCE value needed for large files" >&5
          ++	echo "$as_me:7632: 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
          +@@ -7515,7 +7637,7 @@
          +   while :; do
          +   ac_cv_sys_largefile_source=no
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7518 "configure"
          ++#line 7640 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -7527,16 +7649,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7530: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7652: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7533: \$? = $ac_status" >&5
          ++  echo "$as_me:7655: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7536: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7658: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7539: \$? = $ac_status" >&5
          ++  echo "$as_me:7661: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   break
          + else
          +@@ -7545,7 +7667,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7548 "configure"
          ++#line 7670 "configure"
          + #include "confdefs.h"
          + #define _LARGEFILE_SOURCE 1
          + #include 
          +@@ -7558,16 +7680,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7561: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7683: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7564: \$? = $ac_status" >&5
          ++  echo "$as_me:7686: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7567: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7689: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7570: \$? = $ac_status" >&5
          ++  echo "$as_me:7692: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_sys_largefile_source=1; break
          + else
          +@@ -7578,7 +7700,7 @@
          +   break
          + done
          + fi
          +-echo "$as_me:7581: result: $ac_cv_sys_largefile_source" >&5
          ++echo "$as_me:7703: 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
          + 
          +@@ -7592,13 +7714,13 @@
          + # 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:7595: checking for fseeko" >&5
          ++echo "$as_me:7717: 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
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 7601 "configure"
          ++#line 7723 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -7610,16 +7732,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:7613: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:7735: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7616: \$? = $ac_status" >&5
          ++  echo "$as_me:7738: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:7619: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7741: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7622: \$? = $ac_status" >&5
          ++  echo "$as_me:7744: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_fseeko=yes
          + else
          +@@ -7629,7 +7751,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:7632: result: $ac_cv_func_fseeko" >&5
          ++echo "$as_me:7754: result: $ac_cv_func_fseeko" >&5
          + echo "${ECHO_T}$ac_cv_func_fseeko" >&6
          + if test $ac_cv_func_fseeko = yes; then
          + 
          +@@ -7648,15 +7770,16 @@
          + 	# the config.h
          + 	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
          + 	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
          ++	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
          + 
          +-	echo "$as_me:7652: checking whether to use struct dirent64" >&5
          ++	echo "$as_me:7775: checking whether to use struct dirent64" >&5
          + echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
          + if test "${cf_cv_struct_dirent64+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          + else
          + 
          + 		cat >conftest.$ac_ext <<_ACEOF
          +-#line 7659 "configure"
          ++#line 7782 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -7677,16 +7800,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:7680: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:7803: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7683: \$? = $ac_status" >&5
          ++  echo "$as_me:7806: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:7686: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:7809: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:7689: \$? = $ac_status" >&5
          ++  echo "$as_me:7812: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_struct_dirent64=yes
          + else
          +@@ -7697,7 +7820,7 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:7700: result: $cf_cv_struct_dirent64" >&5
          ++echo "$as_me:7823: result: $cf_cv_struct_dirent64" >&5
          + echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
          + 	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
          + #define HAVE_STRUCT_DIRENT64 1
          +@@ -7706,7 +7829,7 @@
          +     fi
          + 
          + ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
          +-echo "$as_me:7709: checking if you want tparm not to use X/Open fixed-parameter list" >&5
          ++echo "$as_me:7832: checking if you want tparm not to use X/Open fixed-parameter list" >&5
          + echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
          + 
          + # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
          +@@ -7716,13 +7839,13 @@
          + else
          +   with_tparm_varargs=yes
          + fi;
          +-echo "$as_me:7719: result: $with_tparm_varargs" >&5
          ++echo "$as_me:7842: result: $with_tparm_varargs" >&5
          + echo "${ECHO_T}$with_tparm_varargs" >&6
          + NCURSES_TPARM_VARARGS=0
          + test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
          + 
          + ###   use option --with-bool to override bool's type
          +-echo "$as_me:7725: checking for type of bool" >&5
          ++echo "$as_me:7848: 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.
          +@@ -7732,10 +7855,10 @@
          + else
          +   NCURSES_BOOL=auto
          + fi;
          +-echo "$as_me:7735: result: $NCURSES_BOOL" >&5
          ++echo "$as_me:7858: result: $NCURSES_BOOL" >&5
          + echo "${ECHO_T}$NCURSES_BOOL" >&6
          + 
          +-echo "$as_me:7738: checking for alternate terminal capabilities file" >&5
          ++echo "$as_me:7861: 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.
          +@@ -7746,11 +7869,11 @@
          +   TERMINFO_CAPS=Caps
          + fi;
          + test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
          +-echo "$as_me:7749: result: $TERMINFO_CAPS" >&5
          ++echo "$as_me:7872: result: $TERMINFO_CAPS" >&5
          + echo "${ECHO_T}$TERMINFO_CAPS" >&6
          + 
          + ###   use option --with-chtype to override chtype's type
          +-echo "$as_me:7753: checking for type of chtype" >&5
          ++echo "$as_me:7876: checking for type of chtype" >&5
          + echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
          + 
          + # Check whether --with-chtype or --without-chtype was given.
          +@@ -7760,11 +7883,11 @@
          + else
          +   NCURSES_CHTYPE=auto
          + fi;
          +-echo "$as_me:7763: result: $NCURSES_CHTYPE" >&5
          ++echo "$as_me:7886: result: $NCURSES_CHTYPE" >&5
          + echo "${ECHO_T}$NCURSES_CHTYPE" >&6
          + 
          + ###   use option --with-ospeed to override ospeed's type
          +-echo "$as_me:7767: checking for type of ospeed" >&5
          ++echo "$as_me:7890: 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.
          +@@ -7774,11 +7897,11 @@
          + else
          +   NCURSES_OSPEED=short
          + fi;
          +-echo "$as_me:7777: result: $NCURSES_OSPEED" >&5
          ++echo "$as_me:7900: result: $NCURSES_OSPEED" >&5
          + echo "${ECHO_T}$NCURSES_OSPEED" >&6
          + 
          + ###   use option --with-mmask-t to override mmask_t's type
          +-echo "$as_me:7781: checking for type of mmask_t" >&5
          ++echo "$as_me:7904: checking for type of mmask_t" >&5
          + echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
          + 
          + # Check whether --with-mmask-t or --without-mmask-t was given.
          +@@ -7788,11 +7911,11 @@
          + else
          +   NCURSES_MMASK_T=auto
          + fi;
          +-echo "$as_me:7791: result: $NCURSES_MMASK_T" >&5
          ++echo "$as_me:7914: result: $NCURSES_MMASK_T" >&5
          + echo "${ECHO_T}$NCURSES_MMASK_T" >&6
          + 
          + ### Enable compiling-in rcs id's
          +-echo "$as_me:7795: checking if RCS identifiers should be compiled-in" >&5
          ++echo "$as_me:7918: 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.
          +@@ -7802,7 +7925,7 @@
          + else
          +   with_rcs_ids=no
          + fi;
          +-echo "$as_me:7805: result: $with_rcs_ids" >&5
          ++echo "$as_me:7928: 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
          +@@ -7810,7 +7933,7 @@
          + 
          + ###############################################################################
          + 
          +-echo "$as_me:7813: checking format of man-pages" >&5
          ++echo "$as_me:7936: 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.
          +@@ -7899,14 +8022,14 @@
          +   ;;
          + esac
          + 
          +-echo "$as_me:7902: result: $MANPAGE_FORMAT" >&5
          ++echo "$as_me:8025: result: $MANPAGE_FORMAT" >&5
          + echo "${ECHO_T}$MANPAGE_FORMAT" >&6
          + if test -n "$cf_unknown" ; then
          +-  { echo "$as_me:7905: WARNING: Unexpected manpage-format $cf_unknown" >&5
          ++  { echo "$as_me:8028: WARNING: Unexpected manpage-format $cf_unknown" >&5
          + echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
          + fi
          + 
          +-echo "$as_me:7909: checking for manpage renaming" >&5
          ++echo "$as_me:8032: 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.
          +@@ -7934,7 +8057,7 @@
          +   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:7937: error: not a filename: $MANPAGE_RENAMES" >&5
          ++    { { echo "$as_me:8060: error: not a filename: $MANPAGE_RENAMES" >&5
          + echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
          +    { (exit 1); exit 1; }; }
          +   fi
          +@@ -7948,10 +8071,10 @@
          +   fi
          + fi
          + 
          +-echo "$as_me:7951: result: $MANPAGE_RENAMES" >&5
          ++echo "$as_me:8074: result: $MANPAGE_RENAMES" >&5
          + echo "${ECHO_T}$MANPAGE_RENAMES" >&6
          + 
          +-echo "$as_me:7954: checking if manpage aliases will be installed" >&5
          ++echo "$as_me:8077: 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.
          +@@ -7962,7 +8085,7 @@
          +   MANPAGE_ALIASES=yes
          + fi;
          + 
          +-echo "$as_me:7965: result: $MANPAGE_ALIASES" >&5
          ++echo "$as_me:8088: result: $MANPAGE_ALIASES" >&5
          + echo "${ECHO_T}$MANPAGE_ALIASES" >&6
          + 
          + if test "$LN_S" = "ln -s"; then
          +@@ -7973,7 +8096,7 @@
          + 
          + MANPAGE_SYMLINKS=no
          + if test "$MANPAGE_ALIASES" = yes ; then
          +-echo "$as_me:7976: checking if manpage symlinks should be used" >&5
          ++echo "$as_me:8099: 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.
          +@@ -7986,17 +8109,17 @@
          + 
          + if test "$$cf_use_symlinks" = no; then
          + if test "$MANPAGE_SYMLINKS" = yes ; then
          +-	{ echo "$as_me:7989: WARNING: cannot make symlinks" >&5
          ++	{ echo "$as_me:8112: WARNING: cannot make symlinks" >&5
          + echo "$as_me: WARNING: cannot make symlinks" >&2;}
          + 	MANPAGE_SYMLINKS=no
          + fi
          + fi
          + 
          +-echo "$as_me:7995: result: $MANPAGE_SYMLINKS" >&5
          ++echo "$as_me:8118: result: $MANPAGE_SYMLINKS" >&5
          + echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
          + fi
          + 
          +-echo "$as_me:7999: checking for manpage tbl" >&5
          ++echo "$as_me:8122: checking for manpage tbl" >&5
          + echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
          + 
          + # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
          +@@ -8007,7 +8130,7 @@
          +   MANPAGE_TBL=no
          + fi;
          + 
          +-echo "$as_me:8010: result: $MANPAGE_TBL" >&5
          ++echo "$as_me:8133: result: $MANPAGE_TBL" >&5
          + echo "${ECHO_T}$MANPAGE_TBL" >&6
          + 
          +   if test "$prefix" = "NONE" ; then
          +@@ -8047,6 +8170,7 @@
          + esac
          + 
          + cf_edit_man=./edit_man.sh
          ++cf_man_alias=`pwd`/man_alias.sed
          + 
          + cat >$cf_edit_man <>$cf_man_alias <<-CF_EOF2
          ++		s,@DATADIR@,\$datadir,g
          ++		s,@TERMINFO@,\$TERMINFO,g
          ++		s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
          ++		s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
          ++		s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
          ++		s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
          ++CF_EOF
          ++
          ++	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
          ++	do
          ++		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
          ++		cf_name=`echo $cf_name|sed "$program_transform_name"`
          ++cat >>$cf_edit_man <<-CF_EOF
          ++		s,@$cf_NAME@,$cf_name,
          ++CF_EOF
          ++	done
          ++
          ++cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <&5
          ++echo "$as_me:8444: 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
          + 
          + # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
          +@@ -8318,7 +8451,7 @@
          + else
          +   with_ext_funcs=yes
          + fi;
          +-echo "$as_me:8321: result: $with_ext_funcs" >&5
          ++echo "$as_me:8454: result: $with_ext_funcs" >&5
          + echo "${ECHO_T}$with_ext_funcs" >&6
          + if test "$with_ext_funcs" = yes ; then
          + 	NCURSES_EXT_FUNCS=1
          +@@ -8355,7 +8488,7 @@
          + fi
          + 
          + ###   use option --enable-const to turn on use of const beyond that in XSI.
          +-echo "$as_me:8358: checking for extended use of const keyword" >&5
          ++echo "$as_me:8491: 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.
          +@@ -8365,14 +8498,14 @@
          + else
          +   with_ext_const=no
          + fi;
          +-echo "$as_me:8368: result: $with_ext_const" >&5
          ++echo "$as_me:8501: 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
          + 
          +-echo "$as_me:8375: checking if you want \$NCURSES_NO_PADDING code" >&5
          ++echo "$as_me:8508: 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.
          +@@ -8382,19 +8515,19 @@
          + else
          +   with_no_padding=$with_ext_funcs
          + fi;
          +-echo "$as_me:8385: result: $with_no_padding" >&5
          ++echo "$as_me:8518: 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
          + 
          +-echo "$as_me:8391: checking for ANSI C header files" >&5
          ++echo "$as_me:8524: 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 8397 "configure"
          ++#line 8530 "configure"
          + #include "confdefs.h"
          + #include 
          + #include 
          +@@ -8402,13 +8535,13 @@
          + #include 
          + 
          + _ACEOF
          +-if { (eval echo "$as_me:8405: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:8538: \"$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:8411: \$? = $ac_status" >&5
          ++  echo "$as_me:8544: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -8430,7 +8563,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 8433 "configure"
          ++#line 8566 "configure"
          + #include "confdefs.h"
          + #include 
          + 
          +@@ -8448,7 +8581,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 8451 "configure"
          ++#line 8584 "configure"
          + #include "confdefs.h"
          + #include 
          + 
          +@@ -8469,7 +8602,7 @@
          +   :
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 8472 "configure"
          ++#line 8605 "configure"
          + #include "confdefs.h"
          + #include 
          + #if ((' ' & 0x0FF) == 0x020)
          +@@ -8495,15 +8628,15 @@
          + }
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:8498: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:8631: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8501: \$? = $ac_status" >&5
          ++  echo "$as_me:8634: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:8503: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8636: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8506: \$? = $ac_status" >&5
          ++  echo "$as_me:8639: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   :
          + else
          +@@ -8516,7 +8649,7 @@
          + fi
          + fi
          + fi
          +-echo "$as_me:8519: result: $ac_cv_header_stdc" >&5
          ++echo "$as_me:8652: result: $ac_cv_header_stdc" >&5
          + echo "${ECHO_T}$ac_cv_header_stdc" >&6
          + if test $ac_cv_header_stdc = yes; then
          + 
          +@@ -8532,28 +8665,28 @@
          +                   inttypes.h stdint.h unistd.h
          + do
          + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
          +-echo "$as_me:8535: checking for $ac_header" >&5
          ++echo "$as_me:8668: 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 8541 "configure"
          ++#line 8674 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + #include <$ac_header>
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:8547: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8550: \$? = $ac_status" >&5
          ++  echo "$as_me:8683: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:8553: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8686: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8556: \$? = $ac_status" >&5
          ++  echo "$as_me:8689: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   eval "$as_ac_Header=yes"
          + else
          +@@ -8563,7 +8696,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:8566: result: `eval echo '${'$as_ac_Header'}'`" >&5
          ++echo "$as_me:8699: 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 <&5
          ++echo "$as_me:8709: checking for signed char" >&5
          + echo $ECHO_N "checking for signed char... $ECHO_C" >&6
          + if test "${ac_cv_type_signed_char+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 8582 "configure"
          ++#line 8715 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + int
          +@@ -8594,16 +8727,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8600: \$? = $ac_status" >&5
          ++  echo "$as_me:8733: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:8603: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8736: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8606: \$? = $ac_status" >&5
          ++  echo "$as_me:8739: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_type_signed_char=yes
          + else
          +@@ -8613,10 +8746,10 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:8616: result: $ac_cv_type_signed_char" >&5
          ++echo "$as_me:8749: result: $ac_cv_type_signed_char" >&5
          + echo "${ECHO_T}$ac_cv_type_signed_char" >&6
          + 
          +-echo "$as_me:8619: checking size of signed char" >&5
          ++echo "$as_me:8752: checking size of signed char" >&5
          + echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
          + if test "${ac_cv_sizeof_signed_char+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -8625,7 +8758,7 @@
          +   if test "$cross_compiling" = yes; then
          +   # Depending upon the size, compute the lo and hi bounds.
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 8628 "configure"
          ++#line 8761 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + int
          +@@ -8637,21 +8770,21 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8643: \$? = $ac_status" >&5
          ++  echo "$as_me:8776: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:8646: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8779: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8649: \$? = $ac_status" >&5
          ++  echo "$as_me:8782: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_lo=0 ac_mid=0
          +   while :; do
          +     cat >conftest.$ac_ext <<_ACEOF
          +-#line 8654 "configure"
          ++#line 8787 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + int
          +@@ -8663,16 +8796,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:8666: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:8799: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8669: \$? = $ac_status" >&5
          ++  echo "$as_me:8802: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:8672: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8805: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8675: \$? = $ac_status" >&5
          ++  echo "$as_me:8808: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_hi=$ac_mid; break
          + else
          +@@ -8688,7 +8821,7 @@
          + ac_hi=-1 ac_mid=-1
          +   while :; do
          +     cat >conftest.$ac_ext <<_ACEOF
          +-#line 8691 "configure"
          ++#line 8824 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + int
          +@@ -8700,16 +8833,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:8836: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8706: \$? = $ac_status" >&5
          ++  echo "$as_me:8839: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:8709: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8842: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8712: \$? = $ac_status" >&5
          ++  echo "$as_me:8845: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_lo=$ac_mid; break
          + else
          +@@ -8725,7 +8858,7 @@
          + while test "x$ac_lo" != "x$ac_hi"; do
          +   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 8728 "configure"
          ++#line 8861 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + int
          +@@ -8737,16 +8870,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:8873: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8743: \$? = $ac_status" >&5
          ++  echo "$as_me:8876: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:8746: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8879: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8749: \$? = $ac_status" >&5
          ++  echo "$as_me:8882: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_hi=$ac_mid
          + else
          +@@ -8759,12 +8892,12 @@
          + ac_cv_sizeof_signed_char=$ac_lo
          + else
          +   if test "$cross_compiling" = yes; then
          +-  { { echo "$as_me:8762: error: cannot run test program while cross compiling" >&5
          ++  { { echo "$as_me:8895: 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 8767 "configure"
          ++#line 8900 "configure"
          + #include "confdefs.h"
          + $ac_includes_default
          + int
          +@@ -8780,15 +8913,15 @@
          + }
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:8916: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8786: \$? = $ac_status" >&5
          ++  echo "$as_me:8919: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:8788: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:8921: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:8791: \$? = $ac_status" >&5
          ++  echo "$as_me:8924: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_sizeof_signed_char=`cat conftest.val`
          + else
          +@@ -8804,7 +8937,7 @@
          +   ac_cv_sizeof_signed_char=0
          + fi
          + fi
          +-echo "$as_me:8807: result: $ac_cv_sizeof_signed_char" >&5
          ++echo "$as_me:8940: result: $ac_cv_sizeof_signed_char" >&5
          + echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
          + cat >>confdefs.h <&5
          ++echo "$as_me:8951: checking if you want to use signed Boolean array in term.h" >&5
          + echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
          + 
          + # Check whether --enable-signed-char or --disable-signed-char was given.
          +@@ -8825,12 +8958,12 @@
          + else
          +   with_signed_char=no
          + fi;
          +-echo "$as_me:8828: result: $with_signed_char" >&5
          ++echo "$as_me:8961: result: $with_signed_char" >&5
          + echo "${ECHO_T}$with_signed_char" >&6
          + test "$with_signed_char" != yes && NCURSES_SBOOL="char"
          + 
          + ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
          +-echo "$as_me:8833: checking if you want SIGWINCH handler" >&5
          ++echo "$as_me:8966: checking if you want SIGWINCH handler" >&5
          + echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
          + 
          + # Check whether --enable-sigwinch or --disable-sigwinch was given.
          +@@ -8840,14 +8973,14 @@
          + else
          +   with_sigwinch=$with_ext_funcs
          + fi;
          +-echo "$as_me:8843: result: $with_sigwinch" >&5
          ++echo "$as_me:8976: 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:8850: checking if you want user-definable terminal capabilities like termcap" >&5
          ++echo "$as_me:8983: 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.
          +@@ -8857,7 +8990,7 @@
          + else
          +   with_tcap_names=$with_ext_funcs
          + fi;
          +-echo "$as_me:8860: result: $with_tcap_names" >&5
          ++echo "$as_me:8993: result: $with_tcap_names" >&5
          + echo "${ECHO_T}$with_tcap_names" >&6
          + NCURSES_XNAMES=0
          + test "$with_tcap_names" = yes && NCURSES_XNAMES=1
          +@@ -8865,7 +8998,7 @@
          + ###############################################################################
          + # These options are relatively safe to experiment with.
          + 
          +-echo "$as_me:8868: checking if you want all development code" >&5
          ++echo "$as_me:9001: checking if you want all development code" >&5
          + echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
          + 
          + # Check whether --with-develop or --without-develop was given.
          +@@ -8875,11 +9008,11 @@
          + else
          +   with_develop=no
          + fi;
          +-echo "$as_me:8878: result: $with_develop" >&5
          ++echo "$as_me:9011: result: $with_develop" >&5
          + echo "${ECHO_T}$with_develop" >&6
          + 
          + ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
          +-echo "$as_me:8882: checking if you want hard-tabs code" >&5
          ++echo "$as_me:9015: checking if you want hard-tabs code" >&5
          + echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
          + 
          + # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
          +@@ -8889,14 +9022,14 @@
          + else
          +   enable_hard_tabs=$with_develop
          + fi;
          +-echo "$as_me:8892: result: $enable_hard_tabs" >&5
          ++echo "$as_me:9025: result: $enable_hard_tabs" >&5
          + echo "${ECHO_T}$enable_hard_tabs" >&6
          + test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
          + #define USE_HARD_TABS 1
          + EOF
          + 
          + ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
          +-echo "$as_me:8899: checking if you want limited support for xmc" >&5
          ++echo "$as_me:9032: checking if you want limited support for xmc" >&5
          + echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
          + 
          + # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
          +@@ -8906,7 +9039,7 @@
          + else
          +   enable_xmc_glitch=$with_develop
          + fi;
          +-echo "$as_me:8909: result: $enable_xmc_glitch" >&5
          ++echo "$as_me:9042: result: $enable_xmc_glitch" >&5
          + echo "${ECHO_T}$enable_xmc_glitch" >&6
          + test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
          + #define USE_XMC_SUPPORT 1
          +@@ -8915,7 +9048,7 @@
          + ###############################################################################
          + # These are just experimental, probably should not be in a package:
          + 
          +-echo "$as_me:8918: checking if you do not want to assume colors are white-on-black" >&5
          ++echo "$as_me:9051: 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.
          +@@ -8925,14 +9058,14 @@
          + else
          +   with_assumed_color=yes
          + fi;
          +-echo "$as_me:8928: result: $with_assumed_color" >&5
          ++echo "$as_me:9061: 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:8935: checking if you want hashmap scrolling-optimization code" >&5
          ++echo "$as_me:9068: 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.
          +@@ -8942,14 +9075,14 @@
          + else
          +   with_hashmap=yes
          + fi;
          +-echo "$as_me:8945: result: $with_hashmap" >&5
          ++echo "$as_me:9078: result: $with_hashmap" >&5
          + echo "${ECHO_T}$with_hashmap" >&6
          + test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
          + #define USE_HASHMAP 1
          + EOF
          + 
          + ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
          +-echo "$as_me:8952: checking if you want colorfgbg code" >&5
          ++echo "$as_me:9085: 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.
          +@@ -8959,14 +9092,14 @@
          + else
          +   with_colorfgbg=no
          + fi;
          +-echo "$as_me:8962: result: $with_colorfgbg" >&5
          ++echo "$as_me:9095: 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:8969: checking if you want to use experimental extended colors" >&5
          ++echo "$as_me:9102: 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.
          +@@ -8976,13 +9109,14 @@
          + else
          +   with_ext_colors=no
          + fi;
          +-echo "$as_me:8979: result: $with_ext_colors" >&5
          ++echo "$as_me:9112: 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:8984: WARNING: This option applies only to wide-character library" >&5
          +-echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
          ++		{ { echo "$as_me:9117: error: This option applies only to wide-character library" >&5
          ++echo "$as_me: error: This option applies only to wide-character library" >&2;}
          ++   { (exit 1); exit 1; }; }
          + 	else
          + 		# cannot be ABI 5 since it changes sizeof(cchar_t)
          + 
          +@@ -8991,7 +9125,7 @@
          + 	5.*)
          + 		cf_cv_rel_version=6.0
          + 		cf_cv_abi_version=6
          +-		{ echo "$as_me:8994: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
          ++		{ echo "$as_me:9128: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
          + echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
          + 		;;
          + 	esac
          +@@ -9006,7 +9140,7 @@
          + fi
          + 
          + ###   use option --enable-ext-mouse to modify coding to support 5-button mice
          +-echo "$as_me:9009: checking if you want to use experimental extended mouse encoding" >&5
          ++echo "$as_me:9143: 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
          + 
          + # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
          +@@ -9016,7 +9150,7 @@
          + else
          +   with_ext_mouse=no
          + fi;
          +-echo "$as_me:9019: result: $with_ext_mouse" >&5
          ++echo "$as_me:9153: result: $with_ext_mouse" >&5
          + echo "${ECHO_T}$with_ext_mouse" >&6
          + NCURSES_MOUSE_VERSION=1
          + if test "$with_ext_mouse" = yes ; then
          +@@ -9027,7 +9161,7 @@
          + 	5.*)
          + 		cf_cv_rel_version=6.0
          + 		cf_cv_abi_version=6
          +-		{ echo "$as_me:9030: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
          ++		{ echo "$as_me:9164: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
          + echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
          + 		;;
          + 	esac
          +@@ -9035,7 +9169,49 @@
          + 
          + fi
          + 
          +-echo "$as_me:9038: checking if you want experimental safe-sprintf code" >&5
          ++# Reentrant code has to be opaque; there's little advantage to making ncurses
          ++# opaque outside of that, so there is no --enable-opaque option.
          ++echo "$as_me:9174: checking if you want experimental reentrant code" >&5
          ++echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
          ++
          ++# Check whether --enable-reentrant or --disable-reentrant was given.
          ++if test "${enable_reentrant+set}" = set; then
          ++  enableval="$enable_reentrant"
          ++  with_reentrant=$enableval
          ++else
          ++  with_reentrant=no
          ++fi;
          ++echo "$as_me:9184: result: $with_reentrant" >&5
          ++echo "${ECHO_T}$with_reentrant" >&6
          ++if test "$with_reentrant" = yes ; then
          ++	cf_cv_enable_reentrant=1
          ++	cf_cv_enable_opaque="NCURSES_INTERNALS"
          ++	NCURSES_OPAQUE=1
          ++	NCURSES_SIZE_T=int
          ++	LIB_SUFFIX="t${LIB_SUFFIX}"
          ++	cat >>confdefs.h <<\EOF
          ++#define USE_REENTRANT 1
          ++EOF
          ++
          ++if test "${with_abi_version+set}" != set; then
          ++	case $cf_cv_rel_version in
          ++	5.*)
          ++		cf_cv_rel_version=6.0
          ++		cf_cv_abi_version=6
          ++		{ echo "$as_me:9201: 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
          ++
          ++else
          ++	cf_cv_enable_reentrant=0
          ++	cf_cv_enable_opaque="NCURSES_OPAQUE"
          ++	NCURSES_OPAQUE=0
          ++	NCURSES_SIZE_T=short
          ++fi
          ++
          ++echo "$as_me:9214: 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.
          +@@ -9045,7 +9221,7 @@
          + else
          +   with_safe_sprintf=no
          + fi;
          +-echo "$as_me:9048: result: $with_safe_sprintf" >&5
          ++echo "$as_me:9224: 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
          +@@ -9054,7 +9230,7 @@
          + ###   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:9057: checking if you want to experiment without scrolling-hints code" >&5
          ++echo "$as_me:9233: 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 --enable-scroll-hints or --disable-scroll-hints was given.
          +@@ -9064,7 +9240,7 @@
          + else
          +   with_scroll_hints=yes
          + fi;
          +-echo "$as_me:9067: result: $with_scroll_hints" >&5
          ++echo "$as_me:9243: 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
          +@@ -9072,7 +9248,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:9075: checking if you want experimental wgetch-events code" >&5
          ++echo "$as_me:9251: checking if you want experimental wgetch-events code" >&5
          + echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
          + 
          + # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
          +@@ -9082,7 +9258,7 @@
          + else
          +   with_wgetch_events=no
          + fi;
          +-echo "$as_me:9085: result: $with_wgetch_events" >&5
          ++echo "$as_me:9261: result: $with_wgetch_events" >&5
          + echo "${ECHO_T}$with_wgetch_events" >&6
          + test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
          + #define NCURSES_WGETCH_EVENTS 1
          +@@ -9091,7 +9267,7 @@
          + ###############################################################################
          + 
          + ###	use option --disable-echo to suppress full display compiling commands
          +-echo "$as_me:9094: checking if you want to display full commands during build" >&5
          ++echo "$as_me:9270: 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.
          +@@ -9106,12 +9282,13 @@
          + else
          + 	ECHO_LINK='@ echo linking $@ ... ;'
          + 	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
          ++	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
          + fi
          +-echo "$as_me:9110: result: $with_echo" >&5
          ++echo "$as_me:9287: result: $with_echo" >&5
          + echo "${ECHO_T}$with_echo" >&6
          + 
          + ###	use option --enable-warnings to turn on all gcc warnings
          +-echo "$as_me:9114: checking if you want to see compiler warnings" >&5
          ++echo "$as_me:9291: 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.
          +@@ -9119,10 +9296,10 @@
          +   enableval="$enable_warnings"
          +   with_warnings=$enableval
          + fi;
          +-echo "$as_me:9122: result: $with_warnings" >&5
          ++echo "$as_me:9299: result: $with_warnings" >&5
          + echo "${ECHO_T}$with_warnings" >&6
          + 
          +-if test -n "$with_warnings"; then
          ++if test "x$with_warnings" = "xyes"; then
          +  	ADAFLAGS="$ADAFLAGS -gnatg"
          + 
          + INTEL_COMPILER=no
          +@@ -9130,12 +9307,12 @@
          + if test "$GCC" = yes ; then
          + 	case $host_os in
          + 	linux*|gnu*)
          +-		echo "$as_me:9133: checking if this is really Intel C compiler" >&5
          ++		echo "$as_me:9310: checking if this is really Intel C compiler" >&5
          + echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
          + 		cf_save_CFLAGS="$CFLAGS"
          + 		CFLAGS="$CFLAGS -no-gcc"
          + 		cat >conftest.$ac_ext <<_ACEOF
          +-#line 9138 "configure"
          ++#line 9315 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -9152,16 +9329,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:9155: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9158: \$? = $ac_status" >&5
          ++  echo "$as_me:9335: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:9161: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:9338: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9164: \$? = $ac_status" >&5
          ++  echo "$as_me:9341: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   INTEL_COMPILER=yes
          + cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
          +@@ -9172,14 +9349,14 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 		CFLAGS="$cf_save_CFLAGS"
          +-		echo "$as_me:9175: result: $INTEL_COMPILER" >&5
          ++		echo "$as_me:9352: result: $INTEL_COMPILER" >&5
          + echo "${ECHO_T}$INTEL_COMPILER" >&6
          + 		;;
          + 	esac
          + fi
          + 
          + cat > conftest.$ac_ext <&5
          ++	{ echo "$as_me:9377: checking for $CC warning options..." >&5
          + echo "$as_me: checking for $CC warning options..." >&6;}
          + 	cf_save_CFLAGS="$CFLAGS"
          + 	EXTRA_CFLAGS="-Wall"
          +-	for cf_opt in  \
          ++	for cf_opt in \
          + 		wd1419 \
          + 		wd1682 \
          + 		wd1683 \
          +@@ -9214,12 +9391,12 @@
          + 		wd981
          + 	do
          + 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
          +-		if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
          ++		if { (eval echo "$as_me:9394: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9220: \$? = $ac_status" >&5
          ++  echo "$as_me:9397: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          +-			test -n "$verbose" && echo "$as_me:9222: result: ... -$cf_opt" >&5
          ++			test -n "$verbose" && echo "$as_me:9399: result: ... -$cf_opt" >&5
          + echo "${ECHO_T}... -$cf_opt" >&6
          + 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
          + 		fi
          +@@ -9228,7 +9405,7 @@
          + 
          + elif test "$GCC" = yes
          + then
          +-	{ echo "$as_me:9231: checking for $CC warning options..." >&5
          ++	{ echo "$as_me:9408: checking for $CC warning options..." >&5
          + echo "$as_me: checking for $CC warning options..." >&6;}
          + 	cf_save_CFLAGS="$CFLAGS"
          + 	EXTRA_CFLAGS="-W -Wall"
          +@@ -9245,15 +9422,15 @@
          + 		Wpointer-arith \
          + 		Wshadow \
          + 		Wstrict-prototypes \
          +-		Wundef $cf_warn_CONST
          ++		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
          + 	do
          + 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
          +-		if { (eval echo "$as_me:9251: \"$ac_compile\"") >&5
          ++		if { (eval echo "$as_me:9428: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9254: \$? = $ac_status" >&5
          ++  echo "$as_me:9431: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          +-			test -n "$verbose" && echo "$as_me:9256: result: ... -$cf_opt" >&5
          ++			test -n "$verbose" && echo "$as_me:9433: result: ... -$cf_opt" >&5
          + echo "${ECHO_T}... -$cf_opt" >&6
          + 			case $cf_opt in #(vi
          + 			Wcast-qual) #(vi
          +@@ -9264,6 +9441,8 @@
          + 				3.3*)
          + 					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
          + 
          ++echo "${as_me-configure}:9444: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
          ++
          + 					continue;;
          + 				esac
          + 				;;
          +@@ -9282,12 +9461,12 @@
          + if test "$GCC" = yes ; then
          + 	case $host_os in
          + 	linux*|gnu*)
          +-		echo "$as_me:9285: checking if this is really Intel C++ compiler" >&5
          ++		echo "$as_me:9464: checking if this is really Intel C++ compiler" >&5
          + echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
          + 		cf_save_CFLAGS="$CXXFLAGS"
          + 		CXXFLAGS="$CXXFLAGS -no-gcc"
          + 		cat >conftest.$ac_ext <<_ACEOF
          +-#line 9290 "configure"
          ++#line 9469 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -9304,16 +9483,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:9307: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:9486: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9310: \$? = $ac_status" >&5
          ++  echo "$as_me:9489: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:9313: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:9492: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9316: \$? = $ac_status" >&5
          ++  echo "$as_me:9495: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   INTEL_CPLUSPLUS=yes
          + cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
          +@@ -9324,7 +9503,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 		CXXFLAGS="$cf_save_CFLAGS"
          +-		echo "$as_me:9327: result: $INTEL_CPLUSPLUS" >&5
          ++		echo "$as_me:9506: result: $INTEL_CPLUSPLUS" >&5
          + echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
          + 		;;
          + 	esac
          +@@ -9338,7 +9517,7 @@
          + ac_main_return=return
          + 
          + cat > conftest.$ac_ext <&5
          ++	{ echo "$as_me:9538: checking for $CC warning options..." >&5
          + echo "$as_me: checking for $CC warning options..." >&6;}
          + 	cf_save_CXXFLAGS="$CXXFLAGS"
          + 	EXTRA_CXXFLAGS="-Wall"
          +@@ -9373,12 +9552,12 @@
          + 		wd981
          + 	do
          + 		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
          +-		if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5
          ++		if { (eval echo "$as_me:9555: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9379: \$? = $ac_status" >&5
          ++  echo "$as_me:9558: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          +-			test -n "$verbose" && echo "$as_me:9381: result: ... -$cf_opt" >&5
          ++			test -n "$verbose" && echo "$as_me:9560: result: ... -$cf_opt" >&5
          + echo "${ECHO_T}... -$cf_opt" >&6
          + 			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
          + 		fi
          +@@ -9387,7 +9566,7 @@
          + 
          + elif test "$GXX" = yes
          + then
          +-	{ echo "$as_me:9390: checking for $CXX warning options..." >&5
          ++	{ echo "$as_me:9569: checking for $CXX warning options..." >&5
          + echo "$as_me: checking for $CXX warning options..." >&6;}
          + 	cf_save_CXXFLAGS="$CXXFLAGS"
          + 	EXTRA_CXXFLAGS="-W -Wall"
          +@@ -9416,16 +9595,16 @@
          + 		Wundef $cf_gxx_extra_warnings Wno-unused
          + 	do
          + 		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
          +-		if { (eval echo "$as_me:9419: \"$ac_compile\"") >&5
          ++		if { (eval echo "$as_me:9598: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9422: \$? = $ac_status" >&5
          ++  echo "$as_me:9601: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          +-			test -n "$verbose" && echo "$as_me:9424: result: ... -$cf_opt" >&5
          ++			test -n "$verbose" && echo "$as_me:9603: result: ... -$cf_opt" >&5
          + echo "${ECHO_T}... -$cf_opt" >&6
          + 			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
          + 		else
          +-			test -n "$verbose" && echo "$as_me:9428: result: ... no -$cf_opt" >&5
          ++			test -n "$verbose" && echo "$as_me:9607: result: ... no -$cf_opt" >&5
          + echo "${ECHO_T}... no -$cf_opt" >&6
          + 		fi
          + 	done
          +@@ -9461,10 +9640,10 @@
          + EOF
          + if test "$GCC" = yes
          + then
          +-	{ echo "$as_me:9464: checking for $CC __attribute__ directives..." >&5
          ++	{ echo "$as_me:9643: checking for $CC __attribute__ directives..." >&5
          + echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
          + cat > conftest.$ac_ext <&5
          ++		if { (eval echo "$as_me:9684: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9508: \$? = $ac_status" >&5
          ++  echo "$as_me:9687: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          +-			test -n "$verbose" && echo "$as_me:9510: result: ... $cf_attribute" >&5
          ++			test -n "$verbose" && echo "$as_me:9689: result: ... $cf_attribute" >&5
          + echo "${ECHO_T}... $cf_attribute" >&6
          + 			cat conftest.h >>confdefs.h
          + 		fi
          +@@ -9519,7 +9698,7 @@
          + fi
          + 
          + ###	use option --enable-assertions to turn on generation of assertion code
          +-echo "$as_me:9522: checking if you want to enable runtime assertions" >&5
          ++echo "$as_me:9701: 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.
          +@@ -9529,7 +9708,7 @@
          + else
          +   with_assertions=no
          + fi;
          +-echo "$as_me:9532: result: $with_assertions" >&5
          ++echo "$as_me:9711: result: $with_assertions" >&5
          + echo "${ECHO_T}$with_assertions" >&6
          + if test -n "$GCC"
          + then
          +@@ -9547,7 +9726,7 @@
          + 
          + ###	use option --disable-leaks to suppress "permanent" leaks, for testing
          + 
          +-echo "$as_me:9550: checking if you want to use dmalloc for testing" >&5
          ++echo "$as_me:9729: checking if you want to use dmalloc for testing" >&5
          + echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
          + 
          + # Check whether --with-dmalloc or --without-dmalloc was given.
          +@@ -9563,7 +9742,7 @@
          + else
          +   with_dmalloc=
          + fi;
          +-echo "$as_me:9566: result: ${with_dmalloc:-no}" >&5
          ++echo "$as_me:9745: result: ${with_dmalloc:-no}" >&5
          + echo "${ECHO_T}${with_dmalloc:-no}" >&6
          + 
          + case .$with_cflags in #(vi
          +@@ -9647,23 +9826,23 @@
          + esac
          + 
          + if test "$with_dmalloc" = yes ; then
          +-	echo "$as_me:9650: checking for dmalloc.h" >&5
          ++	echo "$as_me:9829: 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 9656 "configure"
          ++#line 9835 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:9660: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:9839: \"$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:9666: \$? = $ac_status" >&5
          ++  echo "$as_me:9845: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -9682,11 +9861,11 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:9685: result: $ac_cv_header_dmalloc_h" >&5
          ++echo "$as_me:9864: 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:9689: checking for dmalloc_debug in -ldmalloc" >&5
          ++echo "$as_me:9868: 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
          +@@ -9694,7 +9873,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-ldmalloc  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 9697 "configure"
          ++#line 9876 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -9713,16 +9892,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:9716: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:9895: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9719: \$? = $ac_status" >&5
          ++  echo "$as_me:9898: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:9722: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:9901: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9725: \$? = $ac_status" >&5
          ++  echo "$as_me:9904: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_dmalloc_dmalloc_debug=yes
          + else
          +@@ -9733,7 +9912,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:9736: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
          ++echo "$as_me:9915: 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 <&5
          ++echo "$as_me:9930: checking if you want to use dbmalloc for testing" >&5
          + echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
          + 
          + # Check whether --with-dbmalloc or --without-dbmalloc was given.
          +@@ -9764,7 +9943,7 @@
          + else
          +   with_dbmalloc=
          + fi;
          +-echo "$as_me:9767: result: ${with_dbmalloc:-no}" >&5
          ++echo "$as_me:9946: result: ${with_dbmalloc:-no}" >&5
          + echo "${ECHO_T}${with_dbmalloc:-no}" >&6
          + 
          + case .$with_cflags in #(vi
          +@@ -9848,23 +10027,23 @@
          + esac
          + 
          + if test "$with_dbmalloc" = yes ; then
          +-	echo "$as_me:9851: checking for dbmalloc.h" >&5
          ++	echo "$as_me:10030: 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 9857 "configure"
          ++#line 10036 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:9861: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:10040: \"$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:9867: \$? = $ac_status" >&5
          ++  echo "$as_me:10046: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -9883,11 +10062,11 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:9886: result: $ac_cv_header_dbmalloc_h" >&5
          ++echo "$as_me:10065: 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:9890: checking for debug_malloc in -ldbmalloc" >&5
          ++echo "$as_me:10069: 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
          +@@ -9895,7 +10074,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-ldbmalloc  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 9898 "configure"
          ++#line 10077 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -9914,16 +10093,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:9917: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10096: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9920: \$? = $ac_status" >&5
          ++  echo "$as_me:10099: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:9923: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10102: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:9926: \$? = $ac_status" >&5
          ++  echo "$as_me:10105: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_dbmalloc_debug_malloc=yes
          + else
          +@@ -9934,7 +10113,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:9937: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
          ++echo "$as_me:10116: 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 <&5
          ++echo "$as_me:10131: checking if you want to use valgrind for testing" >&5
          + echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
          + 
          + # Check whether --with-valgrind or --without-valgrind was given.
          +@@ -9965,7 +10144,7 @@
          + else
          +   with_valgrind=
          + fi;
          +-echo "$as_me:9968: result: ${with_valgrind:-no}" >&5
          ++echo "$as_me:10147: result: ${with_valgrind:-no}" >&5
          + echo "${ECHO_T}${with_valgrind:-no}" >&6
          + 
          + case .$with_cflags in #(vi
          +@@ -10048,7 +10227,7 @@
          + 	;;
          + esac
          + 
          +-echo "$as_me:10051: checking if you want to perform memory-leak testing" >&5
          ++echo "$as_me:10230: checking if you want to perform memory-leak testing" >&5
          + echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
          + 
          + # Check whether --enable-leaks or --disable-leaks was given.
          +@@ -10058,7 +10237,7 @@
          + else
          +   : ${with_no_leaks:=no}
          + fi;
          +-echo "$as_me:10061: result: $with_no_leaks" >&5
          ++echo "$as_me:10240: result: $with_no_leaks" >&5
          + echo "${ECHO_T}$with_no_leaks" >&6
          + 
          + if test "$with_no_leaks" = yes ; then
          +@@ -10103,7 +10282,7 @@
          + 	;;
          + esac
          + 
          +-echo "$as_me:10106: checking whether to add trace feature to all models" >&5
          ++echo "$as_me:10285: 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.
          +@@ -10113,7 +10292,7 @@
          + else
          +   cf_with_trace=$cf_all_traces
          + fi;
          +-echo "$as_me:10116: result: $cf_with_trace" >&5
          ++echo "$as_me:10295: result: $cf_with_trace" >&5
          + echo "${ECHO_T}$cf_with_trace" >&6
          + 
          + if test "$cf_with_trace" = yes ; then
          +@@ -10194,13 +10373,13 @@
          + fi
          + 
          + ###	Checks for libraries.
          +-echo "$as_me:10197: checking for gettimeofday" >&5
          ++echo "$as_me:10376: 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 10203 "configure"
          ++#line 10382 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char gettimeofday (); below.  */
          +@@ -10231,16 +10410,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10234: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10413: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10237: \$? = $ac_status" >&5
          ++  echo "$as_me:10416: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10240: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10419: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10243: \$? = $ac_status" >&5
          ++  echo "$as_me:10422: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_gettimeofday=yes
          + else
          +@@ -10250,7 +10429,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:10253: result: $ac_cv_func_gettimeofday" >&5
          ++echo "$as_me:10432: 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
          +@@ -10259,7 +10438,7 @@
          + 
          + else
          + 
          +-echo "$as_me:10262: checking for gettimeofday in -lbsd" >&5
          ++echo "$as_me:10441: 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
          +@@ -10267,7 +10446,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-lbsd  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 10270 "configure"
          ++#line 10449 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -10286,16 +10465,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10289: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10468: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10292: \$? = $ac_status" >&5
          ++  echo "$as_me:10471: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10295: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10474: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10298: \$? = $ac_status" >&5
          ++  echo "$as_me:10477: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_bsd_gettimeofday=yes
          + else
          +@@ -10306,7 +10485,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:10309: result: $ac_cv_lib_bsd_gettimeofday" >&5
          ++echo "$as_me:10488: 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
          +@@ -10318,14 +10497,14 @@
          + 
          + fi
          + 
          +-echo "$as_me:10321: checking if -lm needed for math functions" >&5
          ++echo "$as_me:10500: 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 10328 "configure"
          ++#line 10507 "configure"
          + #include "confdefs.h"
          + 
          + 	#include 
          +@@ -10340,16 +10519,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10343: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10522: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10346: \$? = $ac_status" >&5
          ++  echo "$as_me:10525: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10349: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10528: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10352: \$? = $ac_status" >&5
          ++  echo "$as_me:10531: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_need_libm=no
          + else
          +@@ -10359,7 +10538,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:10362: result: $cf_cv_need_libm" >&5
          ++echo "$as_me:10541: result: $cf_cv_need_libm" >&5
          + echo "${ECHO_T}$cf_cv_need_libm" >&6
          + if test "$cf_cv_need_libm" = yes
          + then
          +@@ -10367,13 +10546,13 @@
          + fi
          + 
          + ###	Checks for header files.
          +-echo "$as_me:10370: checking for ANSI C header files" >&5
          ++echo "$as_me:10549: 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 10376 "configure"
          ++#line 10555 "configure"
          + #include "confdefs.h"
          + #include 
          + #include 
          +@@ -10381,13 +10560,13 @@
          + #include 
          + 
          + _ACEOF
          +-if { (eval echo "$as_me:10384: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:10563: \"$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:10390: \$? = $ac_status" >&5
          ++  echo "$as_me:10569: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -10409,7 +10588,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 10412 "configure"
          ++#line 10591 "configure"
          + #include "confdefs.h"
          + #include 
          + 
          +@@ -10427,7 +10606,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 10430 "configure"
          ++#line 10609 "configure"
          + #include "confdefs.h"
          + #include 
          + 
          +@@ -10448,7 +10627,7 @@
          +   :
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 10451 "configure"
          ++#line 10630 "configure"
          + #include "confdefs.h"
          + #include 
          + #if ((' ' & 0x0FF) == 0x020)
          +@@ -10474,15 +10653,15 @@
          + }
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10656: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10480: \$? = $ac_status" >&5
          ++  echo "$as_me:10659: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:10482: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10661: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10485: \$? = $ac_status" >&5
          ++  echo "$as_me:10664: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   :
          + else
          +@@ -10495,7 +10674,7 @@
          + fi
          + fi
          + fi
          +-echo "$as_me:10498: result: $ac_cv_header_stdc" >&5
          ++echo "$as_me:10677: result: $ac_cv_header_stdc" >&5
          + echo "${ECHO_T}$ac_cv_header_stdc" >&6
          + if test $ac_cv_header_stdc = yes; then
          + 
          +@@ -10508,13 +10687,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:10511: checking for $ac_hdr that defines DIR" >&5
          ++echo "$as_me:10690: 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 10517 "configure"
          ++#line 10696 "configure"
          + #include "confdefs.h"
          + #include 
          + #include <$ac_hdr>
          +@@ -10529,16 +10708,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:10711: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10535: \$? = $ac_status" >&5
          ++  echo "$as_me:10714: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:10538: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10717: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10541: \$? = $ac_status" >&5
          ++  echo "$as_me:10720: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   eval "$as_ac_Header=yes"
          + else
          +@@ -10548,7 +10727,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:10551: result: `eval echo '${'$as_ac_Header'}'`" >&5
          ++echo "$as_me:10730: 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 <&5
          ++  echo "$as_me:10743: 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
          +@@ -10569,7 +10748,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-ldir  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 10572 "configure"
          ++#line 10751 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -10588,16 +10767,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10591: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10770: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10594: \$? = $ac_status" >&5
          ++  echo "$as_me:10773: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10597: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10776: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10600: \$? = $ac_status" >&5
          ++  echo "$as_me:10779: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_dir_opendir=yes
          + else
          +@@ -10608,14 +10787,14 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:10611: result: $ac_cv_lib_dir_opendir" >&5
          ++echo "$as_me:10790: 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:10618: checking for opendir in -lx" >&5
          ++  echo "$as_me:10797: 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
          +@@ -10623,7 +10802,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-lx  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 10626 "configure"
          ++#line 10805 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -10642,16 +10821,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10645: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10824: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10648: \$? = $ac_status" >&5
          ++  echo "$as_me:10827: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10651: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10830: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10654: \$? = $ac_status" >&5
          ++  echo "$as_me:10833: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_x_opendir=yes
          + else
          +@@ -10662,7 +10841,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:10665: result: $ac_cv_lib_x_opendir" >&5
          ++echo "$as_me:10844: 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"
          +@@ -10670,13 +10849,13 @@
          + 
          + fi
          + 
          +-echo "$as_me:10673: checking whether time.h and sys/time.h may both be included" >&5
          ++echo "$as_me:10852: 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 10679 "configure"
          ++#line 10858 "configure"
          + #include "confdefs.h"
          + #include 
          + #include 
          +@@ -10692,16 +10871,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:10695: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:10874: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10698: \$? = $ac_status" >&5
          ++  echo "$as_me:10877: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:10701: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10880: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10704: \$? = $ac_status" >&5
          ++  echo "$as_me:10883: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_header_time=yes
          + else
          +@@ -10711,7 +10890,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:10714: result: $ac_cv_header_time" >&5
          ++echo "$as_me:10893: result: $ac_cv_header_time" >&5
          + echo "${ECHO_T}$ac_cv_header_time" >&6
          + if test $ac_cv_header_time = yes; then
          + 
          +@@ -10721,14 +10900,14 @@
          + 
          + fi
          + 
          +-echo "$as_me:10724: checking for regular-expression headers" >&5
          ++echo "$as_me:10903: 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 10731 "configure"
          ++#line 10910 "configure"
          + #include "confdefs.h"
          + #include 
          + #include 
          +@@ -10746,16 +10925,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10749: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10928: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10752: \$? = $ac_status" >&5
          ++  echo "$as_me:10931: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10755: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10934: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10758: \$? = $ac_status" >&5
          ++  echo "$as_me:10937: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_regex="regex.h"
          + else
          +@@ -10763,7 +10942,7 @@
          + cat conftest.$ac_ext >&5
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 10766 "configure"
          ++#line 10945 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -10778,16 +10957,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10781: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10784: \$? = $ac_status" >&5
          ++  echo "$as_me:10963: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10787: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:10966: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10790: \$? = $ac_status" >&5
          ++  echo "$as_me:10969: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_regex="regexp.h"
          + else
          +@@ -10797,7 +10976,7 @@
          + 		cf_save_LIBS="$LIBS"
          + 		LIBS="-lgen $LIBS"
          + 		cat >conftest.$ac_ext <<_ACEOF
          +-#line 10800 "configure"
          ++#line 10979 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -10812,16 +10991,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10815: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:10994: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10818: \$? = $ac_status" >&5
          ++  echo "$as_me:10997: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10821: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11000: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10824: \$? = $ac_status" >&5
          ++  echo "$as_me:11003: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_regex="regexpr.h"
          + else
          +@@ -10837,7 +11016,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:10840: result: $cf_cv_regex" >&5
          ++echo "$as_me:11019: result: $cf_cv_regex" >&5
          + echo "${ECHO_T}$cf_cv_regex" >&6
          + case $cf_cv_regex in
          + 	regex.h)   cat >>confdefs.h <<\EOF
          +@@ -10873,23 +11052,23 @@
          + 
          + do
          + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
          +-echo "$as_me:10876: checking for $ac_header" >&5
          ++echo "$as_me:11055: 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 10882 "configure"
          ++#line 11061 "configure"
          + #include "confdefs.h"
          + #include <$ac_header>
          + _ACEOF
          +-if { (eval echo "$as_me:10886: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:11065: \"$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:10892: \$? = $ac_status" >&5
          ++  echo "$as_me:11071: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -10908,7 +11087,7 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:10911: result: `eval echo '${'$as_ac_Header'}'`" >&5
          ++echo "$as_me:11090: 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 < to declare fd_set
          + if test "$ISC" = yes ; then
          + 
          +-echo "$as_me:10925: checking for main in -lcposix" >&5
          ++echo "$as_me:11104: 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
          +@@ -10930,7 +11109,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-lcposix  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 10933 "configure"
          ++#line 11112 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -10942,16 +11121,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:10945: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:11124: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10948: \$? = $ac_status" >&5
          ++  echo "$as_me:11127: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:10951: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11130: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:10954: \$? = $ac_status" >&5
          ++  echo "$as_me:11133: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_cposix_main=yes
          + else
          +@@ -10962,7 +11141,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:10965: result: $ac_cv_lib_cposix_main" >&5
          ++echo "$as_me:11144: 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 <&5
          ++	echo "$as_me:11155: 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
          +@@ -10981,7 +11160,7 @@
          +   ac_check_lib_save_LIBS=$LIBS
          + LIBS="-linet  $LIBS"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 10984 "configure"
          ++#line 11163 "configure"
          + #include "confdefs.h"
          + 
          + /* Override any gcc2 internal prototype to avoid an error.  */
          +@@ -11000,16 +11179,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:11003: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:11182: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11006: \$? = $ac_status" >&5
          ++  echo "$as_me:11185: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:11009: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11188: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11012: \$? = $ac_status" >&5
          ++  echo "$as_me:11191: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_lib_inet_bzero=yes
          + else
          +@@ -11020,21 +11199,21 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + LIBS=$ac_check_lib_save_LIBS
          + fi
          +-echo "$as_me:11023: result: $ac_cv_lib_inet_bzero" >&5
          ++echo "$as_me:11202: 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:11030: checking if sys/time.h works with sys/select.h" >&5
          ++echo "$as_me:11209: 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 11037 "configure"
          ++#line 11216 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -11054,16 +11233,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11057: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:11236: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11060: \$? = $ac_status" >&5
          ++  echo "$as_me:11239: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11063: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11242: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11066: \$? = $ac_status" >&5
          ++  echo "$as_me:11245: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_sys_time_select=yes
          + else
          +@@ -11075,7 +11254,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:11078: result: $cf_cv_sys_time_select" >&5
          ++echo "$as_me:11257: 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
          +@@ -11089,7 +11268,7 @@
          + ac_compiler_gnu=$ac_cv_c_compiler_gnu
          + ac_main_return=return
          + 
          +-echo "$as_me:11092: checking for $CC option to accept ANSI C" >&5
          ++echo "$as_me:11271: 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
          +@@ -11097,7 +11276,7 @@
          +   ac_cv_prog_cc_stdc=no
          + ac_save_CC=$CC
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 11100 "configure"
          ++#line 11279 "configure"
          + #include "confdefs.h"
          + #include 
          + #include 
          +@@ -11146,16 +11325,16 @@
          + do
          +   CC="$ac_save_CC $ac_arg"
          +   rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11149: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11152: \$? = $ac_status" >&5
          ++  echo "$as_me:11331: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11155: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11334: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11158: \$? = $ac_status" >&5
          ++  echo "$as_me:11337: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_prog_cc_stdc=$ac_arg
          + break
          +@@ -11172,21 +11351,21 @@
          + 
          + case "x$ac_cv_prog_cc_stdc" in
          +   x|xno)
          +-    echo "$as_me:11175: result: none needed" >&5
          ++    echo "$as_me:11354: result: none needed" >&5
          + echo "${ECHO_T}none needed" >&6 ;;
          +   *)
          +-    echo "$as_me:11178: result: $ac_cv_prog_cc_stdc" >&5
          ++    echo "$as_me:11357: 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:11183: checking for an ANSI C-conforming const" >&5
          ++echo "$as_me:11362: 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 11189 "configure"
          ++#line 11368 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -11244,16 +11423,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11247: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:11426: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11250: \$? = $ac_status" >&5
          ++  echo "$as_me:11429: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11253: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11432: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11256: \$? = $ac_status" >&5
          ++  echo "$as_me:11435: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_c_const=yes
          + else
          +@@ -11263,7 +11442,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:11266: result: $ac_cv_c_const" >&5
          ++echo "$as_me:11445: result: $ac_cv_c_const" >&5
          + echo "${ECHO_T}$ac_cv_c_const" >&6
          + if test $ac_cv_c_const = no; then
          + 
          +@@ -11273,7 +11452,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:11276: checking for inline" >&5
          ++echo "$as_me:11455: 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
          +@@ -11281,7 +11460,7 @@
          +   ac_cv_c_inline=no
          + for ac_kw in inline __inline__ __inline; do
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 11284 "configure"
          ++#line 11463 "configure"
          + #include "confdefs.h"
          + #ifndef __cplusplus
          + static $ac_kw int static_foo () {return 0; }
          +@@ -11290,16 +11469,16 @@
          + 
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11293: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:11472: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11296: \$? = $ac_status" >&5
          ++  echo "$as_me:11475: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11299: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11478: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11302: \$? = $ac_status" >&5
          ++  echo "$as_me:11481: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_c_inline=$ac_kw; break
          + else
          +@@ -11310,7 +11489,7 @@
          + done
          + 
          + fi
          +-echo "$as_me:11313: result: $ac_cv_c_inline" >&5
          ++echo "$as_me:11492: result: $ac_cv_c_inline" >&5
          + echo "${ECHO_T}$ac_cv_c_inline" >&6
          + case $ac_cv_c_inline in
          +   inline | yes) ;;
          +@@ -11327,16 +11506,197 @@
          + 
          + NCURSES_INLINE=
          + if test "$ac_cv_c_inline" != no ; then
          +-	cat >>confdefs.h <<\EOF
          +-#define CC_HAS_INLINE_FUNCS 1
          +-EOF
          ++  NCURSES_INLINE=inline
          ++  if test "$INTEL_COMPILER" = yes
          ++  then
          ++    :
          ++  elif test "$GCC" = yes
          ++  then
          ++    echo "$as_me:11515: checking if gcc supports options to tune inlining" >&5
          ++echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
          ++if test "${cf_cv_gcc_inline+set}" = set; then
          ++  echo $ECHO_N "(cached) $ECHO_C" >&6
          ++else
          ++
          ++      cf_save_CFLAGS=$CFLAGS
          ++      CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
          ++      cat >conftest.$ac_ext <<_ACEOF
          ++#line 11524 "configure"
          ++#include "confdefs.h"
          ++inline int foo(void) { return 1; }
          ++int
          ++main ()
          ++{
          ++${cf_cv_main_return:-return} foo()
          ++  ;
          ++  return 0;
          ++}
          ++_ACEOF
          ++rm -f conftest.$ac_objext
          ++if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5
          ++  (eval $ac_compile) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:11539: \$? = $ac_status" >&5
          ++  (exit $ac_status); } &&
          ++         { ac_try='test -s conftest.$ac_objext'
          ++  { (eval echo "$as_me:11542: \"$ac_try\"") >&5
          ++  (eval $ac_try) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:11545: \$? = $ac_status" >&5
          ++  (exit $ac_status); }; }; then
          ++  cf_cv_gcc_inline=yes
          ++else
          ++  echo "$as_me: failed program was:" >&5
          ++cat conftest.$ac_ext >&5
          ++cf_cv_gcc_inline=no
          ++fi
          ++rm -f conftest.$ac_objext conftest.$ac_ext
          ++      CFLAGS=$cf_save_CFLAGS
          ++
          ++fi
          ++echo "$as_me:11557: result: $cf_cv_gcc_inline" >&5
          ++echo "${ECHO_T}$cf_cv_gcc_inline" >&6
          ++    if test "$cf_cv_gcc_inline" = yes ; then
          ++
          ++cf_fix_cppflags=no
          ++cf_new_cflags=
          ++cf_new_cppflags=
          ++cf_new_extra_cppflags=
          ++
          ++for cf_add_cflags in --param max-inline-insns-single=1200
          ++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
          ++			;;
          ++		*) #(vi
          ++			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
          ++			;;
          ++		esac
          ++		;;
          ++	*)
          ++		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
          ++		;;
          ++	esac
          ++	;;
          ++yes)
          ++	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
          + 
          +-	NCURSES_INLINE=inline
          ++	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
          ++
          ++	CFLAGS="$CFLAGS $cf_new_cflags"
          ++fi
          ++
          ++if test -n "$cf_new_cppflags" ; then
          ++
          ++	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
          ++fi
          ++
          ++if test -n "$cf_new_extra_cppflags" ; then
          ++
          ++	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
          ++fi
          ++
          ++    fi
          ++  fi
          ++fi
          ++
          ++echo "$as_me:11633: checking for signal global datatype" >&5
          ++echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
          ++if test "${cf_cv_sig_atomic_t+set}" = set; then
          ++  echo $ECHO_N "(cached) $ECHO_C" >&6
          ++else
          ++
          ++	for cf_type in \
          ++		"volatile sig_atomic_t" \
          ++		"sig_atomic_t" \
          ++		"int"
          ++	do
          ++	cat >conftest.$ac_ext <<_ACEOF
          ++#line 11645 "configure"
          ++#include "confdefs.h"
          ++
          ++#include 
          ++#include 
          ++#include 
          ++
          ++extern $cf_type x;
          ++$cf_type x;
          ++static void handler(int sig)
          ++{
          ++	x = 5;
          ++}
          ++int
          ++main ()
          ++{
          ++signal(SIGINT, handler);
          ++		 x = 1
          ++  ;
          ++  return 0;
          ++}
          ++_ACEOF
          ++rm -f conftest.$ac_objext
          ++if { (eval echo "$as_me:11668: \"$ac_compile\"") >&5
          ++  (eval $ac_compile) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:11671: \$? = $ac_status" >&5
          ++  (exit $ac_status); } &&
          ++         { ac_try='test -s conftest.$ac_objext'
          ++  { (eval echo "$as_me:11674: \"$ac_try\"") >&5
          ++  (eval $ac_try) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:11677: \$? = $ac_status" >&5
          ++  (exit $ac_status); }; }; then
          ++  cf_cv_sig_atomic_t=$cf_type
          ++else
          ++  echo "$as_me: failed program was:" >&5
          ++cat conftest.$ac_ext >&5
          ++cf_cv_sig_atomic_t=no
          + fi
          ++rm -f conftest.$ac_objext conftest.$ac_ext
          ++		test "$cf_cv_sig_atomic_t" != no && break
          ++	done
          ++
          ++fi
          ++
          ++echo "$as_me:11691: result: $cf_cv_sig_atomic_t" >&5
          ++echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
          ++test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <&5
          ++echo "$as_me:11699: 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
          +@@ -11346,7 +11706,7 @@
          +   cf_cv_typeof_chtype=long
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 11349 "configure"
          ++#line 11709 "configure"
          + #include "confdefs.h"
          + 
          + #define WANT_BITS 31
          +@@ -11381,15 +11741,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:11384: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11387: \$? = $ac_status" >&5
          ++  echo "$as_me:11747: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:11389: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11749: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11392: \$? = $ac_status" >&5
          ++  echo "$as_me:11752: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_typeof_chtype=`cat cf_test.out`
          + else
          +@@ -11404,7 +11764,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:11407: result: $cf_cv_typeof_chtype" >&5
          ++echo "$as_me:11767: result: $cf_cv_typeof_chtype" >&5
          + echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
          + 
          + cat >>confdefs.h <&5
          ++echo "$as_me:11779: 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 11425 "configure"
          ++#line 11786 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -11434,16 +11795,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11437: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:11798: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11440: \$? = $ac_status" >&5
          ++  echo "$as_me:11801: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11443: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11804: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11446: \$? = $ac_status" >&5
          ++  echo "$as_me:11807: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_unsigned_literals=yes
          + else
          +@@ -11455,29 +11816,30 @@
          + 
          + fi
          + 
          +-echo "$as_me:11458: result: $cf_cv_unsigned_literals" >&5
          ++echo "$as_me:11819: result: $cf_cv_unsigned_literals" >&5
          + echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
          + 
          + cf_cv_1UL="1"
          +-test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
          +-test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
          ++test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
          ++test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
          + 
          + if test $NCURSES_MMASK_T = auto ; then
          + 	cf_cv_typeof_mmask_t=long
          + else
          + 	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
          + fi
          ++test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
          + 
          + ###	Checks for external-data
          + 
          +-echo "$as_me:11473: checking if external errno is declared" >&5
          ++echo "$as_me:11835: 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 11480 "configure"
          ++#line 11842 "configure"
          + #include "confdefs.h"
          + 
          + #ifdef HAVE_STDLIB_H
          +@@ -11495,16 +11857,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11498: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11501: \$? = $ac_status" >&5
          ++  echo "$as_me:11863: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11504: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11866: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11507: \$? = $ac_status" >&5
          ++  echo "$as_me:11869: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_dcl_errno=yes
          + else
          +@@ -11515,7 +11877,7 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:11518: result: $cf_cv_dcl_errno" >&5
          ++echo "$as_me:11880: result: $cf_cv_dcl_errno" >&5
          + echo "${ECHO_T}$cf_cv_dcl_errno" >&6
          + 
          + if test "$cf_cv_dcl_errno" = no ; then
          +@@ -11530,14 +11892,14 @@
          + 
          + # It's possible (for near-UNIX clones) that the data doesn't exist
          + 
          +-echo "$as_me:11533: checking if external errno exists" >&5
          ++echo "$as_me:11895: 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 11540 "configure"
          ++#line 11902 "configure"
          + #include "confdefs.h"
          + 
          + #undef errno
          +@@ -11552,16 +11914,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:11555: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:11917: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11558: \$? = $ac_status" >&5
          ++  echo "$as_me:11920: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:11561: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:11923: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11564: \$? = $ac_status" >&5
          ++  echo "$as_me:11926: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_have_errno=yes
          + else
          +@@ -11572,7 +11934,7 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:11575: result: $cf_cv_have_errno" >&5
          ++echo "$as_me:11937: result: $cf_cv_have_errno" >&5
          + echo "${ECHO_T}$cf_cv_have_errno" >&6
          + 
          + if test "$cf_cv_have_errno" = yes ; then
          +@@ -11585,7 +11947,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:11588: checking if data-only library module links" >&5
          ++echo "$as_me:11950: 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
          +@@ -11593,20 +11955,20 @@
          + 
          + 	rm -f conftest.a
          + 	cat >conftest.$ac_ext <&5
          ++	if { (eval echo "$as_me:11961: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11602: \$? = $ac_status" >&5
          ++  echo "$as_me:11964: \$? = $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 <&5
          ++	if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11625: \$? = $ac_status" >&5
          ++  echo "$as_me:11987: \$? = $ac_status" >&5
          +   (exit $ac_status); }; then
          + 		mv conftest.o func.o && \
          + 		( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
          +@@ -11635,7 +11997,7 @@
          +   cf_cv_link_dataonly=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 11638 "configure"
          ++#line 12000 "configure"
          + #include "confdefs.h"
          + 
          + 	int main()
          +@@ -11646,15 +12008,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:11649: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12011: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11652: \$? = $ac_status" >&5
          ++  echo "$as_me:12014: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:11654: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12016: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11657: \$? = $ac_status" >&5
          ++  echo "$as_me:12019: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_link_dataonly=yes
          + else
          +@@ -11669,7 +12031,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:11672: result: $cf_cv_link_dataonly" >&5
          ++echo "$as_me:12034: result: $cf_cv_link_dataonly" >&5
          + echo "${ECHO_T}$cf_cv_link_dataonly" >&6
          + 
          + if test "$cf_cv_link_dataonly" = no ; then
          +@@ -11704,13 +12066,13 @@
          + 
          + do
          + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
          +-echo "$as_me:11707: checking for $ac_func" >&5
          ++echo "$as_me:12069: 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 11713 "configure"
          ++#line 12075 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char $ac_func (); below.  */
          +@@ -11741,16 +12103,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12106: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11747: \$? = $ac_status" >&5
          ++  echo "$as_me:12109: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:11750: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12112: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11753: \$? = $ac_status" >&5
          ++  echo "$as_me:12115: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   eval "$as_ac_var=yes"
          + else
          +@@ -11760,7 +12122,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:11763: result: `eval echo '${'$as_ac_var'}'`" >&5
          ++echo "$as_me:12125: 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 <&5
          ++echo "$as_me:12137: 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 11782 "configure"
          ++#line 12144 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -11799,16 +12161,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:11802: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12164: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11805: \$? = $ac_status" >&5
          ++  echo "$as_me:12167: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:11808: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12170: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11811: \$? = $ac_status" >&5
          ++  echo "$as_me:12173: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_cgetent=yes
          + else
          +@@ -11820,7 +12182,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:11823: result: $cf_cv_cgetent" >&5
          ++echo "$as_me:12185: 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
          +@@ -11828,14 +12190,14 @@
          + 
          + fi
          + 
          +-echo "$as_me:11831: checking for isascii" >&5
          ++echo "$as_me:12193: 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 11838 "configure"
          ++#line 12200 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -11847,16 +12209,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:11850: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12212: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11853: \$? = $ac_status" >&5
          ++  echo "$as_me:12215: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:11856: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12218: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11859: \$? = $ac_status" >&5
          ++  echo "$as_me:12221: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_have_isascii=yes
          + else
          +@@ -11867,17 +12229,17 @@
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + 
          + fi
          +-echo "$as_me:11870: result: $cf_cv_have_isascii" >&5
          ++echo "$as_me:12232: 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:11877: checking whether sigaction needs _POSIX_SOURCE" >&5
          ++echo "$as_me:12239: 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 11880 "configure"
          ++#line 12242 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -11891,16 +12253,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11894: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:12256: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11897: \$? = $ac_status" >&5
          ++  echo "$as_me:12259: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11900: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12262: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11903: \$? = $ac_status" >&5
          ++  echo "$as_me:12265: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   sigact_bad=no
          + else
          +@@ -11908,7 +12270,7 @@
          + cat conftest.$ac_ext >&5
          + 
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 11911 "configure"
          ++#line 12273 "configure"
          + #include "confdefs.h"
          + 
          + #define _POSIX_SOURCE
          +@@ -11923,16 +12285,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:12288: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11929: \$? = $ac_status" >&5
          ++  echo "$as_me:12291: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:11932: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12294: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11935: \$? = $ac_status" >&5
          ++  echo "$as_me:12297: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   sigact_bad=yes
          + 	 cat >>confdefs.h <<\EOF
          +@@ -11947,11 +12309,11 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +-echo "$as_me:11950: result: $sigact_bad" >&5
          ++echo "$as_me:12312: result: $sigact_bad" >&5
          + echo "${ECHO_T}$sigact_bad" >&6
          + fi
          + 
          +-echo "$as_me:11954: checking if nanosleep really works" >&5
          ++echo "$as_me:12316: checking if nanosleep really works" >&5
          + echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
          + if test "${cf_cv_func_nanosleep+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -11961,7 +12323,7 @@
          +   cf_cv_func_nanosleep=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 11964 "configure"
          ++#line 12326 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -11986,15 +12348,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:11989: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12351: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11992: \$? = $ac_status" >&5
          ++  echo "$as_me:12354: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:11994: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12356: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:11997: \$? = $ac_status" >&5
          ++  echo "$as_me:12359: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_func_nanosleep=yes
          + else
          +@@ -12006,7 +12368,7 @@
          + rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
          + fi
          + fi
          +-echo "$as_me:12009: result: $cf_cv_func_nanosleep" >&5
          ++echo "$as_me:12371: result: $cf_cv_func_nanosleep" >&5
          + echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
          + 
          + test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
          +@@ -12020,23 +12382,23 @@
          + 
          + do
          + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
          +-echo "$as_me:12023: checking for $ac_header" >&5
          ++echo "$as_me:12385: 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 12029 "configure"
          ++#line 12391 "configure"
          + #include "confdefs.h"
          + #include <$ac_header>
          + _ACEOF
          +-if { (eval echo "$as_me:12033: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:12395: \"$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:12039: \$? = $ac_status" >&5
          ++  echo "$as_me:12401: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -12055,7 +12417,7 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:12058: result: `eval echo '${'$as_ac_Header'}'`" >&5
          ++echo "$as_me:12420: 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 <&5
          ++echo "$as_me:12435: 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 12079 "configure"
          ++#line 12441 "configure"
          + #include "confdefs.h"
          + #include <$ac_header>
          + _ACEOF
          +-if { (eval echo "$as_me:12083: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:12445: \"$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:12089: \$? = $ac_status" >&5
          ++  echo "$as_me:12451: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -12105,7 +12467,7 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:12108: result: `eval echo '${'$as_ac_Header'}'`" >&5
          ++echo "$as_me:12470: 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 <&5
          ++	echo "$as_me:12488: 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 12129 "configure"
          ++#line 12491 "configure"
          + #include "confdefs.h"
          + #include 
          + int
          +@@ -12138,16 +12500,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:12141: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:12503: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12144: \$? = $ac_status" >&5
          ++  echo "$as_me:12506: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:12147: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12509: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12150: \$? = $ac_status" >&5
          ++  echo "$as_me:12512: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   termios_bad=no
          + else
          +@@ -12155,7 +12517,7 @@
          + cat conftest.$ac_ext >&5
          + 
          + 		cat >conftest.$ac_ext <<_ACEOF
          +-#line 12158 "configure"
          ++#line 12520 "configure"
          + #include "confdefs.h"
          + 
          + #define _POSIX_SOURCE
          +@@ -12169,16 +12531,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:12172: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:12534: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12175: \$? = $ac_status" >&5
          ++  echo "$as_me:12537: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:12178: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12540: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12181: \$? = $ac_status" >&5
          ++  echo "$as_me:12543: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   termios_bad=unknown
          + else
          +@@ -12193,19 +12555,19 @@
          + 
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          +-	echo "$as_me:12196: result: $termios_bad" >&5
          ++	echo "$as_me:12558: result: $termios_bad" >&5
          + echo "${ECHO_T}$termios_bad" >&6
          + 	fi
          + fi
          + 
          +-echo "$as_me:12201: checking for tcgetattr" >&5
          ++echo "$as_me:12563: 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 12208 "configure"
          ++#line 12570 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -12233,16 +12595,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12236: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12598: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12239: \$? = $ac_status" >&5
          ++  echo "$as_me:12601: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12242: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12604: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12245: \$? = $ac_status" >&5
          ++  echo "$as_me:12607: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_have_tcgetattr=yes
          + else
          +@@ -12252,20 +12614,20 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:12255: result: $cf_cv_have_tcgetattr" >&5
          ++echo "$as_me:12617: 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:12261: checking for vsscanf function or workaround" >&5
          ++echo "$as_me:12623: 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 12268 "configure"
          ++#line 12630 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -12281,16 +12643,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12646: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12287: \$? = $ac_status" >&5
          ++  echo "$as_me:12649: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12290: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12652: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12293: \$? = $ac_status" >&5
          ++  echo "$as_me:12655: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_func_vsscanf=vsscanf
          + else
          +@@ -12298,7 +12660,7 @@
          + cat conftest.$ac_ext >&5
          + 
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 12301 "configure"
          ++#line 12663 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -12320,16 +12682,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12323: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12685: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12326: \$? = $ac_status" >&5
          ++  echo "$as_me:12688: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12329: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12691: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12332: \$? = $ac_status" >&5
          ++  echo "$as_me:12694: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_func_vsscanf=vfscanf
          + else
          +@@ -12337,7 +12699,7 @@
          + cat conftest.$ac_ext >&5
          + 
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 12340 "configure"
          ++#line 12702 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -12359,16 +12721,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12362: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12724: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12365: \$? = $ac_status" >&5
          ++  echo "$as_me:12727: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12368: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12730: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12371: \$? = $ac_status" >&5
          ++  echo "$as_me:12733: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_func_vsscanf=_doscan
          + else
          +@@ -12383,7 +12745,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:12386: result: $cf_cv_func_vsscanf" >&5
          ++echo "$as_me:12748: result: $cf_cv_func_vsscanf" >&5
          + echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
          + 
          + case $cf_cv_func_vsscanf in #(vi
          +@@ -12401,7 +12763,7 @@
          + ;;
          + esac
          + 
          +-echo "$as_me:12404: checking for working mkstemp" >&5
          ++echo "$as_me:12766: 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
          +@@ -12409,13 +12771,13 @@
          + 
          + rm -f conftest*
          + if test "$cross_compiling" = yes; then
          +-  echo "$as_me:12412: checking for mkstemp" >&5
          ++  echo "$as_me:12774: 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 12418 "configure"
          ++#line 12780 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char mkstemp (); below.  */
          +@@ -12446,16 +12808,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12449: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12811: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12452: \$? = $ac_status" >&5
          ++  echo "$as_me:12814: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12455: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12817: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12458: \$? = $ac_status" >&5
          ++  echo "$as_me:12820: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_mkstemp=yes
          + else
          +@@ -12465,12 +12827,12 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:12468: result: $ac_cv_func_mkstemp" >&5
          ++echo "$as_me:12830: result: $ac_cv_func_mkstemp" >&5
          + echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
          + 
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 12473 "configure"
          ++#line 12835 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -12508,15 +12870,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:12511: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12873: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12514: \$? = $ac_status" >&5
          ++  echo "$as_me:12876: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:12516: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12878: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12519: \$? = $ac_status" >&5
          ++  echo "$as_me:12881: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_func_mkstemp=yes
          + 
          +@@ -12531,7 +12893,7 @@
          + fi
          + 
          + fi
          +-echo "$as_me:12534: result: $cf_cv_func_mkstemp" >&5
          ++echo "$as_me:12896: 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
          +@@ -12549,21 +12911,21 @@
          + fi
          + 
          + if test "$cross_compiling" = yes ; then
          +-	{ echo "$as_me:12552: WARNING: cross compiling: assume setvbuf params not reversed" >&5
          ++	{ echo "$as_me:12914: 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:12555: checking whether setvbuf arguments are reversed" >&5
          ++	echo "$as_me:12917: 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:12561: error: cannot run test program while cross compiling" >&5
          ++  { { echo "$as_me:12923: 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 12566 "configure"
          ++#line 12928 "configure"
          + #include "confdefs.h"
          + #include 
          + /* If setvbuf has the reversed format, exit 0. */
          +@@ -12580,15 +12942,15 @@
          + }
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:12583: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:12945: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12586: \$? = $ac_status" >&5
          ++  echo "$as_me:12948: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:12588: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:12950: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12591: \$? = $ac_status" >&5
          ++  echo "$as_me:12953: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_setvbuf_reversed=yes
          + else
          +@@ -12601,7 +12963,7 @@
          + fi
          + rm -f core core.* *.core
          + fi
          +-echo "$as_me:12604: result: $ac_cv_func_setvbuf_reversed" >&5
          ++echo "$as_me:12966: 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
          + 
          +@@ -12612,13 +12974,13 @@
          + fi
          + 
          + fi
          +-echo "$as_me:12615: checking return type of signal handlers" >&5
          ++echo "$as_me:12977: 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 12621 "configure"
          ++#line 12983 "configure"
          + #include "confdefs.h"
          + #include 
          + #include 
          +@@ -12640,16 +13002,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:12643: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13005: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12646: \$? = $ac_status" >&5
          ++  echo "$as_me:13008: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:12649: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13011: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12652: \$? = $ac_status" >&5
          ++  echo "$as_me:13014: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_type_signal=void
          + else
          +@@ -12659,21 +13021,21 @@
          + fi
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          +-echo "$as_me:12662: result: $ac_cv_type_signal" >&5
          ++echo "$as_me:13024: result: $ac_cv_type_signal" >&5
          + echo "${ECHO_T}$ac_cv_type_signal" >&6
          + 
          + cat >>confdefs.h <&5
          ++echo "$as_me:13031: 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 12676 "configure"
          ++#line 13038 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -12686,16 +13048,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:12689: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13051: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12692: \$? = $ac_status" >&5
          ++  echo "$as_me:13054: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:12695: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13057: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12698: \$? = $ac_status" >&5
          ++  echo "$as_me:13060: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_type_sigaction=yes
          + else
          +@@ -12706,13 +13068,13 @@
          + rm -f conftest.$ac_objext conftest.$ac_ext
          + fi
          + 
          +-echo "$as_me:12709: result: $cf_cv_type_sigaction" >&5
          ++echo "$as_me:13071: 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:12715: checking declaration of size-change" >&5
          ++echo "$as_me:13077: 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
          +@@ -12727,7 +13089,7 @@
          +     CPPFLAGS="$cf_save_CPPFLAGS"
          +     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
          +     cat >conftest.$ac_ext <<_ACEOF
          +-#line 12730 "configure"
          ++#line 13092 "configure"
          + #include "confdefs.h"
          + #include 
          + #ifdef HAVE_TERMIOS_H
          +@@ -12771,16 +13133,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13136: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12777: \$? = $ac_status" >&5
          ++  echo "$as_me:13139: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:12780: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13142: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12783: \$? = $ac_status" >&5
          ++  echo "$as_me:13145: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_sizechange=yes
          + else
          +@@ -12799,7 +13161,7 @@
          + done
          + 
          + fi
          +-echo "$as_me:12802: result: $cf_cv_sizechange" >&5
          ++echo "$as_me:13164: result: $cf_cv_sizechange" >&5
          + echo "${ECHO_T}$cf_cv_sizechange" >&6
          + if test "$cf_cv_sizechange" != no ; then
          + 	cat >>confdefs.h <<\EOF
          +@@ -12816,13 +13178,13 @@
          + 	esac
          + fi
          + 
          +-echo "$as_me:12819: checking for memmove" >&5
          ++echo "$as_me:13181: 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 12825 "configure"
          ++#line 13187 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char memmove (); below.  */
          +@@ -12853,16 +13215,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12856: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:13218: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12859: \$? = $ac_status" >&5
          ++  echo "$as_me:13221: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12862: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13224: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12865: \$? = $ac_status" >&5
          ++  echo "$as_me:13227: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_memmove=yes
          + else
          +@@ -12872,19 +13234,19 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:12875: result: $ac_cv_func_memmove" >&5
          ++echo "$as_me:13237: 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:12881: checking for bcopy" >&5
          ++echo "$as_me:13243: 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 12887 "configure"
          ++#line 13249 "configure"
          + #include "confdefs.h"
          + /* System header to define __stub macros and hopefully few prototypes,
          +     which can conflict with char bcopy (); below.  */
          +@@ -12915,16 +13277,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:13280: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12921: \$? = $ac_status" >&5
          ++  echo "$as_me:13283: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:12924: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13286: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12927: \$? = $ac_status" >&5
          ++  echo "$as_me:13289: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   ac_cv_func_bcopy=yes
          + else
          +@@ -12934,11 +13296,11 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + fi
          +-echo "$as_me:12937: result: $ac_cv_func_bcopy" >&5
          ++echo "$as_me:13299: 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:12941: checking if bcopy does overlapping moves" >&5
          ++	echo "$as_me:13303: 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
          +@@ -12948,7 +13310,7 @@
          +   cf_cv_good_bcopy=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 12951 "configure"
          ++#line 13313 "configure"
          + #include "confdefs.h"
          + 
          + int main() {
          +@@ -12962,15 +13324,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:13327: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12968: \$? = $ac_status" >&5
          ++  echo "$as_me:13330: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:12970: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13332: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:12973: \$? = $ac_status" >&5
          ++  echo "$as_me:13335: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_good_bcopy=yes
          + else
          +@@ -12983,7 +13345,7 @@
          + fi
          + 
          + fi
          +-echo "$as_me:12986: result: $cf_cv_good_bcopy" >&5
          ++echo "$as_me:13348: result: $cf_cv_good_bcopy" >&5
          + echo "${ECHO_T}$cf_cv_good_bcopy" >&6
          + 
          + else
          +@@ -13004,7 +13366,7 @@
          + 
          + fi
          + 
          +-echo "$as_me:13007: checking if poll really works" >&5
          ++echo "$as_me:13369: 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
          +@@ -13014,7 +13376,7 @@
          +   cf_cv_working_poll=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 13017 "configure"
          ++#line 13379 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -13035,15 +13397,15 @@
          + }
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:13038: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:13400: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13041: \$? = $ac_status" >&5
          ++  echo "$as_me:13403: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:13043: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13405: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13046: \$? = $ac_status" >&5
          ++  echo "$as_me:13408: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_working_poll=yes
          + else
          +@@ -13055,7 +13417,7 @@
          + rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
          + fi
          + fi
          +-echo "$as_me:13058: result: $cf_cv_working_poll" >&5
          ++echo "$as_me:13420: 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
          +@@ -13066,23 +13428,132 @@
          + #define USE_HASHED_DB 1
          + EOF
          + 
          +-echo "$as_me:13069: checking for db.h" >&5
          ++case $with_hashed_db in #(vi
          ++yes|*able*) #(vi
          ++    ;;
          ++*)
          ++    if test -d "$with_hashed_db" ; then
          ++
          ++if test -n "$with_hashed_db/include" ; then
          ++  for cf_add_incdir in $with_hashed_db/include
          ++  do
          ++	while test $cf_add_incdir != /usr/include
          ++	do
          ++	  if test -d $cf_add_incdir
          ++	  then
          ++		cf_have_incdir=no
          ++		if test -n "$CFLAGS$CPPFLAGS" ; then
          ++		  # a loop is needed to ensure we can add subdirs of existing dirs
          ++		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
          ++			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
          ++			  cf_have_incdir=yes; break
          ++			fi
          ++		  done
          ++		fi
          ++
          ++		if test "$cf_have_incdir" = no ; then
          ++          if test "$cf_add_incdir" = /usr/local/include ; then
          ++			if test "$GCC" = yes
          ++			then
          ++			  cf_save_CPPFLAGS=$CPPFLAGS
          ++			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
          ++			  cat >conftest.$ac_ext <<_ACEOF
          ++#line 13461 "configure"
          ++#include "confdefs.h"
          ++#include 
          ++int
          ++main ()
          ++{
          ++printf("Hello")
          ++  ;
          ++  return 0;
          ++}
          ++_ACEOF
          ++rm -f conftest.$ac_objext
          ++if { (eval echo "$as_me:13473: \"$ac_compile\"") >&5
          ++  (eval $ac_compile) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:13476: \$? = $ac_status" >&5
          ++  (exit $ac_status); } &&
          ++         { ac_try='test -s conftest.$ac_objext'
          ++  { (eval echo "$as_me:13479: \"$ac_try\"") >&5
          ++  (eval $ac_try) 2>&5
          ++  ac_status=$?
          ++  echo "$as_me:13482: \$? = $ac_status" >&5
          ++  (exit $ac_status); }; }; then
          ++  :
          ++else
          ++  echo "$as_me: failed program was:" >&5
          ++cat conftest.$ac_ext >&5
          ++cf_have_incdir=yes
          ++fi
          ++rm -f conftest.$ac_objext conftest.$ac_ext
          ++			  CPPFLAGS=$cf_save_CPPFLAGS
          ++			fi
          ++		  fi
          ++		fi
          ++
          ++		if test "$cf_have_incdir" = no ; then
          ++		  echo "$as_me:13497: result: adding $cf_add_incdir to include-path" >&5
          ++echo "${ECHO_T}adding $cf_add_incdir to include-path" >&6
          ++		  CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
          ++
          ++          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
          ++          test "$cf_top_incdir" = "$cf_add_incdir" && break
          ++          cf_add_incdir="$cf_top_incdir"
          ++		else
          ++		  break
          ++		fi
          ++	  fi
          ++	done
          ++  done
          ++fi
          ++
          ++if test -n "$with_hashed_db/lib" ; then
          ++  for cf_add_libdir in $with_hashed_db/lib
          ++  do
          ++    if test $cf_add_libdir = /usr/lib ; then
          ++      :
          ++    elif test -d $cf_add_libdir
          ++    then
          ++      cf_have_libdir=no
          ++      if test -n "$LDFLAGS$LIBS" ; then
          ++        # a loop is needed to ensure we can add subdirs of existing dirs
          ++        for cf_test_libdir in $LDFLAGS $LIBS ; do
          ++          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
          ++            cf_have_libdir=yes; break
          ++          fi
          ++        done
          ++      fi
          ++      if test "$cf_have_libdir" = no ; then
          ++        echo "$as_me:13529: result: adding $cf_add_libdir to library-path" >&5
          ++echo "${ECHO_T}adding $cf_add_libdir to library-path" >&6
          ++        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
          ++      fi
          ++    fi
          ++  done
          ++fi
          ++
          ++    fi
          ++esac
          ++
          ++echo "$as_me:13540: checking for db.h" >&5
          + echo $ECHO_N "checking for db.h... $ECHO_C" >&6
          + if test "${ac_cv_header_db_h+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 13075 "configure"
          ++#line 13546 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:13079: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:13550: \"$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:13085: \$? = $ac_status" >&5
          ++  echo "$as_me:13556: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_c_preproc_warn_flag
          +@@ -13101,11 +13572,11 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:13104: result: $ac_cv_header_db_h" >&5
          ++echo "$as_me:13575: result: $ac_cv_header_db_h" >&5
          + echo "${ECHO_T}$ac_cv_header_db_h" >&6
          + if test $ac_cv_header_db_h = yes; then
          + 
          +-echo "$as_me:13108: checking for version of db" >&5
          ++echo "$as_me:13579: checking for version of db" >&5
          + echo $ECHO_N "checking for version of db... $ECHO_C" >&6
          + if test "${cf_cv_hashed_db_version+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -13113,13 +13584,13 @@
          + 
          + cf_cv_hashed_db_version=unknown
          + 
          +-for cf_db_version in 1 2 3 4
          ++for cf_db_version in 1 2 3 4 5
          + do
          + 
          +-echo "(line 13119) testing checking for db version $cf_db_version ..." 1>&5
          ++echo "${as_me-configure}:13590: testing checking for db version $cf_db_version ..." 1>&5
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 13122 "configure"
          ++#line 13593 "configure"
          + #include "confdefs.h"
          + 
          + $ac_includes_default
          +@@ -13149,16 +13620,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:13152: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13623: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13155: \$? = $ac_status" >&5
          ++  echo "$as_me:13626: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:13158: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13629: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13161: \$? = $ac_status" >&5
          ++  echo "$as_me:13632: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          + 
          + 	cf_cv_hashed_db_version=$cf_db_version
          +@@ -13172,33 +13643,33 @@
          + done
          + 
          + fi
          +-echo "$as_me:13175: result: $cf_cv_hashed_db_version" >&5
          ++echo "$as_me:13646: result: $cf_cv_hashed_db_version" >&5
          + echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
          + 
          + if test "$cf_cv_hashed_db_version" = unknown ; then
          +-	{ { echo "$as_me:13179: error: Cannot determine version of db" >&5
          ++	{ { echo "$as_me:13650: error: Cannot determine version of db" >&5
          + echo "$as_me: error: Cannot determine version of db" >&2;}
          +    { (exit 1); exit 1; }; }
          + else
          + 
          +-echo "$as_me:13184: checking for db libraries" >&5
          ++echo "$as_me:13655: checking for db libraries" >&5
          + echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
          + if test "${cf_cv_hashed_db_libs+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          + else
          + 
          + cf_cv_hashed_db_libs=unknown
          +-for cf_db_libs in db$cf_cv_hashed_db_version db ''
          ++for cf_db_libs in db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
          + do
          + 	cf_save_libs="$LIBS"
          + 	if test -n "$cf_db_libs"; then
          + 		LIBS="-l$cf_db_libs $LIBS"
          + 	fi
          + 
          +-echo "(line 13198) testing checking for library "$cf_db_libs" ..." 1>&5
          ++echo "${as_me-configure}:13669: testing checking for library "$cf_db_libs" ..." 1>&5
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 13201 "configure"
          ++#line 13672 "configure"
          + #include "confdefs.h"
          + 
          + $ac_includes_default
          +@@ -13253,16 +13724,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:13256: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:13727: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13259: \$? = $ac_status" >&5
          ++  echo "$as_me:13730: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:13262: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13733: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13265: \$? = $ac_status" >&5
          ++  echo "$as_me:13736: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          + 
          + 	if test -n "$cf_db_libs" ; then
          +@@ -13282,11 +13753,11 @@
          + done
          + 
          + fi
          +-echo "$as_me:13285: result: $cf_cv_hashed_db_libs" >&5
          ++echo "$as_me:13756: result: $cf_cv_hashed_db_libs" >&5
          + echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
          + 
          + 	if test "$cf_cv_hashed_db_libs" = unknown ; then
          +-		{ { echo "$as_me:13289: error: Cannot determine library for db" >&5
          ++		{ { echo "$as_me:13760: error: Cannot determine library for db" >&5
          + echo "$as_me: error: Cannot determine library for db" >&2;}
          +    { (exit 1); exit 1; }; }
          + 	elif test "$cf_cv_hashed_db_libs" != default ; then
          +@@ -13296,7 +13767,7 @@
          + 
          + else
          + 
          +-	{ { echo "$as_me:13299: error: Cannot find db.h" >&5
          ++	{ { echo "$as_me:13770: error: Cannot find db.h" >&5
          + echo "$as_me: error: Cannot find db.h" >&2;}
          +    { (exit 1); exit 1; }; }
          + 
          +@@ -13311,7 +13782,7 @@
          + 
          + # Just in case, check if the C compiler has a bool type.
          + 
          +-echo "$as_me:13314: checking if we should include stdbool.h" >&5
          ++echo "$as_me:13785: 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
          +@@ -13319,7 +13790,7 @@
          + else
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 13322 "configure"
          ++#line 13793 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -13331,23 +13802,23 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:13334: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13805: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13337: \$? = $ac_status" >&5
          ++  echo "$as_me:13808: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:13340: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13811: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13343: \$? = $ac_status" >&5
          ++  echo "$as_me:13814: \$? = $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 13350 "configure"
          ++#line 13821 "configure"
          + #include "confdefs.h"
          + 
          + #ifndef __BEOS__
          +@@ -13363,16 +13834,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13837: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13369: \$? = $ac_status" >&5
          ++  echo "$as_me:13840: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:13372: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13843: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13375: \$? = $ac_status" >&5
          ++  echo "$as_me:13846: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_header_stdbool_h=1
          + else
          +@@ -13386,13 +13857,13 @@
          + fi
          + 
          + if test "$cf_cv_header_stdbool_h" = 1
          +-then	echo "$as_me:13389: result: yes" >&5
          ++then	echo "$as_me:13860: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          +-else	echo "$as_me:13391: result: no" >&5
          ++else	echo "$as_me:13862: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +-echo "$as_me:13395: checking for builtin bool type" >&5
          ++echo "$as_me:13866: 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
          +@@ -13400,7 +13871,7 @@
          + else
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 13403 "configure"
          ++#line 13874 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -13415,16 +13886,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:13418: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13421: \$? = $ac_status" >&5
          ++  echo "$as_me:13892: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:13424: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13895: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13427: \$? = $ac_status" >&5
          ++  echo "$as_me:13898: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_cc_bool_type=1
          + else
          +@@ -13437,9 +13908,9 @@
          + fi
          + 
          + if test "$cf_cv_cc_bool_type" = 1
          +-then	echo "$as_me:13440: result: yes" >&5
          ++then	echo "$as_me:13911: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          +-else	echo "$as_me:13442: result: no" >&5
          ++else	echo "$as_me:13913: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -13461,7 +13932,7 @@
          + 	cf_stdcpp_libname=stdc++
          + 	;;
          + esac
          +-echo "$as_me:13464: checking for library $cf_stdcpp_libname" >&5
          ++echo "$as_me:13935: 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
          +@@ -13470,7 +13941,7 @@
          + 	cf_save="$LIBS"
          + 	LIBS="$LIBS -l$cf_stdcpp_libname"
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 13473 "configure"
          ++#line 13944 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -13486,16 +13957,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:13489: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:13960: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13492: \$? = $ac_status" >&5
          ++  echo "$as_me:13963: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:13495: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:13966: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13498: \$? = $ac_status" >&5
          ++  echo "$as_me:13969: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_libstdcpp=yes
          + else
          +@@ -13507,12 +13978,12 @@
          + 	LIBS="$cf_save"
          + 
          + fi
          +-echo "$as_me:13510: result: $cf_cv_libstdcpp" >&5
          ++echo "$as_me:13981: 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:13515: checking whether $CXX understands -c and -o together" >&5
          ++	echo "$as_me:13986: 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
          +@@ -13528,15 +13999,15 @@
          + # 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:13531: \"$ac_try\"") >&5
          ++if { (eval echo "$as_me:14002: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13534: \$? = $ac_status" >&5
          ++  echo "$as_me:14005: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +-  test -f conftest2.$ac_objext && { (eval echo "$as_me:13536: \"$ac_try\"") >&5
          ++  test -f conftest2.$ac_objext && { (eval echo "$as_me:14007: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13539: \$? = $ac_status" >&5
          ++  echo "$as_me:14010: \$? = $ac_status" >&5
          +   (exit $ac_status); };
          + then
          +   eval cf_cv_prog_CXX_c_o=yes
          +@@ -13547,10 +14018,10 @@
          + 
          + fi
          + if test $cf_cv_prog_CXX_c_o = yes; then
          +-  echo "$as_me:13550: result: yes" >&5
          ++  echo "$as_me:14021: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          + else
          +-  echo "$as_me:13553: result: no" >&5
          ++  echo "$as_me:14024: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -13570,12 +14041,12 @@
          + 	;;
          + esac
          + if test "$GXX" = yes; then
          +-	echo "$as_me:13573: checking for lib$cf_gpp_libname" >&5
          ++	echo "$as_me:14044: 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 13578 "configure"
          ++#line 14049 "configure"
          + #include "confdefs.h"
          + 
          + #include <$cf_gpp_libname/builtin.h>
          +@@ -13589,16 +14060,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:13592: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:14063: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13595: \$? = $ac_status" >&5
          ++  echo "$as_me:14066: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:13598: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14069: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13601: \$? = $ac_status" >&5
          ++  echo "$as_me:14072: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cxx_library=yes
          + 	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
          +@@ -13617,7 +14088,7 @@
          +   echo "$as_me: failed program was:" >&5
          + cat conftest.$ac_ext >&5
          + cat >conftest.$ac_ext <<_ACEOF
          +-#line 13620 "configure"
          ++#line 14091 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -13631,16 +14102,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:13634: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:14105: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13637: \$? = $ac_status" >&5
          ++  echo "$as_me:14108: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:13640: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14111: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13643: \$? = $ac_status" >&5
          ++  echo "$as_me:14114: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cxx_library=yes
          + 	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
          +@@ -13657,7 +14128,7 @@
          + fi
          + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          + 	LIBS="$cf_save"
          +-	echo "$as_me:13660: result: $cf_cxx_library" >&5
          ++	echo "$as_me:14131: result: $cf_cxx_library" >&5
          + echo "${ECHO_T}$cf_cxx_library" >&6
          + fi
          + 
          +@@ -13673,7 +14144,7 @@
          + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
          + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
          + ac_main_return=return
          +-echo "$as_me:13676: checking how to run the C++ preprocessor" >&5
          ++echo "$as_me:14147: 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
          +@@ -13690,18 +14161,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 13693 "configure"
          ++#line 14164 "configure"
          + #include "confdefs.h"
          + #include 
          +                      Syntax error
          + _ACEOF
          +-if { (eval echo "$as_me:13698: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:14169: \"$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:13704: \$? = $ac_status" >&5
          ++  echo "$as_me:14175: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_cxx_preproc_warn_flag
          +@@ -13724,17 +14195,17 @@
          +   # OK, works on sane cases.  Now check whether non-existent headers
          +   # can be detected and how.
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 13727 "configure"
          ++#line 14198 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:13731: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:14202: \"$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:13737: \$? = $ac_status" >&5
          ++  echo "$as_me:14208: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_cxx_preproc_warn_flag
          +@@ -13771,7 +14242,7 @@
          + else
          +   ac_cv_prog_CXXCPP=$CXXCPP
          + fi
          +-echo "$as_me:13774: result: $CXXCPP" >&5
          ++echo "$as_me:14245: result: $CXXCPP" >&5
          + echo "${ECHO_T}$CXXCPP" >&6
          + ac_preproc_ok=false
          + for ac_cxx_preproc_warn_flag in '' yes
          +@@ -13781,18 +14252,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 13784 "configure"
          ++#line 14255 "configure"
          + #include "confdefs.h"
          + #include 
          +                      Syntax error
          + _ACEOF
          +-if { (eval echo "$as_me:13789: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:14260: \"$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:13795: \$? = $ac_status" >&5
          ++  echo "$as_me:14266: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_cxx_preproc_warn_flag
          +@@ -13815,17 +14286,17 @@
          +   # OK, works on sane cases.  Now check whether non-existent headers
          +   # can be detected and how.
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 13818 "configure"
          ++#line 14289 "configure"
          + #include "confdefs.h"
          + #include 
          + _ACEOF
          +-if { (eval echo "$as_me:13822: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:14293: \"$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:13828: \$? = $ac_status" >&5
          ++  echo "$as_me:14299: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_cxx_preproc_warn_flag
          +@@ -13853,7 +14324,7 @@
          + if $ac_preproc_ok; then
          +   :
          + else
          +-  { { echo "$as_me:13856: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
          ++  { { echo "$as_me:14327: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
          + echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
          +    { (exit 1); exit 1; }; }
          + fi
          +@@ -13865,26 +14336,26 @@
          + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
          + ac_main_return=return
          + 
          +-for ac_header in typeinfo
          ++for ac_header in iostream typeinfo
          + do
          + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
          +-echo "$as_me:13871: checking for $ac_header" >&5
          ++echo "$as_me:14342: 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 13877 "configure"
          ++#line 14348 "configure"
          + #include "confdefs.h"
          + #include <$ac_header>
          + _ACEOF
          +-if { (eval echo "$as_me:13881: \"$ac_cpp conftest.$ac_ext\"") >&5
          ++if { (eval echo "$as_me:14352: \"$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:13887: \$? = $ac_status" >&5
          ++  echo "$as_me:14358: \$? = $ac_status" >&5
          +   (exit $ac_status); } >/dev/null; then
          +   if test -s conftest.err; then
          +     ac_cpp_err=$ac_cxx_preproc_warn_flag
          +@@ -13903,7 +14374,7 @@
          + fi
          + rm -f conftest.err conftest.$ac_ext
          + fi
          +-echo "$as_me:13906: result: `eval echo '${'$as_ac_Header'}'`" >&5
          ++echo "$as_me:14377: 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 <&5
          ++echo "$as_me:14387: 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
          +@@ -13921,7 +14392,7 @@
          + else
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 13924 "configure"
          ++#line 14395 "configure"
          + #include "confdefs.h"
          + 
          + int
          +@@ -13933,23 +14404,23 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:13936: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:14407: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13939: \$? = $ac_status" >&5
          ++  echo "$as_me:14410: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:13942: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14413: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13945: \$? = $ac_status" >&5
          ++  echo "$as_me:14416: \$? = $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 13952 "configure"
          ++#line 14423 "configure"
          + #include "confdefs.h"
          + 
          + #ifndef __BEOS__
          +@@ -13965,16 +14436,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:14439: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13971: \$? = $ac_status" >&5
          ++  echo "$as_me:14442: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:13974: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14445: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:13977: \$? = $ac_status" >&5
          ++  echo "$as_me:14448: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_header_stdbool_h=1
          + else
          +@@ -13988,13 +14459,13 @@
          + fi
          + 
          + if test "$cf_cv_header_stdbool_h" = 1
          +-then	echo "$as_me:13991: result: yes" >&5
          ++then	echo "$as_me:14462: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          +-else	echo "$as_me:13993: result: no" >&5
          ++else	echo "$as_me:14464: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +-echo "$as_me:13997: checking for builtin bool type" >&5
          ++echo "$as_me:14468: 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
          +@@ -14002,7 +14473,7 @@
          + else
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 14005 "configure"
          ++#line 14476 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -14017,16 +14488,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:14020: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:14491: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14023: \$? = $ac_status" >&5
          ++  echo "$as_me:14494: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:14026: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14497: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14029: \$? = $ac_status" >&5
          ++  echo "$as_me:14500: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_builtin_bool=1
          + else
          +@@ -14039,13 +14510,13 @@
          + fi
          + 
          + if test "$cf_cv_builtin_bool" = 1
          +-then	echo "$as_me:14042: result: yes" >&5
          ++then	echo "$as_me:14513: result: yes" >&5
          + echo "${ECHO_T}yes" >&6
          +-else	echo "$as_me:14044: result: no" >&5
          ++else	echo "$as_me:14515: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +-echo "$as_me:14048: checking for size of bool" >&5
          ++echo "$as_me:14519: 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
          +@@ -14056,7 +14527,7 @@
          +   cf_cv_type_of_bool=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 14059 "configure"
          ++#line 14530 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -14098,15 +14569,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:14101: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:14572: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14104: \$? = $ac_status" >&5
          ++  echo "$as_me:14575: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:14106: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14577: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14109: \$? = $ac_status" >&5
          ++  echo "$as_me:14580: \$? = $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
          +@@ -14124,18 +14595,18 @@
          + fi
          + 
          + 	rm -f cf_test.out
          +-echo "$as_me:14127: result: $cf_cv_type_of_bool" >&5
          ++echo "$as_me:14598: 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:14133: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
          ++	{ echo "$as_me:14604: 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:14138: checking for special defines needed for etip.h" >&5
          ++echo "$as_me:14609: 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"
          +@@ -14147,7 +14618,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 14150 "configure"
          ++#line 14621 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -14161,16 +14632,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:14635: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14167: \$? = $ac_status" >&5
          ++  echo "$as_me:14638: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:14170: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14641: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14173: \$? = $ac_status" >&5
          ++  echo "$as_me:14644: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          + 
          + 	test -n "$cf_math" && cat >>confdefs.h <&5
          ++echo "$as_me:14665: result: $cf_result" >&5
          + echo "${ECHO_T}$cf_result" >&6
          + CXXFLAGS="$cf_save_CXXFLAGS"
          + 
          + if test -n "$CXX"; then
          +-echo "$as_me:14199: checking if $CXX accepts parameter initialization" >&5
          ++echo "$as_me:14670: 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
          +@@ -14213,7 +14684,7 @@
          +   cf_cv_cpp_param_init=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 14216 "configure"
          ++#line 14687 "configure"
          + #include "confdefs.h"
          + 
          + class TEST {
          +@@ -14232,15 +14703,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:14235: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14238: \$? = $ac_status" >&5
          ++  echo "$as_me:14709: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:14240: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14711: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14243: \$? = $ac_status" >&5
          ++  echo "$as_me:14714: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_cpp_param_init=yes
          + else
          +@@ -14259,7 +14730,7 @@
          + ac_main_return=return
          + 
          + fi
          +-echo "$as_me:14262: result: $cf_cv_cpp_param_init" >&5
          ++echo "$as_me:14733: 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
          +@@ -14268,7 +14739,7 @@
          + 
          + if test -n "$CXX"; then
          + 
          +-echo "$as_me:14271: checking if $CXX accepts static_cast" >&5
          ++echo "$as_me:14742: checking if $CXX accepts static_cast" >&5
          + echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
          + if test "${cf_cv_cpp_static_cast+set}" = set; then
          +   echo $ECHO_N "(cached) $ECHO_C" >&6
          +@@ -14282,7 +14753,7 @@
          + ac_main_return=return
          + 
          + 	cat >conftest.$ac_ext <<_ACEOF
          +-#line 14285 "configure"
          ++#line 14756 "configure"
          + #include "confdefs.h"
          + 
          + class NCursesPanel
          +@@ -14326,16 +14797,16 @@
          + }
          + _ACEOF
          + rm -f conftest.$ac_objext
          +-if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
          ++if { (eval echo "$as_me:14800: \"$ac_compile\"") >&5
          +   (eval $ac_compile) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14332: \$? = $ac_status" >&5
          ++  echo "$as_me:14803: \$? = $ac_status" >&5
          +   (exit $ac_status); } &&
          +          { ac_try='test -s conftest.$ac_objext'
          +-  { (eval echo "$as_me:14335: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14806: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14338: \$? = $ac_status" >&5
          ++  echo "$as_me:14809: \$? = $ac_status" >&5
          +   (exit $ac_status); }; }; then
          +   cf_cv_cpp_static_cast=yes
          + else
          +@@ -14353,7 +14824,7 @@
          + ac_main_return=return
          + 
          + fi
          +-echo "$as_me:14356: result: $cf_cv_cpp_static_cast" >&5
          ++echo "$as_me:14827: result: $cf_cv_cpp_static_cast" >&5
          + echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
          + 
          + fi
          +@@ -14362,189 +14833,6 @@
          + #define CPP_HAS_STATIC_CAST 1
          + EOF
          + 
          +-if test -n "$CXX"; 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
          +-ac_main_return=return
          +-
          +-for ac_header in strstream.h
          +-do
          +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
          +-echo "$as_me:14377: 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 14383 "configure"
          +-#include "confdefs.h"
          +-#include <$ac_header>
          +-_ACEOF
          +-if { (eval echo "$as_me:14387: \"$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:14393: \$? = $ac_status" >&5
          +-  (exit $ac_status); } >/dev/null; then
          +-  if test -s conftest.err; then
          +-    ac_cpp_err=$ac_cxx_preproc_warn_flag
          +-  else
          +-    ac_cpp_err=
          +-  fi
          +-else
          +-  ac_cpp_err=yes
          +-fi
          +-if test -z "$ac_cpp_err"; then
          +-  eval "$as_ac_Header=yes"
          +-else
          +-  echo "$as_me: failed program was:" >&5
          +-  cat conftest.$ac_ext >&5
          +-  eval "$as_ac_Header=no"
          +-fi
          +-rm -f conftest.err conftest.$ac_ext
          +-fi
          +-echo "$as_me:14412: 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 <&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
          +-else
          +-
          +-	for cf_vscan_func in strstream strstream_cast stdio
          +-	do
          +-	case $cf_vscan_func in #(vi
          +-	stdio)		cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
          +-	strstream)	cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
          +-	strstream_cast)	cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
          +-	esac
          +-	cat >conftest.$ac_ext <<_ACEOF
          +-#line 14436 "configure"
          +-#include "confdefs.h"
          +-
          +-#include 
          +-#include 
          +-#define $cf_vscan_defs 1
          +-#if defined(USE_STDIO_VSCAN)
          +-#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
          +-#include 
          +-#endif
          +-
          +-int scanw(const char* fmt, ...)
          +-{
          +-    int result = -1;
          +-    char buf[BUFSIZ];
          +-
          +-    va_list args;
          +-    va_start(args, fmt);
          +-#if defined(USE_STDIO_VSCAN)
          +-    if (::vsscanf(buf, fmt, args) != -1)
          +-	result = 0;
          +-#elif defined(USE_STRSTREAM_VSCAN)
          +-    strstreambuf ss(buf, sizeof(buf));
          +-    if (ss.vscan(fmt, args) != -1)
          +-	result = 0;
          +-#elif defined(USE_STRSTREAM_VSCAN_CAST)
          +-    strstreambuf ss(buf, sizeof(buf));
          +-    if (ss.vscan(fmt, (_IO_va_list)args) != -1)
          +-	result = 0;
          +-#else
          +-#error case $cf_vscan_func failed
          +-#endif
          +-    va_end(args);
          +-    return result;
          +-}
          +-
          +-int
          +-main ()
          +-{
          +-int tmp, foo = scanw("%d", &tmp)
          +-  ;
          +-  return 0;
          +-}
          +-_ACEOF
          +-rm -f conftest.$ac_objext conftest$ac_exeext
          +-if { (eval echo "$as_me:14481: \"$ac_link\"") >&5
          +-  (eval $ac_link) 2>&5
          +-  ac_status=$?
          +-  echo "$as_me:14484: \$? = $ac_status" >&5
          +-  (exit $ac_status); } &&
          +-         { ac_try='test -s conftest$ac_exeext'
          +-  { (eval echo "$as_me:14487: \"$ac_try\"") >&5
          +-  (eval $ac_try) 2>&5
          +-  ac_status=$?
          +-  echo "$as_me:14490: \$? = $ac_status" >&5
          +-  (exit $ac_status); }; }; then
          +-  cf_cv_cpp_vscan_func=$cf_vscan_func; break
          +-else
          +-  echo "$as_me: failed program was:" >&5
          +-cat conftest.$ac_ext >&5
          +-cf_cv_cpp_vscan_func=no
          +-fi
          +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          +-	test "$cf_cv_cpp_vscan_func" != no && break
          +-	done
          +-
          +-fi
          +-echo "$as_me:14503: result: $cf_cv_cpp_vscan_func" >&5
          +-echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
          +-
          +-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
          +-ac_main_return=return
          +-
          +-fi
          +-
          +-case $cf_cv_cpp_vscan_func in #(vi
          +-stdio) #(vi
          +-	cat >>confdefs.h <<\EOF
          +-#define CPP_HAS_VSCAN_FUNC 1
          +-EOF
          +-
          +-	cat >>confdefs.h <<\EOF
          +-#define USE_STDIO_VSCAN 1
          +-EOF
          +-
          +-	;;
          +-strstream)
          +-	cat >>confdefs.h <<\EOF
          +-#define CPP_HAS_VSCAN_FUNC 1
          +-EOF
          +-
          +-	cat >>confdefs.h <<\EOF
          +-#define USE_STRSTREAM_VSCAN 1
          +-EOF
          +-
          +-	;;
          +-strstream_cast)
          +-	cat >>confdefs.h <<\EOF
          +-#define CPP_HAS_VSCAN_FUNC 1
          +-EOF
          +-
          +-	cat >>confdefs.h <<\EOF
          +-#define USE_STRSTREAM_VSCAN_CAST 1
          +-EOF
          +-
          +-	;;
          +-esac
          +-
          + 	CXX_AR='$(AR)'
          + 	CXX_AR_OPTS='$(AR_OPTS)'
          + 	case $cf_cv_system_name in #(vi
          +@@ -14584,7 +14872,7 @@
          + 	else
          + 		if test "$cf_cv_header_stdbool_h" = 1 ; then
          + 
          +-echo "$as_me:14587: checking for size of bool" >&5
          ++echo "$as_me:14875: 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
          +@@ -14595,7 +14883,7 @@
          +   cf_cv_type_of_bool=unknown
          + else
          +   cat >conftest.$ac_ext <<_ACEOF
          +-#line 14598 "configure"
          ++#line 14886 "configure"
          + #include "confdefs.h"
          + 
          + #include 
          +@@ -14637,15 +14925,15 @@
          + 
          + _ACEOF
          + rm -f conftest$ac_exeext
          +-if { (eval echo "$as_me:14640: \"$ac_link\"") >&5
          ++if { (eval echo "$as_me:14928: \"$ac_link\"") >&5
          +   (eval $ac_link) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14643: \$? = $ac_status" >&5
          ++  echo "$as_me:14931: \$? = $ac_status" >&5
          +   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
          +-  { (eval echo "$as_me:14645: \"$ac_try\"") >&5
          ++  { (eval echo "$as_me:14933: \"$ac_try\"") >&5
          +   (eval $ac_try) 2>&5
          +   ac_status=$?
          +-  echo "$as_me:14648: \$? = $ac_status" >&5
          ++  echo "$as_me:14936: \$? = $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
          +@@ -14663,25 +14951,25 @@
          + fi
          + 
          + 	rm -f cf_test.out
          +-echo "$as_me:14666: result: $cf_cv_type_of_bool" >&5
          ++echo "$as_me:14954: 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:14672: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
          ++	{ echo "$as_me:14960: 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:14678: checking for fallback type of bool" >&5
          ++			echo "$as_me:14966: 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:14684: result: $cf_cv_type_of_bool" >&5
          ++			echo "$as_me:14972: result: $cf_cv_type_of_bool" >&5
          + echo "${ECHO_T}$cf_cv_type_of_bool" >&6
          + 		fi
          + 	fi
          +@@ -14707,11 +14995,20 @@
          + fi
          + 
          + if test -f "${srcdir}/Ada95/Makefile.in" ; then
          ++
          ++if test "$cf_with_ada" != "no" ; then
          ++    if test "$with_libtool" != "no"; then
          ++	{ echo "$as_me:15001: WARNING: libtool does not support Ada - disabling feature" >&5
          ++echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
          ++	cf_with_ada=no
          ++    fi
          ++fi
          ++
          + if test "$cf_with_ada" != "no" ; then
          + 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:14714: checking for $ac_word" >&5
          ++echo "$as_me:15011: 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
          +@@ -14726,7 +15023,7 @@
          +   test -z "$ac_dir" && ac_dir=.
          +   $as_executable_p "$ac_dir/$ac_word" || continue
          + ac_cv_prog_gnat_exists="yes"
          +-echo "$as_me:14729: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:15026: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -14735,10 +15032,10 @@
          + fi
          + gnat_exists=$ac_cv_prog_gnat_exists
          + if test -n "$gnat_exists"; then
          +-  echo "$as_me:14738: result: $gnat_exists" >&5
          ++  echo "$as_me:15035: result: $gnat_exists" >&5
          + echo "${ECHO_T}$gnat_exists" >&6
          + else
          +-  echo "$as_me:14741: result: no" >&5
          ++  echo "$as_me:15038: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -14746,11 +15043,11 @@
          +    cf_ada_make=
          + else
          + 
          +-echo "$as_me:14749: checking for gnat version" >&5
          ++echo "$as_me:15046: 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:14753: result: $cf_gnat_version" >&5
          ++echo "$as_me:15050: result: $cf_gnat_version" >&5
          + echo "${ECHO_T}$cf_gnat_version" >&6
          + 
          + case $cf_gnat_version in
          +@@ -14773,7 +15070,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:14776: checking for $ac_word" >&5
          ++echo "$as_me:15073: 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
          +@@ -14788,7 +15085,7 @@
          +   test -z "$ac_dir" && ac_dir=.
          +   $as_executable_p "$ac_dir/$ac_word" || continue
          + ac_cv_prog_M4_exists="yes"
          +-echo "$as_me:14791: found $ac_dir/$ac_word" >&5
          ++echo "$as_me:15088: found $ac_dir/$ac_word" >&5
          + break
          + done
          + 
          +@@ -14797,10 +15094,10 @@
          + fi
          + M4_exists=$ac_cv_prog_M4_exists
          + if test -n "$M4_exists"; then
          +-  echo "$as_me:14800: result: $M4_exists" >&5
          ++  echo "$as_me:15097: result: $M4_exists" >&5
          + echo "${ECHO_T}$M4_exists" >&6
          + else
          +-  echo "$as_me:14803: result: no" >&5
          ++  echo "$as_me:15100: result: no" >&5
          + echo "${ECHO_T}no" >&6
          + fi
          + 
          +@@ -14809,7 +15106,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:14812: checking if GNAT works" >&5
          ++      echo "$as_me:15109: checking if GNAT works" >&5
          + echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
          + 
          + rm -f conftest*
          +@@ -14837,14 +15134,14 @@
          + fi
          + rm -f conftest*
          + 
          +-      echo "$as_me:14840: result: $cf_cv_prog_gnat_correct" >&5
          ++      echo "$as_me:15137: 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:14847: checking if GNAT pragma Unreferenced works" >&5
          ++   echo "$as_me:15144: checking if GNAT pragma Unreferenced works" >&5
          + echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
          + 
          + rm -f conftest*
          +@@ -14871,7 +15168,7 @@
          + fi
          + rm -f conftest*
          + 
          +-   echo "$as_me:14874: result: $cf_cv_pragma_unreferenced" >&5
          ++   echo "$as_me:15171: 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).
          +@@ -14897,7 +15194,8 @@
          + 
          + else
          +   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
          +-fi;
          ++fi; if test -n "$prefix/lib/ada/adainclude" ; then
          ++
          + if test "x$prefix" != xNONE; then
          +   cf_path_syntax="$prefix"
          + else
          +@@ -14923,12 +15221,13 @@
          +   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
          +   ;;
          + *)
          +-  { { echo "$as_me:14926: error: expected a pathname, not \"$withval\"" >&5
          ++  { { echo "$as_me:15224: error: expected a pathname, not \"$withval\"" >&5
          + echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
          +    { (exit 1); exit 1; }; }
          +   ;;
          + esac
          + 
          ++fi
          + ADA_INCLUDE="$withval"
          + 
          + # Check whether --with-ada-objects or --without-ada-objects was given.
          +@@ -14937,7 +15236,8 @@
          + 
          + else
          +   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
          +-fi;
          ++fi; if test -n "$prefix/lib/ada/adalib" ; then
          ++
          + if test "x$prefix" != xNONE; then
          +   cf_path_syntax="$prefix"
          + else
          +@@ -14963,34 +15263,57 @@
          +   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
          +   ;;
          + *)
          +-  { { echo "$as_me:14966: error: expected a pathname, not \"$withval\"" >&5
          ++  { { echo "$as_me:15266: error: expected a pathname, not \"$withval\"" >&5
          + echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
          +    { (exit 1); exit 1; }; }
          +   ;;
          + esac
          + 
          ++fi
          + ADA_OBJECTS="$withval"
          + 
          + fi
          + fi
          ++else
          ++   cf_with_ada=no
          + fi
          + 
          +-### 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:14980: checking for library subsets" >&5
          ++### Construct the ncurses library-subsets, if any, from this set of keywords:
          ++###	none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
          ++###
          ++### ticlib modules may be a separate library, otherwise contained in termlib.
          ++### termlib modules may be a separate library, otherwise contained in ncurses.
          ++###
          ++### The of "+" or " " between the tokens controls the way the script
          ++### chooses to split module lists into libraries.
          ++###
          ++### (see CF_LIB_RULES).
          ++echo "$as_me:15291: checking for library subsets" >&5
          + echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
          ++LIB_SUBSETS=
          ++
          ++if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
          ++	LIB_SUBSETS="${LIB_SUBSETS}ticlib"
          ++	if test "$with_ticlib" != no ; then
          ++		LIB_SUBSETS="${LIB_SUBSETS} "
          ++	else
          ++		LIB_SUBSETS="${LIB_SUBSETS}+"
          ++	fi
          ++fi
          ++
          ++LIB_SUBSETS="${LIB_SUBSETS}termlib"
          ++test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
          + if test "$with_termlib" != no ; then
          +-	LIB_SUBSETS="termlib"
          +-	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
          + 	LIB_SUBSETS="${LIB_SUBSETS} "
          + else
          +-	LIB_SUBSETS="termlib+"
          +-	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
          ++	LIB_SUBSETS="${LIB_SUBSETS}+"
          + fi
          ++
          + 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:14993: result: $LIB_SUBSETS" >&5
          ++
          ++echo "$as_me:15316: result: $LIB_SUBSETS" >&5
          + echo "${ECHO_T}$LIB_SUBSETS" >&6
          + 
          + ### Construct the list of include-directories to be generated
          +@@ -15028,7 +15351,7 @@
          + fi
          + 
          + ### Build up pieces for makefile rules
          +-echo "$as_me:15031: checking default library suffix" >&5
          ++echo "$as_me:15354: checking default library suffix" >&5
          + echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
          + 
          + 	case $DFT_LWR_MODEL in
          +@@ -15039,10 +15362,10 @@
          + 	shared)  DFT_ARG_SUFFIX=''   ;;
          + 	esac
          + 	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
          +-echo "$as_me:15042: result: $DFT_ARG_SUFFIX" >&5
          ++echo "$as_me:15365: result: $DFT_ARG_SUFFIX" >&5
          + echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
          + 
          +-echo "$as_me:15045: checking default library-dependency suffix" >&5
          ++echo "$as_me:15368: checking default library-dependency suffix" >&5
          + echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
          + 
          + 	case $DFT_LWR_MODEL in
          +@@ -15064,17 +15387,19 @@
          + 		esac
          + 	esac
          + 	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
          ++DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
          + if test $DFT_LWR_MODEL = shared ; then
          + 	case $cf_cv_system_name in #(vi
          + 	cygwin*)
          + 		DFT_DEP_SUFFIX=".dll.a"
          ++		DFT_LIB_SUFFIX=".dll"
          + 		;;
          + 	esac
          + fi
          +-echo "$as_me:15074: result: $DFT_DEP_SUFFIX" >&5
          ++echo "$as_me:15399: result: $DFT_DEP_SUFFIX" >&5
          + echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
          + 
          +-echo "$as_me:15077: checking default object directory" >&5
          ++echo "$as_me:15402: checking default object directory" >&5
          + echo $ECHO_N "checking default object directory... $ECHO_C" >&6
          + 
          + 	case $DFT_LWR_MODEL in
          +@@ -15090,12 +15415,12 @@
          + 			DFT_OBJ_SUBDIR='obj_s' ;;
          + 		esac
          + 	esac
          +-echo "$as_me:15093: result: $DFT_OBJ_SUBDIR" >&5
          ++echo "$as_me:15418: 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:15098: checking c++ library-dependency suffix" >&5
          ++echo "$as_me:15423: 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
          +@@ -15121,21 +15446,60 @@
          + 	esac
          + 	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
          + fi
          +-echo "$as_me:15124: result: $CXX_LIB_SUFFIX" >&5
          ++echo "$as_me:15449: result: $CXX_LIB_SUFFIX" >&5
          + echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
          + 
          + fi
          + 
          ++# do not want -ldl in build except as needed for -lncurses dependency
          ++if test "$with_dlsym" = yes ; then
          ++if test $DFT_LWR_MODEL = shared || \
          ++   test $DFT_LWR_MODEL = libtool ; then
          ++
          ++# remove dl library from $LIBS
          ++LIBS=`echo "$LIBS" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
          ++
          ++fi
          ++fi
          + ### Set up low-level terminfo dependencies for makefiles.
          +-TINFO_LIST="$SHLIB_LIST"
          ++
          ++# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
          ++# do not need libdl
          ++TICS_LIST=
          ++if test "$with_dlsym" = yes ; then
          ++
          ++# remove dl library from $SHLIB_LIST
          ++TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
          ++
          ++fi
          ++
          ++if test "$with_ticlib" != no ; then
          ++
          ++	if test "$with_ticlib" != yes ; then
          ++		TICS_NAME=$with_ticlib
          ++		TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
          ++		TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
          ++		TICS_LIB_SUFFIX="${with_ticlib}"
          ++	else
          ++		TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
          ++		TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
          ++		TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
          ++	fi
          ++	TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
          ++else
          ++	TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
          ++fi
          ++
          + if test "$with_termlib" != no ; then
          + 
          + 	if test "$with_termlib" != yes ; then
          + 		TINFO_NAME=$with_termlib
          ++		TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
          + 		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_SUFFIX=${DFT_LIB_SUFFIX}
          + 		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
          + 		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
          + 		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
          +@@ -15150,22 +15514,81 @@
          + 	else
          + 		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
          + 		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
          ++		TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
          + 		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
          + 		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
          + 	fi
          + else
          ++	# the next lines are needed for linking libtic over libncurses
          ++	TINFO_NAME=${LIB_NAME}
          ++	TINFO_SUFFIX=${DFT_LIB_SUFFIX}
          ++	TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
          ++	TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
          ++
          + 	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
          + fi
          + 
          ++if test "$DFT_LWR_MODEL" = shared ; then
          ++	case $cf_cv_system_name in #(vi
          ++	cygwin*)
          ++		# "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
          ++		TINFO_SUFFIX=.dll
          ++		;;
          ++	esac
          ++fi
          ++
          ++if test "$with_dlsym" = yes ; then
          ++
          ++# remove dl library from $TICS_LIST
          ++TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ 	]//g' -e 's/-ldl$//'`
          ++
          ++fi
          ++
          + # needed for Ada95
          + TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
          + 
          +-echo "$as_me:15163: checking where we will install curses.h" >&5
          ++case $DFT_LWR_MODEL in
          ++normal|debug|profile)
          ++
          ++if test "$GCC" = yes ; then
          ++	LDFLAGS_STATIC=-static
          ++	LDFLAGS_SHARED=-dynamic
          ++else
          ++	case $cf_cv_system_name in #(
          ++	aix[45]*) 	#( from ld manpage
          ++		LDFLAGS_STATIC=-bstatic
          ++		LDFLAGS_SHARED=-bdynamic
          ++		;;
          ++	hpux*)		#( from ld manpage for hpux10.20, hpux11.11
          ++		# We could also use just "archive" and "shared".
          ++		LDFLAGS_STATIC=-Wl,-a,archive_shared
          ++		LDFLAGS_SHARED=-Wl,-a,shared_archive
          ++		;;
          ++	irix*)		#( from ld manpage IRIX64
          ++		LDFLAGS_STATIC=-Bstatic
          ++		LDFLAGS_SHARED=-Bdynamic
          ++		;;
          ++	osf[45]*)	#( from ld manpage osf4.0d, osf5.1
          ++		# alternative "-oldstyle_liblookup" (not in cc manpage)
          ++		LDFLAGS_STATIC=-noso
          ++		LDFLAGS_SHARED=-so_archive
          ++		;;
          ++	solaris2*)
          ++		LDFLAGS_STATIC=-Bstatic
          ++		LDFLAGS_SHARED=-Bdynamic
          ++		;;
          ++	esac
          ++fi
          ++
          ++	;;
          ++esac
          ++
          ++echo "$as_me:15586: 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:15168: result: $includedir" >&5
          ++echo "$as_me:15591: result: $includedir" >&5
          + echo "${ECHO_T}$includedir" >&6
          + 
          + ### Resolve a conflict between normal and wide-curses by forcing applications
          +@@ -15173,11 +15596,14 @@
          + if test "$with_overwrite" != no ; then
          + if test "$NCURSES_LIBUTF8" = 1 ; then
          + 	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
          +-	{ echo "$as_me:15176: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
          ++	{ echo "$as_me:15599: 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
          + 
          ++# used to separate tack out of the tree
          ++NCURSES_TREE=
          ++
          + ### predefined stuff for the test programs
          + cat >>confdefs.h <<\EOF
          + #define HAVE_SLK_COLOR 1
          +@@ -15186,7 +15612,7 @@
          + ### Construct the list of subdirectories for which we'll customize makefiles
          + ### with the appropriate compile-rules.
          + 
          +-echo "$as_me:15189: checking for src modules" >&5
          ++echo "$as_me:15615: checking for src modules" >&5
          + echo $ECHO_N "checking for src modules... $ECHO_C" >&6
          + 
          + # dependencies and linker-arguments for test-programs
          +@@ -15249,7 +15675,7 @@
          + 		fi
          + 	fi
          + done
          +-echo "$as_me:15252: result: $cf_cv_src_modules" >&5
          ++echo "$as_me:15678: result: $cf_cv_src_modules" >&5
          + echo "${ECHO_T}$cf_cv_src_modules" >&6
          + 
          + TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
          +@@ -15284,6 +15710,10 @@
          + 
          + fi
          + 
          ++if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
          ++   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
          ++fi
          ++
          + DIRS_TO_MAKE="lib"
          + for cf_item in $cf_list_models
          + do
          +@@ -15391,6 +15821,79 @@
          + 	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
          + fi
          + 
          ++### If we're building with rpath, try to link non-standard libs that way too.
          ++if test "$DFT_LWR_MODEL" = "shared"; then
          ++
          ++echo "$as_me:15827: checking for updated LDFLAGS" >&5
          ++echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
          ++if test -n "$LDFLAGS" ; then
          ++echo "$as_me:15830: result: maybe" >&5
          ++echo "${ECHO_T}maybe" >&6
          ++test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
          ++
          ++echo "${as_me-configure}:15834: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
          ++
          ++test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
          ++
          ++echo "${as_me-configure}:15838: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
          ++
          ++case "$EXTRA_LDFLAGS" in #(vi
          ++-Wl,-rpath,*) #(vi
          ++    cf_rpath_hack="-Wl,-rpath,"
          ++    ;;
          ++-R\ *)
          ++    cf_rpath_hack="-R "
          ++    ;;
          ++-R*)
          ++    cf_rpath_hack="-R"
          ++    ;;
          ++*)
          ++    cf_rpath_hack=
          ++    ;;
          ++esac
          ++if test -n "$cf_rpath_hack" ; then
          ++    cf_rpath_dst=
          ++    for cf_rpath_src in $LDFLAGS
          ++    do
          ++        test -n "$verbose" && echo "	Filtering $cf_rpath_src" 1>&6
          ++
          ++echo "${as_me-configure}:15860: testing Filtering $cf_rpath_src ..." 1>&5
          ++
          ++        case $cf_rpath_src in #(vi
          ++        -L*) #(vi
          ++            if test "$cf_rpath_hack" = "-R " ; then
          ++                cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
          ++            else
          ++                cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
          ++            fi
          ++            test -n "$verbose" && echo "	...Filter $cf_rpath_tmp" 1>&6
          ++
          ++echo "${as_me-configure}:15871: testing ...Filter $cf_rpath_tmp ..." 1>&5
          ++
          ++            EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
          ++            ;;
          ++        *)
          ++            cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
          ++            ;;
          ++        esac
          ++    done
          ++    LDFLAGS=$cf_rpath_dst
          ++    test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
          ++
          ++echo "${as_me-configure}:15883: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
          ++
          ++    test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
          ++
          ++echo "${as_me-configure}:15887: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
          ++
          ++fi
          ++else
          ++echo "$as_me:15891: result: no" >&5
          ++echo "${ECHO_T}no" >&6
          ++fi
          ++
          ++fi
          ++
          + ### Define substitutions for header files to avoid name-pollution
          + 
          + if test "$cf_cv_have_tcgetattr" = yes ; then
          +@@ -15495,7 +15998,7 @@
          + : ${CONFIG_STATUS=./config.status}
          + ac_clean_files_save=$ac_clean_files
          + ac_clean_files="$ac_clean_files $CONFIG_STATUS"
          +-{ echo "$as_me:15498: creating $CONFIG_STATUS" >&5
          ++{ echo "$as_me:16001: creating $CONFIG_STATUS" >&5
          + echo "$as_me: creating $CONFIG_STATUS" >&6;}
          + cat >$CONFIG_STATUS <<_ACEOF
          + #! $SHELL
          +@@ -15671,7 +16174,7 @@
          +     echo "$ac_cs_version"; exit 0 ;;
          +   --he | --h)
          +     # Conflict between --help and --header
          +-    { { echo "$as_me:15674: error: ambiguous option: $1
          ++    { { echo "$as_me:16177: 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;}
          +@@ -15690,7 +16193,7 @@
          +     ac_need_defaults=false;;
          + 
          +   # This is an error.
          +-  -*) { { echo "$as_me:15693: error: unrecognized option: $1
          ++  -*) { { echo "$as_me:16196: 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;}
          +@@ -15747,13 +16250,19 @@
          + TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
          + TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
          + TINFO_NAME="$TINFO_NAME"
          ++TINFO_SUFFIX="$TINFO_SUFFIX"
          ++TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
          ++TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
          ++TICS_NAME="$TICS_NAME"
          + WITH_CURSES_H="$with_curses_h"
          + WITH_ECHO="$with_echo"
          + WITH_OVERWRITE="$with_overwrite"
          + cf_LIST_MODELS="$cf_list_models"
          + cf_cv_abi_version="$cf_cv_abi_version"
          ++cf_cv_do_relink="$cf_cv_do_relink"
          + cf_cv_do_symlinks="$cf_cv_do_symlinks"
          + cf_cv_enable_lp64="$cf_cv_enable_lp64"
          ++cf_cv_enable_opaque="$cf_cv_enable_opaque"
          + 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"
          +@@ -15780,7 +16289,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:15783: error: invalid argument: $ac_config_target" >&5
          ++  *) { { echo "$as_me:16292: error: invalid argument: $ac_config_target" >&5
          + echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
          +    { (exit 1); exit 1; }; };;
          +   esac
          +@@ -15928,6 +16437,7 @@
          + s,@cf_list_models@,$cf_list_models,;t t
          + s,@LIBTOOL@,$LIBTOOL,;t t
          + s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
          ++s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
          + s,@LIB_CREATE@,$LIB_CREATE,;t t
          + s,@LIB_OBJECT@,$LIB_OBJECT,;t t
          + s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
          +@@ -15939,6 +16449,7 @@
          + s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
          + s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
          + s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
          ++s,@TICS_NAME@,$TICS_NAME,;t t
          + s,@TINFO_NAME@,$TINFO_NAME,;t t
          + s,@LIB_NAME@,$LIB_NAME,;t t
          + s,@LIB_PREFIX@,$LIB_PREFIX,;t t
          +@@ -15961,6 +16472,7 @@
          + s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
          + s,@TERMINFO@,$TERMINFO,;t t
          + s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
          ++s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
          + s,@TERMPATH@,$TERMPATH,;t t
          + s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
          + s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
          +@@ -15983,6 +16495,10 @@
          + 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,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
          ++s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
          ++s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
          ++s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
          + s,@ECHO_LINK@,$ECHO_LINK,;t t
          + s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
          + s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
          +@@ -16015,14 +16531,22 @@
          + 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,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
          ++s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
          ++s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
          ++s,@TICS_ARGS@,$TICS_ARGS,;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,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
          ++s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
          + s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
          ++s,@TICS_LIST@,$TICS_LIST,;t t
          + s,@TINFO_LIST@,$TINFO_LIST,;t t
          + s,@SHLIB_LIST@,$SHLIB_LIST,;t t
          ++s,@NCURSES_TREE@,$NCURSES_TREE,;t t
          + s,@TEST_ARGS@,$TEST_ARGS,;t t
          + s,@TEST_DEPS@,$TEST_DEPS,;t t
          + s,@TEST_ARG2@,$TEST_ARG2,;t t
          +@@ -16146,7 +16670,7 @@
          +   esac
          + 
          +   if test x"$ac_file" != x-; then
          +-    { echo "$as_me:16149: creating $ac_file" >&5
          ++    { echo "$as_me:16673: creating $ac_file" >&5
          + echo "$as_me: creating $ac_file" >&6;}
          +     rm -f "$ac_file"
          +   fi
          +@@ -16164,7 +16688,7 @@
          +       -) echo $tmp/stdin ;;
          +       [\\/$]*)
          +          # Absolute (can't be DOS-style, as IFS=:)
          +-         test -f "$f" || { { echo "$as_me:16167: error: cannot find input file: $f" >&5
          ++         test -f "$f" || { { echo "$as_me:16691: error: cannot find input file: $f" >&5
          + echo "$as_me: error: cannot find input file: $f" >&2;}
          +    { (exit 1); exit 1; }; }
          +          echo $f;;
          +@@ -16177,7 +16701,7 @@
          +            echo $srcdir/$f
          +          else
          +            # /dev/null tree
          +-           { { echo "$as_me:16180: error: cannot find input file: $f" >&5
          ++           { { echo "$as_me:16704: error: cannot find input file: $f" >&5
          + echo "$as_me: error: cannot find input file: $f" >&2;}
          +    { (exit 1); exit 1; }; }
          +          fi;;
          +@@ -16243,7 +16767,7 @@
          +   * )   ac_file_in=$ac_file.in ;;
          +   esac
          + 
          +-  test x"$ac_file" != x- && { echo "$as_me:16246: creating $ac_file" >&5
          ++  test x"$ac_file" != x- && { echo "$as_me:16770: creating $ac_file" >&5
          + echo "$as_me: creating $ac_file" >&6;}
          + 
          +   # First look for the input files in the build tree, otherwise in the
          +@@ -16254,7 +16778,7 @@
          +       -) echo $tmp/stdin ;;
          +       [\\/$]*)
          +          # Absolute (can't be DOS-style, as IFS=:)
          +-         test -f "$f" || { { echo "$as_me:16257: error: cannot find input file: $f" >&5
          ++         test -f "$f" || { { echo "$as_me:16781: error: cannot find input file: $f" >&5
          + echo "$as_me: error: cannot find input file: $f" >&2;}
          +    { (exit 1); exit 1; }; }
          +          echo $f;;
          +@@ -16267,7 +16791,7 @@
          +            echo $srcdir/$f
          +          else
          +            # /dev/null tree
          +-           { { echo "$as_me:16270: error: cannot find input file: $f" >&5
          ++           { { echo "$as_me:16794: error: cannot find input file: $f" >&5
          + echo "$as_me: error: cannot find input file: $f" >&2;}
          +    { (exit 1); exit 1; }; }
          +          fi;;
          +@@ -16325,7 +16849,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:16328: $ac_file is unchanged" >&5
          ++      { echo "$as_me:16852: $ac_file is unchanged" >&5
          + echo "$as_me: $ac_file is unchanged" >&6;}
          +     else
          +       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
          +@@ -16400,7 +16924,6 @@
          + 		continue
          + 	elif test -f $srcdir/$cf_dir/modules; then
          + 
          +-		IMPORT_LIB=
          + 		SHARED_LIB=
          + 		LIBS_TO_MAKE=
          + 		for cf_item in $cf_LIST_MODELS
          +@@ -16467,9 +16990,7 @@
          + 			# use autodetected ${cf_prefix} for import lib and static lib, but
          + 			# use 'cyg' prefix for shared lib.
          + 			if test $cf_cv_shlib_version = cygdll ; then
          +-				SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
          +-				IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
          +-				LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
          ++				LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
          + 				continue
          + 			fi
          + 			fi
          +@@ -16478,17 +16999,34 @@
          + 
          + 		if test $cf_dir = ncurses ; then
          + 			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}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
          +-				LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
          +-			fi
          ++			cf_r_parts="$cf_subsets"
          ++
          ++			while test -n "$cf_r_parts"
          ++			do
          ++				cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
          ++				cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
          ++				if test "$cf_l_parts" != "$cf_r_parts" ; then
          ++					case $cf_l_parts in #(vi
          ++					*termlib*) #(vi
          ++						cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
          ++						;;
          ++					*ticlib*)
          ++						cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
          ++						;;
          ++					*)
          ++						break
          ++						;;
          ++					esac
          ++					LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
          ++				else
          ++					break
          ++				fi
          ++			done
          + 		else
          + 			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
          + 		fi
          + 
          + 		sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
          +-		    -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
          + 		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
          + 			$cf_dir/Makefile >$cf_dir/Makefile.out
          + 		mv $cf_dir/Makefile.out $cf_dir/Makefile
          +@@ -16546,13 +17084,20 @@
          + 				case $cf_subset in
          + 				*base*)
          + 					;;
          +-				termlib*)
          ++				*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
          +-				;;
          ++					;;
          ++				ticlib*)
          ++					cf_libname=$TICS_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
          + 
          +@@ -16593,8 +17138,11 @@
          + 				prefix=$cf_prefix \
          + 				suffix=$cf_suffix \
          + 				subset=$cf_subset \
          ++				TermlibRoot=$TINFO_NAME \
          ++				TermlibSuffix=$TINFO_SUFFIX \
          + 				ShlibVer=$cf_cv_shlib_version \
          + 				ShlibVerInfix=$cf_cv_shlib_version_infix \
          ++				ReLink=${cf_cv_do_relink-no} \
          + 				DoLinks=$cf_cv_do_symlinks \
          + 				rmSoLocs=$cf_cv_rm_so_locs \
          + 				ldconfig="$LDCONFIG" \
          +@@ -16681,8 +17229,8 @@
          + 
          + cat >> Makefile <>$cf_dir/Makefile <>$cf_dir/Makefile
          +-			j=$i
          +-		done
          +-
          +-		echo "		$j" >>$cf_dir/Makefile
          +-
          +-		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
          +-		do
          +-			echo "	@ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile
          +-			test $i = curses.h && test $WITH_CURSES_H = yes && echo "	@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h && \${LN_S} curses.h ncurses.h)" >>$cf_dir/Makefile
          +-		done
          +-
          +-	cat >>$cf_dir/Makefile <>$cf_dir/Makefile
          +-			test $i = curses.h && echo "	-@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile
          +-		done
          ++		$AWK -f $srcdir/mk-hdr.awk \
          ++			subset="$LIB_SUBSETS" \
          ++			compat="$WITH_CURSES_H" \
          ++			$srcdir/$cf_dir/headers >>$cf_dir/Makefile
          + 	fi
          + 
          + 	if test -f $srcdir/$cf_dir/modules; then
          +Index: configure.in
          +Prereq:  1.383 
          +--- ncurses-5.6/configure.in	2006-12-17 01:26:06.000000000 +0000
          ++++ ncurses-5.6-20071201/configure.in	2007-11-24 22:42:43.000000000 +0000
          +@@ -1,5 +1,5 @@
          + dnl***************************************************************************
          +-dnl Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
          ++dnl Copyright (c) 1998-2006,2007 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.383 2006/12/17 01:26:06 tom Exp $
          ++dnl $Id: configure.in,v 1.429 2007/11/24 22:42:43 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.383 $)
          ++AC_REVISION($Revision: 1.429 $)
          + AC_INIT(ncurses/base/lib_initscr.c)
          + AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
          + 
          +@@ -150,13 +150,28 @@
          + CF_PROG_LINT
          + AC_PROG_LN_S
          + 
          ++AC_SYS_LONG_FILE_NAMES
          ++
          ++AC_MSG_CHECKING(if we should assume mixed-case filenames)
          ++AC_ARG_ENABLE(mixed-case,
          ++	[  --enable-mixed-case     tic should assume mixed-case filenames],
          ++	[enable_mixedcase=$enableval],
          ++	[enable_mixedcase=auto])
          ++AC_MSG_RESULT($enable_mixedcase)
          ++if test "$enable_mixedcase" = "auto" ; then
          ++    CF_MIXEDCASE_FILENAMES
          ++else
          ++    cf_cv_mixedcase=$enable_mixedcase
          ++    if test "$enable_mixedcase" = "yes" ; then
          ++        AC_DEFINE(MIXEDCASE_FILENAMES)
          ++    fi
          ++fi
          ++
          ++# do this after mixed-case option (tags/TAGS is not as important as tic).
          + AC_PROG_MAKE_SET
          + CF_MAKE_TAGS
          + CF_MAKEFLAGS
          + 
          +-AC_SYS_LONG_FILE_NAMES
          +-CF_MIXEDCASE_FILENAMES
          +-
          + dnl These are standard among *NIX systems, but not when cross-compiling
          + AC_CHECK_TOOL(RANLIB, ranlib, ':')
          + AC_CHECK_TOOL(LD, ld, ld)
          +@@ -255,6 +270,9 @@
          + AC_SUBST(DFT_LWR_MODEL)dnl	the default model ("normal")
          + AC_SUBST(DFT_UPR_MODEL)dnl	the default model ("NORMAL")
          + 
          ++TICS_NAME=tic
          ++AC_SUBST(TICS_NAME)
          ++
          + TINFO_NAME=tinfo
          + AC_SUBST(TINFO_NAME)
          + 
          +@@ -280,6 +298,13 @@
          + 	[with_termlib=no])
          + AC_MSG_RESULT($with_termlib)
          + 
          ++AC_MSG_CHECKING(if you want to build a separate tic library)
          ++AC_ARG_WITH(ticlib,
          ++	[  --with-ticlib           generate separate tic library],
          ++	[with_ticlib=$withval],
          ++	[with_ticlib=no])
          ++AC_MSG_RESULT($with_ticlib)
          ++
          + ### Checks for special libraries, must be done up-front.
          + SHLIB_LIST=""
          + CF_WITH_GPM
          +@@ -304,9 +329,7 @@
          + 		SHLIB_LIST="-lgpm $SHLIB_LIST"
          + 	fi
          + 	AC_DEFINE(HAVE_LIBGPM)
          +-	AC_CHECK_LIB(gpm,Gpm_Wgetch,[
          +-		AC_MSG_WARN(GPM library is already linked with curses - read the FAQ)
          +-	])
          ++	CF_CHECK_GPM_WGETCH
          + fi
          + 
          + CF_WITH_SYSMOUSE
          +@@ -336,12 +359,22 @@
          + AC_SUBST(LD_MODEL)dnl		the type of link (e.g., -g or -pg)
          + AC_MSG_RESULT($LD_MODEL)
          + 
          ++case $DFT_LWR_MODEL in
          ++shared)
          + AC_MSG_CHECKING(if rpath option should be used)
          + AC_ARG_ENABLE(rpath,
          + [  --enable-rpath          use rpath option when generating shared libraries],
          + [cf_cv_ld_rpath=$enableval],
          + [cf_cv_ld_rpath=no])
          + AC_MSG_RESULT($cf_cv_ld_rpath)
          ++AC_MSG_CHECKING(if shared libraries should be relinked during install)
          ++AC_ARG_ENABLE(relink,
          ++[  --disable-relink        relink shared libraries during install],
          ++[cf_cv_do_relink=$enableval],
          ++[cf_cv_do_relink=yes])
          ++AC_MSG_RESULT($cf_cv_do_relink)
          ++	;;
          ++esac
          + 
          + CF_SHARED_OPTS
          + if test "$CC_SHARED_OPTS" = "unknown"; then
          +@@ -470,6 +503,19 @@
          + AC_MSG_RESULT($with_big_core)
          + test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE)
          + 
          ++### ISO C only guarantees 512-char strings, we have tables which load faster
          ++### when constructed using "big" strings.
          ++AC_MSG_CHECKING(if big-strings option selected)
          ++AC_ARG_ENABLE(big-strings,
          ++	[  --disable-big-strings   assume compiler has only standard-size strings],
          ++	[with_big_strings=no],
          ++	[with_big_strings=yes])
          ++AC_MSG_RESULT($with_big_strings)
          ++
          ++USE_BIG_STRINGS=0
          ++test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
          ++AC_SUBST(USE_BIG_STRINGS)
          ++
          + ###	use option --enable-termcap to compile in the termcap fallback support
          + AC_MSG_CHECKING(if you want termcap-fallback support)
          + AC_ARG_ENABLE(termcap,
          +@@ -487,6 +533,10 @@
          + 	AC_DEFINE(PURE_TERMINFO)
          + else
          + 
          ++if test "$with_ticlib" != no ; then
          ++	AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined)
          ++fi
          ++
          + AC_DEFINE(USE_TERMCAP)
          + AC_MSG_CHECKING(for list of termcap files)
          + CF_WITH_PATHLIST(termpath,
          +@@ -683,7 +733,7 @@
          + 
          + CF_LARGEFILE
          + 
          +-###   use option --disable-tparm-varargs to make tparm() conform to X/Open 
          ++###   use option --disable-tparm-varargs to make tparm() conform to X/Open
          + AC_MSG_CHECKING(if you want tparm not to use X/Open fixed-parameter list)
          + AC_ARG_ENABLE(tparm-varargs,
          + 	[  --disable-tparm-varargs compile tparm() without varargs interface],
          +@@ -802,7 +852,7 @@
          + fi
          + AC_MSG_CHECKING(if you want to use signed Boolean array in term.h)
          + AC_ARG_ENABLE(signed-char,
          +-	[  --enable-signed-char    compile with SIGWINCH handler],
          ++	[  --enable-signed-char    compile using signed Boolean's in term.h],
          + 	[with_signed_char=$enableval],
          + 	[with_signed_char=no])
          + AC_MSG_RESULT($with_signed_char)
          +@@ -895,7 +945,7 @@
          + 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)
          ++		AC_MSG_ERROR(This option applies only to wide-character library)
          + 	else
          + 		# cannot be ABI 5 since it changes sizeof(cchar_t)
          + 		CF_NCURSES_ABI_6
          +@@ -919,6 +969,33 @@
          + fi
          + AC_SUBST(NCURSES_MOUSE_VERSION)
          + 
          ++# Reentrant code has to be opaque; there's little advantage to making ncurses
          ++# opaque outside of that, so there is no --enable-opaque option.
          ++AC_MSG_CHECKING(if you want experimental reentrant code)
          ++AC_ARG_ENABLE(reentrant,
          ++	[  --enable-reentrant      compile with experimental reentrant code],
          ++	[with_reentrant=$enableval],
          ++	[with_reentrant=no])
          ++AC_MSG_RESULT($with_reentrant)
          ++if test "$with_reentrant" = yes ; then
          ++	cf_cv_enable_reentrant=1
          ++	cf_cv_enable_opaque="NCURSES_INTERNALS"
          ++	NCURSES_OPAQUE=1
          ++	NCURSES_SIZE_T=int
          ++	LIB_SUFFIX="t${LIB_SUFFIX}"
          ++	AC_DEFINE(USE_REENTRANT)
          ++	CF_NCURSES_ABI_6
          ++else
          ++	cf_cv_enable_reentrant=0
          ++	cf_cv_enable_opaque="NCURSES_OPAQUE"
          ++	NCURSES_OPAQUE=0
          ++	NCURSES_SIZE_T=short
          ++fi
          ++AC_SUBST(cf_cv_enable_reentrant)
          ++AC_SUBST(cf_cv_enable_opaque)
          ++AC_SUBST(NCURSES_OPAQUE)
          ++AC_SUBST(NCURSES_SIZE_T)
          ++
          + AC_MSG_CHECKING(if you want experimental safe-sprintf code)
          + AC_ARG_ENABLE(safe-sprintf,
          + 	[  --enable-safe-sprintf   compile with experimental safe-sprintf code],
          +@@ -961,6 +1038,7 @@
          + else
          + 	ECHO_LINK='@ echo linking $@ ... ;'
          + 	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
          ++	test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
          + fi
          + AC_MSG_RESULT($with_echo)
          + AC_SUBST(ECHO_LINK)
          +@@ -972,9 +1050,9 @@
          + 	[with_warnings=$enableval])
          + AC_MSG_RESULT($with_warnings)
          + 
          +-if test -n "$with_warnings"; then
          ++if test "x$with_warnings" = "xyes"; then
          +  	ADAFLAGS="$ADAFLAGS -gnatg"
          +-	CF_GCC_WARNINGS
          ++	CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
          + 	if test "$cf_with_cxx" = yes ; then
          + 		CF_GXX_WARNINGS(Wno-unused)
          + 	fi
          +@@ -1088,26 +1166,21 @@
          + ###	checks for compiler characteristics
          + AC_LANG_C
          + AC_C_CONST
          +-AC_C_INLINE
          +-
          +-NCURSES_INLINE=
          +-if test "$ac_cv_c_inline" != no ; then
          +-	AC_DEFINE(CC_HAS_INLINE_FUNCS)
          +-	NCURSES_INLINE=inline
          +-fi
          +-AC_SUBST(NCURSES_INLINE)
          ++CF_C_INLINE(NCURSES_INLINE,1200)
          ++CF_SIG_ATOMIC_T
          + 
          + if test $NCURSES_CHTYPE = auto ; then
          + 	CF_TYPEOF_CHTYPE
          + else
          + 	cf_cv_typeof_chtype=$NCURSES_CHTYPE
          + fi
          ++test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
          + AC_SUBST(cf_cv_typeof_chtype)
          + 
          + CF_UNSIGNED_LITERALS
          + cf_cv_1UL="1"
          +-test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
          +-test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
          ++test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
          ++test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
          + AC_SUBST(cf_cv_1UL)
          + 
          + if test $NCURSES_MMASK_T = auto ; then
          +@@ -1115,6 +1188,7 @@
          + else
          + 	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
          + fi
          ++test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
          + AC_SUBST(cf_cv_typeof_mmask_t)
          + 
          + ###	Checks for external-data
          +@@ -1170,7 +1244,7 @@
          + 
          + if test "$with_hashed_db" != no ; then
          + 	AC_DEFINE(USE_HASHED_DB)
          +-	CF_HASHED_DB
          ++	CF_HASHED_DB($with_hashed_db)
          + fi
          + 
          + dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
          +@@ -1200,14 +1274,13 @@
          + 		;;
          + 	esac
          + 
          +-	AC_CHECK_HEADERS(typeinfo)
          ++	AC_CHECK_HEADERS(iostream typeinfo)
          + 
          + 	CF_BOOL_DECL
          + 	CF_BOOL_SIZE
          + 	CF_ETIP_DEFINES
          + 	CF_CPP_PARAM_INIT
          + 	CF_CPP_STATIC_CAST
          +-	CF_CPP_VSCAN_FUNC
          + 
          + 	CXX_AR='$(AR)'
          + 	CXX_AR_OPTS='$(AR_OPTS)'
          +@@ -1284,9 +1357,22 @@
          + 
          + CF_HELP_MESSAGE(Ada95 Binding Options:)
          + 
          ++dnl If the Ada95 source-tree is present, add that to the build unless it will
          ++dnl not work, or was not requested.
          ++if test -f "${srcdir}/Ada95/Makefile.in" ; then
          ++
          ++dnl libtool does not know anything about GNAT, though a change made in 1998
          ++dnl provided for it "someday".  Disable the ada subtree if we are using
          ++dnl libtool -TD 20070714
          ++if test "$cf_with_ada" != "no" ; then
          ++    if test "$with_libtool" != "no"; then
          ++	AC_MSG_WARN(libtool does not support Ada - disabling feature)
          ++	cf_with_ada=no
          ++    fi
          ++fi
          ++
          + dnl Check for availability of GNU Ada Translator (GNAT).
          + dnl At the moment we support no other Ada95 compiler.
          +-if test -f "${srcdir}/Ada95/Makefile.in" ; then
          + if test "$cf_with_ada" != "no" ; then
          + cf_ada_make=gnatmake
          + AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
          +@@ -1369,22 +1455,44 @@
          + 
          + fi
          + fi
          ++else
          ++   cf_with_ada=no
          + fi
          + 
          +-### Construct the library-subsets, if any, from this set of keywords:
          +-### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
          ++### Construct the ncurses library-subsets, if any, from this set of keywords:
          ++###	none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
          ++###
          ++### ticlib modules may be a separate library, otherwise contained in termlib.
          ++### termlib modules may be a separate library, otherwise contained in ncurses.
          ++###
          ++### The of "+" or " " between the tokens controls the way the script
          ++### chooses to split module lists into libraries.
          ++###
          ++### (see CF_LIB_RULES).
          + AC_MSG_CHECKING(for library subsets)
          ++LIB_SUBSETS=
          ++
          ++if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
          ++	LIB_SUBSETS="${LIB_SUBSETS}ticlib"
          ++	if test "$with_ticlib" != no ; then
          ++		LIB_SUBSETS="${LIB_SUBSETS} "
          ++	else
          ++		LIB_SUBSETS="${LIB_SUBSETS}+"
          ++	fi
          ++fi
          ++
          ++LIB_SUBSETS="${LIB_SUBSETS}termlib"
          ++test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
          + if test "$with_termlib" != no ; then
          +-	LIB_SUBSETS="termlib"
          +-	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
          + 	LIB_SUBSETS="${LIB_SUBSETS} "
          + else
          +-	LIB_SUBSETS="termlib+"
          +-	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
          ++	LIB_SUBSETS="${LIB_SUBSETS}+"
          + fi
          ++
          + 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"
          ++
          + AC_MSG_RESULT($LIB_SUBSETS)
          + 
          + ### Construct the list of include-directories to be generated
          +@@ -1399,10 +1507,12 @@
          + 
          + AC_MSG_CHECKING(default library-dependency suffix)
          + CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
          ++DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
          + if test $DFT_LWR_MODEL = shared ; then
          + 	case $cf_cv_system_name in #(vi
          + 	cygwin*)
          + 		DFT_DEP_SUFFIX=".dll.a"
          ++		DFT_LIB_SUFFIX=".dll"
          + 		;;
          + 	esac
          + fi
          +@@ -1426,16 +1536,53 @@
          + AC_SUBST(CXX_LIB_SUFFIX)
          + fi
          + 
          ++# do not want -ldl in build except as needed for -lncurses dependency
          ++if test "$with_dlsym" = yes ; then
          ++if test $DFT_LWR_MODEL = shared || \
          ++   test $DFT_LWR_MODEL = libtool ; then
          ++	CF_REMOVE_LIB(LIBS,$LIBS,dl)
          ++fi
          ++fi
          + ### Set up low-level terminfo dependencies for makefiles.
          +-TINFO_LIST="$SHLIB_LIST"
          ++
          ++# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
          ++# do not need libdl
          ++TICS_LIST=
          ++if test "$with_dlsym" = yes ; then
          ++	CF_REMOVE_LIB(TINFO_LIST,$SHLIB_LIST,dl)
          ++fi
          ++
          ++if test "$with_ticlib" != no ; then
          ++
          ++	if test "$with_ticlib" != yes ; then
          ++		TICS_NAME=$with_ticlib
          ++		TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
          ++		TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
          ++		TICS_LIB_SUFFIX="${with_ticlib}"
          ++	else
          ++		TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
          ++		TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
          ++		TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
          ++	fi
          ++	TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
          ++else
          ++	TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
          ++fi
          ++AC_SUBST(TICS_ARG_SUFFIX)
          ++AC_SUBST(TICS_DEP_SUFFIX)
          ++AC_SUBST(TICS_LIB_SUFFIX)
          ++AC_SUBST(TICS_ARGS)
          ++
          + if test "$with_termlib" != no ; then
          + 
          + 	if test "$with_termlib" != yes ; then
          + 		TINFO_NAME=$with_termlib
          ++		TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
          + 		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_SUFFIX=${DFT_LIB_SUFFIX}
          + 		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
          + 		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
          + 		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
          +@@ -1450,21 +1597,48 @@
          + 	else
          + 		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
          + 		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
          ++		TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
          + 		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
          + 		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
          + 	fi
          + else
          ++	# the next lines are needed for linking libtic over libncurses
          ++	TINFO_NAME=${LIB_NAME}
          ++	TINFO_SUFFIX=${DFT_LIB_SUFFIX}
          ++	TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
          ++	TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
          ++
          + 	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
          + fi
          ++
          ++if test "$DFT_LWR_MODEL" = shared ; then
          ++	case $cf_cv_system_name in #(vi
          ++	cygwin*)
          ++		# "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
          ++		TINFO_SUFFIX=.dll
          ++		;;
          ++	esac
          ++fi
          ++
          + AC_SUBST(TINFO_ARG_SUFFIX)
          + AC_SUBST(TINFO_DEP_SUFFIX)
          + AC_SUBST(TINFO_LIB_SUFFIX)
          + AC_SUBST(TINFO_ARGS)
          + 
          ++if test "$with_dlsym" = yes ; then
          ++	CF_REMOVE_LIB(TICS_LIST,$TICS_LIST,dl)
          ++fi
          ++
          + # needed for Ada95
          + TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
          + AC_SUBST(TINFO_ARGS2)
          + 
          ++case $DFT_LWR_MODEL in
          ++normal|debug|profile)
          ++	CF_LDFLAGS_STATIC
          ++	;;
          ++esac
          ++
          + AC_MSG_CHECKING(where we will install curses.h)
          + test "$with_overwrite" = no && \
          + test "x$includedir" = 'x${prefix}/include' && \
          +@@ -1481,9 +1655,14 @@
          + fi
          + 
          + AC_SUBST(WITH_OVERWRITE)
          ++AC_SUBST(TICS_LIST)
          + AC_SUBST(TINFO_LIST)
          + AC_SUBST(SHLIB_LIST)
          + 
          ++# used to separate tack out of the tree
          ++NCURSES_TREE=
          ++AC_SUBST(NCURSES_TREE)
          ++
          + ### predefined stuff for the test programs
          + AC_DEFINE(HAVE_SLK_COLOR)
          + 
          +@@ -1491,6 +1670,11 @@
          + ### with the appropriate compile-rules.
          + 
          + CF_SRC_MODULES($modules_to_build)
          ++
          ++if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
          ++   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
          ++fi
          ++
          + CF_DIRS_TO_MAKE
          + 
          + AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
          +@@ -1500,6 +1684,11 @@
          + ### Now that we're done running tests, add the compiler-warnings, if any
          + CF_ADD_CFLAGS($EXTRA_CFLAGS)
          + 
          ++### If we're building with rpath, try to link non-standard libs that way too.
          ++if test "$DFT_LWR_MODEL" = "shared"; then
          ++  CF_RPATH_HACK
          ++fi
          ++
          + ### Define substitutions for header files to avoid name-pollution
          + CF_SUBST_IF(["$cf_cv_have_tcgetattr" = yes], HAVE_TCGETATTR, 1, 0)
          + CF_SUBST_IF(["$ac_cv_header_termio_h" = yes], HAVE_TERMIO_H, 1, 0)
          +@@ -1540,13 +1729,19 @@
          + TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
          + TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
          + TINFO_NAME="$TINFO_NAME"
          ++TINFO_SUFFIX="$TINFO_SUFFIX"
          ++TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
          ++TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
          ++TICS_NAME="$TICS_NAME"
          + WITH_CURSES_H="$with_curses_h"
          + WITH_ECHO="$with_echo"
          + WITH_OVERWRITE="$with_overwrite"
          + cf_LIST_MODELS="$cf_list_models"
          + cf_cv_abi_version="$cf_cv_abi_version"
          ++cf_cv_do_relink="$cf_cv_do_relink"
          + cf_cv_do_symlinks="$cf_cv_do_symlinks"
          + cf_cv_enable_lp64="$cf_cv_enable_lp64"
          ++cf_cv_enable_opaque="$cf_cv_enable_opaque"
          + 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"
          +Index: dist.mk
          +Prereq:  1.567 
          +--- ncurses-5.6/dist.mk	2006-12-17 19:58:35.000000000 +0000
          ++++ ncurses-5.6-20071201/dist.mk	2007-12-01 16:08:01.000000000 +0000
          +@@ -1,5 +1,5 @@
          + ##############################################################################
          +-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
          ++# Copyright (c) 1998-2006,2007 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"), #
          +@@ -25,7 +25,7 @@
          + # use or other dealings in this Software without prior written               #
          + # authorization.                                                             #
          + ##############################################################################
          +-# $Id: dist.mk,v 1.567 2006/12/17 19:58:35 tom Exp $
          ++# $Id: dist.mk,v 1.618 2007/12/01 16:08:01 tom Exp $
          + # Makefile for creating ncurses distributions.
          + #
          + # This only needs to be used directly as a makefile by developers, but
          +@@ -37,7 +37,7 @@
          + # These define the major/minor/patch versions of ncurses.
          + NCURSES_MAJOR = 5
          + NCURSES_MINOR = 6
          +-NCURSES_PATCH = 20061217
          ++NCURSES_PATCH = 20071201
          + 
          + # We don't append the patch to the version, since this only applies to releases
          + VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
          +@@ -106,6 +106,7 @@
          + 	   fi ;\
          + 	done
          + 	# change some things to make weblint happy:
          ++	@cat man_alias.sed           >> subst.tmp
          + 	@echo 's///g'     >> subst.tmp
          + 	@echo 's/<\/B>/<\/STRONG>/g' >> subst.tmp
          + 	@echo 's///g'         >> subst.tmp
          +Index: doc/hackguide.doc
          +--- ncurses-5.6/doc/hackguide.doc	2005-12-24 15:44:52.000000000 +0000
          ++++ ncurses-5.6-20071201/doc/hackguide.doc	2007-03-03 23:45:04.000000000 +0000
          +@@ -261,7 +261,7 @@
          +      lib_tracedmp.c lib_tracemse.c trace_buf.c
          + 
          +    It  is  rather unlikely you will ever need to change these, unless you
          +-   want to introduce a new debug trace level for some reasoon.
          ++   want to introduce a new debug trace level for some reason.
          + 
          +    There  is  another  group  of  files  that  do direct I/O via tputs(),
          +    computations  on  the  terminal  capabilities,  or  queries  to the OS
          +Index: doc/html/ada/funcs/A.htm
          +--- ncurses-5.6/doc/html/ada/funcs/A.htm	2005-05-14 17:34:32.000000000 +0000
          ++++ ncurses-5.6-20071201/doc/html/ada/funcs/A.htm	2007-09-01 23:56:30.000000000 +0000
          +@@ -4,6 +4,21 @@
          + 

          Functions - A

          + [index] + +Index: doc/html/ada/funcs/B.htm +--- ncurses-5.6/doc/html/ada/funcs/B.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/B.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,8 +4,18 @@ +

          Functions - B

          + [index] + +Index: doc/html/ada/funcs/C.htm +--- ncurses-5.6/doc/html/ada/funcs/C.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/C.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,24 +4,53 @@ +

          Functions - C

          + [index] + +Index: doc/html/ada/funcs/D.htm +--- ncurses-5.6/doc/html/ada/funcs/D.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/D.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,19 +4,44 @@ +

          Functions - D

          + [index] + +Index: doc/html/ada/funcs/E.htm +--- ncurses-5.6/doc/html/ada/funcs/E.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/E.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,7 +4,15 @@ +

          Functions - E

          + [index] + +Index: doc/html/ada/funcs/F.htm +--- ncurses-5.6/doc/html/ada/funcs/F.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/F.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,10 +4,13 @@ +

          Functions - F

          + [index] + +Index: doc/html/ada/funcs/G.htm +--- ncurses-5.6/doc/html/ada/funcs/G.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/G.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -8,26 +8,89 @@ +
        • Generic_Field_Check +
        • Generic_Next +
        • Generic_Prev ++
        • Get - terminal_interface-curses.ads:1463 ++
        • Get - terminal_interface-curses.ads:1474 ++
        • GetBegX ++
        • GetBegY ++
        • GetCurX ++
        • GetCurY ++
        • GetMaxX ++
        • GetMaxY +
        • Getmouse ++
        • GetParX ++
        • GetParY +
        • getwin +
        • Get_Arg ++
        • Get_Background ++
        • Get_Buffer - terminal_interface-curses-forms.ads:362 ++
        • Get_Buffer - terminal_interface-curses-forms.ads:368 ++
        • Get_Character_Attribute - terminal_interface-curses.ads:826 ++
        • Get_Character_Attribute - terminal_interface-curses.ads:832 ++
        • Get_Cursor_Position +
        • Get_Entry ++
        • Get_Event +
        • Get_Fieldindex +
        • Get_Fieldtype ++
        • Get_Field_Init_Hook ++
        • Get_Field_Term_Hook +
        • Get_Flag - terminal_interface-curses-termcap.ads:63 +
        • Get_Flag - terminal_interface-curses-terminfo.ads:64 +-
        • Get_Flag - terminal_interface-curses.adb:93 ++
        • Get_Form_Init_Hook ++
        • Get_Form_Term_Hook ++
        • Get_Index - terminal_interface-curses-forms.ads:745 ++
        • Get_Index - terminal_interface-curses-menus.ads:310 +
        • Get_Itemindex ++
        • Get_Item_Init_Hook ++
        • Get_Item_Term_Hook ++
        • Get_Justification ++
        • Get_KeyPad_Mode ++
        • Get_Keystroke ++
        • Get_Menu_Init_Hook +
        • Get_Menu_Mark - terminal_interface-curses-menus.adb:532 +
        • Get_Menu_Mark - terminal_interface-curses-menus.adb:540 ++
        • Get_Menu_Term_Hook ++
        • Get_Mouse +
        • Get_Number - terminal_interface-curses-termcap.ads:67 +
        • Get_Number - terminal_interface-curses-terminfo.ads:68 ++
        • Get_Options - terminal_interface-curses-forms.ads:411 ++
        • Get_Options - terminal_interface-curses-forms.ads:416 ++
        • Get_Options - terminal_interface-curses-forms.ads:658 ++
        • Get_Options - terminal_interface-curses-forms.ads:663 ++
        • Get_Options - terminal_interface-curses-menus.ads:251 ++
        • Get_Options - terminal_interface-curses-menus.ads:256 ++
        • Get_Options - terminal_interface-curses-menus.ads:347 ++
        • Get_Options - terminal_interface-curses-menus.ads:352 ++
        • Get_Origin_Relative_To_Parent +
        • Get_Page +
        • Get_Pattern ++
        • Get_Size ++
        • Get_Soft_Label_Key - terminal_interface-curses.ads:1522 ++
        • Get_Soft_Label_Key - terminal_interface-curses.ads:1527 ++
        • Get_Soft_Label_Key_Attributes - terminal_interface-curses.ads:1563 ++
        • Get_Soft_Label_Key_Attributes - terminal_interface-curses.ads:1567 +
        • Get_Spacing +
        • Get_String - terminal_interface-curses-termcap.ads:73 +
        • Get_String - terminal_interface-curses-termcap.ads:76 +
        • Get_String - terminal_interface-curses-terminfo.ads:57 ++
        • Get_Sub_Window - terminal_interface-curses-forms.ads:522 ++
        • Get_Sub_Window - terminal_interface-curses-menus.ads:378 ++
        • Get_Type ++
        • Get_User_Data - terminal_interface-curses-forms-field_user_data.ads:59 ++
        • Get_User_Data - terminal_interface-curses-forms-field_user_data.ads:64 ++
        • Get_User_Data - terminal_interface-curses-forms-form_user_data.ads:59 ++
        • Get_User_Data - terminal_interface-curses-forms-form_user_data.ads:64 ++
        • Get_User_Data - terminal_interface-curses-menus-item_user_data.ads:64 ++
        • Get_User_Data - terminal_interface-curses-menus-item_user_data.ads:69 ++
        • Get_User_Data - terminal_interface-curses-menus-menu_user_data.ads:59 ++
        • Get_User_Data - terminal_interface-curses-menus-menu_user_data.ads:64 ++
        • Get_User_Data - terminal_interface-curses-panels-user_data.ads:59 ++
        • Get_User_Data - terminal_interface-curses-panels-user_data.ads:64 ++
        • Get_Window - terminal_interface-curses-forms.ads:511 ++
        • Get_Window - terminal_interface-curses-menus.ads:367 ++
        • Get_Window - terminal_interface-curses-panels.ads:102 +
        • Get_Window - terminal_interface-curses-putwin.ads:48 +
        • Get_Window - terminal_interface-curses-text_io.ads:62 ++
        • Get_Window_Position ++
        • Grey - terminal_interface-curses-menus.ads:471 ++
        • Grey - terminal_interface-curses-menus.ads:476 +
        +Index: doc/html/ada/funcs/H.htm +--- ncurses-5.6/doc/html/ada/funcs/H.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/H.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,11 +4,19 @@ +

        Functions - H

        + [index] + +Index: doc/html/ada/funcs/I.htm +--- ncurses-5.6/doc/html/ada/funcs/I.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/I.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,19 +4,42 @@ +

        Functions - I

        + [index] +
          +-
        • IDC_Ok +-
        • IDL_Ok +-
        • Immedok +-
        • Initcolor +-
        • Initpair +-
        • Initscr +-
        • Intrflush +-
        • Isendwin ++
        • IDC_Ok ++
        • IDL_Ok ++
        • Immediate_Update_Mode ++
        • Immedok ++
        • Info ++
        • Initcolor ++
        • Initpair ++
        • Initscr ++
        • Init_Color ++
        • Init_Pair ++
        • Init_Screen ++
        • Init_Soft_Label_Keys ++
        • Init_Windows ++
        • Insert - terminal_interface-curses.ads:1371 ++
        • Insert - terminal_interface-curses.ads:1377 ++
        • Insert - terminal_interface-curses.ads:1389 ++
        • Insert - terminal_interface-curses.ads:1398 ++
        • Insert_Delete_Lines ++
        • Insert_Line ++
        • Intrflush ++
        • Isendwin ++
        • Is_End_Window ++
        • Is_Function_Key ++
        • Is_Hidden ++
        • Is_Keypad +
        • Is_MinusOne_Pointer +
        • Is_New ++
        • Is_New_Page ++
        • Is_Scroll_Ok ++
        • Is_Touched - terminal_interface-curses.ads:1160 ++
        • Is_Touched - terminal_interface-curses.ads:1165 +
        • Itemname - terminal_interface-curses-menus.adb:128 +
        • Itemname - terminal_interface-curses-menus.adb:253 +
        • Itemname - terminal_interface-curses-menus.adb:261 ++
        • Items ++
        • Item_Count +
        • Item_Init +
        • Item_Opts +
        • Item_Opts_Off +Index: doc/html/ada/funcs/K.htm +--- ncurses-5.6/doc/html/ada/funcs/K.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/K.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,8 +4,11 @@ +

          Functions - K

          + [index] + +Index: doc/html/ada/funcs/L.htm +--- ncurses-5.6/doc/html/ada/funcs/L.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/L.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,12 +4,17 @@ +

          Functions - L

          + [index] + +Index: doc/html/ada/funcs/M.htm +--- ncurses-5.6/doc/html/ada/funcs/M.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/M.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,6 +4,9 @@ +

          Functions - M

          + [index] +
            ++
          • Make_Arg ++
          • Mark - terminal_interface-curses-menus.ads:409 ++
          • Mark - terminal_interface-curses-menus.ads:413 +
          • Menu_Back - terminal_interface-curses-menus.adb:608 +
          • Menu_Back - terminal_interface-curses-menus.adb:618 +
          • Menu_Fmt +@@ -20,19 +23,25 @@ +
          • Menu_Term +
          • Menu_Userptr +
          • Menu_Win +-
          • Meta ++
          • Meta +
          • MMask +
          • Mouseinterval +
          • Mouse_Avail ++
          • Mouse_Interval ++
          • Move - terminal_interface-curses-forms.ads:612 ++
          • Move - terminal_interface-curses-panels.ads:117 +
          • Move - terminal_interface-curses-forms.adb:786 +
          • Move - terminal_interface-curses-panels.adb:132 +-
          • Mvderwin +-
          • mvwaddch +-
          • Mvwdelch +-
          • Mvwin +-
          • Mvwinch +-
          • Mvwinsch +-
          • Mvwinsnstr ++
          • Move_Cursor ++
          • Move_Derived_Window ++
          • Move_Window ++
          • Mvderwin ++
          • mvwaddch ++
          • Mvwdelch ++
          • Mvwin ++
          • Mvwinch ++
          • Mvwinsch ++
          • Mvwinsnstr +
          • M_Post - terminal_interface-curses-forms.adb:916 +
          • M_Post - terminal_interface-curses-menus.adb:354 +
          • M_Scale - terminal_interface-curses-forms.adb:643 +Index: doc/html/ada/funcs/N.htm +--- ncurses-5.6/doc/html/ada/funcs/N.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/N.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,24 +4,32 @@ +

            Functions - N

            + [index] + +Index: doc/html/ada/funcs/O.htm +--- ncurses-5.6/doc/html/ada/funcs/O.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/O.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -5,6 +5,8 @@ + [index] + +Index: doc/html/ada/funcs/P.htm +--- ncurses-5.6/doc/html/ada/funcs/P.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/P.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,17 +4,33 @@ +

            Functions - P

            + [index] +
              ++
            • Pad_Character - terminal_interface-curses-forms.ads:472 ++
            • Pad_Character - terminal_interface-curses-menus.ads:490 ++
            • Page +
            • Page_Length - terminal_interface-curses-text_io.ads:80 +
            • Page_Length - terminal_interface-curses-text_io.ads:81 +-
            • Paircontent ++
            • Paircontent ++
            • Pair_Content +
            • Panel_Hidden +
            • Panel_Userptr +
            • Panel_Win +-
            • Pechochar +-
            • Pnoutrefresh ++
            • Pattern ++
            • Pechochar ++
            • Peek - terminal_interface-curses.ads:1352 ++
            • Peek - terminal_interface-curses.ads:1358 ++
            • Peek - terminal_interface-curses.ads:1414 ++
            • Peek - terminal_interface-curses.ads:1423 ++
            • Peek - terminal_interface-curses.ads:1438 ++
            • Peek - terminal_interface-curses.ads:1447 ++
            • Pnoutrefresh ++
            • Position_Cursor - terminal_interface-curses-forms.ads:683 ++
            • Position_Cursor - terminal_interface-curses-menus.ads:394 ++
            • Post - terminal_interface-curses-forms.ads:672 ++
            • Post - terminal_interface-curses-menus.ads:322 +
            • Pos_Form_Cursor +
            • Pos_Menu_Cursor +-
            • Prefresh ++
            • Prefresh ++
            • Prev_Router +
            • Put - terminal_interface-curses-text_io-complex_io.ads:54 +
            • Put - terminal_interface-curses-text_io-complex_io.ads:61 +
            • Put - terminal_interface-curses-text_io-decimal_io.ads:50 +Index: doc/html/ada/funcs/Q.htm +--- ncurses-5.6/doc/html/ada/funcs/Q.htm 2005-05-14 17:34:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/Q.htm 2007-05-05 20:35:19.000000000 +0000 +@@ -4,5 +4,5 @@ +

              Functions - Q

              + [index] + +Index: doc/html/ada/funcs/R.htm +--- ncurses-5.6/doc/html/ada/funcs/R.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/R.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,14 +4,36 @@ +

              Functions - R

              + [index] + +Index: doc/html/ada/funcs/S.htm +--- ncurses-5.6/doc/html/ada/funcs/S.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/S.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,24 +4,51 @@ +

              Functions - S

              + [index] + +Index: doc/html/ada/funcs/T.htm +--- ncurses-5.6/doc/html/ada/funcs/T.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/T.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,9 +4,12 @@ +

              Functions - T

              + [index] + +Index: doc/html/ada/funcs/U.htm +--- ncurses-5.6/doc/html/ada/funcs/U.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/U.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,9 +4,20 @@ +

              Functions - U

              + [index] + +Index: doc/html/ada/funcs/V.htm +--- ncurses-5.6/doc/html/ada/funcs/V.htm 2005-05-14 17:34:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/V.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,5 +4,8 @@ +

              Functions - V

              + [index] + +Index: doc/html/ada/funcs/W.htm +--- ncurses-5.6/doc/html/ada/funcs/W.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/funcs/W.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -4,50 +4,50 @@ +

              Functions - W

              + [index] + +Index: doc/html/ada/table.html +--- ncurses-5.6/doc/html/ada/table.html 2000-12-02 23:38:22.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/table.html 2007-05-05 20:35:21.000000000 +0000 +@@ -10,36 +10,38 @@ + + + ++ + +- +- +- ++ ++ ++ + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + + +- +- ++ ++ ++ + + +- +- ++ ++ + +- +- +- +- ++ ++ ++ ++ + +- ++ + +- +- +- ++ ++ ++ + + + +@@ -59,8 +61,8 @@ + + + +- +- ++ ++ + + + +@@ -77,28 +79,28 @@ + + + +- +- ++ ++ + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ + +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -112,30 +114,30 @@ + + + +- + +- +- +- +- ++ ++ ++ ++ ++ + +- + +- +- ++ ++ ++ + +- +- ++ ++ + +- +- ++ ++ + + + + + + +- ++ + + + +@@ -144,25 +146,25 @@ + + + +- ++ + + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -173,14 +175,14 @@ + + + +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -188,28 +190,28 @@ + + + +- +- ++ ++ + + + + +- +- +- +- ++ ++ ++ ++ + +- +- +- +- ++ ++ ++ ++ + + +- +- +- +- +- ++ ++ ++ ++ ++ + + + +@@ -238,15 +240,15 @@ + + + +- +- ++ ++ + +- ++ + + + + +- ++ + + + +@@ -257,83 +259,83 @@ + + + +- + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ + +- +- +- +- +- ++ ++ ++ ++ + ++ + + +- +- ++ ++ + +- + +- ++ ++ + +- ++ + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +
              C nameAda nameman page
              _nc_freeall()Curses_Free_Allcurs_trace.3x
              _tracef()Trace_Putcurs_trace.3x
              assume_default_colors()Assume_Default_Colorsdft_fgbg.3x
              baudrate()Baudratecurs_termattrs.3x
              beep()Beepcurs_beep.3x
              assume_default_colors()Assume_Default_Colorsdefault_colors.3x
              baudrate()Baudratecurs_termattrs.3x
              beep()Beepcurs_beep.3x
              bottom_panel()Bottompanel.3x
              box()Boxcurs_border.3x
              can_change_color()Can_Change_Colorcurs_color.3x
              cbreak()Set_Cbreak_Modecurs_inopts.3x
              clearok()Clear_On_Next_Updatecurs_outopts.3x
              color_content()Color_Contentcurs_color.3x
              copywin()Copycurs_overlay.3x
              box()Boxcurs_border.3x
              can_change_color()Can_Change_Colorcurs_color.3x
              cbreak()Set_Cbreak_Modecurs_inopts.3x
              clearok()Clear_On_Next_Updatecurs_outopts.3x
              color_content()Color_Contentcurs_color.3x
              copywin()Copycurs_overlay.3x
              current_field()Currentform_page.3x
              current_item()Currentmitem_current.3x
              curs_set()Set_Cursor_Visibilitycurs_kernel.3x
              curses_version()Curses_Versioncurs_extend.3x
              curs_set()Set_Cursor_Visibilitycurs_kernel.3x
              curscrCurrent_Windowcurs_initscr.3x
              curses_version()Curses_Versioncurs_extend.3x
              data_ahead()Data_Aheadform_data.3x
              data_behind()Data_Behindform_data.3x
              def_prog_mode()Save_Curses_Modecurs_kernel.3x
              define_key()Define_Keydefine_key.3x
              def_prog_mode()Save_Curses_Modecurs_kernel.3x
              define_key()Define_Keydefine_key.3x
              del_panel()Deletepanel.3x
              delay_output()Delay_Outputcurs_util.3x
              delwin()Deletecurs_window.3x
              derwin()Derived_Windowcurs_window.3x
              doupdate()Update_Screencurs_refresh.3x
              delay_output()Delay_Outputcurs_util.3x
              delwin()Deletecurs_window.3x
              derwin()Derived_Windowcurs_window.3x
              doupdate()Update_Screencurs_refresh.3x
              dup_field()Duplicateform_field_new.3x
              dupwin()Duplicatecurs_window.3x
              dupwin()Duplicatecurs_window.3x
              dynamic_field_info()Dynamic_Infoform_field_info.3x
              echo()Set_Echo_Modecurs_inopts.3x
              endwin()End_Windowscurs_initscr.3x
              erasechar()Erase_Charactercurs_termattrs.3x
              echo()Set_Echo_Modecurs_inopts.3x
              endwin()End_Windowscurs_initscr.3x
              erasechar()Erase_Charactercurs_termattrs.3x
              field_back()Backgroundform_field_attributes.3x
              field_back()Backgroundform_field_attributes.3x
              field_buffer()Get_Bufferform_field_buffer.3x
              field_type()Get_Typeform_field_validation.3x
              field_userptrGet_User_Dataform_field_userptr.3x
              field_userptrGet_User_Dataform_field_userptr.3x
              flash()Flash_Screencurs_beep.3x
              flushinp()Flush_Inputcurs_util.3x
              flash()Flash_Screencurs_beep.3x
              flushinp()Flush_Inputcurs_util.3x
              form_driver()Driverform_driver.3x
              form_fields()Fieldsform_field.3x
              form_init()Get_Form_Init_Hookform_hook.3x
              free_form()Deleteform_new.3x
              free_item()Deletemitem_new.3x
              free_menu()Deletemenu_new.3x
              getbegyx()Get_Window_Positioncurs_getyx.3x
              getmaxyx()Get_Sizecurs_getyx.3x
              getbegyx()Get_Window_Positioncurs_getyx.3x
              getmaxyx()Get_Sizecurs_getyx.3x
              getmouse()Get_Mousecurs_mouse.3x
              getparyx()Get_Origin_Relative_To_Parentcurs_getyx.3x
              getyx()Get_Cursor_Positioncurs_getyx.3x
              halfdelay()Half_Delaycurs_inopts.3x
              has_colors()Has_Colorscurs_color.3x
              has_ic()Has_Insert_Charactercurs_termattrs.3x
              has_il()Has_Insert_Linecurs_termattrs.3x
              has_key()Has_Keycurs_getch.3x
              getparyx()Get_Origin_Relative_To_Parentcurs_getyx.3x
              getyx()Get_Cursor_Positioncurs_getyx.3x
              halfdelay()Half_Delaycurs_inopts.3x
              has_colors()Has_Colorscurs_color.3x
              has_ic()Has_Insert_Charactercurs_termattrs.3x
              has_il()Has_Insert_Linecurs_termattrs.3x
              has_key()Has_Keycurs_getch.3x
              hide_panel()Hidepanel.3x
              idcok()Use_Insert_Delete_Charactercurs_outopts.3x
              idlok()Use_Insert_Delete_Linecurs_outopts.3x
              immedok()Immediate_Update_Modecurs_outopts.3x
              init_color()Init_Colorcurs_color.3x
              init_pair()Init_Paircurs_color.3x
              initscr()Init_Screencurs_initscr.3x
              initscr()Init_Windowscurs_initscr.3x
              intrflush()Set_Flush_On_Interrupt_Modecurs_inopts.3x
              is_linetouched()Is_Touchedcurs_touch.3x
              is_wintouched()Is_Touchedcurs_touch.3x
              isendwin()Is_End_Windowcurs_initscr.3x
              idcok()Use_Insert_Delete_Charactercurs_outopts.3x
              idlok()Use_Insert_Delete_Linecurs_outopts.3x
              immedok()Immediate_Update_Modecurs_outopts.3x
              init_color()Init_Colorcurs_color.3x
              init_pair()Init_Paircurs_color.3x
              initscr()Init_Screencurs_initscr.3x
              initscr()Init_Windowscurs_initscr.3x
              intrflush()Set_Flush_On_Interrupt_Modecurs_inopts.3x
              is_linetouched()Is_Touchedcurs_touch.3x
              is_wintouched()Is_Touchedcurs_touch.3x
              isendwin()Is_End_Windowcurs_initscr.3x
              item_count()Item_Countmenu_items.3x
              item_description();Descriptionmitem_name.3x
              item_index()Get_Indexmitem_current.3x
              item_userptrGet_User_Datamitem_userptr.3x
              item_value()Valuemitem_value.3x
              item_visible()Visiblemitem_visible.3x
              keyname()Key_Namecurs_util.3x
              keyname()Key_Namecurs_util.3x
              keyok()Enable_Keykeyok.3x
              keypad()Set_KeyPad_Modecurs_inopts.3x
              killchar()Kill_Charactercurs_termattrs.3x
              leaveok()Leave_Cursor_After_Updatecurs_outopts.3x
              keyname()Key_Namecurs_util.3x
              keyok()Enable_Keykeyok.3x
              keypad()Set_KeyPad_Modecurs_inopts.3x
              killchar()Kill_Charactercurs_termattrs.3x
              leaveok()Leave_Cursor_After_Updatecurs_outopts.3x
              link_field()Linkform_field_new.3x
              longname()Long_Namecurs_termattrs.3x
              longname()Long_Namecurs_termattrs.3x
              menu_back()Backgroundmenu_attribs.3x
              menu_back()Backgroundmenu_attribs.3x
              longname()Long_Namecurs_termattrs.3x
              menu_back()Backgroundmenu_attributes.3x
              menu_back()Backgroundmenu_attributes.3x
              menu_driver()Drivermenu_driver.3x
              menu_fore()Foregroundmenu_attribs.3x
              menu_fore()Foregroundmenu_attribs.3x
              menu_fore()Foregroundmenu_attributes.3x
              menu_fore()Foregroundmenu_attributes.3x
              menu_format()Formatmenu_format.3x
              menu_grey()Greymenu_attribs.3x
              menu_grey()Greymenu_attribs.3x
              menu_grey()Greymenu_attributes.3x
              menu_grey()Greymenu_attributes.3x
              menu_init()Get_Menu_Init_Hookmenu_hook.3x
              menu_items()Itemsmenu_items.3x
              menu_mark()Markmenu_mark.3x
              menu_opts()Get_Optionsmenu_opts.3x
              menu_opts()Get_Optionsmenu_opts.3x
              menu_opts_on()Switch_Optionsmenu_opts.3x
              menu_pad()Pad_Charactermenu_attribs.3x
              menu_pad()Pad_Charactermenu_attributes.3x
              menu_pattern()Patternmenu_pattern.3x
              menu_requestname.3xmenu_driver.3x
              menu_spacing()Spacingmenu_spacing.3x
              menu_userptrGet_User_Datamenu_userptr.3x
              menu_userptrGet_User_Datamenu_userptr.3x
              menu_win()Get_Windowmenu_win.3x
              meta()Set_Meta_Modecurs_inopts.3x
              meta()Set_Meta_Modecurs_inopts.3x
              mouseinterval()Mouse_Intervalcurs_mouse.3x
              mousemask()Start_Mousecurs_mouse.3x
              move_field()Moveform_field.3x
              move_panel()Movepanel.3x
              mvderwin()Move_Derived_Windowcurs_window.3x
              mvwaddch()Addcurs_addch.3x
              mvwaddchnstr()Addcurs_addchstr.3x
              mvwaddnstr()Addcurs_addstr.3x
              mvwchgat()Change_Attributescurs_attr.3x
              mvwdelch()Delete_Charactercurs_delch.3x
              mvwgetnstr()Getcurs_getstr.3x
              mvwin()Move_Windowcurs_window.3x
              mvwinch()Peekcurs_inch.3x
              mvwinchnstr()Peekcurs_inchstr.3x
              mvwinnstr()Peekcurs_instr.3x
              mvwinsch()Insertcurs_insch.3x
              mvwinsnstr()Insertcurs_insstr.3x
              napms()Nap_Milli_Secondscurs_kernel.3x
              mvderwin()Move_Derived_Windowcurs_window.3x
              mvwaddch()Addcurs_addch.3x
              mvwaddchnstr()Addcurs_addchstr.3x
              mvwaddnstr()Addcurs_addstr.3x
              mvwchgat()Change_Attributescurs_attr.3x
              mvwdelch()Delete_Charactercurs_delch.3x
              mvwgetnstr()Getcurs_getstr.3x
              mvwin()Move_Windowcurs_window.3x
              mvwinch()Peekcurs_inch.3x
              mvwinchnstr()Peekcurs_inchstr.3x
              mvwinnstr()Peekcurs_instr.3x
              mvwinsch()Insertcurs_insch.3x
              mvwinsnstr()Insertcurs_insstr.3x
              napms()Nap_Milli_Secondscurs_kernel.3x
              new_field()Createform_field_new.3x
              new_field()New_Fieldform_field_new.3x
              new_form()Createform_new.3x
              new_page()Is_New_Pageform_new_page.3x
              new_panel()Createpanel.3x
              new_panel()New_Panelpanel.3x
              newpad()New_Padcurs_pad.3x
              newwin()Createcurs_window.3x
              nl()Set_NL_Modecurs_outopts.3x
              nodelay()Set_NoDelay_Modecurs_inopts.3x
              notimeout()Set_Escape_Time_Modecurs_inopts.3x
              overlay()Overlaycurs_overlay.3x
              overwrite()Overwritecurs_overlay.3x
              pair_content()Pair_Contentcurs_color.3x
              newpad()New_Padcurs_pad.3x
              newwin()Createcurs_window.3x
              nl()Set_NL_Modecurs_outopts.3x
              nodelay()Set_NoDelay_Modecurs_inopts.3x
              notimeout()Set_Escape_Time_Modecurs_inopts.3x
              overlay()Overlaycurs_overlay.3x
              overwrite()Overwritecurs_overlay.3x
              pair_content()Pair_Contentcurs_color.3x
              panel_above()Abovepanel.3x
              panel_below()Belowpanel.3x
              panel_hidden()Is_Hiddenpanel.3x
              panel_userptrGet_User_Datapanel.3x
              panel_window()Get_Windowpanel.3x
              panel_window()Panel_Windowpanel.3x
              pechochar()Add_Character_To_Pad_And_Echo_Itcurs_pad.3x
              pnoutrefresh()Refresh_Without_Updatecurs_pad.3x
              pechochar()Add_Character_To_Pad_And_Echo_Itcurs_pad.3x
              pnoutrefresh()Refresh_Without_Updatecurs_pad.3x
              pos_form_cursor()Position_Cursorform_cursor.3x
              pos_menu_cursor()Position_Cursormenu_cursor.3x
              post_form()Postform_post.3x
              post_menu()Postmenu_post.3x
              prefresh()Refreshcurs_pad.3x
              qiflush()Set_Queue_Interrupt_Modecurs_inopts.3x
              raw()Set_Raw_Modecurs_inopts.3x
              redrawwin()Redrawcurs_refresh.3x
              prefresh()Refreshcurs_pad.3x
              qiflush()Set_Queue_Interrupt_Modecurs_inopts.3x
              raw()Set_Raw_Modecurs_inopts.3x
              redrawwin()Redrawcurs_refresh.3x
              replace_panel()Replacepanel.3x
              reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
              resetty();Reset_Terminal_Statecurs_kernel.3x
              ripoffline()Rip_Off_Linescurs_kernel.3x
              savetty()Save_Terminal_Statecurs_kernel.3x
              reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
              resetty();Reset_Terminal_Statecurs_kernel.3x
              ripoffline()Rip_Off_Linescurs_kernel.3x
              savetty()Save_Terminal_Statecurs_kernel.3x
              scale_form()Scaleform_win.3x
              scale_menu()Scalemenu_win.3x
              scr_dump()Screen_Dump_To_Filecurs_scr_dump.3x
              scr_init()Screen_Init_From_Filecurs_scr_dump.3x
              scr_restore()Screen_Restore_From_Filecurs_scr_dump.3x
              scr_set()Screen_Set_Filecurs_scr_dump.3x
              scrollok()Allow_Scrollingcurs_outopts.3x
              scr_dump()Screen_Dump_To_Filecurs_scr_dump.3x
              scr_init()Screen_Init_From_Filecurs_scr_dump.3x
              scr_restore()Screen_Restore_From_Filecurs_scr_dump.3x
              scr_set()Screen_Set_Filecurs_scr_dump.3x
              scrollok()Allow_Scrollingcurs_outopts.3x
              set_current_field()Set_Currentform_page.3x
              set_current_item()Set_Currentmitem_current.3x
              set_field_back()Set_Backgroundform_field_attributes.3x
              set_item_term()Set_Item_Term_Hookmenu_hook.3x
              set_item_userptrSet_User_Datamitem_userptr.3x
              set_item_value()Set_Valuemitem_value.3x
              set_menu_back()Set_Backgroundmenu_attribs.3x
              set_menu_fore()Set_Foregroundmenu_attribs.3x
              set_menu_back()Set_Backgroundmenu_attributes.3x
              set_menu_fore()Set_Foregroundmenu_attributes.3x
              set_menu_format()Set_Formatmenu_format.3x
              set_menu_grey()Set_Greymenu_attribs.3x
              set_menu_grey()Set_Greymenu_attributes.3x
              set_menu_init()Set_Menu_Init_Hookmenu_hook.3x
              set_menu_items()Redefinemenu_items.3x
              set_menu_mark()Set_Markmenu_mark.3x
              set_menu_opts()Set_Optionsmenu_opts.3x
              set_menu_pad()Set_Pad_Charactermenu_attribs.3x
              set_menu_pad()Set_Pad_Charactermenu_attributes.3x
              set_menu_pattern()Set_Patternmenu_pattern.3x
              set_menu_spacing()Set_Spacingmenu_spacing.3x
              set_menu_sub()Set_Sub_Windowmenu_win.3x
              set_panel_userptrSet_User_Datapanel.3x
              set_top_row()Set_Top_Rowmitem_current.3x
              show_panel()Showpanel.3x
              slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
              slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
              slk_attron()Switch_Soft_Label_Key_Attributescurs_slk.3x
              slk_attrset()Set_Soft_Label_Key_Attributescurs_slk.3x
              slk_clear()Clear_Soft_Label_Keyscurs_slk.3x
              slk_color()Set_Soft_Label_Key_Colorcurs_slk.3x
              slk_init()Init_Soft_Label_Keyscurs_slk.3x
              slk_label()Get_Soft_Label_Keycurs_slk.3x
              slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
              slk_attron()Switch_Soft_Label_Key_Attributescurs_slk.3x
              slk_attrset()Set_Soft_Label_Key_Attributescurs_slk.3x
              slk_clear()Clear_Soft_Label_Keyscurs_slk.3x
              slk_color()Set_Soft_Label_Key_Colorcurs_slk.3x
              slk_init()Init_Soft_Label_Keyscurs_slk.3x
              slk_label()Get_Soft_Label_Keycurs_slk.3x
              slk_noutrefresh()Refresh_Soft_Label_Keys_Without_Updatecurs_slk.3x
              slk_refresh()Refresh_Soft_Label_Keycurs_slk.3x
              slk_restore()Restore_Soft_Label_Keyscurs_slk.3x
              slk_set()Set_Soft_Label_Keycurs_slk.3x
              slk_touch()Touch_Soft_Label_Keyscurs_slk.3x
              standout()Standoutcurs_attr.3x
              start_color()Start_Colorcurs_color.3x
              slk_label()Get_Soft_Label_Keycurs_slk.3x
              slk_noutrefresh()Refresh_Soft_Label_Keys_Without_Updatecurs_slk.3x
              slk_refresh()Refresh_Soft_Label_Keycurs_slk.3x
              slk_restore()Restore_Soft_Label_Keyscurs_slk.3x
              slk_set()Set_Soft_Label_Keycurs_slk.3x
              slk_touch()Touch_Soft_Label_Keyscurs_slk.3x
              standout()Standoutcurs_attr.3x
              start_color()Start_Colorcurs_color.3x
              stdscrStandard_Windowcurs_initscr.3x
              subpad()Sub_Padcurs_pad.3x
              subwin()Sub_Windowcurs_window.3x
              syncok()Set_Synch_Modecurs_window.3x
              termattrs()Supported_Attributescurs_termattrs.3x
              termname()Terminal_Namecurs_termattrs.3x
              subpad()Sub_Padcurs_pad.3x
              subwin()Sub_Windowcurs_window.3x
              syncok()Set_Synch_Modecurs_window.3x
              termattrs()Supported_Attributescurs_termattrs.3x
              termname()Terminal_Namecurs_termattrs.3x
              termname()Terminal_Namecurs_termattrs.3x
              top_panel()Toppanel.3x
              top_row()Top_Rowmitem_current.3x
              touchline()Touchcurs_touch.3x
              touchwin()Touchcurs_touch.3x
              touchline()Touchcurs_touch.3x
              touchwin()Touchcurs_touch.3x
              trace()Trace_oncurs_trace.3x
              unctrl()Un_Controlcurs_util.3x
              unctrl()Un_Controlcurs_util.3x
              ungetch()Undo_Keystrokecurs_getch.3x
              unctrl()Un_Controlcurs_util.3x
              ungetch()Undo_Keystrokecurs_getch.3x
              ungetmouse()Unget_Mousecurs_mouse.3x
              untouchwin()Untouchcurs_touch.3x
              untouchwin()Untouchcurs_touch.3x
              update_panels()Update_Panelspanel.3x
              use_default_colors()Use_Default_Colorsdft_fgbg.3x
              use_extended_names()Use_Extended_Namescurs_extend.3x
              waddch()Addcurs_addch.3x
              waddchnstr()Addcurs_addchstr.3x
              waddnstr()Addcurs_addstr.3x
              wattr_get()Get_Character_Attributescurs_attr.3x
              wattr_get()Get_Character_Attributecurs_attr.3x
              wattron()Switch_Character_Attributecurs_attr.3x
              wattrset()Set_Character_Attributescurs_attr.3x
              wbkgd()Change_Backgroundcurs_bkgd.3x
              wbkgdget()Get_Backgroundcurs_bkgd.3x
              wbkgdset()Set_Backgroundcurs_bkgd.3x
              wborder()Bordercurs_border.3x
              wchgat()Change_Attributescurs_attr.3x
              wclear()Clearcurs_clear.3x
              wclrtobot()Clear_To_End_Of_Screencurs_clear.3x
              wclrtoeol()Clear_To_End_Of_Linecurs_clear.3x
              wcolor_set()Set_Colorcurs_attr.3x
              wdelch()Delete_Charactercurs_delch.3x
              wdeleteln()Delete_Linecurs_deleteln.3x
              wechochar()Add_With_Immediate_Echocurs_addch.3x
              use_default_colors()Use_Default_Colorsdefault_colors.3x
              use_extended_names()Use_Extended_Namescurs_extend.3x
              waddch()Addcurs_addch.3x
              waddchnstr()Addcurs_addchstr.3x
              waddnstr()Addcurs_addstr.3x
              wattr_get()Get_Character_Attributescurs_attr.3x
              wattr_get()Get_Character_Attributecurs_attr.3x
              wattron()Switch_Character_Attributecurs_attr.3x
              wattrset()Set_Character_Attributescurs_attr.3x
              wbkgd()Change_Backgroundcurs_bkgd.3x
              wbkgdget()Get_Backgroundcurs_bkgd.3x
              wbkgdset()Set_Backgroundcurs_bkgd.3x
              wborder()Bordercurs_border.3x
              wchgat()Change_Attributescurs_attr.3x
              wclear()Clearcurs_clear.3x
              wclrtobot()Clear_To_End_Of_Screencurs_clear.3x
              wclrtoeol()Clear_To_End_Of_Linecurs_clear.3x
              wcolor_set()Set_Colorcurs_attr.3x
              wdelch()Delete_Charactercurs_delch.3x
              wdeleteln()Delete_Linecurs_deleteln.3x
              wechochar()Add_With_Immediate_Echocurs_addch.3x
              wenclose()Enclosed_In_Windowcurs_mouse.3x
              werase()Erasecurs_clear.3x
              wgetch()Get_Keystrokecurs_getch.3x
              wgetnstr()Getcurs_getstr.3x
              whline()Horizontal_Linecurs_border.3x
              winch()Peekcurs_inch.3x
              winchnstr()Peekcurs_inchstr.3x
              winnstr()Peekcurs_instr.3x
              winsch()Insertcurs_insch.3x
              winsdelln()Insert_Delete_Linescurs_deleteln.3x
              winsertln()Insert_Linecurs_deleteln.3x
              winsnstr()Insertcurs_insstr.3x
              wmove()Move_Cursorcurs_move.3x
              wnoutrefresh()Refresh_Without_Updatecurs_refresh.3x
              wredrawln()Redrawcurs_refresh.3x
              wrefresh()Refreshcurs_refresh.3x
              wresize()Resizewresize.3x
              wscrl()Scrollcurs_scroll.3x
              wsetscrreg()Set_Scroll_Regioncurs_outopts.3x
              wsyncdown()Synchronize_Downwardscurs_window.3x
              wsyncup()Synchronize_Upwardscurs_window.3x
              wtimeout()Set_Timeout_Modecurs_inopts.3x
              wtouchln()Change_Line_Statuscurs_touch.3x
              wvline()Vertical_Linecurs_border.3x
              werase()Erasecurs_clear.3x
              wgetch()Get_Keystrokecurs_getch.3x
              wgetnstr()Getcurs_getstr.3x
              whline()Horizontal_Linecurs_border.3x
              winch()Peekcurs_inch.3x
              winchnstr()Peekcurs_inchstr.3x
              winnstr()Peekcurs_instr.3x
              winsch()Insertcurs_insch.3x
              winsdelln()Insert_Delete_Linescurs_deleteln.3x
              winsertln()Insert_Linecurs_deleteln.3x
              winsnstr()Insertcurs_insstr.3x
              wmove()Move_Cursorcurs_move.3x
              wnoutrefresh()Refresh_Without_Updatecurs_refresh.3x
              wredrawln()Redrawcurs_refresh.3x
              wrefresh()Refreshcurs_refresh.3x
              wresize()Resizewresize.3x
              wscrl()Scrollcurs_scroll.3x
              wsetscrreg()Set_Scroll_Regioncurs_outopts.3x
              wsyncdown()Synchronize_Downwardscurs_window.3x
              wsyncup()Synchronize_Upwardscurs_window.3x
              wtimeout()Set_Timeout_Modecurs_inopts.3x
              wtouchln()Change_Line_Statuscurs_touch.3x
              wvline()Vertical_Linecurs_border.3x
              +Index: doc/html/ada/terminal_interface-curses-aux__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-aux__ads.htm 2006-09-23 20:31:30.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-aux__ads.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-aux.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -48,84 +47,84 @@
              + --  This module is generated. Please don't change it manually!
              + --  Run the generator instead.
              + --  |
              +-with System;
              ++with System;
              + with Interfaces.C;
              +-with Interfaces.C.Strings; use Interfaces.C.Strings;
              +-with Unchecked_Conversion;
              ++with Interfaces.C.Strings; use Interfaces.C.Strings;
              ++with Unchecked_Conversion;
              + 
              +-package Terminal_Interface.Curses.Aux is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Aux);
              ++package Terminal_Interface.Curses.Aux is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Aux);
              + 
              +-   use type Interfaces.C.int;
              ++   use type Interfaces.C.int;
              + 
              +-   subtype C_Int      is Interfaces.C.int;
              +-   subtype C_Short    is Interfaces.C.short;
              +-   subtype C_Long_Int is Interfaces.C.long;
              +-   subtype C_Size_T   is Interfaces.C.size_t;
              +-   subtype C_UInt     is Interfaces.C.unsigned;
              +-   subtype C_ULong    is Interfaces.C.unsigned_long;
              +-   subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr;
              +-   type    C_Void_Ptr is new System.Address;
              +-   type    C_Chtype   is new C_ULong;
              +-   type    C_AttrType is new C_ULong;
              ++   subtype C_Int      is Interfaces.C.int;
              ++   subtype C_Short    is Interfaces.C.short;
              ++   subtype C_Long_Int is Interfaces.C.long;
              ++   subtype C_Size_T   is Interfaces.C.size_t;
              ++   subtype C_UInt     is Interfaces.C.unsigned;
              ++   subtype C_ULong    is Interfaces.C.unsigned_long;
              ++   subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr;
              ++   type    C_Void_Ptr is new System.Address;
              ++   type    C_Chtype   is new C_ULong;
              ++   type    C_AttrType is new C_ULong;
              + 
              +    --  This is how those constants are defined in ncurses. I see them also
              +    --  exactly like this in all ETI implementations I ever tested. So it
              +    --  could be that this is quite general, but please check with your curses.
              +    --  This is critical, because curses sometime mixes boolean returns with
              +    --  returning an error status.
              +-   Curses_Ok    : constant C_Int := 0;
              +-   Curses_Err   : constant C_Int := -1;
              ++   Curses_Ok    : constant C_Int := 0;
              ++   Curses_Err   : constant C_Int := -1;
              + 
              +-   Curses_True  : constant C_Int := 1;
              +-   Curses_False : constant C_Int := 0;
              ++   Curses_True  : constant C_Int := 1;
              ++   Curses_False : constant C_Int := 0;
              + 
              +    --  Eti_Error: type for error codes returned by the menu and form subsystem
              +-   subtype Eti_Error is C_Int range -14 .. 0;
              ++   subtype Eti_Error is C_Int range -14 .. 0;
              + 
              +-   E_Ok               : constant Eti_Error := 0;
              +-   E_System_Error     : constant Eti_Error := -1;
              +-   E_Bad_Argument     : constant Eti_Error := -2;
              +-   E_Posted           : constant Eti_Error := -3;
              +-   E_Connected        : constant Eti_Error := -4;
              +-   E_Bad_State        : constant Eti_Error := -5;
              +-   E_No_Room          : constant Eti_Error := -6;
              +-   E_Not_Posted       : constant Eti_Error := -7;
              +-   E_Unknown_Command  : constant Eti_Error := -8;
              +-   E_No_Match         : constant Eti_Error := -9;
              +-   E_Not_Selectable   : constant Eti_Error := -10;
              +-   E_Not_Connected    : constant Eti_Error := -11;
              +-   E_Request_Denied   : constant Eti_Error := -12;
              +-   E_Invalid_Field    : constant Eti_Error := -13;
              +-   E_Current          : constant Eti_Error := -14;
              ++   E_Ok               : constant Eti_Error := 0;
              ++   E_System_Error     : constant Eti_Error := -1;
              ++   E_Bad_Argument     : constant Eti_Error := -2;
              ++   E_Posted           : constant Eti_Error := -3;
              ++   E_Connected        : constant Eti_Error := -4;
              ++   E_Bad_State        : constant Eti_Error := -5;
              ++   E_No_Room          : constant Eti_Error := -6;
              ++   E_Not_Posted       : constant Eti_Error := -7;
              ++   E_Unknown_Command  : constant Eti_Error := -8;
              ++   E_No_Match         : constant Eti_Error := -9;
              ++   E_Not_Selectable   : constant Eti_Error := -10;
              ++   E_Not_Connected    : constant Eti_Error := -11;
              ++   E_Request_Denied   : constant Eti_Error := -12;
              ++   E_Invalid_Field    : constant Eti_Error := -13;
              ++   E_Current          : constant Eti_Error := -14;
              + 
              +-   procedure Eti_Exception (Code : Eti_Error);
              ++   procedure Eti_Exception (Code : Eti_Error);
              +    --  Dispatch the error code and raise the appropriate exception
              +    --
              +    --
              +    --  Some helpers
              +    function Chtype_To_AttrChar is new
              +-     Unchecked_Conversion (Source => C_Chtype,
              +-                           Target => Attributed_Character);
              ++     Unchecked_Conversion (Source => C_Chtype,
              ++                           Target => Attributed_Character);
              +    function AttrChar_To_Chtype is new
              +-     Unchecked_Conversion (Source => Attributed_Character,
              +-                           Target => C_Chtype);
              ++     Unchecked_Conversion (Source => Attributed_Character,
              ++                           Target => C_Chtype);
              + 
              +    function AttrChar_To_AttrType is new
              +-     Unchecked_Conversion (Source => Attributed_Character,
              +-                           Target => C_AttrType);
              ++     Unchecked_Conversion (Source => Attributed_Character,
              ++                           Target => C_AttrType);
              + 
              +    function AttrType_To_AttrChar is new
              +-     Unchecked_Conversion (Source => C_AttrType,
              +-                           Target => Attributed_Character);
              ++     Unchecked_Conversion (Source => C_AttrType,
              ++                           Target => Attributed_Character);
              + 
              +-   procedure Fill_String (Cp  : in  chars_ptr;
              +-                          Str : out String);
              ++   procedure Fill_String (Cp  : in  chars_ptr;
              ++                          Str : out String);
              +    --  Fill the Str parameter with the string denoted by the chars_ptr
              +    --  C-Style string.
              + 
              +-   function Fill_String (Cp : chars_ptr) return String;
              ++   function Fill_String (Cp : chars_ptr) return String;
              +    --  Same but as function.
              + 
              +-end Terminal_Interface.Curses.Aux;
              ++end Terminal_Interface.Curses.Aux;
              + 
              +Index: doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-forms-field_types.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -44,18 +43,18 @@
              + --  @Revision: 1.14 @
              + --  Binding Version 01.00
              + ------------------------------------------------------------------------------
              +-with Interfaces.C;
              ++with Interfaces.C;
              + 
              +-package Terminal_Interface.Curses.Forms.Field_Types is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types);
              +-   use type Interfaces.C.int;
              +-   subtype C_Int is Interfaces.C.int;
              ++package Terminal_Interface.Curses.Forms.Field_Types is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types);
              ++   use type Interfaces.C.int;
              ++   subtype C_Int is Interfaces.C.int;
              + 
              +    --  |=====================================================================
              +    --  | Man page form_fieldtype.3x
              +    --  |=====================================================================
              + 
              +-   type Field_Type is abstract tagged null record;
              ++   type Field_Type is abstract tagged null record;
              +    --  Abstract base type for all field types. A concrete field type
              +    --  is an extension that adds some data elements describing formats or
              +    --  boundary values for the type and validation routines.
              +@@ -66,11 +65,11 @@
              +    --  how to create you own child packages for low-level field types that
              +    --  you may have already written in C.
              + 
              +-   type Field_Type_Access is access all Field_Type'Class;
              ++   type Field_Type_Access is access all Field_Type'Class;
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Set_Field_Type (Fld      : in Field;
              +-                             Fld_Type : in Field_Type) is abstract;
              ++   procedure Set_Field_Type (Fld      : in Field;
              ++                             Fld_Type : in Field_Type) is abstract;
              +    --  AKA: set_field_type()
              +    --  But: we hide the vararg mechanism of the C interface. You always
              +    --       have to pass a single Field_Type parameter.
              +@@ -82,7 +81,7 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   function Get_Type (Fld : in Field) return Field_Type_Access;
              ++   function Get_Type (Fld : in Field) return Field_Type_Access;
              +    --  AKA: field_type()
              +    --  AKA: field_arg()
              +    --  In Ada95 we can combine these. If you try to retrieve the field type
              +@@ -95,68 +94,68 @@
              +    --  | Most of this is used by the implementations of the child packages.
              +    --  |
              + private
              +-   type Makearg_Function is access
              +-     function (Args : System.Address) return System.Address;
              +-   pragma Convention (C, Makearg_Function);
              +-
              +-   type Copyarg_Function is access
              +-     function (Usr : System.Address) return System.Address;
              +-   pragma Convention (C, Copyarg_Function);
              +-
              +-   type Freearg_Function is access
              +-     procedure (Usr : System.Address);
              +-   pragma Convention (C, Freearg_Function);
              +-
              +-   type Field_Check_Function is access
              +-     function (Fld : Field; Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Field_Check_Function);
              +-
              +-   type Char_Check_Function is access
              +-     function (Ch : C_Int; Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Char_Check_Function);
              +-
              +-   type Choice_Function is access
              +-     function (Fld : Field; Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Choice_Function);
              ++   type Makearg_Function is access
              ++     function (Args : System.Address) return System.Address;
              ++   pragma Convention (C, Makearg_Function);
              ++
              ++   type Copyarg_Function is access
              ++     function (Usr : System.Address) return System.Address;
              ++   pragma Convention (C, Copyarg_Function);
              ++
              ++   type Freearg_Function is access
              ++     procedure (Usr : System.Address);
              ++   pragma Convention (C, Freearg_Function);
              ++
              ++   type Field_Check_Function is access
              ++     function (Fld : Field; Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Field_Check_Function);
              ++
              ++   type Char_Check_Function is access
              ++     function (Ch : C_Int; Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Char_Check_Function);
              ++
              ++   type Choice_Function is access
              ++     function (Fld : Field; Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Choice_Function);
              + 
              +    --  +----------------------------------------------------------------------
              +    --  | This must be in sync with the FIELDTYPE structure in form.h
              +    --  |
              +-   type Low_Level_Field_Type is
              ++   type Low_Level_Field_Type is
              +       record
              +-         Status :              Interfaces.C.short;
              +-         Ref_Count :           Interfaces.C.long;
              +-         Left, Right :         System.Address;
              +-         Makearg :             Makearg_Function;
              +-         Copyarg :             Copyarg_Function;
              +-         Freearg :             Freearg_Function;
              +-         Fcheck :              Field_Check_Function;
              +-         Ccheck :              Char_Check_Function;
              +-         Next, Prev :          Choice_Function;
              ++         Status :              Interfaces.C.short;
              ++         Ref_Count :           Interfaces.C.long;
              ++         Left, Right :         System.Address;
              ++         Makearg :             Makearg_Function;
              ++         Copyarg :             Copyarg_Function;
              ++         Freearg :             Freearg_Function;
              ++         Fcheck :              Field_Check_Function;
              ++         Ccheck :              Char_Check_Function;
              ++         Next, Prev :          Choice_Function;
              +       end record;
              +-   pragma Convention (C, Low_Level_Field_Type);
              +-   type C_Field_Type is access all Low_Level_Field_Type;
              ++   pragma Convention (C, Low_Level_Field_Type);
              ++   type C_Field_Type is access all Low_Level_Field_Type;
              + 
              +-   Null_Field_Type   : constant C_Field_Type := null;
              ++   Null_Field_Type   : constant C_Field_Type := null;
              + 
              +    --  +----------------------------------------------------------------------
              +    --  | This four low-level fieldtypes are the ones associated with
              +    --  | fieldtypes handled by this binding. Any other low-level fieldtype
              +    --  | will result in a Form_Exception is function Get_Type.
              +    --  |
              +-   M_Generic_Type   : C_Field_Type := null;
              +-   M_Generic_Choice : C_Field_Type := null;
              +-   M_Builtin_Router : C_Field_Type := null;
              +-   M_Choice_Router  : C_Field_Type := null;
              ++   M_Generic_Type   : C_Field_Type := null;
              ++   M_Generic_Choice : C_Field_Type := null;
              ++   M_Builtin_Router : C_Field_Type := null;
              ++   M_Choice_Router  : C_Field_Type := null;
              + 
              +    --  Two wrapper functions to access those low-level fieldtypes defined
              +    --  in this package.
              +-   function C_Builtin_Router return C_Field_Type;
              +-   function C_Choice_Router  return C_Field_Type;
              ++   function C_Builtin_Router return C_Field_Type;
              ++   function C_Choice_Router  return C_Field_Type;
              + 
              +-   procedure Wrap_Builtin (Fld : Field;
              +-                           Typ : Field_Type'Class;
              +-                           Cft : C_Field_Type := C_Builtin_Router);
              ++   procedure Wrap_Builtin (Fld : Field;
              ++                           Typ : Field_Type'Class;
              ++                           Cft : C_Field_Type := C_Builtin_Router);
              +    --  This procedure has to be called by the Set_Field_Type implementation
              +    --  for builtin low-level fieldtypes to replace it by an Ada95
              +    --  conformant Field_Type object.
              +@@ -165,48 +164,48 @@
              +    --  low-level fieldtypes witch choice functions (like TYP_ENUM).
              +    --  Any other value will raise a Form_Exception.
              + 
              +-   function Make_Arg (Args : System.Address) return System.Address;
              +-   pragma Convention (C, Make_Arg);
              ++   function Make_Arg (Args : System.Address) return System.Address;
              ++   pragma Convention (C, Make_Arg);
              +    --  This is the Makearg_Function for the internal low-level types
              +    --  introduced by this binding.
              + 
              +-   function Copy_Arg (Usr : System.Address) return System.Address;
              +-   pragma Convention (C, Copy_Arg);
              ++   function Copy_Arg (Usr : System.Address) return System.Address;
              ++   pragma Convention (C, Copy_Arg);
              +    --  This is the Copyarg_Function for the internal low-level types
              +    --  introduced by this binding.
              + 
              +-   procedure Free_Arg (Usr : System.Address);
              +-   pragma Convention (C, Free_Arg);
              ++   procedure Free_Arg (Usr : System.Address);
              ++   pragma Convention (C, Free_Arg);
              +    --  This is the Freearg_Function for the internal low-level types
              +    --  introduced by this binding.
              + 
              +-   function Field_Check_Router (Fld : Field;
              +-                                Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Field_Check_Router);
              ++   function Field_Check_Router (Fld : Field;
              ++                                Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Field_Check_Router);
              +    --  This is the Field_Check_Function for the internal low-level types
              +    --  introduced to wrap the low-level types by a Field_Type derived
              +    --  type. It routes the call to the corresponding low-level validation
              +    --  function.
              + 
              +-   function Char_Check_Router (Ch : C_Int;
              +-                               Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Char_Check_Router);
              ++   function Char_Check_Router (Ch : C_Int;
              ++                               Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Char_Check_Router);
              +    --  This is the Char_Check_Function for the internal low-level types
              +    --  introduced to wrap the low-level types by a Field_Type derived
              +    --  type. It routes the call to the corresponding low-level validation
              +    --  function.
              + 
              +-   function Next_Router (Fld : Field;
              +-                         Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Next_Router);
              ++   function Next_Router (Fld : Field;
              ++                         Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Next_Router);
              +    --  This is the Choice_Function for the internal low-level types
              +    --  introduced to wrap the low-level types by a Field_Type derived
              +    --  type. It routes the call to the corresponding low-level next_choice
              +    --  function.
              + 
              +-   function Prev_Router (Fld : Field;
              +-                         Usr : System.Address) return C_Int;
              +-   pragma Convention (C, Prev_Router);
              ++   function Prev_Router (Fld : Field;
              ++                         Usr : System.Address) return C_Int;
              ++   pragma Convention (C, Prev_Router);
              +    --  This is the Choice_Function for the internal low-level types
              +    --  introduced to wrap the low-level types by a Field_Type derived
              +    --  type. It routes the call to the corresponding low-level prev_choice
              +@@ -214,33 +213,33 @@
              + 
              +    --  This is the Argument structure maintained by all low-level field types
              +    --  introduced by this binding.
              +-   type Argument is record
              +-      Typ : Field_Type_Access;   --  the Field_Type creating this record
              +-      Usr : System.Address;      --  original arg for builtin low-level types
              +-      Cft : C_Field_Type;        --  the original low-level type
              ++   type Argument is record
              ++      Typ : Field_Type_Access;   --  the Field_Type creating this record
              ++      Usr : System.Address;      --  original arg for builtin low-level types
              ++      Cft : C_Field_Type;        --  the original low-level type
              +    end record;
              +-   type Argument_Access is access all Argument;
              ++   type Argument_Access is access all Argument;
              + 
              +    --  +----------------------------------------------------------------------
              +    --  |
              +    --  | Some Imports of libform routines to deal with low-level fieldtypes.
              +    --  |
              +-   function New_Fieldtype (Fcheck : Field_Check_Function;
              +-                           Ccheck : Char_Check_Function)
              +-     return C_Field_Type;
              ++   function New_Fieldtype (Fcheck : Field_Check_Function;
              ++                           Ccheck : Char_Check_Function)
              ++     return C_Field_Type;
              +    pragma Import (C, New_Fieldtype, "new_fieldtype");
              + 
              +-   function Set_Fieldtype_Arg (Cft : C_Field_Type;
              +-                               Mak : Makearg_Function := Make_Arg'Access;
              +-                               Cop : Copyarg_Function := Copy_Arg'Access;
              +-                               Fre : Freearg_Function := Free_Arg'Access)
              +-     return C_Int;
              ++   function Set_Fieldtype_Arg (Cft : C_Field_Type;
              ++                               Mak : Makearg_Function := Make_Arg'Access;
              ++                               Cop : Copyarg_Function := Copy_Arg'Access;
              ++                               Fre : Freearg_Function := Free_Arg'Access)
              ++     return C_Int;
              +    pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
              + 
              +-   function Set_Fieldtype_Choice (Cft : C_Field_Type;
              +-                                  Next, Prev : Choice_Function)
              +-     return C_Int;
              ++   function Set_Fieldtype_Choice (Cft : C_Field_Type;
              ++                                  Next, Prev : Choice_Function)
              ++     return C_Int;
              +    pragma Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
              + 
              +-end Terminal_Interface.Curses.Forms.Field_Types;
              ++end Terminal_Interface.Curses.Forms.Field_Types;
              + 
              +Index: doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-forms-field_user_data.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -46,31 +45,31 @@
              + ------------------------------------------------------------------------------
              + 
              + generic
              +-   type User is limited private;
              +-   type User_Access is access User;
              +-package Terminal_Interface.Curses.Forms.Field_User_Data is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_User_Data);
              ++   type User is limited private;
              ++   type User_Access is access User;
              ++package Terminal_Interface.Curses.Forms.Field_User_Data is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_User_Data);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_field_userptr.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Set_User_Data (Fld  : in Field;
              +-                            Data : in User_Access);
              ++   procedure Set_User_Data (Fld  : in Field;
              ++                            Data : in User_Access);
              +    --  AKA: set_field_userptr
              +-   pragma Inline (Set_User_Data);
              ++   pragma Inline (Set_User_Data);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Get_User_Data (Fld  : in  Field;
              +-                            Data : out User_Access);
              ++   procedure Get_User_Data (Fld  : in  Field;
              ++                            Data : out User_Access);
              +    --  AKA: field_userptr
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   function Get_User_Data (Fld  : in  Field) return User_Access;
              ++   function Get_User_Data (Fld  : in  Field) return User_Access;
              +    --  AKA: field_userptr
              +    --  Sama as function
              +    pragma Inline (Get_User_Data);
              + 
              +-end Terminal_Interface.Curses.Forms.Field_User_Data;
              ++end Terminal_Interface.Curses.Forms.Field_User_Data;
              + 
              +Index: doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm 2007-09-01 23:56:30.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-forms-form_user_data.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -46,31 +45,31 @@
              + ------------------------------------------------------------------------------
              + 
              + generic
              +-   type User is limited private;
              +-   type User_Access is access User;
              +-package Terminal_Interface.Curses.Forms.Form_User_Data is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Forms.Form_User_Data);
              ++   type User is limited private;
              ++   type User_Access is access User;
              ++package Terminal_Interface.Curses.Forms.Form_User_Data is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Forms.Form_User_Data);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_userptr.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Set_User_Data (Frm  : in Form;
              +-                            Data : in User_Access);
              ++   procedure Set_User_Data (Frm  : in Form;
              ++                            Data : in User_Access);
              +    --  AKA: set_form_userptr
              +-   pragma Inline (Set_User_Data);
              ++   pragma Inline (Set_User_Data);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Get_User_Data (Frm  : in  Form;
              +-                            Data : out User_Access);
              ++   procedure Get_User_Data (Frm  : in  Form;
              ++                            Data : out User_Access);
              +    --  AKA: form_userptr
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   function Get_User_Data (Frm  : in  Form) return User_Access;
              ++   function Get_User_Data (Frm  : in  Form) return User_Access;
              +    --  AKA: form_userptr
              +    --  Same as function
              +    pragma Inline (Get_User_Data);
              + 
              +-end Terminal_Interface.Curses.Forms.Form_User_Data;
              ++end Terminal_Interface.Curses.Forms.Form_User_Data;
              + 
              +Index: doc/html/ada/terminal_interface-curses-forms__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-forms__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-forms__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-forms.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -52,41 +51,41 @@
              + with System;
              + with Ada.Characters.Latin_1;
              + 
              +-package Terminal_Interface.Curses.Forms is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Forms);
              ++package Terminal_Interface.Curses.Forms is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Forms);
              +    pragma Linker_Options ("-lform");
              +    pragma Linker_Options ("-lncurses");
              + 
              +    Space : Character renames Ada.Characters.Latin_1.Space;
              + 
              +-   type Field        is private;
              +-   type Form         is private;
              ++   type Field        is private;
              ++   type Form         is private;
              + 
              +-   Null_Field        : constant Field;
              +-   Null_Form         : constant Form;
              ++   Null_Field        : constant Field;
              ++   Null_Form         : constant Form;
              + 
              +-   type Field_Justification is (None,
              +-                                Left,
              +-                                Center,
              +-                                Right);
              ++   type Field_Justification is (None,
              ++                                Left,
              ++                                Center,
              ++                                Right);
              + 
              +    pragma Warnings (Off);
              +-   type Field_Option_Set is
              ++   type Field_Option_Set is
              +       record
              +-         Visible     : Boolean;
              +-         Active      : Boolean;
              +-         Public      : Boolean;
              +-         Edit        : Boolean;
              +-         Wrap        : Boolean;
              +-         Blank       : Boolean;
              +-         Auto_Skip   : Boolean;
              +-         Null_Ok     : Boolean;
              +-         Pass_Ok     : Boolean;
              +-         Static      : Boolean;
              ++         Visible     : Boolean;
              ++         Active      : Boolean;
              ++         Public      : Boolean;
              ++         Edit        : Boolean;
              ++         Wrap        : Boolean;
              ++         Blank       : Boolean;
              ++         Auto_Skip   : Boolean;
              ++         Null_Ok     : Boolean;
              ++         Pass_Ok     : Boolean;
              ++         Static      : Boolean;
              +       end record;
              +-   pragma Convention (C, Field_Option_Set);
              ++   pragma Convention (C, Field_Option_Set);
              + 
              +-   for Field_Option_Set use
              ++   for Field_Option_Set use
              +       record
              +          Visible     at 0 range  0 ..  0;
              +          Active      at 0 range  1 ..  1;
              +@@ -99,328 +98,328 @@
              +          Pass_Ok     at 0 range  8 ..  8;
              +          Static      at 0 range  9 ..  9;
              +       end record;
              +-   for Field_Option_Set'Size use 32;
              ++   for Field_Option_Set'Size use 32;
              +    --  Please note: this rep. clause is generated and may be
              +    --               different on your system.Dnl
              + 
              +    pragma Warnings (On);
              + 
              +-   function Default_Field_Options return Field_Option_Set;
              ++   function Default_Field_Options return Field_Option_Set;
              +    --  The initial defaults for the field options.
              +-   pragma Inline (Default_Field_Options);
              ++   pragma Inline (Default_Field_Options);
              + 
              +    pragma Warnings (Off);
              +-   type Form_Option_Set is
              ++   type Form_Option_Set is
              +       record
              +-         NL_Overload : Boolean;
              +-         BS_Overload : Boolean;
              ++         NL_Overload : Boolean;
              ++         BS_Overload : Boolean;
              +       end record;
              +-   pragma Convention (C, Form_Option_Set);
              ++   pragma Convention (C, Form_Option_Set);
              + 
              +-   for Form_Option_Set use
              ++   for Form_Option_Set use
              +       record
              +          NL_Overload at 0 range  0 ..  0;
              +          BS_Overload at 0 range  1 ..  1;
              +       end record;
              +-   for Form_Option_Set'Size use 32;
              ++   for Form_Option_Set'Size use 32;
              +    --  Please note: this rep. clause is generated and may be
              +    --               different on your system.Dnl
              + 
              +    pragma Warnings (On);
              + 
              +-   function Default_Form_Options return Form_Option_Set;
              ++   function Default_Form_Options return Form_Option_Set;
              +    --  The initial defaults for the form options.
              +-   pragma Inline (Default_Form_Options);
              ++   pragma Inline (Default_Form_Options);
              + 
              +-   type Buffer_Number is new Natural;
              ++   type Buffer_Number is new Natural;
              + 
              +-   type Field_Array is array (Positive range <>) of aliased Field;
              +-   pragma Convention (C, Field_Array);
              ++   type Field_Array is array (Positive range <>) of aliased Field;
              ++   pragma Convention (C, Field_Array);
              + 
              +-   type Field_Array_Access is access Field_Array;
              ++   type Field_Array_Access is access Field_Array;
              + 
              +-   procedure Free (FA          : in out Field_Array_Access;
              +-                   Free_Fields : in Boolean := False);
              ++   procedure Free (FA          : in out Field_Array_Access;
              ++                   Free_Fields : in Boolean := False);
              +    --  Release the memory for an allocated field array
              +    --  If Free_Fields is True, call Delete() for all the fields in
              +    --  the array.
              + 
              +-   subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57);
              ++   subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57);
              + 
              +    --  The prefix F_ stands for "Form Request"
              +-   F_Next_Page                : constant Form_Request_Code := Key_Max + 1;
              +-   F_Previous_Page            : constant Form_Request_Code := Key_Max + 2;
              +-   F_First_Page               : constant Form_Request_Code := Key_Max + 3;
              +-   F_Last_Page                : constant Form_Request_Code := Key_Max + 4;
              +-
              +-   F_Next_Field               : constant Form_Request_Code := Key_Max + 5;
              +-   F_Previous_Field           : constant Form_Request_Code := Key_Max + 6;
              +-   F_First_Field              : constant Form_Request_Code := Key_Max + 7;
              +-   F_Last_Field               : constant Form_Request_Code := Key_Max + 8;
              +-   F_Sorted_Next_Field        : constant Form_Request_Code := Key_Max + 9;
              +-   F_Sorted_Previous_Field    : constant Form_Request_Code := Key_Max + 10;
              +-   F_Sorted_First_Field       : constant Form_Request_Code := Key_Max + 11;
              +-   F_Sorted_Last_Field        : constant Form_Request_Code := Key_Max + 12;
              +-   F_Left_Field               : constant Form_Request_Code := Key_Max + 13;
              +-   F_Right_Field              : constant Form_Request_Code := Key_Max + 14;
              +-   F_Up_Field                 : constant Form_Request_Code := Key_Max + 15;
              +-   F_Down_Field               : constant Form_Request_Code := Key_Max + 16;
              +-
              +-   F_Next_Char                : constant Form_Request_Code := Key_Max + 17;
              +-   F_Previous_Char            : constant Form_Request_Code := Key_Max + 18;
              +-   F_Next_Line                : constant Form_Request_Code := Key_Max + 19;
              +-   F_Previous_Line            : constant Form_Request_Code := Key_Max + 20;
              +-   F_Next_Word                : constant Form_Request_Code := Key_Max + 21;
              +-   F_Previous_Word            : constant Form_Request_Code := Key_Max + 22;
              +-   F_Begin_Field              : constant Form_Request_Code := Key_Max + 23;
              +-   F_End_Field                : constant Form_Request_Code := Key_Max + 24;
              +-   F_Begin_Line               : constant Form_Request_Code := Key_Max + 25;
              +-   F_End_Line                 : constant Form_Request_Code := Key_Max + 26;
              +-   F_Left_Char                : constant Form_Request_Code := Key_Max + 27;
              +-   F_Right_Char               : constant Form_Request_Code := Key_Max + 28;
              +-   F_Up_Char                  : constant Form_Request_Code := Key_Max + 29;
              +-   F_Down_Char                : constant Form_Request_Code := Key_Max + 30;
              +-
              +-   F_New_Line                 : constant Form_Request_Code := Key_Max + 31;
              +-   F_Insert_Char              : constant Form_Request_Code := Key_Max + 32;
              +-   F_Insert_Line              : constant Form_Request_Code := Key_Max + 33;
              +-   F_Delete_Char              : constant Form_Request_Code := Key_Max + 34;
              +-   F_Delete_Previous          : constant Form_Request_Code := Key_Max + 35;
              +-   F_Delete_Line              : constant Form_Request_Code := Key_Max + 36;
              +-   F_Delete_Word              : constant Form_Request_Code := Key_Max + 37;
              +-   F_Clear_EOL                : constant Form_Request_Code := Key_Max + 38;
              +-   F_Clear_EOF                : constant Form_Request_Code := Key_Max + 39;
              +-   F_Clear_Field              : constant Form_Request_Code := Key_Max + 40;
              +-   F_Overlay_Mode             : constant Form_Request_Code := Key_Max + 41;
              +-   F_Insert_Mode              : constant Form_Request_Code := Key_Max + 42;
              ++   F_Next_Page                : constant Form_Request_Code := Key_Max + 1;
              ++   F_Previous_Page            : constant Form_Request_Code := Key_Max + 2;
              ++   F_First_Page               : constant Form_Request_Code := Key_Max + 3;
              ++   F_Last_Page                : constant Form_Request_Code := Key_Max + 4;
              ++
              ++   F_Next_Field               : constant Form_Request_Code := Key_Max + 5;
              ++   F_Previous_Field           : constant Form_Request_Code := Key_Max + 6;
              ++   F_First_Field              : constant Form_Request_Code := Key_Max + 7;
              ++   F_Last_Field               : constant Form_Request_Code := Key_Max + 8;
              ++   F_Sorted_Next_Field        : constant Form_Request_Code := Key_Max + 9;
              ++   F_Sorted_Previous_Field    : constant Form_Request_Code := Key_Max + 10;
              ++   F_Sorted_First_Field       : constant Form_Request_Code := Key_Max + 11;
              ++   F_Sorted_Last_Field        : constant Form_Request_Code := Key_Max + 12;
              ++   F_Left_Field               : constant Form_Request_Code := Key_Max + 13;
              ++   F_Right_Field              : constant Form_Request_Code := Key_Max + 14;
              ++   F_Up_Field                 : constant Form_Request_Code := Key_Max + 15;
              ++   F_Down_Field               : constant Form_Request_Code := Key_Max + 16;
              ++
              ++   F_Next_Char                : constant Form_Request_Code := Key_Max + 17;
              ++   F_Previous_Char            : constant Form_Request_Code := Key_Max + 18;
              ++   F_Next_Line                : constant Form_Request_Code := Key_Max + 19;
              ++   F_Previous_Line            : constant Form_Request_Code := Key_Max + 20;
              ++   F_Next_Word                : constant Form_Request_Code := Key_Max + 21;
              ++   F_Previous_Word            : constant Form_Request_Code := Key_Max + 22;
              ++   F_Begin_Field              : constant Form_Request_Code := Key_Max + 23;
              ++   F_End_Field                : constant Form_Request_Code := Key_Max + 24;
              ++   F_Begin_Line               : constant Form_Request_Code := Key_Max + 25;
              ++   F_End_Line                 : constant Form_Request_Code := Key_Max + 26;
              ++   F_Left_Char                : constant Form_Request_Code := Key_Max + 27;
              ++   F_Right_Char               : constant Form_Request_Code := Key_Max + 28;
              ++   F_Up_Char                  : constant Form_Request_Code := Key_Max + 29;
              ++   F_Down_Char                : constant Form_Request_Code := Key_Max + 30;
              ++
              ++   F_New_Line                 : constant Form_Request_Code := Key_Max + 31;
              ++   F_Insert_Char              : constant Form_Request_Code := Key_Max + 32;
              ++   F_Insert_Line              : constant Form_Request_Code := Key_Max + 33;
              ++   F_Delete_Char              : constant Form_Request_Code := Key_Max + 34;
              ++   F_Delete_Previous          : constant Form_Request_Code := Key_Max + 35;
              ++   F_Delete_Line              : constant Form_Request_Code := Key_Max + 36;
              ++   F_Delete_Word              : constant Form_Request_Code := Key_Max + 37;
              ++   F_Clear_EOL                : constant Form_Request_Code := Key_Max + 38;
              ++   F_Clear_EOF                : constant Form_Request_Code := Key_Max + 39;
              ++   F_Clear_Field              : constant Form_Request_Code := Key_Max + 40;
              ++   F_Overlay_Mode             : constant Form_Request_Code := Key_Max + 41;
              ++   F_Insert_Mode              : constant Form_Request_Code := Key_Max + 42;
              + 
              +    --  Vertical Scrolling
              +-   F_ScrollForward_Line       : constant Form_Request_Code := Key_Max + 43;
              +-   F_ScrollBackward_Line      : constant Form_Request_Code := Key_Max + 44;
              +-   F_ScrollForward_Page       : constant Form_Request_Code := Key_Max + 45;
              +-   F_ScrollBackward_Page      : constant Form_Request_Code := Key_Max + 46;
              +-   F_ScrollForward_HalfPage   : constant Form_Request_Code := Key_Max + 47;
              +-   F_ScrollBackward_HalfPage  : constant Form_Request_Code := Key_Max + 48;
              ++   F_ScrollForward_Line       : constant Form_Request_Code := Key_Max + 43;
              ++   F_ScrollBackward_Line      : constant Form_Request_Code := Key_Max + 44;
              ++   F_ScrollForward_Page       : constant Form_Request_Code := Key_Max + 45;
              ++   F_ScrollBackward_Page      : constant Form_Request_Code := Key_Max + 46;
              ++   F_ScrollForward_HalfPage   : constant Form_Request_Code := Key_Max + 47;
              ++   F_ScrollBackward_HalfPage  : constant Form_Request_Code := Key_Max + 48;
              + 
              +    --  Horizontal Scrolling
              +-   F_HScrollForward_Char      : constant Form_Request_Code := Key_Max + 49;
              +-   F_HScrollBackward_Char     : constant Form_Request_Code := Key_Max + 50;
              +-   F_HScrollForward_Line      : constant Form_Request_Code := Key_Max + 51;
              +-   F_HScrollBackward_Line     : constant Form_Request_Code := Key_Max + 52;
              +-   F_HScrollForward_HalfLine  : constant Form_Request_Code := Key_Max + 53;
              +-   F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54;
              +-
              +-   F_Validate_Field           : constant Form_Request_Code := Key_Max + 55;
              +-   F_Next_Choice              : constant Form_Request_Code := Key_Max + 56;
              +-   F_Previous_Choice          : constant Form_Request_Code := Key_Max + 57;
              ++   F_HScrollForward_Char      : constant Form_Request_Code := Key_Max + 49;
              ++   F_HScrollBackward_Char     : constant Form_Request_Code := Key_Max + 50;
              ++   F_HScrollForward_Line      : constant Form_Request_Code := Key_Max + 51;
              ++   F_HScrollBackward_Line     : constant Form_Request_Code := Key_Max + 52;
              ++   F_HScrollForward_HalfLine  : constant Form_Request_Code := Key_Max + 53;
              ++   F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54;
              ++
              ++   F_Validate_Field           : constant Form_Request_Code := Key_Max + 55;
              ++   F_Next_Choice              : constant Form_Request_Code := Key_Max + 56;
              ++   F_Previous_Choice          : constant Form_Request_Code := Key_Max + 57;
              + 
              +    --  For those who like the old 'C' style request names
              +-   REQ_NEXT_PAGE    : Form_Request_Code renames F_Next_Page;
              +-   REQ_PREV_PAGE    : Form_Request_Code renames F_Previous_Page;
              +-   REQ_FIRST_PAGE   : Form_Request_Code renames F_First_Page;
              +-   REQ_LAST_PAGE    : Form_Request_Code renames F_Last_Page;
              +-
              +-   REQ_NEXT_FIELD   : Form_Request_Code renames F_Next_Field;
              +-   REQ_PREV_FIELD   : Form_Request_Code renames F_Previous_Field;
              +-   REQ_FIRST_FIELD  : Form_Request_Code renames F_First_Field;
              +-   REQ_LAST_FIELD   : Form_Request_Code renames F_Last_Field;
              +-   REQ_SNEXT_FIELD  : Form_Request_Code renames F_Sorted_Next_Field;
              +-   REQ_SPREV_FIELD  : Form_Request_Code renames F_Sorted_Previous_Field;
              +-   REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field;
              +-   REQ_SLAST_FIELD  : Form_Request_Code renames F_Sorted_Last_Field;
              +-   REQ_LEFT_FIELD   : Form_Request_Code renames F_Left_Field;
              +-   REQ_RIGHT_FIELD  : Form_Request_Code renames F_Right_Field;
              +-   REQ_UP_FIELD     : Form_Request_Code renames F_Up_Field;
              +-   REQ_DOWN_FIELD   : Form_Request_Code renames F_Down_Field;
              +-
              +-   REQ_NEXT_CHAR    : Form_Request_Code renames F_Next_Char;
              +-   REQ_PREV_CHAR    : Form_Request_Code renames F_Previous_Char;
              +-   REQ_NEXT_LINE    : Form_Request_Code renames F_Next_Line;
              +-   REQ_PREV_LINE    : Form_Request_Code renames F_Previous_Line;
              +-   REQ_NEXT_WORD    : Form_Request_Code renames F_Next_Word;
              +-   REQ_PREV_WORD    : Form_Request_Code renames F_Previous_Word;
              +-   REQ_BEG_FIELD    : Form_Request_Code renames F_Begin_Field;
              +-   REQ_END_FIELD    : Form_Request_Code renames F_End_Field;
              +-   REQ_BEG_LINE     : Form_Request_Code renames F_Begin_Line;
              +-   REQ_END_LINE     : Form_Request_Code renames F_End_Line;
              +-   REQ_LEFT_CHAR    : Form_Request_Code renames F_Left_Char;
              +-   REQ_RIGHT_CHAR   : Form_Request_Code renames F_Right_Char;
              +-   REQ_UP_CHAR      : Form_Request_Code renames F_Up_Char;
              +-   REQ_DOWN_CHAR    : Form_Request_Code renames F_Down_Char;
              +-
              +-   REQ_NEW_LINE     : Form_Request_Code renames F_New_Line;
              +-   REQ_INS_CHAR     : Form_Request_Code renames F_Insert_Char;
              +-   REQ_INS_LINE     : Form_Request_Code renames F_Insert_Line;
              +-   REQ_DEL_CHAR     : Form_Request_Code renames F_Delete_Char;
              +-   REQ_DEL_PREV     : Form_Request_Code renames F_Delete_Previous;
              +-   REQ_DEL_LINE     : Form_Request_Code renames F_Delete_Line;
              +-   REQ_DEL_WORD     : Form_Request_Code renames F_Delete_Word;
              +-   REQ_CLR_EOL      : Form_Request_Code renames F_Clear_EOL;
              +-   REQ_CLR_EOF      : Form_Request_Code renames F_Clear_EOF;
              +-   REQ_CLR_FIELD    : Form_Request_Code renames F_Clear_Field;
              +-   REQ_OVL_MODE     : Form_Request_Code renames F_Overlay_Mode;
              +-   REQ_INS_MODE     : Form_Request_Code renames F_Insert_Mode;
              +-
              +-   REQ_SCR_FLINE    : Form_Request_Code renames F_ScrollForward_Line;
              +-   REQ_SCR_BLINE    : Form_Request_Code renames F_ScrollBackward_Line;
              +-   REQ_SCR_FPAGE    : Form_Request_Code renames F_ScrollForward_Page;
              +-   REQ_SCR_BPAGE    : Form_Request_Code renames F_ScrollBackward_Page;
              +-   REQ_SCR_FHPAGE   : Form_Request_Code renames F_ScrollForward_HalfPage;
              +-   REQ_SCR_BHPAGE   : Form_Request_Code renames F_ScrollBackward_HalfPage;
              +-
              +-   REQ_SCR_FCHAR    : Form_Request_Code renames F_HScrollForward_Char;
              +-   REQ_SCR_BCHAR    : Form_Request_Code renames F_HScrollBackward_Char;
              +-   REQ_SCR_HFLINE   : Form_Request_Code renames F_HScrollForward_Line;
              +-   REQ_SCR_HBLINE   : Form_Request_Code renames F_HScrollBackward_Line;
              +-   REQ_SCR_HFHALF   : Form_Request_Code renames F_HScrollForward_HalfLine;
              +-   REQ_SCR_HBHALF   : Form_Request_Code renames F_HScrollBackward_HalfLine;
              +-
              +-   REQ_VALIDATION   : Form_Request_Code renames F_Validate_Field;
              +-   REQ_NEXT_CHOICE  : Form_Request_Code renames F_Next_Choice;
              +-   REQ_PREV_CHOICE  : Form_Request_Code renames F_Previous_Choice;
              ++   REQ_NEXT_PAGE    : Form_Request_Code renames F_Next_Page;
              ++   REQ_PREV_PAGE    : Form_Request_Code renames F_Previous_Page;
              ++   REQ_FIRST_PAGE   : Form_Request_Code renames F_First_Page;
              ++   REQ_LAST_PAGE    : Form_Request_Code renames F_Last_Page;
              ++
              ++   REQ_NEXT_FIELD   : Form_Request_Code renames F_Next_Field;
              ++   REQ_PREV_FIELD   : Form_Request_Code renames F_Previous_Field;
              ++   REQ_FIRST_FIELD  : Form_Request_Code renames F_First_Field;
              ++   REQ_LAST_FIELD   : Form_Request_Code renames F_Last_Field;
              ++   REQ_SNEXT_FIELD  : Form_Request_Code renames F_Sorted_Next_Field;
              ++   REQ_SPREV_FIELD  : Form_Request_Code renames F_Sorted_Previous_Field;
              ++   REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field;
              ++   REQ_SLAST_FIELD  : Form_Request_Code renames F_Sorted_Last_Field;
              ++   REQ_LEFT_FIELD   : Form_Request_Code renames F_Left_Field;
              ++   REQ_RIGHT_FIELD  : Form_Request_Code renames F_Right_Field;
              ++   REQ_UP_FIELD     : Form_Request_Code renames F_Up_Field;
              ++   REQ_DOWN_FIELD   : Form_Request_Code renames F_Down_Field;
              ++
              ++   REQ_NEXT_CHAR    : Form_Request_Code renames F_Next_Char;
              ++   REQ_PREV_CHAR    : Form_Request_Code renames F_Previous_Char;
              ++   REQ_NEXT_LINE    : Form_Request_Code renames F_Next_Line;
              ++   REQ_PREV_LINE    : Form_Request_Code renames F_Previous_Line;
              ++   REQ_NEXT_WORD    : Form_Request_Code renames F_Next_Word;
              ++   REQ_PREV_WORD    : Form_Request_Code renames F_Previous_Word;
              ++   REQ_BEG_FIELD    : Form_Request_Code renames F_Begin_Field;
              ++   REQ_END_FIELD    : Form_Request_Code renames F_End_Field;
              ++   REQ_BEG_LINE     : Form_Request_Code renames F_Begin_Line;
              ++   REQ_END_LINE     : Form_Request_Code renames F_End_Line;
              ++   REQ_LEFT_CHAR    : Form_Request_Code renames F_Left_Char;
              ++   REQ_RIGHT_CHAR   : Form_Request_Code renames F_Right_Char;
              ++   REQ_UP_CHAR      : Form_Request_Code renames F_Up_Char;
              ++   REQ_DOWN_CHAR    : Form_Request_Code renames F_Down_Char;
              ++
              ++   REQ_NEW_LINE     : Form_Request_Code renames F_New_Line;
              ++   REQ_INS_CHAR     : Form_Request_Code renames F_Insert_Char;
              ++   REQ_INS_LINE     : Form_Request_Code renames F_Insert_Line;
              ++   REQ_DEL_CHAR     : Form_Request_Code renames F_Delete_Char;
              ++   REQ_DEL_PREV     : Form_Request_Code renames F_Delete_Previous;
              ++   REQ_DEL_LINE     : Form_Request_Code renames F_Delete_Line;
              ++   REQ_DEL_WORD     : Form_Request_Code renames F_Delete_Word;
              ++   REQ_CLR_EOL      : Form_Request_Code renames F_Clear_EOL;
              ++   REQ_CLR_EOF      : Form_Request_Code renames F_Clear_EOF;
              ++   REQ_CLR_FIELD    : Form_Request_Code renames F_Clear_Field;
              ++   REQ_OVL_MODE     : Form_Request_Code renames F_Overlay_Mode;
              ++   REQ_INS_MODE     : Form_Request_Code renames F_Insert_Mode;
              ++
              ++   REQ_SCR_FLINE    : Form_Request_Code renames F_ScrollForward_Line;
              ++   REQ_SCR_BLINE    : Form_Request_Code renames F_ScrollBackward_Line;
              ++   REQ_SCR_FPAGE    : Form_Request_Code renames F_ScrollForward_Page;
              ++   REQ_SCR_BPAGE    : Form_Request_Code renames F_ScrollBackward_Page;
              ++   REQ_SCR_FHPAGE   : Form_Request_Code renames F_ScrollForward_HalfPage;
              ++   REQ_SCR_BHPAGE   : Form_Request_Code renames F_ScrollBackward_HalfPage;
              ++
              ++   REQ_SCR_FCHAR    : Form_Request_Code renames F_HScrollForward_Char;
              ++   REQ_SCR_BCHAR    : Form_Request_Code renames F_HScrollBackward_Char;
              ++   REQ_SCR_HFLINE   : Form_Request_Code renames F_HScrollForward_Line;
              ++   REQ_SCR_HBLINE   : Form_Request_Code renames F_HScrollBackward_Line;
              ++   REQ_SCR_HFHALF   : Form_Request_Code renames F_HScrollForward_HalfLine;
              ++   REQ_SCR_HBHALF   : Form_Request_Code renames F_HScrollBackward_HalfLine;
              ++
              ++   REQ_VALIDATION   : Form_Request_Code renames F_Validate_Field;
              ++   REQ_NEXT_CHOICE  : Form_Request_Code renames F_Next_Choice;
              ++   REQ_PREV_CHOICE  : Form_Request_Code renames F_Previous_Choice;
              + 
              +-   procedure Request_Name (Key  : in Form_Request_Code;
              +-                           Name : out String);
              ++   procedure Request_Name (Key  : in Form_Request_Code;
              ++                           Name : out String);
              + 
              +-   function  Request_Name (Key : Form_Request_Code) return String;
              ++   function  Request_Name (Key : Form_Request_Code) return String;
              +    --  Same as function
              +    pragma Inline (Request_Name);
              + 
              +    ------------------
              +    --  Exceptions  --
              +    ------------------
              +-   Form_Exception : exception;
              ++   Form_Exception : exception;
              + 
              +    --  |=====================================================================
              +    --  | Man page form_field_new.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   function Create (Height       : Line_Count;
              +-                    Width        : Column_Count;
              +-                    Top          : Line_Position;
              +-                    Left         : Column_Position;
              +-                    Off_Screen   : Natural := 0;
              +-                    More_Buffers : Buffer_Number := Buffer_Number'First)
              +-                    return Field;
              ++   function Create (Height       : Line_Count;
              ++                    Width        : Column_Count;
              ++                    Top          : Line_Position;
              ++                    Left         : Column_Position;
              ++                    Off_Screen   : Natural := 0;
              ++                    More_Buffers : Buffer_Number := Buffer_Number'First)
              ++                    return Field;
              +    --  AKA: new_field()
              +    --  An overloaded Create is defined later. Pragma Inline appears there.
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   function New_Field (Height       : Line_Count;
              +-                       Width        : Column_Count;
              +-                       Top          : Line_Position;
              +-                       Left         : Column_Position;
              +-                       Off_Screen   : Natural := 0;
              +-                       More_Buffers : Buffer_Number := Buffer_Number'First)
              +-                       return Field renames Create;
              ++   function New_Field (Height       : Line_Count;
              ++                       Width        : Column_Count;
              ++                       Top          : Line_Position;
              ++                       Left         : Column_Position;
              ++                       Off_Screen   : Natural := 0;
              ++                       More_Buffers : Buffer_Number := Buffer_Number'First)
              ++                       return Field renames Create;
              +    --  AKA: new_field()
              +    pragma Inline (New_Field);
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   procedure Delete (Fld : in out Field);
              ++   procedure Delete (Fld : in out Field);
              +    --  AKA: free_field()
              +    --  Reset Fld to Null_Field
              +    --  An overloaded Delete is defined later. Pragma Inline appears there.
              + 
              +    --  #1A NAME="AFU_4"#2|
              +-   function Duplicate (Fld  : Field;
              +-                       Top  : Line_Position;
              +-                       Left : Column_Position) return Field;
              ++   function Duplicate (Fld  : Field;
              ++                       Top  : Line_Position;
              ++                       Left : Column_Position) return Field;
              +    --  AKA: dup_field()
              +    pragma Inline (Duplicate);
              + 
              +    --  #1A NAME="AFU_5"#2|
              +-   function Link (Fld  : Field;
              +-                  Top  : Line_Position;
              +-                  Left : Column_Position) return Field;
              ++   function Link (Fld  : Field;
              ++                  Top  : Line_Position;
              ++                  Left : Column_Position) return Field;
              +    --  AKA: link_field()
              +-   pragma Inline (Link);
              ++   pragma Inline (Link);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_field_just.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_6"#2|
              +-   procedure Set_Justification (Fld  : in Field;
              +-                                Just : in Field_Justification := None);
              ++   procedure Set_Justification (Fld  : in Field;
              ++                                Just : in Field_Justification := None);
              +    --  AKA: set_field_just()
              +-   pragma Inline (Set_Justification);
              ++   pragma Inline (Set_Justification);
              + 
              +    --  #1A NAME="AFU_7"#2|
              +-   function Get_Justification (Fld : Field) return Field_Justification;
              ++   function Get_Justification (Fld : Field) return Field_Justification;
              +    --  AKA: field_just()
              +-   pragma Inline (Get_Justification);
              ++   pragma Inline (Get_Justification);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_field_buffer.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_8"#2|
              +-   procedure Set_Buffer
              +-     (Fld    : in Field;
              +-      Buffer : in Buffer_Number := Buffer_Number'First;
              +-      Str    : in String);
              ++   procedure Set_Buffer
              ++     (Fld    : in Field;
              ++      Buffer : in Buffer_Number := Buffer_Number'First;
              ++      Str    : in String);
              +    --  AKA: set_field_buffer()
              +    --  Not inlined
              + 
              +    --  #1A NAME="AFU_9"#2|
              +-   procedure Get_Buffer
              +-     (Fld    : in Field;
              +-      Buffer : in Buffer_Number := Buffer_Number'First;
              +-      Str    : out String);
              ++   procedure Get_Buffer
              ++     (Fld    : in Field;
              ++      Buffer : in Buffer_Number := Buffer_Number'First;
              ++      Str    : out String);
              +    --  AKA: field_buffer()
              + 
              +-   function Get_Buffer
              +-     (Fld    : in Field;
              +-      Buffer : in Buffer_Number := Buffer_Number'First) return String;
              ++   function Get_Buffer
              ++     (Fld    : in Field;
              ++      Buffer : in Buffer_Number := Buffer_Number'First) return String;
              +    --  AKA: field_buffer()
              +    --  Same but as function
              +    pragma Inline (Get_Buffer);
              + 
              +    --  #1A NAME="AFU_10"#2|
              +-   procedure Set_Status (Fld    : in Field;
              +-                         Status : in Boolean := True);
              ++   procedure Set_Status (Fld    : in Field;
              ++                         Status : in Boolean := True);
              +    --  AKA: set_field_status()
              +-   pragma Inline (Set_Status);
              ++   pragma Inline (Set_Status);
              + 
              +    --  #1A NAME="AFU_11"#2|
              +-   function Changed (Fld : Field) return Boolean;
              ++   function Changed (Fld : Field) return Boolean;
              +    --  AKA: field_status()
              +-   pragma Inline (Changed);
              ++   pragma Inline (Changed);
              + 
              +    --  #1A NAME="AFU_12"#2|
              +-   procedure Set_Maximum_Size (Fld : in Field;
              +-                               Max : in Natural := 0);
              ++   procedure Set_Maximum_Size (Fld : in Field;
              ++                               Max : in Natural := 0);
              +    --  AKA: set_field_max()
              +-   pragma Inline (Set_Maximum_Size);
              ++   pragma Inline (Set_Maximum_Size);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_field_opts.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_13"#2|
              +-   procedure Set_Options (Fld     : in Field;
              +-                          Options : in Field_Option_Set);
              ++   procedure Set_Options (Fld     : in Field;
              ++                          Options : in Field_Option_Set);
              +    --  AKA: set_field_opts()
              +    --  An overloaded version is defined later. Pragma Inline appears there
              + 
              +    --  #1A NAME="AFU_14"#2|
              +-   procedure Switch_Options (Fld     : in Field;
              +-                             Options : in Field_Option_Set;
              +-                             On      : Boolean := True);
              ++   procedure Switch_Options (Fld     : in Field;
              ++                             Options : in Field_Option_Set;
              ++                             On      : Boolean := True);
              +    --  AKA: field_opts_on()
              +    --  AKA: field_opts_off()
              +    --  An overloaded version is defined later. Pragma Inline appears there
              + 
              +    --  #1A NAME="AFU_15"#2|
              +-   procedure Get_Options (Fld     : in  Field;
              +-                          Options : out Field_Option_Set);
              ++   procedure Get_Options (Fld     : in  Field;
              ++                          Options : out Field_Option_Set);
              +    --  AKA: field_opts()
              + 
              +    --  #1A NAME="AFU_16"#2|
              +-   function Get_Options (Fld : Field := Null_Field)
              +-                         return Field_Option_Set;
              ++   function Get_Options (Fld : Field := Null_Field)
              ++                         return Field_Option_Set;
              +    --  AKA: field_opts()
              +    --  An overloaded version is defined later. Pragma Inline appears there
              + 
              +@@ -429,161 +428,161 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_17"#2|
              +-   procedure Set_Foreground
              +-     (Fld   : in Field;
              +-      Fore  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              ++   procedure Set_Foreground
              ++     (Fld   : in Field;
              ++      Fore  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              +    --  AKA: set_field_fore()
              +-   pragma Inline (Set_Foreground);
              ++   pragma Inline (Set_Foreground);
              + 
              +    --  #1A NAME="AFU_18"#2|
              +-   procedure Foreground (Fld  : in  Field;
              +-                         Fore : out Character_Attribute_Set);
              ++   procedure Foreground (Fld  : in  Field;
              ++                         Fore : out Character_Attribute_Set);
              +    --  AKA: field_fore()
              + 
              +    --  #1A NAME="AFU_19"#2|
              +-   procedure Foreground (Fld   : in  Field;
              +-                         Fore  : out Character_Attribute_Set;
              +-                         Color : out Color_Pair);
              ++   procedure Foreground (Fld   : in  Field;
              ++                         Fore  : out Character_Attribute_Set;
              ++                         Color : out Color_Pair);
              +    --  AKA: field_fore()
              +    pragma Inline (Foreground);
              + 
              +    --  #1A NAME="AFU_20"#2|
              +-   procedure Set_Background
              +-     (Fld   : in Field;
              +-      Back  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              ++   procedure Set_Background
              ++     (Fld   : in Field;
              ++      Back  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              +    --  AKA: set_field_back()
              +    pragma Inline (Set_Background);
              + 
              +    --  #1A NAME="AFU_21"#2|
              +-   procedure Background (Fld  : in  Field;
              +-                         Back : out Character_Attribute_Set);
              ++   procedure Background (Fld  : in  Field;
              ++                         Back : out Character_Attribute_Set);
              +    --  AKA: field_back()
              + 
              +    --  #1A NAME="AFU_22"#2|
              +-   procedure Background (Fld   : in  Field;
              +-                         Back  : out Character_Attribute_Set;
              +-                         Color : out Color_Pair);
              ++   procedure Background (Fld   : in  Field;
              ++                         Back  : out Character_Attribute_Set;
              ++                         Color : out Color_Pair);
              +    --  AKA: field_back()
              +    pragma Inline (Background);
              + 
              +    --  #1A NAME="AFU_23"#2|
              +-   procedure Set_Pad_Character (Fld : in Field;
              +-                                Pad : in Character := Space);
              ++   procedure Set_Pad_Character (Fld : in Field;
              ++                                Pad : in Character := Space);
              +    --  AKA: set_field_pad()
              +-   pragma Inline (Set_Pad_Character);
              ++   pragma Inline (Set_Pad_Character);
              + 
              +    --  #1A NAME="AFU_24"#2|
              +-   procedure Pad_Character (Fld : in  Field;
              +-                            Pad : out Character);
              ++   procedure Pad_Character (Fld : in  Field;
              ++                            Pad : out Character);
              +    --  AKA: field_pad()
              +-   pragma Inline (Pad_Character);
              ++   pragma Inline (Pad_Character);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_field_info.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_25"#2|
              +-   procedure Info (Fld                : in  Field;
              +-                   Lines              : out Line_Count;
              +-                   Columns            : out Column_Count;
              +-                   First_Row          : out Line_Position;
              +-                   First_Column       : out Column_Position;
              +-                   Off_Screen         : out Natural;
              +-                   Additional_Buffers : out Buffer_Number);
              ++   procedure Info (Fld                : in  Field;
              ++                   Lines              : out Line_Count;
              ++                   Columns            : out Column_Count;
              ++                   First_Row          : out Line_Position;
              ++                   First_Column       : out Column_Position;
              ++                   Off_Screen         : out Natural;
              ++                   Additional_Buffers : out Buffer_Number);
              +    --  AKA: field_info()
              +-   pragma Inline (Info);
              ++   pragma Inline (Info);
              + 
              +    --  #1A NAME="AFU_26"#2|
              +-   procedure Dynamic_Info (Fld     : in Field;
              +-                           Lines   : out Line_Count;
              +-                           Columns : out Column_Count;
              +-                           Max     : out Natural);
              ++   procedure Dynamic_Info (Fld     : in Field;
              ++                           Lines   : out Line_Count;
              ++                           Columns : out Column_Count;
              ++                           Max     : out Natural);
              +    --  AKA: dynamic_field_info()
              +-   pragma Inline (Dynamic_Info);
              ++   pragma Inline (Dynamic_Info);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_win.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_27"#2|
              +-   procedure Set_Window (Frm : in Form;
              +-                         Win : in Window);
              ++   procedure Set_Window (Frm : in Form;
              ++                         Win : in Window);
              +    --  AKA: set_form_win()
              +-   pragma Inline (Set_Window);
              ++   pragma Inline (Set_Window);
              + 
              +    --  #1A NAME="AFU_28"#2|
              +-   function Get_Window (Frm : Form) return Window;
              ++   function Get_Window (Frm : Form) return Window;
              +    --  AKA: form_win()
              +-   pragma Inline (Get_Window);
              ++   pragma Inline (Get_Window);
              + 
              +    --  #1A NAME="AFU_29"#2|
              +-   procedure Set_Sub_Window (Frm : in Form;
              +-                             Win : in Window);
              ++   procedure Set_Sub_Window (Frm : in Form;
              ++                             Win : in Window);
              +    --  AKA: set_form_sub()
              +-   pragma Inline (Set_Sub_Window);
              ++   pragma Inline (Set_Sub_Window);
              + 
              +    --  #1A NAME="AFU_30"#2|
              +-   function Get_Sub_Window (Frm : Form) return Window;
              ++   function Get_Sub_Window (Frm : Form) return Window;
              +    --  AKA: form_sub()
              +-   pragma Inline (Get_Sub_Window);
              ++   pragma Inline (Get_Sub_Window);
              + 
              +    --  #1A NAME="AFU_31"#2|
              +-   procedure Scale (Frm     : in Form;
              +-                    Lines   : out Line_Count;
              +-                    Columns : out Column_Count);
              ++   procedure Scale (Frm     : in Form;
              ++                    Lines   : out Line_Count;
              ++                    Columns : out Column_Count);
              +    --  AKA: scale_form()
              +-   pragma Inline (Scale);
              ++   pragma Inline (Scale);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_hook.3x
              +    --  |=====================================================================
              + 
              +-   type Form_Hook_Function is access procedure (Frm : in Form);
              +-   pragma Convention (C, Form_Hook_Function);
              ++   type Form_Hook_Function is access procedure (Frm : in Form);
              ++   pragma Convention (C, Form_Hook_Function);
              + 
              +    --  #1A NAME="AFU_32"#2|
              +-   procedure Set_Field_Init_Hook (Frm  : in Form;
              +-                                  Proc : in Form_Hook_Function);
              ++   procedure Set_Field_Init_Hook (Frm  : in Form;
              ++                                  Proc : in Form_Hook_Function);
              +    --  AKA: set_field_init()
              +-   pragma Inline (Set_Field_Init_Hook);
              ++   pragma Inline (Set_Field_Init_Hook);
              + 
              +    --  #1A NAME="AFU_33"#2|
              +-   procedure Set_Field_Term_Hook (Frm  : in Form;
              +-                                  Proc : in Form_Hook_Function);
              ++   procedure Set_Field_Term_Hook (Frm  : in Form;
              ++                                  Proc : in Form_Hook_Function);
              +    --  AKA: set_field_term()
              +-   pragma Inline (Set_Field_Term_Hook);
              ++   pragma Inline (Set_Field_Term_Hook);
              + 
              +    --  #1A NAME="AFU_34"#2|
              +-   procedure Set_Form_Init_Hook (Frm  : in Form;
              +-                                 Proc : in Form_Hook_Function);
              ++   procedure Set_Form_Init_Hook (Frm  : in Form;
              ++                                 Proc : in Form_Hook_Function);
              +    --  AKA: set_form_init()
              +-   pragma Inline (Set_Form_Init_Hook);
              ++   pragma Inline (Set_Form_Init_Hook);
              + 
              +    --  #1A NAME="AFU_35"#2|
              +-   procedure Set_Form_Term_Hook (Frm  : in Form;
              +-                                 Proc : in Form_Hook_Function);
              ++   procedure Set_Form_Term_Hook (Frm  : in Form;
              ++                                 Proc : in Form_Hook_Function);
              +    --  AKA: set_form_term()
              +-   pragma Inline (Set_Form_Term_Hook);
              ++   pragma Inline (Set_Form_Term_Hook);
              + 
              +    --  #1A NAME="AFU_36"#2|
              +-   function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
              ++   function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
              +    --  AKA: field_init()
              +    pragma Import (C, Get_Field_Init_Hook, "field_init");
              + 
              +    --  #1A NAME="AFU_37"#2|
              +-   function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
              ++   function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
              +    --  AKA: field_term()
              +    pragma Import (C, Get_Field_Term_Hook, "field_term");
              + 
              +    --  #1A NAME="AFU_38"#2|
              +-   function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
              ++   function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
              +    --  AKA: form_init()
              +    pragma Import (C, Get_Form_Init_Hook, "form_init");
              + 
              +    --  #1A NAME="AFU_39"#2|
              +-   function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
              ++   function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
              +    --  AKA: form_term()
              +    pragma Import (C, Get_Form_Term_Hook, "form_term");
              + 
              +@@ -592,52 +591,52 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_40"#2|
              +-   procedure Redefine (Frm  : in Form;
              +-                       Flds : in Field_Array_Access);
              ++   procedure Redefine (Frm  : in Form;
              ++                       Flds : in Field_Array_Access);
              +    --  AKA: set_form_fields()
              +-   pragma Inline (Redefine);
              ++   pragma Inline (Redefine);
              + 
              +    --  #1A NAME="AFU_41"#2|
              +-   procedure Set_Fields (Frm  : in Form;
              +-                         Flds : in Field_Array_Access) renames Redefine;
              ++   procedure Set_Fields (Frm  : in Form;
              ++                         Flds : in Field_Array_Access) renames Redefine;
              +    --  AKA: set_form_fields()
              +    --  pragma Inline (Set_Fields);
              + 
              +    --  #1A NAME="AFU_42"#2|
              +-   function Fields (Frm   : Form;
              +-                    Index : Positive) return Field;
              ++   function Fields (Frm   : Form;
              ++                    Index : Positive) return Field;
              +    --  AKA: form_fields()
              +-   pragma Inline (Fields);
              ++   pragma Inline (Fields);
              + 
              +    --  #1A NAME="AFU_43"#2|
              +-   function Field_Count (Frm : Form) return Natural;
              ++   function Field_Count (Frm : Form) return Natural;
              +    --  AKA: field_count()
              +-   pragma Inline (Field_Count);
              ++   pragma Inline (Field_Count);
              + 
              +    --  #1A NAME="AFU_44"#2|
              +-   procedure Move (Fld    : in Field;
              +-                   Line   : in Line_Position;
              +-                   Column : in Column_Position);
              ++   procedure Move (Fld    : in Field;
              ++                   Line   : in Line_Position;
              ++                   Column : in Column_Position);
              +    --  AKA: move_field()
              +-   pragma Inline (Move);
              ++   pragma Inline (Move);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_new.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_45"#2|
              +-   function Create (Fields : Field_Array_Access) return Form;
              ++   function Create (Fields : Field_Array_Access) return Form;
              +    --  AKA: new_form()
              +    pragma Inline (Create);
              + 
              +    --  #1A NAME="AFU_46"#2|
              +-   function New_Form (Fields : Field_Array_Access) return Form
              +-     renames Create;
              ++   function New_Form (Fields : Field_Array_Access) return Form
              ++     renames Create;
              +    --  AKA: new_form()
              +    --  pragma Inline (New_Form);
              + 
              +    --  #1A NAME="AFU_47"#2|
              +-   procedure Delete (Frm : in out Form);
              ++   procedure Delete (Frm : in out Form);
              +    --  AKA: free_form()
              +    --  Reset Frm to Null_Form
              +    pragma Inline (Delete);
              +@@ -647,26 +646,26 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_48"#2|
              +-   procedure Set_Options (Frm     : in Form;
              +-                          Options : in Form_Option_Set);
              ++   procedure Set_Options (Frm     : in Form;
              ++                          Options : in Form_Option_Set);
              +    --  AKA: set_form_opts()
              +    pragma Inline (Set_Options);
              + 
              +    --  #1A NAME="AFU_49"#2|
              +-   procedure Switch_Options (Frm     : in Form;
              +-                             Options : in Form_Option_Set;
              +-                             On      : Boolean := True);
              ++   procedure Switch_Options (Frm     : in Form;
              ++                             Options : in Form_Option_Set;
              ++                             On      : Boolean := True);
              +    --  AKA: form_opts_on()
              +    --  AKA: form_opts_off()
              +    pragma Inline (Switch_Options);
              + 
              +    --  #1A NAME="AFU_50"#2|
              +-   procedure Get_Options (Frm     : in  Form;
              +-                          Options : out Form_Option_Set);
              ++   procedure Get_Options (Frm     : in  Form;
              ++                          Options : out Form_Option_Set);
              +    --  AKA: form_opts()
              + 
              +    --  #1A NAME="AFU_51"#2|
              +-   function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
              ++   function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
              +    --  AKA: form_opts()
              +    pragma Inline (Get_Options);
              + 
              +@@ -675,47 +674,47 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_52"#2|
              +-   procedure Post (Frm  : in Form;
              +-                   Post : in Boolean := True);
              ++   procedure Post (Frm  : in Form;
              ++                   Post : in Boolean := True);
              +    --  AKA: post_form()
              +    --  AKA: unpost_form()
              +-   pragma Inline (Post);
              ++   pragma Inline (Post);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_cursor.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_53"#2|
              +-   procedure Position_Cursor (Frm : Form);
              ++   procedure Position_Cursor (Frm : Form);
              +    --  AKA: pos_form_cursor()
              +-   pragma Inline (Position_Cursor);
              ++   pragma Inline (Position_Cursor);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_data.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_54"#2|
              +-   function Data_Ahead (Frm : Form) return Boolean;
              ++   function Data_Ahead (Frm : Form) return Boolean;
              +    --  AKA: data_ahead()
              +-   pragma Inline (Data_Ahead);
              ++   pragma Inline (Data_Ahead);
              + 
              +    --  #1A NAME="AFU_55"#2|
              +-   function Data_Behind (Frm : Form) return Boolean;
              ++   function Data_Behind (Frm : Form) return Boolean;
              +    --  AKA: data_behind()
              +-   pragma Inline (Data_Behind);
              ++   pragma Inline (Data_Behind);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_driver.3x
              +    --  |=====================================================================
              + 
              +-   type Driver_Result is (Form_Ok,
              +-                          Request_Denied,
              +-                          Unknown_Request,
              +-                          Invalid_Field);
              ++   type Driver_Result is (Form_Ok,
              ++                          Request_Denied,
              ++                          Unknown_Request,
              ++                          Invalid_Field);
              + 
              +    --  #1A NAME="AFU_56"#2|
              +-   function Driver (Frm : Form;
              +-                    Key : Key_Code) return Driver_Result;
              ++   function Driver (Frm : Form;
              ++                    Key : Key_Code) return Driver_Result;
              +    --  AKA: form_driver()
              +    --  Driver not inlined
              + 
              +@@ -723,52 +722,52 @@
              +    --  | Man page form_page.3x
              +    --  |=====================================================================
              + 
              +-   type Page_Number is new Natural;
              ++   type Page_Number is new Natural;
              + 
              +    --  #1A NAME="AFU_57"#2|
              +-   procedure Set_Current (Frm : in Form;
              +-                          Fld : in Field);
              ++   procedure Set_Current (Frm : in Form;
              ++                          Fld : in Field);
              +    --  AKA: set_current_field()
              +-   pragma Inline (Set_Current);
              ++   pragma Inline (Set_Current);
              + 
              +    --  #1A NAME="AFU_58"#2|
              +-   function Current (Frm : in Form) return Field;
              ++   function Current (Frm : in Form) return Field;
              +    --  AKA: current_field()
              +-   pragma Inline (Current);
              ++   pragma Inline (Current);
              + 
              +    --  #1A NAME="AFU_59"#2|
              +-   procedure Set_Page (Frm  : in Form;
              +-                       Page : in Page_Number := Page_Number'First);
              ++   procedure Set_Page (Frm  : in Form;
              ++                       Page : in Page_Number := Page_Number'First);
              +    --  AKA: set_form_page()
              +-   pragma Inline (Set_Page);
              ++   pragma Inline (Set_Page);
              + 
              +    --  #1A NAME="AFU_60"#2|
              +-   function Page (Frm : Form) return Page_Number;
              ++   function Page (Frm : Form) return Page_Number;
              +    --  AKA: form_page()
              +-   pragma Inline (Page);
              ++   pragma Inline (Page);
              + 
              +    --  #1A NAME="AFU_61"#2|
              +-   function Get_Index (Fld : Field) return Positive;
              ++   function Get_Index (Fld : Field) return Positive;
              +    --  AKA: field_index()
              +    --  Please note that in this binding we start the numbering of fields
              +    --  with 1. So this is number is one more than you get from the low
              +    --  level call.
              +-   pragma Inline (Get_Index);
              ++   pragma Inline (Get_Index);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_new_page.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_62"#2|
              +-   procedure Set_New_Page (Fld      : in Field;
              +-                           New_Page : in Boolean := True);
              ++   procedure Set_New_Page (Fld      : in Field;
              ++                           New_Page : in Boolean := True);
              +    --  AKA: set_new_page()
              +-   pragma Inline (Set_New_Page);
              ++   pragma Inline (Set_New_Page);
              + 
              +    --  #1A NAME="AFU_63"#2|
              +-   function Is_New_Page (Fld : Field) return Boolean;
              ++   function Is_New_Page (Fld : Field) return Boolean;
              +    --  AKA: new_page()
              +-   pragma Inline (Is_New_Page);
              ++   pragma Inline (Is_New_Page);
              + 
              +    --  |=====================================================================
              +    --  | Man page form_requestname.3x
              +@@ -777,11 +776,11 @@
              + 
              + ------------------------------------------------------------------------------
              + private
              +-   type Field is new System.Storage_Elements.Integer_Address;
              +-   type Form  is new System.Storage_Elements.Integer_Address;
              ++   type Field is new System.Storage_Elements.Integer_Address;
              ++   type Form  is new System.Storage_Elements.Integer_Address;
              + 
              +-   Null_Field : constant Field := 0;
              +-   Null_Form  : constant Form  := 0;
              ++   Null_Field : constant Field := 0;
              ++   Null_Form  : constant Form  := 0;
              + 
              +-end Terminal_Interface.Curses.Forms;
              ++end Terminal_Interface.Curses.Forms;
              + 
              +Index: doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-menus-item_user_data.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -47,10 +46,10 @@
              + ------------------------------------------------------------------------------
              + 
              + generic
              +-   type User is limited private;
              +-   type User_Access is access User;
              +-package Terminal_Interface.Curses.Menus.Item_User_Data is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Menus.Item_User_Data);
              ++   type User is limited private;
              ++   type User_Access is access User;
              ++package Terminal_Interface.Curses.Menus.Item_User_Data is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Menus.Item_User_Data);
              + 
              +    --  The binding uses the same user pointer for menu items
              +    --  as the low level C implementation. So you can safely
              +@@ -61,21 +60,21 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Set_User_Data (Itm  : in Item;
              +-                            Data : in User_Access);
              ++   procedure Set_User_Data (Itm  : in Item;
              ++                            Data : in User_Access);
              +    --  AKA: set_item_userptr
              +-   pragma Inline (Set_User_Data);
              ++   pragma Inline (Set_User_Data);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Get_User_Data (Itm  : in  Item;
              +-                            Data : out User_Access);
              ++   procedure Get_User_Data (Itm  : in  Item;
              ++                            Data : out User_Access);
              +    --  AKA: item_userptr
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   function Get_User_Data (Itm  : in  Item) return User_Access;
              ++   function Get_User_Data (Itm  : in  Item) return User_Access;
              +    --  AKA: item_userptr
              +    --  Same as function
              +    pragma Inline (Get_User_Data);
              + 
              +-end Terminal_Interface.Curses.Menus.Item_User_Data;
              ++end Terminal_Interface.Curses.Menus.Item_User_Data;
              + 
              +Index: doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-menus-menu_user_data.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -46,31 +45,31 @@
              + ------------------------------------------------------------------------------
              + 
              + generic
              +-   type User is limited private;
              +-   type User_Access is access User;
              +-package Terminal_Interface.Curses.Menus.Menu_User_Data is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Menus.Menu_User_Data);
              ++   type User is limited private;
              ++   type User_Access is access User;
              ++package Terminal_Interface.Curses.Menus.Menu_User_Data is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Menus.Menu_User_Data);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_userptr.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Set_User_Data (Men  : in Menu;
              +-                            Data : in User_Access);
              ++   procedure Set_User_Data (Men  : in Menu;
              ++                            Data : in User_Access);
              +    --  AKA: set_menu_userptr
              +-   pragma Inline (Set_User_Data);
              ++   pragma Inline (Set_User_Data);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Get_User_Data (Men  : in  Menu;
              +-                            Data : out User_Access);
              ++   procedure Get_User_Data (Men  : in  Menu;
              ++                            Data : out User_Access);
              +    --  AKA: menu_userptr
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   function Get_User_Data (Men  : in  Menu) return User_Access;
              ++   function Get_User_Data (Men  : in  Menu) return User_Access;
              +    --  AKA: menu_userptr
              +    --  Same as function
              +    pragma Inline (Get_User_Data);
              + 
              +-end Terminal_Interface.Curses.Menus.Menu_User_Data;
              ++end Terminal_Interface.Curses.Menus.Menu_User_Data;
              + 
              +Index: doc/html/ada/terminal_interface-curses-menus__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-menus__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-menus__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-menus.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -41,8 +40,8 @@
              + ------------------------------------------------------------------------------
              + --  Author:  Juergen Pfeifer, 1996
              + --  Version Control:
              +---  @Revision: 1.26 @
              +---  @Date: 2006/06/25 14:30:22 @
              ++--  @Revision: 1.27 @
              ++--  @Date: 2007/05/05 20:20:52 @
              + --  Binding Version 01.00
              + ------------------------------------------------------------------------------
              + --  menu binding.
              +@@ -52,90 +51,90 @@
              + with System;
              + with Ada.Characters.Latin_1;
              + 
              +-package Terminal_Interface.Curses.Menus is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Menus);
              ++package Terminal_Interface.Curses.Menus is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Menus);
              +    pragma Linker_Options ("-lmenu");
              +    pragma Linker_Options ("-lncurses");
              + 
              +    Space : Character renames Ada.Characters.Latin_1.Space;
              + 
              +-   type Item is private;
              +-   type Menu is private;
              ++   type Item is private;
              ++   type Menu is private;
              + 
              +    ---------------------------
              +    --  Interface constants  --
              +    ---------------------------
              +-   Null_Item : constant Item;
              +-   Null_Menu : constant Menu;
              ++   Null_Item : constant Item;
              ++   Null_Menu : constant Menu;
              + 
              +-   subtype Menu_Request_Code is Key_Code
              +-     range (Key_Max + 1) .. (Key_Max + 17);
              ++   subtype Menu_Request_Code is Key_Code
              ++     range (Key_Max + 1) .. (Key_Max + 17);
              + 
              +    --  The prefix M_ stands for "Menu Request"
              +-   M_Left_Item       : constant Menu_Request_Code := Key_Max + 1;
              +-   M_Right_Item      : constant Menu_Request_Code := Key_Max + 2;
              +-   M_Up_Item         : constant Menu_Request_Code := Key_Max + 3;
              +-   M_Down_Item       : constant Menu_Request_Code := Key_Max + 4;
              +-   M_ScrollUp_Line   : constant Menu_Request_Code := Key_Max + 5;
              +-   M_ScrollDown_Line : constant Menu_Request_Code := Key_Max + 6;
              +-   M_ScrollDown_Page : constant Menu_Request_Code := Key_Max + 7;
              +-   M_ScrollUp_Page   : constant Menu_Request_Code := Key_Max + 8;
              +-   M_First_Item      : constant Menu_Request_Code := Key_Max + 9;
              +-   M_Last_Item       : constant Menu_Request_Code := Key_Max + 10;
              +-   M_Next_Item       : constant Menu_Request_Code := Key_Max + 11;
              +-   M_Previous_Item   : constant Menu_Request_Code := Key_Max + 12;
              +-   M_Toggle_Item     : constant Menu_Request_Code := Key_Max + 13;
              +-   M_Clear_Pattern   : constant Menu_Request_Code := Key_Max + 14;
              +-   M_Back_Pattern    : constant Menu_Request_Code := Key_Max + 15;
              +-   M_Next_Match      : constant Menu_Request_Code := Key_Max + 16;
              +-   M_Previous_Match  : constant Menu_Request_Code := Key_Max + 17;
              ++   M_Left_Item       : constant Menu_Request_Code := Key_Max + 1;
              ++   M_Right_Item      : constant Menu_Request_Code := Key_Max + 2;
              ++   M_Up_Item         : constant Menu_Request_Code := Key_Max + 3;
              ++   M_Down_Item       : constant Menu_Request_Code := Key_Max + 4;
              ++   M_ScrollUp_Line   : constant Menu_Request_Code := Key_Max + 5;
              ++   M_ScrollDown_Line : constant Menu_Request_Code := Key_Max + 6;
              ++   M_ScrollDown_Page : constant Menu_Request_Code := Key_Max + 7;
              ++   M_ScrollUp_Page   : constant Menu_Request_Code := Key_Max + 8;
              ++   M_First_Item      : constant Menu_Request_Code := Key_Max + 9;
              ++   M_Last_Item       : constant Menu_Request_Code := Key_Max + 10;
              ++   M_Next_Item       : constant Menu_Request_Code := Key_Max + 11;
              ++   M_Previous_Item   : constant Menu_Request_Code := Key_Max + 12;
              ++   M_Toggle_Item     : constant Menu_Request_Code := Key_Max + 13;
              ++   M_Clear_Pattern   : constant Menu_Request_Code := Key_Max + 14;
              ++   M_Back_Pattern    : constant Menu_Request_Code := Key_Max + 15;
              ++   M_Next_Match      : constant Menu_Request_Code := Key_Max + 16;
              ++   M_Previous_Match  : constant Menu_Request_Code := Key_Max + 17;
              + 
              +    --  For those who like the old 'C' names for the request codes
              +-   REQ_LEFT_ITEM     : Menu_Request_Code renames M_Left_Item;
              +-   REQ_RIGHT_ITEM    : Menu_Request_Code renames M_Right_Item;
              +-   REQ_UP_ITEM       : Menu_Request_Code renames M_Up_Item;
              +-   REQ_DOWN_ITEM     : Menu_Request_Code renames M_Down_Item;
              +-   REQ_SCR_ULINE     : Menu_Request_Code renames M_ScrollUp_Line;
              +-   REQ_SCR_DLINE     : Menu_Request_Code renames M_ScrollDown_Line;
              +-   REQ_SCR_DPAGE     : Menu_Request_Code renames M_ScrollDown_Page;
              +-   REQ_SCR_UPAGE     : Menu_Request_Code renames M_ScrollUp_Page;
              +-   REQ_FIRST_ITEM    : Menu_Request_Code renames M_First_Item;
              +-   REQ_LAST_ITEM     : Menu_Request_Code renames M_Last_Item;
              +-   REQ_NEXT_ITEM     : Menu_Request_Code renames M_Next_Item;
              +-   REQ_PREV_ITEM     : Menu_Request_Code renames M_Previous_Item;
              +-   REQ_TOGGLE_ITEM   : Menu_Request_Code renames M_Toggle_Item;
              +-   REQ_CLEAR_PATTERN : Menu_Request_Code renames M_Clear_Pattern;
              +-   REQ_BACK_PATTERN  : Menu_Request_Code renames M_Back_Pattern;
              +-   REQ_NEXT_MATCH    : Menu_Request_Code renames M_Next_Match;
              +-   REQ_PREV_MATCH    : Menu_Request_Code renames M_Previous_Match;
              ++   REQ_LEFT_ITEM     : Menu_Request_Code renames M_Left_Item;
              ++   REQ_RIGHT_ITEM    : Menu_Request_Code renames M_Right_Item;
              ++   REQ_UP_ITEM       : Menu_Request_Code renames M_Up_Item;
              ++   REQ_DOWN_ITEM     : Menu_Request_Code renames M_Down_Item;
              ++   REQ_SCR_ULINE     : Menu_Request_Code renames M_ScrollUp_Line;
              ++   REQ_SCR_DLINE     : Menu_Request_Code renames M_ScrollDown_Line;
              ++   REQ_SCR_DPAGE     : Menu_Request_Code renames M_ScrollDown_Page;
              ++   REQ_SCR_UPAGE     : Menu_Request_Code renames M_ScrollUp_Page;
              ++   REQ_FIRST_ITEM    : Menu_Request_Code renames M_First_Item;
              ++   REQ_LAST_ITEM     : Menu_Request_Code renames M_Last_Item;
              ++   REQ_NEXT_ITEM     : Menu_Request_Code renames M_Next_Item;
              ++   REQ_PREV_ITEM     : Menu_Request_Code renames M_Previous_Item;
              ++   REQ_TOGGLE_ITEM   : Menu_Request_Code renames M_Toggle_Item;
              ++   REQ_CLEAR_PATTERN : Menu_Request_Code renames M_Clear_Pattern;
              ++   REQ_BACK_PATTERN  : Menu_Request_Code renames M_Back_Pattern;
              ++   REQ_NEXT_MATCH    : Menu_Request_Code renames M_Next_Match;
              ++   REQ_PREV_MATCH    : Menu_Request_Code renames M_Previous_Match;
              + 
              +-   procedure Request_Name (Key  : in Menu_Request_Code;
              +-                           Name : out String);
              ++   procedure Request_Name (Key  : in Menu_Request_Code;
              ++                           Name : out String);
              + 
              +-   function  Request_Name (Key : Menu_Request_Code) return String;
              ++   function  Request_Name (Key : Menu_Request_Code) return String;
              +    --  Same as function
              + 
              +    ------------------
              +    --  Exceptions  --
              +    ------------------
              + 
              +-   Menu_Exception : exception;
              ++   Menu_Exception : exception;
              +    --
              +    --  Menu options
              +    --
              +    pragma Warnings (Off);
              +-   type Menu_Option_Set is
              ++   type Menu_Option_Set is
              +       record
              +-         One_Valued        : Boolean;
              +-         Show_Descriptions : Boolean;
              +-         Row_Major_Order   : Boolean;
              +-         Ignore_Case       : Boolean;
              +-         Show_Matches      : Boolean;
              +-         Non_Cyclic        : Boolean;
              ++         One_Valued        : Boolean;
              ++         Show_Descriptions : Boolean;
              ++         Row_Major_Order   : Boolean;
              ++         Ignore_Case       : Boolean;
              ++         Show_Matches      : Boolean;
              ++         Non_Cyclic        : Boolean;
              +       end record;
              +-   pragma Convention (C, Menu_Option_Set);
              ++   pragma Convention (C, Menu_Option_Set);
              + 
              +-   for Menu_Option_Set use
              ++   for Menu_Option_Set use
              +       record
              +          One_Valued        at 0 range  0 ..  0;
              +          Show_Descriptions at 0 range  1 ..  1;
              +@@ -144,47 +143,47 @@
              +          Show_Matches      at 0 range  4 ..  4;
              +          Non_Cyclic        at 0 range  5 ..  5;
              +       end record;
              +-   for Menu_Option_Set'Size use 32;
              ++   for Menu_Option_Set'Size use 32;
              +    --  Please note: this rep. clause is generated and may be
              +    --               different on your system.
              +    pragma Warnings (On);
              + 
              +-   function Default_Menu_Options return Menu_Option_Set;
              ++   function Default_Menu_Options return Menu_Option_Set;
              +    --  Initial default options for a menu.
              +-   pragma Inline (Default_Menu_Options);
              ++   pragma Inline (Default_Menu_Options);
              +    --
              +    --  Item options
              +    --
              +    pragma Warnings (Off);
              +-   type Item_Option_Set is
              ++   type Item_Option_Set is
              +       record
              +-         Selectable  : Boolean;
              ++         Selectable  : Boolean;
              +       end record;
              +-   pragma Convention (C, Item_Option_Set);
              ++   pragma Convention (C, Item_Option_Set);
              + 
              +-   for Item_Option_Set use
              ++   for Item_Option_Set use
              +       record
              +          Selectable  at 0 range  0 ..  0;
              +       end record;
              +-   for Item_Option_Set'Size use 32;
              ++   for Item_Option_Set'Size use 32;
              +    --  Please note: this rep. clause is generated and may be
              +    --               different on your system.
              +    pragma Warnings (On);
              + 
              +-   function Default_Item_Options return Item_Option_Set;
              ++   function Default_Item_Options return Item_Option_Set;
              +    --  Initial default options for an item.
              +-   pragma Inline (Default_Item_Options);
              ++   pragma Inline (Default_Item_Options);
              + 
              +    --
              +    --  Item Array
              +    --
              +-   type Item_Array is array (Positive range <>) of aliased Item;
              +-   pragma Convention (C, Item_Array);
              ++   type Item_Array is array (Positive range <>) of aliased Item;
              ++   pragma Convention (C, Item_Array);
              + 
              +-   type Item_Array_Access is access Item_Array;
              ++   type Item_Array_Access is access Item_Array;
              + 
              +-   procedure Free (IA         : in out Item_Array_Access;
              +-                   Free_Items : Boolean := False);
              ++   procedure Free (IA         : in out Item_Array_Access;
              ++                   Free_Items : Boolean := False);
              +    --  Release the memory for an allocated item array
              +    --  If Free_Items is True, call Delete() for all the items in
              +    --  the array.
              +@@ -194,19 +193,19 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   function Create (Name        : String;
              +-                    Description : String := "") return Item;
              ++   function Create (Name        : String;
              ++                    Description : String := "") return Item;
              +    --  AKA: new_item()
              +    --  Not inlined.
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   function New_Item (Name        : String;
              +-                      Description : String := "") return Item
              +-     renames Create;
              ++   function New_Item (Name        : String;
              ++                      Description : String := "") return Item
              ++     renames Create;
              +    --  AKA: new_item()
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   procedure Delete (Itm : in out Item);
              ++   procedure Delete (Itm : in out Item);
              +    --  AKA: free_item()
              +    --  Resets Itm to Null_Item
              + 
              +@@ -215,51 +214,51 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_4"#2|
              +-   procedure Set_Value (Itm   : in Item;
              +-                        Value : in Boolean := True);
              ++   procedure Set_Value (Itm   : in Item;
              ++                        Value : in Boolean := True);
              +    --  AKA: set_item_value()
              +-   pragma Inline (Set_Value);
              ++   pragma Inline (Set_Value);
              + 
              +    --  #1A NAME="AFU_5"#2|
              +-   function Value (Itm : Item) return Boolean;
              ++   function Value (Itm : Item) return Boolean;
              +    --  AKA: item_value()
              +-   pragma Inline (Value);
              ++   pragma Inline (Value);
              + 
              +    --  |=====================================================================
              +    --  | Man page mitem_visible.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_6"#2|
              +-   function Visible (Itm : Item) return Boolean;
              ++   function Visible (Itm : Item) return Boolean;
              +    --  AKA: item_visible()
              +-   pragma Inline (Visible);
              ++   pragma Inline (Visible);
              + 
              +    --  |=====================================================================
              +    --  | Man page mitem_opts.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_7"#2|
              +-   procedure Set_Options (Itm     : in Item;
              +-                          Options : in Item_Option_Set);
              ++   procedure Set_Options (Itm     : in Item;
              ++                          Options : in Item_Option_Set);
              +    --  AKA: set_item_opts()
              +    --  An overloaded Set_Options is defined later. Pragma Inline appears there
              + 
              +    --  #1A NAME="AFU_8"#2|
              +-   procedure Switch_Options (Itm     : in Item;
              +-                             Options : in Item_Option_Set;
              +-                             On      : Boolean := True);
              ++   procedure Switch_Options (Itm     : in Item;
              ++                             Options : in Item_Option_Set;
              ++                             On      : Boolean := True);
              +    --  AKA: item_opts_on()
              +    --  AKA: item_opts_off()
              +    --  An overloaded Switch_Options is defined later.
              +    --  Pragma Inline appears there
              + 
              +    --  #1A NAME="AFU_9"#2|
              +-   procedure Get_Options (Itm     : in  Item;
              +-                          Options : out Item_Option_Set);
              ++   procedure Get_Options (Itm     : in  Item;
              ++                          Options : out Item_Option_Set);
              +    --  AKA: item_opts()
              + 
              +    --  #1A NAME="AFU_10"#2|
              +-   function Get_Options (Itm : Item := Null_Item) return Item_Option_Set;
              ++   function Get_Options (Itm : Item := Null_Item) return Item_Option_Set;
              +    --  AKA: item_opts()
              +    --  An overloaded Get_Options is defined later. Pragma Inline appears there
              + 
              +@@ -268,20 +267,20 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_11"#2|
              +-   procedure Name (Itm  : in Item;
              +-                   Name : out String);
              ++   procedure Name (Itm  : in Item;
              ++                   Name : out String);
              +    --  AKA: item_name()
              +-   function  Name (Itm : Item) return String;
              ++   function  Name (Itm : Item) return String;
              +    --  AKA: item_name()
              +    --  Implemented as function
              +    pragma Inline (Name);
              + 
              +    --  #1A NAME="AFU_12"#2|
              +-   procedure Description (Itm         : in Item;
              +-                          Description : out String);
              ++   procedure Description (Itm         : in Item;
              ++                          Description : out String);
              +    --  AKA: item_description();
              + 
              +-   function  Description (Itm : Item) return String;
              ++   function  Description (Itm : Item) return String;
              +    --  AKA: item_description();
              +    --  Implemented as function
              +    pragma Inline (Description);
              +@@ -291,71 +290,71 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_13"#2|
              +-   procedure Set_Current (Men : in Menu;
              +-                          Itm : in Item);
              ++   procedure Set_Current (Men : in Menu;
              ++                          Itm : in Item);
              +    --  AKA: set_current_item()
              +-   pragma Inline (Set_Current);
              ++   pragma Inline (Set_Current);
              + 
              +    --  #1A NAME="AFU_14"#2|
              +-   function Current (Men : Menu) return Item;
              ++   function Current (Men : Menu) return Item;
              +    --  AKA: current_item()
              +-   pragma Inline (Current);
              ++   pragma Inline (Current);
              + 
              +    --  #1A NAME="AFU_15"#2|
              +-   procedure Set_Top_Row (Men  : in Menu;
              +-                          Line : in Line_Position);
              ++   procedure Set_Top_Row (Men  : in Menu;
              ++                          Line : in Line_Position);
              +    --  AKA: set_top_row()
              +-   pragma Inline (Set_Top_Row);
              ++   pragma Inline (Set_Top_Row);
              + 
              +    --  #1A NAME="AFU_16"#2|
              +-   function Top_Row (Men : Menu) return Line_Position;
              ++   function Top_Row (Men : Menu) return Line_Position;
              +    --  AKA: top_row()
              +-   pragma Inline (Top_Row);
              ++   pragma Inline (Top_Row);
              + 
              +    --  #1A NAME="AFU_17"#2|
              +-   function Get_Index (Itm : Item) return Positive;
              ++   function Get_Index (Itm : Item) return Positive;
              +    --  AKA: item_index()
              +    --  Please note that in this binding we start the numbering of items
              +    --  with 1. So this is number is one more than you get from the low
              +    --  level call.
              +-   pragma Inline (Get_Index);
              ++   pragma Inline (Get_Index);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_post.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_18"#2|
              +-   procedure Post (Men  : in Menu;
              +-                   Post : in Boolean := True);
              ++   procedure Post (Men  : in Menu;
              ++                   Post : in Boolean := True);
              +    --  AKA: post_menu()
              +    --  AKA: unpost_menu()
              +-   pragma Inline (Post);
              ++   pragma Inline (Post);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_opts.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_19"#2|
              +-   procedure Set_Options (Men     : in Menu;
              +-                          Options : in Menu_Option_Set);
              ++   procedure Set_Options (Men     : in Menu;
              ++                          Options : in Menu_Option_Set);
              +    --  AKA: set_menu_opts()
              +    pragma Inline (Set_Options);
              + 
              +    --  #1A NAME="AFU_20"#2|
              +-   procedure Switch_Options (Men     : in Menu;
              +-                             Options : in Menu_Option_Set;
              +-                             On      : Boolean := True);
              ++   procedure Switch_Options (Men     : in Menu;
              ++                             Options : in Menu_Option_Set;
              ++                             On      : Boolean := True);
              +    --  AKA: menu_opts_on()
              +    --  AKA: menu_opts_off()
              +    pragma Inline (Switch_Options);
              + 
              +    --  #1A NAME="AFU_21"#2|
              +-   procedure Get_Options (Men     : in  Menu;
              +-                          Options : out Menu_Option_Set);
              ++   procedure Get_Options (Men     : in  Menu;
              ++                          Options : out Menu_Option_Set);
              +    --  AKA: menu_opts()
              + 
              +    --  #1A NAME="AFU_22"#2|
              +-   function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set;
              ++   function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set;
              +    --  AKA: menu_opts()
              +    pragma Inline (Get_Options);
              + 
              +@@ -364,185 +363,185 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_23"#2|
              +-   procedure Set_Window (Men : in Menu;
              +-                         Win : in Window);
              ++   procedure Set_Window (Men : in Menu;
              ++                         Win : in Window);
              +    --  AKA: set_menu_win()
              +-   pragma Inline (Set_Window);
              ++   pragma Inline (Set_Window);
              + 
              +    --  #1A NAME="AFU_24"#2|
              +-   function Get_Window (Men : Menu) return Window;
              ++   function Get_Window (Men : Menu) return Window;
              +    --  AKA: menu_win()
              +-   pragma Inline (Get_Window);
              ++   pragma Inline (Get_Window);
              + 
              +    --  #1A NAME="AFU_25"#2|
              +-   procedure Set_Sub_Window (Men : in Menu;
              +-                             Win : in Window);
              ++   procedure Set_Sub_Window (Men : in Menu;
              ++                             Win : in Window);
              +    --  AKA: set_menu_sub()
              +-   pragma Inline (Set_Sub_Window);
              ++   pragma Inline (Set_Sub_Window);
              + 
              +    --  #1A NAME="AFU_26"#2|
              +-   function Get_Sub_Window (Men : Menu) return Window;
              ++   function Get_Sub_Window (Men : Menu) return Window;
              +    --  AKA: menu_sub()
              +-   pragma Inline (Get_Sub_Window);
              ++   pragma Inline (Get_Sub_Window);
              + 
              +    --  #1A NAME="AFU_27"#2|
              +-   procedure Scale (Men     : in Menu;
              +-                    Lines   : out Line_Count;
              +-                    Columns : out Column_Count);
              ++   procedure Scale (Men     : in Menu;
              ++                    Lines   : out Line_Count;
              ++                    Columns : out Column_Count);
              +    --  AKA: scale_menu()
              +-   pragma Inline (Scale);
              ++   pragma Inline (Scale);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_cursor.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_28"#2|
              +-   procedure Position_Cursor (Men : Menu);
              ++   procedure Position_Cursor (Men : Menu);
              +    --  AKA: pos_menu_cursor()
              +-   pragma Inline (Position_Cursor);
              ++   pragma Inline (Position_Cursor);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_mark.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_29"#2|
              +-   procedure Set_Mark (Men  : in Menu;
              +-                       Mark : in String);
              ++   procedure Set_Mark (Men  : in Menu;
              ++                       Mark : in String);
              +    --  AKA: set_menu_mark()
              +-   pragma Inline (Set_Mark);
              ++   pragma Inline (Set_Mark);
              + 
              +    --  #1A NAME="AFU_30"#2|
              +-   procedure Mark (Men  : in  Menu;
              +-                   Mark : out String);
              ++   procedure Mark (Men  : in  Menu;
              ++                   Mark : out String);
              +    --  AKA: menu_mark()
              + 
              +-   function  Mark (Men : Menu) return String;
              ++   function  Mark (Men : Menu) return String;
              +    --  AKA: menu_mark()
              +    --  Implemented as function
              +    pragma Inline (Mark);
              + 
              +    --  |=====================================================================
              +-   --  | Man page menu_attribs.3x
              ++   --  | Man page menu_attributes.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_31"#2|
              +-   procedure Set_Foreground
              +-     (Men   : in Menu;
              +-      Fore  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              +-   --  AKA: set_menu_fore()
              +-   pragma Inline (Set_Foreground);
              ++   procedure Set_Foreground
              ++     (Men   : in Menu;
              ++      Fore  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              ++   --  AKA: set_menu_fore()
              ++   pragma Inline (Set_Foreground);
              + 
              +    --  #1A NAME="AFU_32"#2|
              +-   procedure Foreground (Men   : in  Menu;
              +-                         Fore  : out Character_Attribute_Set);
              +-   --  AKA: menu_fore()
              ++   procedure Foreground (Men   : in  Menu;
              ++                         Fore  : out Character_Attribute_Set);
              ++   --  AKA: menu_fore()
              + 
              +    --  #1A NAME="AFU_33"#2|
              +-   procedure Foreground (Men   : in  Menu;
              +-                         Fore  : out Character_Attribute_Set;
              +-                         Color : out Color_Pair);
              +-   --  AKA: menu_fore()
              ++   procedure Foreground (Men   : in  Menu;
              ++                         Fore  : out Character_Attribute_Set;
              ++                         Color : out Color_Pair);
              ++   --  AKA: menu_fore()
              +    pragma Inline (Foreground);
              + 
              +    --  #1A NAME="AFU_34"#2|
              +-   procedure Set_Background
              +-     (Men   : in Menu;
              +-      Back  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              +-   --  AKA: set_menu_back()
              ++   procedure Set_Background
              ++     (Men   : in Menu;
              ++      Back  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              ++   --  AKA: set_menu_back()
              +    pragma Inline (Set_Background);
              + 
              +    --  #1A NAME="AFU_35"#2|
              +-   procedure Background (Men  : in  Menu;
              +-                         Back : out Character_Attribute_Set);
              +-   --  AKA: menu_back()
              ++   procedure Background (Men  : in  Menu;
              ++                         Back : out Character_Attribute_Set);
              ++   --  AKA: menu_back()
              +    --  #1A NAME="AFU_36"#2|
              + 
              +-   procedure Background (Men   : in  Menu;
              +-                         Back  : out Character_Attribute_Set;
              +-                         Color : out Color_Pair);
              +-   --  AKA: menu_back()
              ++   procedure Background (Men   : in  Menu;
              ++                         Back  : out Character_Attribute_Set;
              ++                         Color : out Color_Pair);
              ++   --  AKA: menu_back()
              +    pragma Inline (Background);
              + 
              +    --  #1A NAME="AFU_37"#2|
              +-   procedure Set_Grey
              +-     (Men   : in Menu;
              +-      Grey  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              +-   --  AKA: set_menu_grey()
              +-   pragma Inline (Set_Grey);
              ++   procedure Set_Grey
              ++     (Men   : in Menu;
              ++      Grey  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              ++   --  AKA: set_menu_grey()
              ++   pragma Inline (Set_Grey);
              + 
              +    --  #1A NAME="AFU_38"#2|
              +-   procedure Grey (Men  : in  Menu;
              +-                   Grey : out Character_Attribute_Set);
              +-   --  AKA: menu_grey()
              ++   procedure Grey (Men  : in  Menu;
              ++                   Grey : out Character_Attribute_Set);
              ++   --  AKA: menu_grey()
              + 
              +    --  #1A NAME="AFU_39"#2|
              +-   procedure Grey
              +-     (Men   : in  Menu;
              +-      Grey  : out Character_Attribute_Set;
              +-      Color : out Color_Pair);
              +-   --  AKA: menu_grey()
              ++   procedure Grey
              ++     (Men   : in  Menu;
              ++      Grey  : out Character_Attribute_Set;
              ++      Color : out Color_Pair);
              ++   --  AKA: menu_grey()
              +    pragma Inline (Grey);
              + 
              +    --  #1A NAME="AFU_40"#2|
              +-   procedure Set_Pad_Character (Men : in Menu;
              +-                                Pad : in Character := Space);
              +-   --  AKA: set_menu_pad()
              +-   pragma Inline (Set_Pad_Character);
              ++   procedure Set_Pad_Character (Men : in Menu;
              ++                                Pad : in Character := Space);
              ++   --  AKA: set_menu_pad()
              ++   pragma Inline (Set_Pad_Character);
              + 
              +    --  #1A NAME="AFU_41"#2|
              +-   procedure Pad_Character (Men : in  Menu;
              +-                            Pad : out Character);
              +-   --  AKA: menu_pad()
              +-   pragma Inline (Pad_Character);
              ++   procedure Pad_Character (Men : in  Menu;
              ++                            Pad : out Character);
              ++   --  AKA: menu_pad()
              ++   pragma Inline (Pad_Character);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_spacing.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_42"#2|
              +-   procedure Set_Spacing (Men   : in Menu;
              +-                          Descr : in Column_Position := 0;
              +-                          Row   : in Line_Position   := 0;
              +-                          Col   : in Column_Position := 0);
              ++   procedure Set_Spacing (Men   : in Menu;
              ++                          Descr : in Column_Position := 0;
              ++                          Row   : in Line_Position   := 0;
              ++                          Col   : in Column_Position := 0);
              +    --  AKA: set_menu_spacing()
              +-   pragma Inline (Set_Spacing);
              ++   pragma Inline (Set_Spacing);
              + 
              +    --  #1A NAME="AFU_43"#2|
              +-   procedure Spacing (Men   : in Menu;
              +-                      Descr : out Column_Position;
              +-                      Row   : out Line_Position;
              +-                      Col   : out Column_Position);
              ++   procedure Spacing (Men   : in Menu;
              ++                      Descr : out Column_Position;
              ++                      Row   : out Line_Position;
              ++                      Col   : out Column_Position);
              +    --  AKA: menu_spacing()
              +-   pragma Inline (Spacing);
              ++   pragma Inline (Spacing);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_pattern.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_44"#2|
              +-   function Set_Pattern (Men  : Menu;
              +-                         Text : String) return Boolean;
              ++   function Set_Pattern (Men  : Menu;
              ++                         Text : String) return Boolean;
              +    --  AKA: set_menu_pattern()
              +    --  Return TRUE if the pattern matches, FALSE otherwise
              +-   pragma Inline (Set_Pattern);
              ++   pragma Inline (Set_Pattern);
              + 
              +    --  #1A NAME="AFU_45"#2|
              +-   procedure Pattern (Men  : in  Menu;
              +-                      Text : out String);
              ++   procedure Pattern (Men  : in  Menu;
              ++                      Text : out String);
              +    --  AKA: menu_pattern()
              +-   pragma Inline (Pattern);
              ++   pragma Inline (Pattern);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_format.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_46"#2|
              +-   procedure Set_Format (Men     : in Menu;
              +-                         Lines   : in Line_Count;
              +-                         Columns : in Column_Count);
              ++   procedure Set_Format (Men     : in Menu;
              ++                         Lines   : in Line_Count;
              ++                         Columns : in Column_Count);
              +    --  Not implemented: 0 argument for Lines or Columns;
              +    --  instead use Format to get the current sizes
              +    --      The  default  format  is  16  rows,  1  column.    Calling
              +@@ -551,104 +550,104 @@
              +    --      is  interpreted  as  a  request  not to change the current
              +    --      value.
              +    --  AKA: set_menu_format()
              +-   pragma Inline (Set_Format);
              ++   pragma Inline (Set_Format);
              + 
              +    --  #1A NAME="AFU_47"#2|
              +-   procedure Format (Men     : in  Menu;
              +-                     Lines   : out Line_Count;
              +-                     Columns : out Column_Count);
              ++   procedure Format (Men     : in  Menu;
              ++                     Lines   : out Line_Count;
              ++                     Columns : out Column_Count);
              +    --  AKA: menu_format()
              +-   pragma Inline (Format);
              ++   pragma Inline (Format);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_hook.3x
              +    --  |=====================================================================
              + 
              +-   type Menu_Hook_Function is access procedure (Men : in Menu);
              +-   pragma Convention (C, Menu_Hook_Function);
              ++   type Menu_Hook_Function is access procedure (Men : in Menu);
              ++   pragma Convention (C, Menu_Hook_Function);
              + 
              +    --  #1A NAME="AFU_48"#2|
              +-   procedure Set_Item_Init_Hook (Men  : in Menu;
              +-                                 Proc : in Menu_Hook_Function);
              ++   procedure Set_Item_Init_Hook (Men  : in Menu;
              ++                                 Proc : in Menu_Hook_Function);
              +    --  AKA: set_item_init()
              +-   pragma Inline (Set_Item_Init_Hook);
              ++   pragma Inline (Set_Item_Init_Hook);
              + 
              +    --  #1A NAME="AFU_49"#2|
              +-   procedure Set_Item_Term_Hook (Men  : in Menu;
              +-                                 Proc : in Menu_Hook_Function);
              ++   procedure Set_Item_Term_Hook (Men  : in Menu;
              ++                                 Proc : in Menu_Hook_Function);
              +    --  AKA: set_item_term()
              +-   pragma Inline (Set_Item_Term_Hook);
              ++   pragma Inline (Set_Item_Term_Hook);
              + 
              +    --  #1A NAME="AFU_50"#2|
              +-   procedure Set_Menu_Init_Hook (Men  : in Menu;
              +-                                 Proc : in Menu_Hook_Function);
              ++   procedure Set_Menu_Init_Hook (Men  : in Menu;
              ++                                 Proc : in Menu_Hook_Function);
              +    --  AKA: set_menu_init()
              +-   pragma Inline (Set_Menu_Init_Hook);
              ++   pragma Inline (Set_Menu_Init_Hook);
              + 
              +    --  #1A NAME="AFU_51"#2|
              +-   procedure Set_Menu_Term_Hook (Men  : in Menu;
              +-                                 Proc : in Menu_Hook_Function);
              ++   procedure Set_Menu_Term_Hook (Men  : in Menu;
              ++                                 Proc : in Menu_Hook_Function);
              +    --  AKA: set_menu_term()
              +-   pragma Inline (Set_Menu_Term_Hook);
              ++   pragma Inline (Set_Menu_Term_Hook);
              + 
              +    --  #1A NAME="AFU_52"#2|
              +-   function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function;
              ++   function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function;
              +    --  AKA: item_init()
              +-   pragma Inline (Get_Item_Init_Hook);
              ++   pragma Inline (Get_Item_Init_Hook);
              + 
              +    --  #1A NAME="AFU_53"#2|
              +-   function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function;
              ++   function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function;
              +    --  AKA: item_term()
              +-   pragma Inline (Get_Item_Term_Hook);
              ++   pragma Inline (Get_Item_Term_Hook);
              + 
              +    --  #1A NAME="AFU_54"#2|
              +-   function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function;
              ++   function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function;
              +    --  AKA: menu_init()
              +-   pragma Inline (Get_Menu_Init_Hook);
              ++   pragma Inline (Get_Menu_Init_Hook);
              + 
              +    --  #1A NAME="AFU_55"#2|
              +-   function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function;
              ++   function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function;
              +    --  AKA: menu_term()
              +-   pragma Inline (Get_Menu_Term_Hook);
              ++   pragma Inline (Get_Menu_Term_Hook);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_items.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_56"#2|
              +-   procedure Redefine (Men   : in Menu;
              +-                       Items : in Item_Array_Access);
              ++   procedure Redefine (Men   : in Menu;
              ++                       Items : in Item_Array_Access);
              +    --  AKA: set_menu_items()
              +-   pragma Inline (Redefine);
              ++   pragma Inline (Redefine);
              + 
              +-   procedure Set_Items (Men   : in Menu;
              +-                        Items : in Item_Array_Access) renames Redefine;
              ++   procedure Set_Items (Men   : in Menu;
              ++                        Items : in Item_Array_Access) renames Redefine;
              +    --  pragma Inline (Set_Items);
              + 
              +    --  #1A NAME="AFU_57"#2|
              +-   function Items (Men   : Menu;
              +-                   Index : Positive) return Item;
              ++   function Items (Men   : Menu;
              ++                   Index : Positive) return Item;
              +    --  AKA: menu_items()
              +-   pragma Inline (Items);
              ++   pragma Inline (Items);
              + 
              +    --  #1A NAME="AFU_58"#2|
              +-   function Item_Count (Men : Menu) return Natural;
              ++   function Item_Count (Men : Menu) return Natural;
              +    --  AKA: item_count()
              +-   pragma Inline (Item_Count);
              ++   pragma Inline (Item_Count);
              + 
              +    --  |=====================================================================
              +    --  | Man page menu_new.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_59"#2|
              +-   function Create (Items : Item_Array_Access) return Menu;
              ++   function Create (Items : Item_Array_Access) return Menu;
              +    --  AKA: new_menu()
              +    --  Not inlined
              + 
              +-   function New_Menu (Items : Item_Array_Access) return Menu renames Create;
              ++   function New_Menu (Items : Item_Array_Access) return Menu renames Create;
              + 
              +    --  #1A NAME="AFU_60"#2|
              +-   procedure Delete (Men : in out Menu);
              ++   procedure Delete (Men : in out Menu);
              +    --  AKA: free_menu()
              +    --  Reset Men to Null_Menu
              +    --  Not inlined
              +@@ -657,14 +656,14 @@
              +    --  | Man page menu_driver.3x
              +    --  |=====================================================================
              + 
              +-   type Driver_Result is (Menu_Ok,
              +-                          Request_Denied,
              +-                          Unknown_Request,
              +-                          No_Match);
              ++   type Driver_Result is (Menu_Ok,
              ++                          Request_Denied,
              ++                          Unknown_Request,
              ++                          No_Match);
              + 
              +    --  #1A NAME="AFU_61"#2|
              +-   function Driver (Men : Menu;
              +-                    Key : Key_Code) return Driver_Result;
              ++   function Driver (Men : Menu;
              ++                    Key : Key_Code) return Driver_Result;
              +    --  AKA: menu_driver()
              +    --  Driver is not inlined
              + 
              +@@ -672,11 +671,11 @@
              +    --  Not Implemented: menu_request_name, menu_request_by_name
              + -------------------------------------------------------------------------------
              + private
              +-   type Item   is new System.Storage_Elements.Integer_Address;
              +-   type Menu   is new System.Storage_Elements.Integer_Address;
              ++   type Item   is new System.Storage_Elements.Integer_Address;
              ++   type Menu   is new System.Storage_Elements.Integer_Address;
              + 
              +-   Null_Item : constant Item := 0;
              +-   Null_Menu : constant Menu := 0;
              ++   Null_Item : constant Item := 0;
              ++   Null_Menu : constant Menu := 0;
              + 
              +-end Terminal_Interface.Curses.Menus;
              ++end Terminal_Interface.Curses.Menus;
              + 
              +Index: doc/html/ada/terminal_interface-curses-mouse__adb.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-mouse__adb.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-mouse__adb.htm 2007-05-05 20:35:20.000000000 +0000 +@@ -60,7 +60,7 @@ + function Mouse_Avail return C_Int; + pragma Import (C, Mouse_Avail, "_nc_has_mouse"); + begin +- if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then ++ if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then + return True; + else + return False; +@@ -123,7 +123,7 @@ + begin + R := MMask (Mask, Old'Access); + if R = No_Events then +- Beep; ++ Beep; + end if; + return Old; + end Start_Mouse; +@@ -132,7 +132,7 @@ + is + begin + if Mask /= No_Events then +- Beep; ++ Beep; + end if; + end End_Mouse; + +@@ -199,15 +199,15 @@ + end if; + end Unget_Mouse; + +- function Enclosed_In_Window (Win : Window := Standard_Window; ++ function Enclosed_In_Window (Win : Window := Standard_Window; + Event : Mouse_Event) return Boolean + is + function Wenclose (Win : Window; Y : C_Int; X : C_Int) +- return Curses_Bool; ++ return Curses_Bool; + pragma Import (C, Wenclose, "wenclose"); + begin + if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) +- = Curses_Bool_False then ++ = Curses_Bool_False then + return False; + else + return True; +Index: doc/html/ada/terminal_interface-curses-mouse__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-mouse__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-mouse__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-mouse.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -51,8 +50,8 @@
              + --  |
              + with System;
              + 
              +-package Terminal_Interface.Curses.Mouse is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Mouse);
              ++package Terminal_Interface.Curses.Mouse is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Mouse);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_mouse.3x
              +@@ -67,56 +66,56 @@
              +    --  Not implemented:
              +    --  REPORT_MOUSE_POSITION (i.e. as a parameter to Register_Reportable_Event
              +    --  or Start_Mouse)
              +-   type Event_Mask is private;
              +-   No_Events  : constant Event_Mask;
              +-   All_Events : constant Event_Mask;
              +-
              +-   type Mouse_Button is (Left,     -- aka: Button 1
              +-                         Middle,   -- aka: Button 2
              +-                         Right,    -- aka: Button 3
              +-                         Button4,  -- aka: Button 4
              +-                         Control,  -- Control Key
              +-                         Shift,    -- Shift Key
              +-                         Alt);     -- ALT Key
              +-
              +-   subtype Real_Buttons  is Mouse_Button range Left .. Button4;
              +-   subtype Modifier_Keys is Mouse_Button range Control .. Alt;
              +-
              +-   type Button_State is (Released,
              +-                         Pressed,
              +-                         Clicked,
              +-                         Double_Clicked,
              +-                         Triple_Clicked);
              +-
              +-   type Button_States is array (Button_State) of Boolean;
              +-   pragma Pack (Button_States);
              +-
              +-   All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True,
              +-                                           others => False);
              +-   All_States : constant Button_States := (others => True);
              ++   type Event_Mask is private;
              ++   No_Events  : constant Event_Mask;
              ++   All_Events : constant Event_Mask;
              ++
              ++   type Mouse_Button is (Left,     -- aka: Button 1
              ++                         Middle,   -- aka: Button 2
              ++                         Right,    -- aka: Button 3
              ++                         Button4,  -- aka: Button 4
              ++                         Control,  -- Control Key
              ++                         Shift,    -- Shift Key
              ++                         Alt);     -- ALT Key
              ++
              ++   subtype Real_Buttons  is Mouse_Button range Left .. Button4;
              ++   subtype Modifier_Keys is Mouse_Button range Control .. Alt;
              ++
              ++   type Button_State is (Released,
              ++                         Pressed,
              ++                         Clicked,
              ++                         Double_Clicked,
              ++                         Triple_Clicked);
              ++
              ++   type Button_States is array (Button_State) of Boolean;
              ++   pragma Pack (Button_States);
              ++
              ++   All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True,
              ++                                           others => False);
              ++   All_States : constant Button_States := (others => True);
              + 
              +-   type Mouse_Event is private;
              ++   type Mouse_Event is private;
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_mouse.3x
              +    --  |=====================================================================
              + 
              +-   function Has_Mouse return Boolean;
              ++   function Has_Mouse return Boolean;
              +    --  Return true if a mouse device is supported, false otherwise.
              + 
              +-   procedure Register_Reportable_Event
              +-     (Button : in Mouse_Button;
              +-      State  : in Button_State;
              +-      Mask   : in out Event_Mask);
              ++   procedure Register_Reportable_Event
              ++     (Button : in Mouse_Button;
              ++      State  : in Button_State;
              ++      Mask   : in out Event_Mask);
              +    --  Stores the event described by the button and the state in the mask.
              +    --  Before you call this the first time, you should init the mask
              +    --  with the Empty_Mask constant
              +-   pragma Inline (Register_Reportable_Event);
              ++   pragma Inline (Register_Reportable_Event);
              + 
              +-   procedure Register_Reportable_Events
              +-     (Button : in Mouse_Button;
              +-      State  : in Button_States;
              +-      Mask   : in out Event_Mask);
              ++   procedure Register_Reportable_Events
              ++     (Button : in Mouse_Button;
              ++      State  : in Button_States;
              ++      Mask   : in out Event_Mask);
              +    --  Register all events described by the Button and the State bitmap.
              +    --  Before you call this the first time, you should init the mask
              +    --  with the Empty_Mask constant
              +@@ -126,62 +125,62 @@
              +    --  old mask, that means the event mask value before this call.
              +    --  Not Implemented: The library version
              +    --  returns a Mouse_Mask that tells which events are reported.
              +-   function Start_Mouse (Mask : Event_Mask := All_Events)
              +-                         return Event_Mask;
              ++   function Start_Mouse (Mask : Event_Mask := All_Events)
              ++                         return Event_Mask;
              +    --  AKA: mousemask()
              +-   pragma Inline (Start_Mouse);
              ++   pragma Inline (Start_Mouse);
              + 
              +-   procedure End_Mouse (Mask : in Event_Mask := No_Events);
              ++   procedure End_Mouse (Mask : in Event_Mask := No_Events);
              +    --  Terminates the mouse, restores the specified event mask
              +-   pragma Inline (End_Mouse);
              ++   pragma Inline (End_Mouse);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   function Get_Mouse return Mouse_Event;
              ++   function Get_Mouse return Mouse_Event;
              +    --  AKA: getmouse()
              +-   pragma Inline (Get_Mouse);
              ++   pragma Inline (Get_Mouse);
              + 
              +-   procedure Get_Event (Event  : in  Mouse_Event;
              +-                        Y      : out Line_Position;
              +-                        X      : out Column_Position;
              +-                        Button : out Mouse_Button;
              +-                        State  : out Button_State);
              ++   procedure Get_Event (Event  : in  Mouse_Event;
              ++                        Y      : out Line_Position;
              ++                        X      : out Column_Position;
              ++                        Button : out Mouse_Button;
              ++                        State  : out Button_State);
              +    --  !!! Warning: X and Y are screen coordinates. Due to ripped of lines they
              +    --  may not be identical to window coordinates.
              +    --  Not Implemented: Get_Event only reports one event, the C library
              +    --  version supports multiple events, e.g. {click-1, click-3}
              +-   pragma Inline (Get_Event);
              ++   pragma Inline (Get_Event);
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   procedure Unget_Mouse (Event : in Mouse_Event);
              ++   procedure Unget_Mouse (Event : in Mouse_Event);
              +    --  AKA: ungetmouse()
              +-   pragma Inline (Unget_Mouse);
              ++   pragma Inline (Unget_Mouse);
              + 
              +    --  #1A NAME="AFU_4"#2|
              +-   function Enclosed_In_Window (Win    : Window := Standard_Window;
              +-                                Event  : Mouse_Event) return Boolean;
              ++   function Enclosed_In_Window (Win    : Window := Standard_Window;
              ++                                Event  : Mouse_Event) return Boolean;
              +    --  AKA: wenclose()
              +    --  But : use event instead of screen coordinates.
              +-   pragma Inline (Enclosed_In_Window);
              ++   pragma Inline (Enclosed_In_Window);
              + 
              +    --  #1A NAME="AFU_5"#2|
              +-   function Mouse_Interval (Msec : Natural := 200) return Natural;
              ++   function Mouse_Interval (Msec : Natural := 200) return Natural;
              +    --  AKA: mouseinterval()
              +-   pragma Inline (Mouse_Interval);
              ++   pragma Inline (Mouse_Interval);
              + 
              + private
              +-   type Event_Mask is new Interfaces.C.unsigned_long;
              ++   type Event_Mask is new Interfaces.C.unsigned_long;
              + 
              +-   type Mouse_Event is
              ++   type Mouse_Event is
              +       record
              +-         Id      : Integer range Integer (Interfaces.C.short'First) ..
              +-                                 Integer (Interfaces.C.short'Last);
              +-         X, Y, Z : Integer range Integer (Interfaces.C.int'First) ..
              +-                                 Integer (Interfaces.C.int'Last);
              +-         Bstate  : Event_Mask;
              ++         Id      : Integer range Integer (Interfaces.C.short'First) ..
              ++                                 Integer (Interfaces.C.short'Last);
              ++         X, Y, Z : Integer range Integer (Interfaces.C.int'First) ..
              ++                                 Integer (Interfaces.C.int'Last);
              ++         Bstate  : Event_Mask;
              +       end record;
              +-   pragma Convention (C, Mouse_Event);
              ++   pragma Convention (C, Mouse_Event);
              + 
              +-   for Mouse_Event use
              ++   for Mouse_Event use
              +       record
              +          Id      at 0 range   0 ..  15;
              +          X       at 0 range  32 ..  63;
              +@@ -192,45 +191,45 @@
              +       --  Please note: this rep. clause is generated and may be
              +       --               different on your system.
              + 
              +-   Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First;
              ++   Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First;
              +    --  This constant may be different on your system.
              + 
              +-   BUTTON1_RELEASED          : constant Event_Mask := 8#00000000001#;
              +-   BUTTON1_PRESSED           : constant Event_Mask := 8#00000000002#;
              +-   BUTTON1_CLICKED           : constant Event_Mask := 8#00000000004#;
              +-   BUTTON1_DOUBLE_CLICKED    : constant Event_Mask := 8#00000000010#;
              +-   BUTTON1_TRIPLE_CLICKED    : constant Event_Mask := 8#00000000020#;
              +-   BUTTON1_RESERVED_EVENT    : constant Event_Mask := 8#00000000040#;
              +-   BUTTON2_RELEASED          : constant Event_Mask := 8#00000000100#;
              +-   BUTTON2_PRESSED           : constant Event_Mask := 8#00000000200#;
              +-   BUTTON2_CLICKED           : constant Event_Mask := 8#00000000400#;
              +-   BUTTON2_DOUBLE_CLICKED    : constant Event_Mask := 8#00000001000#;
              +-   BUTTON2_TRIPLE_CLICKED    : constant Event_Mask := 8#00000002000#;
              +-   BUTTON2_RESERVED_EVENT    : constant Event_Mask := 8#00000004000#;
              +-   BUTTON3_RELEASED          : constant Event_Mask := 8#00000010000#;
              +-   BUTTON3_PRESSED           : constant Event_Mask := 8#00000020000#;
              +-   BUTTON3_CLICKED           : constant Event_Mask := 8#00000040000#;
              +-   BUTTON3_DOUBLE_CLICKED    : constant Event_Mask := 8#00000100000#;
              +-   BUTTON3_TRIPLE_CLICKED    : constant Event_Mask := 8#00000200000#;
              +-   BUTTON3_RESERVED_EVENT    : constant Event_Mask := 8#00000400000#;
              +-   BUTTON4_RELEASED          : constant Event_Mask := 8#00001000000#;
              +-   BUTTON4_PRESSED           : constant Event_Mask := 8#00002000000#;
              +-   BUTTON4_CLICKED           : constant Event_Mask := 8#00004000000#;
              +-   BUTTON4_DOUBLE_CLICKED    : constant Event_Mask := 8#00010000000#;
              +-   BUTTON4_TRIPLE_CLICKED    : constant Event_Mask := 8#00020000000#;
              +-   BUTTON4_RESERVED_EVENT    : constant Event_Mask := 8#00040000000#;
              +-   BUTTON_CTRL               : constant Event_Mask := 8#00100000000#;
              +-   BUTTON_SHIFT              : constant Event_Mask := 8#00200000000#;
              +-   BUTTON_ALT                : constant Event_Mask := 8#00400000000#;
              +-   REPORT_MOUSE_POSITION     : constant Event_Mask := 8#01000000000#;
              +-   ALL_MOUSE_EVENTS          : constant Event_Mask := 8#00777777777#;
              +-   BUTTON1_EVENTS            : constant Event_Mask := 8#00000000077#;
              +-   BUTTON2_EVENTS            : constant Event_Mask := 8#00000007700#;
              +-   BUTTON3_EVENTS            : constant Event_Mask := 8#00000770000#;
              +-   BUTTON4_EVENTS            : constant Event_Mask := 8#00077000000#;
              ++   BUTTON1_RELEASED          : constant Event_Mask := 8#00000000001#;
              ++   BUTTON1_PRESSED           : constant Event_Mask := 8#00000000002#;
              ++   BUTTON1_CLICKED           : constant Event_Mask := 8#00000000004#;
              ++   BUTTON1_DOUBLE_CLICKED    : constant Event_Mask := 8#00000000010#;
              ++   BUTTON1_TRIPLE_CLICKED    : constant Event_Mask := 8#00000000020#;
              ++   BUTTON1_RESERVED_EVENT    : constant Event_Mask := 8#00000000040#;
              ++   BUTTON2_RELEASED          : constant Event_Mask := 8#00000000100#;
              ++   BUTTON2_PRESSED           : constant Event_Mask := 8#00000000200#;
              ++   BUTTON2_CLICKED           : constant Event_Mask := 8#00000000400#;
              ++   BUTTON2_DOUBLE_CLICKED    : constant Event_Mask := 8#00000001000#;
              ++   BUTTON2_TRIPLE_CLICKED    : constant Event_Mask := 8#00000002000#;
              ++   BUTTON2_RESERVED_EVENT    : constant Event_Mask := 8#00000004000#;
              ++   BUTTON3_RELEASED          : constant Event_Mask := 8#00000010000#;
              ++   BUTTON3_PRESSED           : constant Event_Mask := 8#00000020000#;
              ++   BUTTON3_CLICKED           : constant Event_Mask := 8#00000040000#;
              ++   BUTTON3_DOUBLE_CLICKED    : constant Event_Mask := 8#00000100000#;
              ++   BUTTON3_TRIPLE_CLICKED    : constant Event_Mask := 8#00000200000#;
              ++   BUTTON3_RESERVED_EVENT    : constant Event_Mask := 8#00000400000#;
              ++   BUTTON4_RELEASED          : constant Event_Mask := 8#00001000000#;
              ++   BUTTON4_PRESSED           : constant Event_Mask := 8#00002000000#;
              ++   BUTTON4_CLICKED           : constant Event_Mask := 8#00004000000#;
              ++   BUTTON4_DOUBLE_CLICKED    : constant Event_Mask := 8#00010000000#;
              ++   BUTTON4_TRIPLE_CLICKED    : constant Event_Mask := 8#00020000000#;
              ++   BUTTON4_RESERVED_EVENT    : constant Event_Mask := 8#00040000000#;
              ++   BUTTON_CTRL               : constant Event_Mask := 8#00100000000#;
              ++   BUTTON_SHIFT              : constant Event_Mask := 8#00200000000#;
              ++   BUTTON_ALT                : constant Event_Mask := 8#00400000000#;
              ++   REPORT_MOUSE_POSITION     : constant Event_Mask := 8#01000000000#;
              ++   ALL_MOUSE_EVENTS          : constant Event_Mask := 8#00777777777#;
              ++   BUTTON1_EVENTS            : constant Event_Mask := 8#00000000077#;
              ++   BUTTON2_EVENTS            : constant Event_Mask := 8#00000007700#;
              ++   BUTTON3_EVENTS            : constant Event_Mask := 8#00000770000#;
              ++   BUTTON4_EVENTS            : constant Event_Mask := 8#00077000000#;
              + 
              +-   No_Events  : constant Event_Mask := 0;
              +-   All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;
              ++   No_Events  : constant Event_Mask := 0;
              ++   All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;
              + 
              +-end Terminal_Interface.Curses.Mouse;
              ++end Terminal_Interface.Curses.Mouse;
              + 
              +Index: doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm 2006-09-23 20:31:31.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-panels-user_data.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -46,31 +45,31 @@
              + ------------------------------------------------------------------------------
              + 
              + generic
              +-   type User is limited private;
              +-   type User_Access is access all User;
              +-package Terminal_Interface.Curses.Panels.User_Data is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Panels.User_Data);
              ++   type User is limited private;
              ++   type User_Access is access all User;
              ++package Terminal_Interface.Curses.Panels.User_Data is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Panels.User_Data);
              + 
              +    --  |=====================================================================
              +    --  | Man page panel.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Set_User_Data (Pan  : in Panel;
              +-                            Data : in User_Access);
              ++   procedure Set_User_Data (Pan  : in Panel;
              ++                            Data : in User_Access);
              +    --  AKA: set_panel_userptr
              +-   pragma Inline (Set_User_Data);
              ++   pragma Inline (Set_User_Data);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Get_User_Data (Pan  : in  Panel;
              +-                            Data : out User_Access);
              ++   procedure Get_User_Data (Pan  : in  Panel;
              ++                            Data : out User_Access);
              +    --  AKA: panel_userptr
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   function Get_User_Data (Pan  : in  Panel) return User_Access;
              ++   function Get_User_Data (Pan  : in  Panel) return User_Access;
              +    --  AKA: panel_userptr
              +    --  Same as function
              +    pragma Inline (Get_User_Data);
              + 
              +-end Terminal_Interface.Curses.Panels.User_Data;
              ++end Terminal_Interface.Curses.Panels.User_Data;
              + 
              +Index: doc/html/ada/terminal_interface-curses-panels__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-panels__ads.htm 2006-09-23 20:31:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-panels__ads.htm 2007-09-01 23:56:31.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-panels.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -47,108 +46,108 @@
              + ------------------------------------------------------------------------------
              + with System;
              + 
              +-package Terminal_Interface.Curses.Panels is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Panels);
              ++package Terminal_Interface.Curses.Panels is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Panels);
              +    pragma Linker_Options ("-lpanel");
              +    pragma Linker_Options ("-lncurses");
              + 
              +-   type Panel is private;
              ++   type Panel is private;
              + 
              +    ---------------------------
              +    --  Interface constants  --
              +    ---------------------------
              +-   Null_Panel : constant Panel;
              ++   Null_Panel : constant Panel;
              + 
              +    -------------------
              +    --  Exceptions   --
              +    -------------------
              + 
              +-   Panel_Exception : exception;
              ++   Panel_Exception : exception;
              + 
              +    --  |=====================================================================
              +    --  | Man page panel.3x
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   function Create (Win : Window) return Panel;
              ++   function Create (Win : Window) return Panel;
              +    --  AKA: new_panel()
              +    pragma Inline (Create);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   function New_Panel (Win : Window) return Panel renames Create;
              ++   function New_Panel (Win : Window) return Panel renames Create;
              +    --  AKA: new_panel()
              +    --  pragma Inline (New_Panel);
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   procedure Bottom (Pan : in Panel);
              ++   procedure Bottom (Pan : in Panel);
              +    --  AKA: bottom_panel()
              +-   pragma Inline (Bottom);
              ++   pragma Inline (Bottom);
              + 
              +    --  #1A NAME="AFU_4"#2|
              +-   procedure Top (Pan : in Panel);
              ++   procedure Top (Pan : in Panel);
              +    --  AKA: top_panel()
              +-   pragma Inline (Top);
              ++   pragma Inline (Top);
              + 
              +    --  #1A NAME="AFU_5"#2|
              +-   procedure Show (Pan : in Panel);
              ++   procedure Show (Pan : in Panel);
              +    --  AKA: show_panel()
              +-   pragma Inline (Show);
              ++   pragma Inline (Show);
              + 
              +    --  #1A NAME="AFU_6"#2|
              +-   procedure Update_Panels;
              ++   procedure Update_Panels;
              +    --  AKA: update_panels()
              +    pragma Import (C, Update_Panels, "update_panels");
              + 
              +    --  #1A NAME="AFU_7"#2|
              +-   procedure Hide (Pan : in Panel);
              ++   procedure Hide (Pan : in Panel);
              +    --  AKA: hide_panel()
              +-   pragma Inline (Hide);
              ++   pragma Inline (Hide);
              + 
              +    --  #1A NAME="AFU_8"#2|
              +-   function Get_Window (Pan : Panel) return Window;
              ++   function Get_Window (Pan : Panel) return Window;
              +    --  AKA: panel_window()
              +-   pragma Inline (Get_Window);
              ++   pragma Inline (Get_Window);
              + 
              +    --  #1A NAME="AFU_9"#2|
              +-   function Panel_Window (Pan : Panel) return Window renames Get_Window;
              ++   function Panel_Window (Pan : Panel) return Window renames Get_Window;
              +    --  pragma Inline (Panel_Window);
              + 
              +    --  #1A NAME="AFU_10"#2|
              +-   procedure Replace (Pan : in Panel;
              +-                      Win : in Window);
              ++   procedure Replace (Pan : in Panel;
              ++                      Win : in Window);
              +    --  AKA: replace_panel()
              +-   pragma Inline (Replace);
              ++   pragma Inline (Replace);
              + 
              +    --  #1A NAME="AFU_11"#2|
              +-   procedure Move (Pan    : in Panel;
              +-                   Line   : in Line_Position;
              +-                   Column : in Column_Position);
              ++   procedure Move (Pan    : in Panel;
              ++                   Line   : in Line_Position;
              ++                   Column : in Column_Position);
              +    --  AKA: move_panel()
              +-   pragma Inline (Move);
              ++   pragma Inline (Move);
              + 
              +    --  #1A NAME="AFU_12"#2|
              +-   function Is_Hidden (Pan : Panel) return Boolean;
              ++   function Is_Hidden (Pan : Panel) return Boolean;
              +    --  AKA: panel_hidden()
              +-   pragma Inline (Is_Hidden);
              ++   pragma Inline (Is_Hidden);
              + 
              +    --  #1A NAME="AFU_13"#2|
              +-   function Above (Pan : Panel) return Panel;
              ++   function Above (Pan : Panel) return Panel;
              +    --  AKA: panel_above()
              +    pragma Import (C, Above, "panel_above");
              + 
              +    --  #1A NAME="AFU_14"#2|
              +-   function Below (Pan : Panel) return Panel;
              ++   function Below (Pan : Panel) return Panel;
              +    --  AKA: panel_below()
              +    pragma Import (C, Below, "panel_below");
              + 
              +    --  #1A NAME="AFU_15"#2|
              +-   procedure Delete (Pan : in out Panel);
              ++   procedure Delete (Pan : in out Panel);
              +    --  AKA: del_panel()
              +    pragma Inline (Delete);
              + 
              + private
              +-      type Panel is new System.Storage_Elements.Integer_Address;
              +-      Null_Panel : constant Panel := 0;
              ++      type Panel is new System.Storage_Elements.Integer_Address;
              ++      Null_Panel : constant Panel := 0;
              + 
              +-end Terminal_Interface.Curses.Panels;
              ++end Terminal_Interface.Curses.Panels;
              + 
              +Index: doc/html/ada/terminal_interface-curses-terminfo__adb.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-terminfo__adb.htm 2006-09-23 20:31:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-terminfo__adb.htm 2007-05-05 20:35:20.000000000 +0000 +@@ -71,13 +71,13 @@ + ------------------------------------------------------------------------------ + function Get_Flag (Name : String) return Boolean + is +- function tigetflag (id : char_array) return Curses_Bool; ++ function tigetflag (id : char_array) return Curses_Bool; + pragma Import (C, tigetflag); + Txt : char_array (0 .. Name'Length); + Length : size_t; + begin + To_C (Name, Txt, Length); +- if tigetflag (Txt) = Curses_Bool (Curses_True) then ++ if tigetflag (Txt) = Curses_Bool (Curses_True) then + return True; + else + return False; +Index: doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm 2006-09-23 20:31:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm 2007-05-05 20:35:20.000000000 +0000 +@@ -76,7 +76,7 @@ + end if; + + pragma Assert (Len <= W); +- Get_Size (Win, LC, CC); ++ Get_Size (Win, LC, CC); + if Column_Count (Len) > CC then + if Signal then + raise Layout_Error; +@@ -92,7 +92,7 @@ + Put (Win, Filler); + end; + end if; +- Get_Cursor_Position (Win, Y, X); ++ Get_Cursor_Position (Win, Y, X); + if (X + Column_Position (Len)) > CC then + New_Line (Win); + end if; +Index: doc/html/ada/terminal_interface-curses-text_io__adb.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-text_io__adb.htm 2006-09-23 20:31:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-text_io__adb.htm 2007-05-05 20:35:20.000000000 +0000 +@@ -58,7 +58,7 @@ + is + begin + if Default_Window = Null_Window then +- return Standard_Window; ++ return Standard_Window; + else + return Default_Window; + end if; +@@ -68,7 +68,7 @@ + procedure Flush (Win : in Window) + is + begin +- Refresh (Win); ++ Refresh (Win); + end Flush; + + procedure Flush +@@ -91,7 +91,7 @@ + N_Lines : Line_Count; + N_Cols : Column_Count; + begin +- Get_Size (Win, N_Lines, N_Cols); ++ Get_Size (Win, N_Lines, N_Cols); + -- if Natural (N_Cols) > Natural (Count'Last) then + -- raise Layout_Error; + -- end if; +@@ -109,10 +109,10 @@ + N_Lines : Line_Count; + N_Cols : Column_Count; + begin +- if Scrolling_Allowed (Win) then ++ if Scrolling_Allowed (Win) then + return 0; + else +- Get_Size (Win, N_Lines, N_Cols); ++ Get_Size (Win, N_Lines, N_Cols); + -- if Natural (N_Lines) > Natural (Count'Last) then + -- raise Layout_Error; + -- end if; +@@ -141,7 +141,7 @@ + if P_Size > 0 and then Line (Win) >= P_Size then + New_Page (Win); + else +- Add (Win, ASCII.LF); ++ Add (Win, ASCII.LF); + end if; + end loop; + end New_Line; +@@ -155,7 +155,7 @@ + procedure New_Page (Win : in Window) + is + begin +- Clear (Win); ++ Clear (Win); + end New_Page; + + procedure New_Page +@@ -175,7 +175,7 @@ + raise Constraint_Error; + end if; + +- Get_Cursor_Position (Win, Y, X1); ++ Get_Cursor_Position (Win, Y, X1); + N := Natural (To); N := N - 1; + X2 := Column_Position (N); + if X1 > X2 then +@@ -209,7 +209,7 @@ + raise Constraint_Error; + end if; + +- Get_Cursor_Position (Win, Y1, X); ++ Get_Cursor_Position (Win, Y1, X); + N := Natural (To); N := N - 1; + Y2 := Line_Position (N); + if Y2 < Y1 then +@@ -233,7 +233,7 @@ + X : Column_Position; + N : Natural; + begin +- Get_Cursor_Position (Win, Y, X); ++ Get_Cursor_Position (Win, Y, X); + N := Natural (X); N := N + 1; + -- if N > Natural (Count'Last) then + -- raise Layout_Error; +@@ -253,7 +253,7 @@ + X : Column_Position; + N : Natural; + begin +- Get_Cursor_Position (Win, Y, X); ++ Get_Cursor_Position (Win, Y, X); + N := Natural (Y); N := N + 1; + -- if N > Natural (Count'Last) then + -- raise Layout_Error; +@@ -280,13 +280,13 @@ + C : Column_Count; + begin + if P_Size > 0 then +- Get_Cursor_Position (Win, Y, X); +- Get_Size (Win, L, C); ++ Get_Cursor_Position (Win, Y, X); ++ Get_Size (Win, L, C); + if (Y + 1) = L and then (X + 1) = C then + New_Page (Win); + end if; + end if; +- Add (Win, Item); ++ Add (Win, Item); + end Put; + + procedure Put (Item : in Character) +@@ -308,13 +308,13 @@ + C : Column_Count; + begin + if P_Size > 0 then +- Get_Cursor_Position (Win, Y, X); +- Get_Size (Win, L, C); ++ Get_Cursor_Position (Win, Y, X); ++ Get_Size (Win, L, C); + if (Y + 1) = L and then (X + 1 + Item'Length) >= C then + New_Page (Win); + end if; + end if; +- Add (Win, Item); ++ Add (Win, Item); + end Put; + + procedure Put (Item : in String) +Index: doc/html/ada/terminal_interface-curses-trace__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses-trace__ads.htm 2006-09-23 20:31:32.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses-trace__ads.htm 2007-09-01 23:56:32.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses-trace.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -45,28 +44,28 @@
              + --  Binding Version 01.00
              + ------------------------------------------------------------------------------
              + 
              +-package Terminal_Interface.Curses.Trace is
              +-   pragma Preelaborate (Terminal_Interface.Curses.Trace);
              ++package Terminal_Interface.Curses.Trace is
              ++   pragma Preelaborate (Terminal_Interface.Curses.Trace);
              + 
              +    pragma Warnings (Off);
              +-   type Trace_Attribute_Set is
              ++   type Trace_Attribute_Set is
              +       record
              +-         Times            : Boolean;
              +-         Tputs            : Boolean;
              +-         Update           : Boolean;
              +-         Cursor_Move      : Boolean;
              +-         Character_Output : Boolean;
              +-         Calls            : Boolean;
              +-         Virtual_Puts     : Boolean;
              +-         Input_Events     : Boolean;
              +-         TTY_State        : Boolean;
              +-         Internal_Calls   : Boolean;
              +-         Character_Calls  : Boolean;
              +-         Termcap_TermInfo : Boolean;
              ++         Times            : Boolean;
              ++         Tputs            : Boolean;
              ++         Update           : Boolean;
              ++         Cursor_Move      : Boolean;
              ++         Character_Output : Boolean;
              ++         Calls            : Boolean;
              ++         Virtual_Puts     : Boolean;
              ++         Input_Events     : Boolean;
              ++         TTY_State        : Boolean;
              ++         Internal_Calls   : Boolean;
              ++         Character_Calls  : Boolean;
              ++         Termcap_TermInfo : Boolean;
              +       end record;
              +-   pragma Convention (C, Trace_Attribute_Set);
              ++   pragma Convention (C, Trace_Attribute_Set);
              + 
              +-   for Trace_Attribute_Set use
              ++   for Trace_Attribute_Set use
              +       record
              +          Times            at 0 range  0 ..  0;
              +          Tputs            at 0 range  1 ..  1;
              +@@ -81,22 +80,22 @@
              +          Character_Calls  at 0 range 10 .. 10;
              +          Termcap_TermInfo at 0 range 11 .. 11;
              +       end record;
              +-   for Trace_Attribute_Set'Size use 32;
              ++   for Trace_Attribute_Set'Size use 32;
              +    --  Please note: this rep. clause is generated and may be
              +    --               different on your system.
              + 
              +    pragma Warnings (On);
              + 
              +-   Trace_Disable  : constant Trace_Attribute_Set := (others => False);
              ++   Trace_Disable  : constant Trace_Attribute_Set := (others => False);
              + 
              +-   Trace_Ordinary : constant Trace_Attribute_Set :=
              +-     (Times            => True,
              +-      Tputs            => True,
              +-      Update           => True,
              +-      Cursor_Move      => True,
              +-      Character_Output => True,
              +-      others           => False);
              +-   Trace_Maximum : constant Trace_Attribute_Set := (others => True);
              ++   Trace_Ordinary : constant Trace_Attribute_Set :=
              ++     (Times            => True,
              ++      Tputs            => True,
              ++      Update           => True,
              ++      Cursor_Move      => True,
              ++      Character_Output => True,
              ++      others           => False);
              ++   Trace_Maximum : constant Trace_Attribute_Set := (others => True);
              + 
              + ------------------------------------------------------------------------------
              + 
              +@@ -105,15 +104,15 @@
              +    --  |=====================================================================
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   procedure Trace_On (x : Trace_Attribute_Set);
              ++   procedure Trace_On (x : Trace_Attribute_Set);
              +    --  The debugging library has trace.
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Trace_Put (str : String);
              ++   procedure Trace_Put (str : String);
              +    --  AKA: _tracef()
              + 
              +-   Current_Trace_Setting : Trace_Attribute_Set;
              +-   pragma Import (C, Current_Trace_Setting, "_nc_tracing");
              ++   Current_Trace_Setting : Trace_Attribute_Set;
              ++   pragma Import (C, Current_Trace_Setting, "_nc_tracing");
              + 
              +-end Terminal_Interface.Curses.Trace;
              ++end Terminal_Interface.Curses.Trace;
              + 
              +Index: doc/html/ada/terminal_interface-curses__adb.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses__adb.htm 2006-09-23 20:31:33.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses__adb.htm 2007-05-05 20:35:21.000000000 +0000 +@@ -12,7 +12,7 @@ + -- B O D Y -- + -- -- + ------------------------------------------------------------------------------ +--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- ++-- Copyright (c) 1998-2006,2007 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 -- +@@ -40,8 +40,8 @@ + ------------------------------------------------------------------------------ + -- Author: Juergen Pfeifer, 1996 + -- Version Control: +--- @Revision: 1.34 @ +--- @Date: 2006/06/25 14:30:22 @ ++-- @Revision: 1.4 @ ++-- @Date: 2007/05/05 20:09:10 @ + -- Binding Version 01.00 + ------------------------------------------------------------------------------ + with System; +@@ -49,2522 +49,2512 @@ + with Terminal_Interface.Curses.Aux; + with Interfaces.C; use Interfaces.C; + with Interfaces.C.Strings; use Interfaces.C.Strings; +-with Interfaces.C.Pointers; + with Ada.Characters.Handling; use Ada.Characters.Handling; + with Ada.Strings.Fixed; +-with Ada.Unchecked_Conversion; + +-package body Terminal_Interface.Curses is ++package body Terminal_Interface.Curses is + + use Aux; + use type System.Bit_Order; + +- package ASF renames Ada.Strings.Fixed; ++ package ASF renames Ada.Strings.Fixed; + +- type chtype_array is array (size_t range <>) ++ type chtype_array is array (size_t range <>) + of aliased Attributed_Character; +- pragma Convention (C, chtype_array); ++ pragma Convention (C, chtype_array); + + ------------------------------------------------------------------------------ +- generic +- type Element is (<>); +- function W_Get_Element (Win : in Window; +- Offset : in Natural) return Element; +- +- function W_Get_Element (Win : in Window; +- Offset : in Natural) return Element is +- type E_Array is array (Natural range <>) of aliased Element; +- package C_E_Array is new +- Interfaces.C.Pointers (Natural, Element, E_Array, Element'Val (0)); +- use C_E_Array; +- +- function To_Pointer is new +- Ada.Unchecked_Conversion (Window, Pointer); +- +- P : Pointer := To_Pointer (Win); +- begin +- if Win = Null_Window then +- raise Curses_Exception; +- else +- P := P + ptrdiff_t (Offset); +- return P.all; +- end if; +- end W_Get_Element; +- +- function W_Get_Int is new W_Get_Element (C_Int); +- function W_Get_Short is new W_Get_Element (C_Short); +- function W_Get_Byte is new W_Get_Element (Interfaces.C.unsigned_char); +- +- function Get_Flag (Win : Window; +- Offset : Natural) return Boolean; +- +- function Get_Flag (Win : Window; +- Offset : Natural) return Boolean +- is +- Res : C_Int; +- begin +- case Sizeof_bool is +- when 1 => Res := C_Int (W_Get_Byte (Win, Offset)); +- when 2 => Res := C_Int (W_Get_Short (Win, Offset)); +- when 4 => Res := C_Int (W_Get_Int (Win, Offset)); +- when others => raise Curses_Exception; +- end case; +- +- case Res is +- when 0 => return False; +- when others => return True; +- end case; +- end Get_Flag; +- +------------------------------------------------------------------------------- +- function Key_Name (Key : in Real_Key_Code) return String ++ function Key_Name (Key : in Real_Key_Code) return String + is +- function Keyname (K : C_Int) return chars_ptr; ++ function Keyname (K : C_Int) return chars_ptr; + pragma Import (C, Keyname, "keyname"); + +- Ch : Character; ++ Ch : Character; + begin +- if Key <= Character'Pos (Character'Last) then +- Ch := Character'Val (Key); +- if Is_Control (Ch) then +- return Un_Control (Attributed_Character'(Ch => Ch, ++ if Key <= Character'Pos (Character'Last) then ++ Ch := Character'Val (Key); ++ if Is_Control (Ch) then ++ return Un_Control (Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); +- elsif Is_Graphic (Ch) then ++ elsif Is_Graphic (Ch) then + declare +- S : String (1 .. 1); ++ S : String (1 .. 1); + begin +- S (1) := Ch; +- return S; ++ S (1) := Ch; ++ return S; + end; + else + return ""; + end if; + else +- return Fill_String (Keyname (C_Int (Key))); ++ return Fill_String (Keyname (C_Int (Key))); + end if; +- end Key_Name; ++ end Key_Name; + +- procedure Key_Name (Key : in Real_Key_Code; +- Name : out String) ++ procedure Key_Name (Key : in Real_Key_Code; ++ Name : out String) + is + begin +- ASF.Move (Key_Name (Key), Name); +- end Key_Name; ++ ASF.Move (Key_Name (Key), Name); ++ end Key_Name; + + ------------------------------------------------------------------------------ +- procedure Init_Screen ++ procedure Init_Screen + is +- function Initscr return Window; ++ function Initscr return Window; + pragma Import (C, Initscr, "initscr"); + +- W : Window; ++ W : Window; + begin +- W := Initscr; +- if W = Null_Window then ++ W := Initscr; ++ if W = Null_Window then + raise Curses_Exception; + end if; +- end Init_Screen; ++ end Init_Screen; + +- procedure End_Windows ++ procedure End_Windows + is +- function Endwin return C_Int; ++ function Endwin return C_Int; + pragma Import (C, Endwin, "endwin"); + begin +- if Endwin = Curses_Err then ++ if Endwin = Curses_Err then + raise Curses_Exception; + end if; +- end End_Windows; ++ end End_Windows; + +- function Is_End_Window return Boolean ++ function Is_End_Window return Boolean + is +- function Isendwin return Curses_Bool; ++ function Isendwin return Curses_Bool; + pragma Import (C, Isendwin, "isendwin"); + begin +- if Isendwin = Curses_Bool_False then ++ if Isendwin = Curses_Bool_False then + return False; + else + return True; + end if; +- end Is_End_Window; ++ end Is_End_Window; + ------------------------------------------------------------------------------ +- procedure Move_Cursor (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position) +- is +- function Wmove (Win : Window; +- Line : C_Int; +- Column : C_Int ++ procedure Move_Cursor (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position) ++ is ++ function Wmove (Win : Window; ++ Line : C_Int; ++ Column : C_Int + ) return C_Int; + pragma Import (C, Wmove, "wmove"); + begin +- if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then ++ if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; +- end Move_Cursor; ++ end Move_Cursor; + ------------------------------------------------------------------------------ +- procedure Add (Win : in Window := Standard_Window; +- Ch : in Attributed_Character) ++ procedure Add (Win : in Window := Standard_Window; ++ Ch : in Attributed_Character) + is +- function Waddch (W : Window; +- Ch : C_Chtype) return C_Int; ++ function Waddch (W : Window; ++ Ch : C_Chtype) return C_Int; + pragma Import (C, Waddch, "waddch"); + begin +- if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Add; ++ end Add; + +- procedure Add (Win : in Window := Standard_Window; +- Ch : in Character) ++ procedure Add (Win : in Window := Standard_Window; ++ Ch : in Character) + is + begin +- Add (Win, +- Attributed_Character'(Ch => Ch, ++ Add (Win, ++ Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); +- end Add; ++ end Add; + +- procedure Add +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Ch : in Attributed_Character) +- is +- function mvwaddch (W : Window; +- Y : C_Int; +- X : C_Int; +- Ch : C_Chtype) return C_Int; ++ procedure Add ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Ch : in Attributed_Character) ++ is ++ function mvwaddch (W : Window; ++ Y : C_Int; ++ X : C_Int; ++ Ch : C_Chtype) return C_Int; + pragma Import (C, mvwaddch, "mvwaddch"); + begin +- if mvwaddch (Win, C_Int (Line), +- C_Int (Column), +- AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if mvwaddch (Win, C_Int (Line), ++ C_Int (Column), ++ AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Add; ++ end Add; + +- procedure Add +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Ch : in Character) ++ procedure Add ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Ch : in Character) + is + begin +- Add (Win, +- Line, +- Column, +- Attributed_Character'(Ch => Ch, ++ Add (Win, ++ Line, ++ Column, ++ Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); +- end Add; ++ end Add; + +- procedure Add_With_Immediate_Echo +- (Win : in Window := Standard_Window; +- Ch : in Attributed_Character) ++ procedure Add_With_Immediate_Echo ++ (Win : in Window := Standard_Window; ++ Ch : in Attributed_Character) + is +- function Wechochar (W : Window; +- Ch : C_Chtype) return C_Int; ++ function Wechochar (W : Window; ++ Ch : C_Chtype) return C_Int; + pragma Import (C, Wechochar, "wechochar"); + begin +- if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Add_With_Immediate_Echo; ++ end Add_With_Immediate_Echo; + +- procedure Add_With_Immediate_Echo +- (Win : in Window := Standard_Window; +- Ch : in Character) ++ procedure Add_With_Immediate_Echo ++ (Win : in Window := Standard_Window; ++ Ch : in Character) + is + begin +- Add_With_Immediate_Echo +- (Win, +- Attributed_Character'(Ch => Ch, ++ Add_With_Immediate_Echo ++ (Win, ++ Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); +- end Add_With_Immediate_Echo; ++ end Add_With_Immediate_Echo; + ------------------------------------------------------------------------------ +- function Create (Number_Of_Lines : Line_Count; +- Number_Of_Columns : Column_Count; +- First_Line_Position : Line_Position; +- First_Column_Position : Column_Position) return Window +- is +- function Newwin (Number_Of_Lines : C_Int; +- Number_Of_Columns : C_Int; +- First_Line_Position : C_Int; +- First_Column_Position : C_Int) return Window; ++ function Create (Number_Of_Lines : Line_Count; ++ Number_Of_Columns : Column_Count; ++ First_Line_Position : Line_Position; ++ First_Column_Position : Column_Position) return Window ++ is ++ function Newwin (Number_Of_Lines : C_Int; ++ Number_Of_Columns : C_Int; ++ First_Line_Position : C_Int; ++ First_Column_Position : C_Int) return Window; + pragma Import (C, Newwin, "newwin"); + +- W : Window; ++ W : Window; + begin +- W := Newwin (C_Int (Number_Of_Lines), +- C_Int (Number_Of_Columns), +- C_Int (First_Line_Position), +- C_Int (First_Column_Position)); +- if W = Null_Window then ++ W := Newwin (C_Int (Number_Of_Lines), ++ C_Int (Number_Of_Columns), ++ C_Int (First_Line_Position), ++ C_Int (First_Column_Position)); ++ if W = Null_Window then + raise Curses_Exception; + end if; +- return W; +- end Create; ++ return W; ++ end Create; + +- procedure Delete (Win : in out Window) ++ procedure Delete (Win : in out Window) + is +- function Wdelwin (W : Window) return C_Int; ++ function Wdelwin (W : Window) return C_Int; + pragma Import (C, Wdelwin, "delwin"); + begin +- if Wdelwin (Win) = Curses_Err then ++ if Wdelwin (Win) = Curses_Err then + raise Curses_Exception; + end if; +- Win := Null_Window; +- end Delete; ++ Win := Null_Window; ++ end Delete; + +- function Sub_Window +- (Win : Window := Standard_Window; +- Number_Of_Lines : Line_Count; +- Number_Of_Columns : Column_Count; +- First_Line_Position : Line_Position; +- First_Column_Position : Column_Position) return Window +- is +- function Subwin +- (Win : Window; +- Number_Of_Lines : C_Int; +- Number_Of_Columns : C_Int; +- First_Line_Position : C_Int; +- First_Column_Position : C_Int) return Window; ++ function Sub_Window ++ (Win : Window := Standard_Window; ++ Number_Of_Lines : Line_Count; ++ Number_Of_Columns : Column_Count; ++ First_Line_Position : Line_Position; ++ First_Column_Position : Column_Position) return Window ++ is ++ function Subwin ++ (Win : Window; ++ Number_Of_Lines : C_Int; ++ Number_Of_Columns : C_Int; ++ First_Line_Position : C_Int; ++ First_Column_Position : C_Int) return Window; + pragma Import (C, Subwin, "subwin"); + +- W : Window; ++ W : Window; + begin +- W := Subwin (Win, +- C_Int (Number_Of_Lines), +- C_Int (Number_Of_Columns), +- C_Int (First_Line_Position), +- C_Int (First_Column_Position)); +- if W = Null_Window then +- raise Curses_Exception; +- end if; +- return W; +- end Sub_Window; +- +- function Derived_Window +- (Win : Window := Standard_Window; +- Number_Of_Lines : Line_Count; +- Number_Of_Columns : Column_Count; +- First_Line_Position : Line_Position; +- First_Column_Position : Column_Position) return Window +- is +- function Derwin +- (Win : Window; +- Number_Of_Lines : C_Int; +- Number_Of_Columns : C_Int; +- First_Line_Position : C_Int; +- First_Column_Position : C_Int) return Window; ++ W := Subwin (Win, ++ C_Int (Number_Of_Lines), ++ C_Int (Number_Of_Columns), ++ C_Int (First_Line_Position), ++ C_Int (First_Column_Position)); ++ if W = Null_Window then ++ raise Curses_Exception; ++ end if; ++ return W; ++ end Sub_Window; ++ ++ function Derived_Window ++ (Win : Window := Standard_Window; ++ Number_Of_Lines : Line_Count; ++ Number_Of_Columns : Column_Count; ++ First_Line_Position : Line_Position; ++ First_Column_Position : Column_Position) return Window ++ is ++ function Derwin ++ (Win : Window; ++ Number_Of_Lines : C_Int; ++ Number_Of_Columns : C_Int; ++ First_Line_Position : C_Int; ++ First_Column_Position : C_Int) return Window; + pragma Import (C, Derwin, "derwin"); + +- W : Window; ++ W : Window; + begin +- W := Derwin (Win, +- C_Int (Number_Of_Lines), +- C_Int (Number_Of_Columns), +- C_Int (First_Line_Position), +- C_Int (First_Column_Position)); +- if W = Null_Window then ++ W := Derwin (Win, ++ C_Int (Number_Of_Lines), ++ C_Int (Number_Of_Columns), ++ C_Int (First_Line_Position), ++ C_Int (First_Column_Position)); ++ if W = Null_Window then + raise Curses_Exception; + end if; +- return W; +- end Derived_Window; ++ return W; ++ end Derived_Window; + +- function Duplicate (Win : Window) return Window ++ function Duplicate (Win : Window) return Window + is +- function Dupwin (Win : Window) return Window; ++ function Dupwin (Win : Window) return Window; + pragma Import (C, Dupwin, "dupwin"); + +- W : constant Window := Dupwin (Win); ++ W : constant Window := Dupwin (Win); + begin +- if W = Null_Window then ++ if W = Null_Window then + raise Curses_Exception; + end if; +- return W; +- end Duplicate; ++ return W; ++ end Duplicate; + +- procedure Move_Window (Win : in Window; +- Line : in Line_Position; +- Column : in Column_Position) ++ procedure Move_Window (Win : in Window; ++ Line : in Line_Position; ++ Column : in Column_Position) + is +- function Mvwin (Win : Window; +- Line : C_Int; +- Column : C_Int) return C_Int; ++ function Mvwin (Win : Window; ++ Line : C_Int; ++ Column : C_Int) return C_Int; + pragma Import (C, Mvwin, "mvwin"); + begin +- if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then ++ if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; +- end Move_Window; ++ end Move_Window; + +- procedure Move_Derived_Window (Win : in Window; +- Line : in Line_Position; +- Column : in Column_Position) ++ procedure Move_Derived_Window (Win : in Window; ++ Line : in Line_Position; ++ Column : in Column_Position) + is +- function Mvderwin (Win : Window; +- Line : C_Int; +- Column : C_Int) return C_Int; ++ function Mvderwin (Win : Window; ++ Line : C_Int; ++ Column : C_Int) return C_Int; + pragma Import (C, Mvderwin, "mvderwin"); + begin +- if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then ++ if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; +- end Move_Derived_Window; ++ end Move_Derived_Window; + +- procedure Set_Synch_Mode (Win : in Window := Standard_Window; +- Mode : in Boolean := False) ++ procedure Set_Synch_Mode (Win : in Window := Standard_Window; ++ Mode : in Boolean := False) + is +- function Syncok (Win : Window; +- Mode : Curses_Bool) return C_Int; ++ function Syncok (Win : Window; ++ Mode : Curses_Bool) return C_Int; + pragma Import (C, Syncok, "syncok"); + begin +- if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then ++ if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Synch_Mode; ++ end Set_Synch_Mode; + ------------------------------------------------------------------------------ +- procedure Add (Win : in Window := Standard_Window; +- Str : in String; +- Len : in Integer := -1) ++ procedure Add (Win : in Window := Standard_Window; ++ Str : in String; ++ Len : in Integer := -1) + is +- function Waddnstr (Win : Window; +- Str : char_array; +- Len : C_Int := -1) return C_Int; ++ function Waddnstr (Win : Window; ++ Str : char_array; ++ Len : C_Int := -1) return C_Int; + pragma Import (C, Waddnstr, "waddnstr"); + +- Txt : char_array (0 .. Str'Length); +- Length : size_t; ++ Txt : char_array (0 .. Str'Length); ++ Length : size_t; + begin +- To_C (Str, Txt, Length); +- if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then ++ To_C (Str, Txt, Length); ++ if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then + raise Curses_Exception; + end if; +- end Add; ++ end Add; + +- procedure Add +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Str : in String; +- Len : in Integer := -1) ++ procedure Add ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Str : in String; ++ Len : in Integer := -1) + is + begin +- Move_Cursor (Win, Line, Column); +- Add (Win, Str, Len); +- end Add; ++ Move_Cursor (Win, Line, Column); ++ Add (Win, Str, Len); ++ end Add; + ------------------------------------------------------------------------------ +- procedure Add +- (Win : in Window := Standard_Window; +- Str : in Attributed_String; +- Len : in Integer := -1) ++ procedure Add ++ (Win : in Window := Standard_Window; ++ Str : in Attributed_String; ++ Len : in Integer := -1) + is +- function Waddchnstr (Win : Window; +- Str : chtype_array; +- Len : C_Int := -1) return C_Int; ++ function Waddchnstr (Win : Window; ++ Str : chtype_array; ++ Len : C_Int := -1) return C_Int; + pragma Import (C, Waddchnstr, "waddchnstr"); + +- Txt : chtype_array (0 .. Str'Length); ++ Txt : chtype_array (0 .. Str'Length); + begin +- for Length in 1 .. size_t (Str'Length) loop +- Txt (Length - 1) := Str (Natural (Length)); ++ for Length in 1 .. size_t (Str'Length) loop ++ Txt (Length - 1) := Str (Natural (Length)); + end loop; +- Txt (Str'Length) := Default_Character; +- if Waddchnstr (Win, +- Txt, +- C_Int (Len)) = Curses_Err then +- raise Curses_Exception; +- end if; +- end Add; +- +- procedure Add +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Str : in Attributed_String; +- Len : in Integer := -1) +- is +- begin +- Move_Cursor (Win, Line, Column); +- Add (Win, Str, Len); +- end Add; +------------------------------------------------------------------------------- +- procedure Border +- (Win : in Window := Standard_Window; +- Left_Side_Symbol : in Attributed_Character := Default_Character; +- Right_Side_Symbol : in Attributed_Character := Default_Character; +- Top_Side_Symbol : in Attributed_Character := Default_Character; +- Bottom_Side_Symbol : in Attributed_Character := Default_Character; +- Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; +- Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; +- Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; +- Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) +- is +- function Wborder (W : Window; +- LS : C_Chtype; +- RS : C_Chtype; +- TS : C_Chtype; +- BS : C_Chtype; +- ULC : C_Chtype; +- URC : C_Chtype; +- LLC : C_Chtype; +- LRC : C_Chtype) return C_Int; ++ Txt (Str'Length) := Default_Character; ++ if Waddchnstr (Win, ++ Txt, ++ C_Int (Len)) = Curses_Err then ++ raise Curses_Exception; ++ end if; ++ end Add; ++ ++ procedure Add ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Str : in Attributed_String; ++ Len : in Integer := -1) ++ is ++ begin ++ Move_Cursor (Win, Line, Column); ++ Add (Win, Str, Len); ++ end Add; ++------------------------------------------------------------------------------ ++ procedure Border ++ (Win : in Window := Standard_Window; ++ Left_Side_Symbol : in Attributed_Character := Default_Character; ++ Right_Side_Symbol : in Attributed_Character := Default_Character; ++ Top_Side_Symbol : in Attributed_Character := Default_Character; ++ Bottom_Side_Symbol : in Attributed_Character := Default_Character; ++ Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; ++ Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; ++ Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; ++ Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) ++ is ++ function Wborder (W : Window; ++ LS : C_Chtype; ++ RS : C_Chtype; ++ TS : C_Chtype; ++ BS : C_Chtype; ++ ULC : C_Chtype; ++ URC : C_Chtype; ++ LLC : C_Chtype; ++ LRC : C_Chtype) return C_Int; + pragma Import (C, Wborder, "wborder"); + begin +- if Wborder (Win, +- AttrChar_To_Chtype (Left_Side_Symbol), +- AttrChar_To_Chtype (Right_Side_Symbol), +- AttrChar_To_Chtype (Top_Side_Symbol), +- AttrChar_To_Chtype (Bottom_Side_Symbol), +- AttrChar_To_Chtype (Upper_Left_Corner_Symbol), +- AttrChar_To_Chtype (Upper_Right_Corner_Symbol), +- AttrChar_To_Chtype (Lower_Left_Corner_Symbol), +- AttrChar_To_Chtype (Lower_Right_Corner_Symbol) ++ if Wborder (Win, ++ AttrChar_To_Chtype (Left_Side_Symbol), ++ AttrChar_To_Chtype (Right_Side_Symbol), ++ AttrChar_To_Chtype (Top_Side_Symbol), ++ AttrChar_To_Chtype (Bottom_Side_Symbol), ++ AttrChar_To_Chtype (Upper_Left_Corner_Symbol), ++ AttrChar_To_Chtype (Upper_Right_Corner_Symbol), ++ AttrChar_To_Chtype (Lower_Left_Corner_Symbol), ++ AttrChar_To_Chtype (Lower_Right_Corner_Symbol) + ) = Curses_Err + then + raise Curses_Exception; + end if; +- end Border; ++ end Border; + +- procedure Box +- (Win : in Window := Standard_Window; +- Vertical_Symbol : in Attributed_Character := Default_Character; +- Horizontal_Symbol : in Attributed_Character := Default_Character) +- is +- begin +- Border (Win, +- Vertical_Symbol, Vertical_Symbol, +- Horizontal_Symbol, Horizontal_Symbol); +- end Box; +- +- procedure Horizontal_Line +- (Win : in Window := Standard_Window; +- Line_Size : in Natural; +- Line_Symbol : in Attributed_Character := Default_Character) +- is +- function Whline (W : Window; +- Ch : C_Chtype; +- Len : C_Int) return C_Int; ++ procedure Box ++ (Win : in Window := Standard_Window; ++ Vertical_Symbol : in Attributed_Character := Default_Character; ++ Horizontal_Symbol : in Attributed_Character := Default_Character) ++ is ++ begin ++ Border (Win, ++ Vertical_Symbol, Vertical_Symbol, ++ Horizontal_Symbol, Horizontal_Symbol); ++ end Box; ++ ++ procedure Horizontal_Line ++ (Win : in Window := Standard_Window; ++ Line_Size : in Natural; ++ Line_Symbol : in Attributed_Character := Default_Character) ++ is ++ function Whline (W : Window; ++ Ch : C_Chtype; ++ Len : C_Int) return C_Int; + pragma Import (C, Whline, "whline"); + begin +- if Whline (Win, +- AttrChar_To_Chtype (Line_Symbol), +- C_Int (Line_Size)) = Curses_Err then ++ if Whline (Win, ++ AttrChar_To_Chtype (Line_Symbol), ++ C_Int (Line_Size)) = Curses_Err then + raise Curses_Exception; + end if; +- end Horizontal_Line; ++ end Horizontal_Line; + +- procedure Vertical_Line +- (Win : in Window := Standard_Window; +- Line_Size : in Natural; +- Line_Symbol : in Attributed_Character := Default_Character) ++ procedure Vertical_Line ++ (Win : in Window := Standard_Window; ++ Line_Size : in Natural; ++ Line_Symbol : in Attributed_Character := Default_Character) + is +- function Wvline (W : Window; +- Ch : C_Chtype; +- Len : C_Int) return C_Int; ++ function Wvline (W : Window; ++ Ch : C_Chtype; ++ Len : C_Int) return C_Int; + pragma Import (C, Wvline, "wvline"); + begin +- if Wvline (Win, +- AttrChar_To_Chtype (Line_Symbol), +- C_Int (Line_Size)) = Curses_Err then ++ if Wvline (Win, ++ AttrChar_To_Chtype (Line_Symbol), ++ C_Int (Line_Size)) = Curses_Err then + raise Curses_Exception; + end if; +- end Vertical_Line; ++ end Vertical_Line; + + ------------------------------------------------------------------------------ +- function Get_Keystroke (Win : Window := Standard_Window) ++ function Get_Keystroke (Win : Window := Standard_Window) + return Real_Key_Code + is +- function Wgetch (W : Window) return C_Int; ++ function Wgetch (W : Window) return C_Int; + pragma Import (C, Wgetch, "wgetch"); + +- C : constant C_Int := Wgetch (Win); ++ C : constant C_Int := Wgetch (Win); + begin +- if C = Curses_Err then ++ if C = Curses_Err then + return Key_None; + else +- return Real_Key_Code (C); ++ return Real_Key_Code (C); + end if; +- end Get_Keystroke; ++ end Get_Keystroke; + +- procedure Undo_Keystroke (Key : in Real_Key_Code) ++ procedure Undo_Keystroke (Key : in Real_Key_Code) + is +- function Ungetch (Ch : C_Int) return C_Int; ++ function Ungetch (Ch : C_Int) return C_Int; + pragma Import (C, Ungetch, "ungetch"); + begin +- if Ungetch (C_Int (Key)) = Curses_Err then ++ if Ungetch (C_Int (Key)) = Curses_Err then + raise Curses_Exception; + end if; +- end Undo_Keystroke; ++ end Undo_Keystroke; + +- function Has_Key (Key : Special_Key_Code) return Boolean ++ function Has_Key (Key : Special_Key_Code) return Boolean + is +- function Haskey (Key : C_Int) return C_Int; ++ function Haskey (Key : C_Int) return C_Int; + pragma Import (C, Haskey, "has_key"); + begin +- if Haskey (C_Int (Key)) = Curses_False then ++ if Haskey (C_Int (Key)) = Curses_False then + return False; + else + return True; + end if; +- end Has_Key; ++ end Has_Key; + +- function Is_Function_Key (Key : Special_Key_Code) return Boolean ++ function Is_Function_Key (Key : Special_Key_Code) return Boolean + is +- L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + +- Natural (Function_Key_Number'Last)); ++ L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + ++ Natural (Function_Key_Number'Last)); + begin +- if (Key >= Key_F0) and then (Key <= L) then ++ if (Key >= Key_F0) and then (Key <= L) then + return True; + else + return False; + end if; +- end Is_Function_Key; ++ end Is_Function_Key; + +- function Function_Key (Key : Real_Key_Code) +- return Function_Key_Number ++ function Function_Key (Key : Real_Key_Code) ++ return Function_Key_Number + is + begin +- if Is_Function_Key (Key) then +- return Function_Key_Number (Key - Key_F0); ++ if Is_Function_Key (Key) then ++ return Function_Key_Number (Key - Key_F0); + else + raise Constraint_Error; + end if; +- end Function_Key; ++ end Function_Key; + +- function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code ++ function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code + is + begin +- return Real_Key_Code (Natural (Key_F0) + Natural (Key)); +- end Function_Key_Code; ++ return Real_Key_Code (Natural (Key_F0) + Natural (Key)); ++ end Function_Key_Code; + ------------------------------------------------------------------------------ +- procedure Standout (Win : Window := Standard_Window; +- On : Boolean := True) ++ procedure Standout (Win : Window := Standard_Window; ++ On : Boolean := True) + is +- function wstandout (Win : Window) return C_Int; ++ function wstandout (Win : Window) return C_Int; + pragma Import (C, wstandout, "wstandout"); +- function wstandend (Win : Window) return C_Int; ++ function wstandend (Win : Window) return C_Int; + pragma Import (C, wstandend, "wstandend"); + +- Err : C_Int; ++ Err : C_Int; + begin +- if On then +- Err := wstandout (Win); ++ if On then ++ Err := wstandout (Win); + else +- Err := wstandend (Win); ++ Err := wstandend (Win); + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Standout; ++ end Standout; + +- procedure Switch_Character_Attribute +- (Win : in Window := Standard_Window; +- Attr : in Character_Attribute_Set := Normal_Video; +- On : in Boolean := True) ++ procedure Switch_Character_Attribute ++ (Win : in Window := Standard_Window; ++ Attr : in Character_Attribute_Set := Normal_Video; ++ On : in Boolean := True) + is +- function Wattron (Win : Window; +- C_Attr : C_AttrType) return C_Int; ++ function Wattron (Win : Window; ++ C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattron, "wattr_on"); +- function Wattroff (Win : Window; +- C_Attr : C_AttrType) return C_Int; ++ function Wattroff (Win : Window; ++ C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattroff, "wattr_off"); + -- In Ada we use the On Boolean to control whether or not we want to + -- switch on or off the attributes in the set. +- Err : C_Int; +- AC : constant Attributed_Character := (Ch => Character'First, ++ Err : C_Int; ++ AC : constant Attributed_Character := (Ch => Character'First, + Color => Color_Pair'First, +- Attr => Attr); ++ Attr => Attr); + begin +- if On then +- Err := Wattron (Win, AttrChar_To_AttrType (AC)); ++ if On then ++ Err := Wattron (Win, AttrChar_To_AttrType (AC)); + else +- Err := Wattroff (Win, AttrChar_To_AttrType (AC)); ++ Err := Wattroff (Win, AttrChar_To_AttrType (AC)); + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Switch_Character_Attribute; ++ end Switch_Character_Attribute; + +- procedure Set_Character_Attributes +- (Win : in Window := Standard_Window; +- Attr : in Character_Attribute_Set := Normal_Video; +- Color : in Color_Pair := Color_Pair'First) ++ procedure Set_Character_Attributes ++ (Win : in Window := Standard_Window; ++ Attr : in Character_Attribute_Set := Normal_Video; ++ Color : in Color_Pair := Color_Pair'First) + is +- function Wattrset (Win : Window; +- C_Attr : C_AttrType) return C_Int; ++ function Wattrset (Win : Window; ++ C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set + begin +- if Wattrset (Win, ++ if Wattrset (Win, + AttrChar_To_AttrType (Attributed_Character' + (Ch => Character'First, +- Color => Color, +- Attr => Attr))) = Curses_Err then ++ Color => Color, ++ Attr => Attr))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Character_Attributes; ++ end Set_Character_Attributes; + +- function Get_Character_Attribute (Win : Window := Standard_Window) ++ function Get_Character_Attribute (Win : Window := Standard_Window) + return Character_Attribute_Set + is +- function Wattrget (Win : Window; +- Atr : access C_AttrType; +- Col : access C_Short; +- Opt : System.Address) return C_Int; ++ function Wattrget (Win : Window; ++ Atr : access C_AttrType; ++ Col : access C_Short; ++ Opt : System.Address) return C_Int; + pragma Import (C, Wattrget, "wattr_get"); + +- Attr : aliased C_AttrType; +- Col : aliased C_Short; +- Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, ++ Attr : aliased C_AttrType; ++ Col : aliased C_Short; ++ Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + System.Null_Address); +- Ch : Attributed_Character; ++ Ch : Attributed_Character; + begin +- if Res = Curses_Ok then +- Ch := AttrType_To_AttrChar (Attr); +- return Ch.Attr; ++ if Res = Curses_Ok then ++ Ch := AttrType_To_AttrChar (Attr); ++ return Ch.Attr; + else + raise Curses_Exception; + end if; +- end Get_Character_Attribute; ++ end Get_Character_Attribute; + +- function Get_Character_Attribute (Win : Window := Standard_Window) ++ function Get_Character_Attribute (Win : Window := Standard_Window) + return Color_Pair + is +- function Wattrget (Win : Window; +- Atr : access C_AttrType; +- Col : access C_Short; +- Opt : System.Address) return C_Int; ++ function Wattrget (Win : Window; ++ Atr : access C_AttrType; ++ Col : access C_Short; ++ Opt : System.Address) return C_Int; + pragma Import (C, Wattrget, "wattr_get"); + +- Attr : aliased C_AttrType; +- Col : aliased C_Short; +- Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, ++ Attr : aliased C_AttrType; ++ Col : aliased C_Short; ++ Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + System.Null_Address); +- Ch : Attributed_Character; ++ Ch : Attributed_Character; + begin +- if Res = Curses_Ok then +- Ch := AttrType_To_AttrChar (Attr); +- return Ch.Color; ++ if Res = Curses_Ok then ++ Ch := AttrType_To_AttrChar (Attr); ++ return Ch.Color; + else + raise Curses_Exception; + end if; +- end Get_Character_Attribute; ++ end Get_Character_Attribute; + +- procedure Set_Color (Win : in Window := Standard_Window; +- Pair : in Color_Pair) ++ procedure Set_Color (Win : in Window := Standard_Window; ++ Pair : in Color_Pair) + is +- function Wset_Color (Win : Window; +- Color : C_Short; +- Opts : C_Void_Ptr) return C_Int; ++ function Wset_Color (Win : Window; ++ Color : C_Short; ++ Opts : C_Void_Ptr) return C_Int; + pragma Import (C, Wset_Color, "wcolor_set"); + begin +- if Wset_Color (Win, +- C_Short (Pair), ++ if Wset_Color (Win, ++ C_Short (Pair), + C_Void_Ptr (System.Null_Address)) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Color; ++ end Set_Color; + +- procedure Change_Attributes +- (Win : in Window := Standard_Window; +- Count : in Integer := -1; +- Attr : in Character_Attribute_Set := Normal_Video; +- Color : in Color_Pair := Color_Pair'First) +- is +- function Wchgat (Win : Window; +- Cnt : C_Int; +- Attr : C_AttrType; +- Color : C_Short; +- Opts : System.Address := System.Null_Address) ++ procedure Change_Attributes ++ (Win : in Window := Standard_Window; ++ Count : in Integer := -1; ++ Attr : in Character_Attribute_Set := Normal_Video; ++ Color : in Color_Pair := Color_Pair'First) ++ is ++ function Wchgat (Win : Window; ++ Cnt : C_Int; ++ Attr : C_AttrType; ++ Color : C_Short; ++ Opts : System.Address := System.Null_Address) + return C_Int; + pragma Import (C, Wchgat, "wchgat"); + +- Ch : constant Attributed_Character := +- (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); ++ Ch : constant Attributed_Character := ++ (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); + begin +- if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), +- C_Short (Color)) = Curses_Err then ++ if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), ++ C_Short (Color)) = Curses_Err then + raise Curses_Exception; + end if; +- end Change_Attributes; ++ end Change_Attributes; + +- procedure Change_Attributes +- (Win : in Window := Standard_Window; +- Line : in Line_Position := Line_Position'First; +- Column : in Column_Position := Column_Position'First; +- Count : in Integer := -1; +- Attr : in Character_Attribute_Set := Normal_Video; +- Color : in Color_Pair := Color_Pair'First) ++ procedure Change_Attributes ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position := Line_Position'First; ++ Column : in Column_Position := Column_Position'First; ++ Count : in Integer := -1; ++ Attr : in Character_Attribute_Set := Normal_Video; ++ Color : in Color_Pair := Color_Pair'First) + is + begin +- Move_Cursor (Win, Line, Column); +- Change_Attributes (Win, Count, Attr, Color); +- end Change_Attributes; ++ Move_Cursor (Win, Line, Column); ++ Change_Attributes (Win, Count, Attr, Color); ++ end Change_Attributes; + ------------------------------------------------------------------------------ +- procedure Beep ++ procedure Beep + is +- function Beeper return C_Int; ++ function Beeper return C_Int; + pragma Import (C, Beeper, "beep"); + begin +- if Beeper = Curses_Err then ++ if Beeper = Curses_Err then + raise Curses_Exception; + end if; +- end Beep; ++ end Beep; + +- procedure Flash_Screen ++ procedure Flash_Screen + is +- function Flash return C_Int; ++ function Flash return C_Int; + pragma Import (C, Flash, "flash"); + begin +- if Flash = Curses_Err then ++ if Flash = Curses_Err then + raise Curses_Exception; + end if; +- end Flash_Screen; ++ end Flash_Screen; + ------------------------------------------------------------------------------ +- procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) ++ procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) + is +- function Cbreak return C_Int; ++ function Cbreak return C_Int; + pragma Import (C, Cbreak, "cbreak"); +- function NoCbreak return C_Int; ++ function NoCbreak return C_Int; + pragma Import (C, NoCbreak, "nocbreak"); + +- Err : C_Int; ++ Err : C_Int; + begin +- if SwitchOn then +- Err := Cbreak; ++ if SwitchOn then ++ Err := Cbreak; + else +- Err := NoCbreak; ++ Err := NoCbreak; + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Cbreak_Mode; ++ end Set_Cbreak_Mode; + +- procedure Set_Raw_Mode (SwitchOn : in Boolean := True) ++ procedure Set_Raw_Mode (SwitchOn : in Boolean := True) + is +- function Raw return C_Int; ++ function Raw return C_Int; + pragma Import (C, Raw, "raw"); +- function NoRaw return C_Int; ++ function NoRaw return C_Int; + pragma Import (C, NoRaw, "noraw"); + +- Err : C_Int; ++ Err : C_Int; + begin +- if SwitchOn then +- Err := Raw; ++ if SwitchOn then ++ Err := Raw; + else +- Err := NoRaw; ++ Err := NoRaw; + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Raw_Mode; ++ end Set_Raw_Mode; + +- procedure Set_Echo_Mode (SwitchOn : in Boolean := True) ++ procedure Set_Echo_Mode (SwitchOn : in Boolean := True) + is +- function Echo return C_Int; ++ function Echo return C_Int; + pragma Import (C, Echo, "echo"); +- function NoEcho return C_Int; ++ function NoEcho return C_Int; + pragma Import (C, NoEcho, "noecho"); + +- Err : C_Int; ++ Err : C_Int; + begin +- if SwitchOn then +- Err := Echo; ++ if SwitchOn then ++ Err := Echo; + else +- Err := NoEcho; ++ Err := NoEcho; + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Echo_Mode; ++ end Set_Echo_Mode; + +- procedure Set_Meta_Mode (Win : in Window := Standard_Window; +- SwitchOn : in Boolean := True) ++ procedure Set_Meta_Mode (Win : in Window := Standard_Window; ++ SwitchOn : in Boolean := True) + is +- function Meta (W : Window; Mode : Curses_Bool) return C_Int; ++ function Meta (W : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Meta, "meta"); + begin +- if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then ++ if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Meta_Mode; ++ end Set_Meta_Mode; + +- procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; +- SwitchOn : in Boolean := True) ++ procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; ++ SwitchOn : in Boolean := True) + is +- function Keypad (W : Window; Mode : Curses_Bool) return C_Int; ++ function Keypad (W : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Keypad, "keypad"); + begin +- if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then ++ if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_KeyPad_Mode; ++ end Set_KeyPad_Mode; + +- function Get_KeyPad_Mode (Win : in Window := Standard_Window) ++ function Get_KeyPad_Mode (Win : in Window := Standard_Window) + return Boolean + is ++ function Is_Keypad (W : Window) return Curses_Bool; ++ pragma Import (C, Is_Keypad, "is_keypad"); + begin +- return Get_Flag (Win, Offset_use_keypad); +- end Get_KeyPad_Mode; ++ return (Is_Keypad (Win) /= Curses_Bool_False); ++ end Get_KeyPad_Mode; + +- procedure Half_Delay (Amount : in Half_Delay_Amount) ++ procedure Half_Delay (Amount : in Half_Delay_Amount) + is +- function Halfdelay (Amount : C_Int) return C_Int; ++ function Halfdelay (Amount : C_Int) return C_Int; + pragma Import (C, Halfdelay, "halfdelay"); + begin +- if Halfdelay (C_Int (Amount)) = Curses_Err then ++ if Halfdelay (C_Int (Amount)) = Curses_Err then + raise Curses_Exception; + end if; +- end Half_Delay; ++ end Half_Delay; + +- procedure Set_Flush_On_Interrupt_Mode +- (Win : in Window := Standard_Window; +- Mode : in Boolean := True) ++ procedure Set_Flush_On_Interrupt_Mode ++ (Win : in Window := Standard_Window; ++ Mode : in Boolean := True) + is +- function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; ++ function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Intrflush, "intrflush"); + begin +- if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then ++ if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Flush_On_Interrupt_Mode; ++ end Set_Flush_On_Interrupt_Mode; + +- procedure Set_Queue_Interrupt_Mode +- (Win : in Window := Standard_Window; +- Flush : in Boolean := True) ++ procedure Set_Queue_Interrupt_Mode ++ (Win : in Window := Standard_Window; ++ Flush : in Boolean := True) + is +- procedure Qiflush; ++ procedure Qiflush; + pragma Import (C, Qiflush, "qiflush"); +- procedure No_Qiflush; ++ procedure No_Qiflush; + pragma Import (C, No_Qiflush, "noqiflush"); + begin +- if Win = Null_Window then ++ if Win = Null_Window then + raise Curses_Exception; + end if; +- if Flush then +- Qiflush; ++ if Flush then ++ Qiflush; + else +- No_Qiflush; ++ No_Qiflush; + end if; +- end Set_Queue_Interrupt_Mode; ++ end Set_Queue_Interrupt_Mode; + +- procedure Set_NoDelay_Mode +- (Win : in Window := Standard_Window; +- Mode : in Boolean := False) ++ procedure Set_NoDelay_Mode ++ (Win : in Window := Standard_Window; ++ Mode : in Boolean := False) + is +- function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; ++ function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Nodelay, "nodelay"); + begin +- if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then ++ if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_NoDelay_Mode; ++ end Set_NoDelay_Mode; + +- procedure Set_Timeout_Mode (Win : in Window := Standard_Window; +- Mode : in Timeout_Mode; +- Amount : in Natural) ++ procedure Set_Timeout_Mode (Win : in Window := Standard_Window; ++ Mode : in Timeout_Mode; ++ Amount : in Natural) + is +- function Wtimeout (Win : Window; Amount : C_Int) return C_Int; ++ procedure Wtimeout (Win : Window; Amount : C_Int); + pragma Import (C, Wtimeout, "wtimeout"); + +- Time : C_Int; ++ Time : C_Int; + begin +- case Mode is +- when Blocking => Time := -1; +- when Non_Blocking => Time := 0; +- when Delayed => +- if Amount = 0 then ++ case Mode is ++ when Blocking => Time := -1; ++ when Non_Blocking => Time := 0; ++ when Delayed => ++ if Amount = 0 then + raise Constraint_Error; + end if; +- Time := C_Int (Amount); ++ Time := C_Int (Amount); + end case; +- if Wtimeout (Win, Time) = Curses_Err then +- raise Curses_Exception; +- end if; +- end Set_Timeout_Mode; ++ Wtimeout (Win, Time); ++ end Set_Timeout_Mode; + +- procedure Set_Escape_Timer_Mode +- (Win : in Window := Standard_Window; +- Timer_Off : in Boolean := False) ++ procedure Set_Escape_Timer_Mode ++ (Win : in Window := Standard_Window; ++ Timer_Off : in Boolean := False) + is +- function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; ++ function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Notimeout, "notimeout"); + begin +- if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) ++ if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) + = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Escape_Timer_Mode; ++ end Set_Escape_Timer_Mode; + + ------------------------------------------------------------------------------ +- procedure Set_NL_Mode (SwitchOn : in Boolean := True) ++ procedure Set_NL_Mode (SwitchOn : in Boolean := True) + is +- function NL return C_Int; ++ function NL return C_Int; + pragma Import (C, NL, "nl"); +- function NoNL return C_Int; ++ function NoNL return C_Int; + pragma Import (C, NoNL, "nonl"); + +- Err : C_Int; ++ Err : C_Int; + begin +- if SwitchOn then +- Err := NL; ++ if SwitchOn then ++ Err := NL; + else +- Err := NoNL; ++ Err := NoNL; + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Set_NL_Mode; ++ end Set_NL_Mode; + +- procedure Clear_On_Next_Update +- (Win : in Window := Standard_Window; +- Do_Clear : in Boolean := True) ++ procedure Clear_On_Next_Update ++ (Win : in Window := Standard_Window; ++ Do_Clear : in Boolean := True) + is +- function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; ++ function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, Clear_Ok, "clearok"); + begin +- if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then ++ if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then + raise Curses_Exception; + end if; +- end Clear_On_Next_Update; ++ end Clear_On_Next_Update; + +- procedure Use_Insert_Delete_Line +- (Win : in Window := Standard_Window; +- Do_Idl : in Boolean := True) ++ procedure Use_Insert_Delete_Line ++ (Win : in Window := Standard_Window; ++ Do_Idl : in Boolean := True) + is +- function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; ++ function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, IDL_Ok, "idlok"); + begin +- if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then ++ if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then + raise Curses_Exception; + end if; +- end Use_Insert_Delete_Line; ++ end Use_Insert_Delete_Line; + +- procedure Use_Insert_Delete_Character +- (Win : in Window := Standard_Window; +- Do_Idc : in Boolean := True) ++ procedure Use_Insert_Delete_Character ++ (Win : in Window := Standard_Window; ++ Do_Idc : in Boolean := True) + is +- function IDC_Ok (W : Window; Flag : Curses_Bool) return C_Int; ++ procedure IDC_Ok (W : Window; Flag : Curses_Bool); + pragma Import (C, IDC_Ok, "idcok"); + begin +- if IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))) = Curses_Err then +- raise Curses_Exception; +- end if; +- end Use_Insert_Delete_Character; ++ IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))); ++ end Use_Insert_Delete_Character; + +- procedure Leave_Cursor_After_Update +- (Win : in Window := Standard_Window; +- Do_Leave : in Boolean := True) ++ procedure Leave_Cursor_After_Update ++ (Win : in Window := Standard_Window; ++ Do_Leave : in Boolean := True) + is +- function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; ++ function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, Leave_Ok, "leaveok"); + begin +- if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then ++ if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then + raise Curses_Exception; + end if; +- end Leave_Cursor_After_Update; ++ end Leave_Cursor_After_Update; + +- procedure Immediate_Update_Mode +- (Win : in Window := Standard_Window; +- Mode : in Boolean := False) ++ procedure Immediate_Update_Mode ++ (Win : in Window := Standard_Window; ++ Mode : in Boolean := False) + is +- function Immedok (Win : Window; Mode : Curses_Bool) return C_Int; ++ procedure Immedok (Win : Window; Mode : Curses_Bool); + pragma Import (C, Immedok, "immedok"); + begin +- if Immedok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then +- raise Curses_Exception; +- end if; +- end Immediate_Update_Mode; ++ Immedok (Win, Curses_Bool (Boolean'Pos (Mode))); ++ end Immediate_Update_Mode; + +- procedure Allow_Scrolling +- (Win : in Window := Standard_Window; +- Mode : in Boolean := False) ++ procedure Allow_Scrolling ++ (Win : in Window := Standard_Window; ++ Mode : in Boolean := False) + is +- function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; ++ function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Scrollok, "scrollok"); + begin +- if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then ++ if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; + end if; +- end Allow_Scrolling; ++ end Allow_Scrolling; + +- function Scrolling_Allowed (Win : Window := Standard_Window) ++ function Scrolling_Allowed (Win : Window := Standard_Window) + return Boolean + is ++ function Is_Scroll_Ok (W : Window) return Curses_Bool; ++ pragma Import (C, Is_Scroll_Ok, "is_scrollok"); + begin +- return Get_Flag (Win, Offset_scroll); +- end Scrolling_Allowed; ++ return (Is_Scroll_Ok (Win) /= Curses_Bool_False); ++ end Scrolling_Allowed; + +- procedure Set_Scroll_Region +- (Win : in Window := Standard_Window; +- Top_Line : in Line_Position; +- Bottom_Line : in Line_Position) +- is +- function Wsetscrreg (Win : Window; +- Lin : C_Int; +- Col : C_Int) return C_Int; ++ procedure Set_Scroll_Region ++ (Win : in Window := Standard_Window; ++ Top_Line : in Line_Position; ++ Bottom_Line : in Line_Position) ++ is ++ function Wsetscrreg (Win : Window; ++ Lin : C_Int; ++ Col : C_Int) return C_Int; + pragma Import (C, Wsetscrreg, "wsetscrreg"); + begin +- if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) ++ if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) + = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Scroll_Region; ++ end Set_Scroll_Region; + ------------------------------------------------------------------------------ +- procedure Update_Screen ++ procedure Update_Screen + is +- function Do_Update return C_Int; ++ function Do_Update return C_Int; + pragma Import (C, Do_Update, "doupdate"); + begin +- if Do_Update = Curses_Err then ++ if Do_Update = Curses_Err then + raise Curses_Exception; + end if; +- end Update_Screen; ++ end Update_Screen; + +- procedure Refresh (Win : in Window := Standard_Window) ++ procedure Refresh (Win : in Window := Standard_Window) + is +- function Wrefresh (W : Window) return C_Int; ++ function Wrefresh (W : Window) return C_Int; + pragma Import (C, Wrefresh, "wrefresh"); + begin +- if Wrefresh (Win) = Curses_Err then ++ if Wrefresh (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Refresh; ++ end Refresh; + +- procedure Refresh_Without_Update +- (Win : in Window := Standard_Window) ++ procedure Refresh_Without_Update ++ (Win : in Window := Standard_Window) + is +- function Wnoutrefresh (W : Window) return C_Int; ++ function Wnoutrefresh (W : Window) return C_Int; + pragma Import (C, Wnoutrefresh, "wnoutrefresh"); + begin +- if Wnoutrefresh (Win) = Curses_Err then ++ if Wnoutrefresh (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Refresh_Without_Update; ++ end Refresh_Without_Update; + +- procedure Redraw (Win : in Window := Standard_Window) ++ procedure Redraw (Win : in Window := Standard_Window) + is +- function Redrawwin (Win : Window) return C_Int; ++ function Redrawwin (Win : Window) return C_Int; + pragma Import (C, Redrawwin, "redrawwin"); + begin +- if Redrawwin (Win) = Curses_Err then ++ if Redrawwin (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Redraw; ++ end Redraw; + +- procedure Redraw +- (Win : in Window := Standard_Window; +- Begin_Line : in Line_Position; +- Line_Count : in Positive) ++ procedure Redraw ++ (Win : in Window := Standard_Window; ++ Begin_Line : in Line_Position; ++ Line_Count : in Positive) + is +- function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) ++ function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) + return C_Int; + pragma Import (C, Wredrawln, "wredrawln"); + begin +- if Wredrawln (Win, +- C_Int (Begin_Line), +- C_Int (Line_Count)) = Curses_Err then ++ if Wredrawln (Win, ++ C_Int (Begin_Line), ++ C_Int (Line_Count)) = Curses_Err then + raise Curses_Exception; + end if; +- end Redraw; ++ end Redraw; + + ------------------------------------------------------------------------------ +- procedure Erase (Win : in Window := Standard_Window) ++ procedure Erase (Win : in Window := Standard_Window) + is +- function Werase (W : Window) return C_Int; ++ function Werase (W : Window) return C_Int; + pragma Import (C, Werase, "werase"); + begin +- if Werase (Win) = Curses_Err then ++ if Werase (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Erase; ++ end Erase; + +- procedure Clear (Win : in Window := Standard_Window) ++ procedure Clear (Win : in Window := Standard_Window) + is +- function Wclear (W : Window) return C_Int; ++ function Wclear (W : Window) return C_Int; + pragma Import (C, Wclear, "wclear"); + begin +- if Wclear (Win) = Curses_Err then ++ if Wclear (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Clear; ++ end Clear; + +- procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) ++ procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) + is +- function Wclearbot (W : Window) return C_Int; ++ function Wclearbot (W : Window) return C_Int; + pragma Import (C, Wclearbot, "wclrtobot"); + begin +- if Wclearbot (Win) = Curses_Err then ++ if Wclearbot (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Clear_To_End_Of_Screen; ++ end Clear_To_End_Of_Screen; + +- procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) ++ procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) + is +- function Wcleareol (W : Window) return C_Int; ++ function Wcleareol (W : Window) return C_Int; + pragma Import (C, Wcleareol, "wclrtoeol"); + begin +- if Wcleareol (Win) = Curses_Err then ++ if Wcleareol (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Clear_To_End_Of_Line; ++ end Clear_To_End_Of_Line; + ------------------------------------------------------------------------------ +- procedure Set_Background +- (Win : in Window := Standard_Window; +- Ch : in Attributed_Character) ++ procedure Set_Background ++ (Win : in Window := Standard_Window; ++ Ch : in Attributed_Character) + is +- procedure WBackground (W : in Window; Ch : in C_Chtype); ++ procedure WBackground (W : in Window; Ch : in C_Chtype); + pragma Import (C, WBackground, "wbkgdset"); + begin +- WBackground (Win, AttrChar_To_Chtype (Ch)); +- end Set_Background; ++ WBackground (Win, AttrChar_To_Chtype (Ch)); ++ end Set_Background; + +- procedure Change_Background +- (Win : in Window := Standard_Window; +- Ch : in Attributed_Character) ++ procedure Change_Background ++ (Win : in Window := Standard_Window; ++ Ch : in Attributed_Character) + is +- function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; ++ function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; + pragma Import (C, WChangeBkgd, "wbkgd"); + begin +- if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Change_Background; ++ end Change_Background; + +- function Get_Background (Win : Window := Standard_Window) ++ function Get_Background (Win : Window := Standard_Window) + return Attributed_Character + is +- function Wgetbkgd (Win : Window) return C_Chtype; ++ function Wgetbkgd (Win : Window) return C_Chtype; + pragma Import (C, Wgetbkgd, "getbkgd"); + begin +- return Chtype_To_AttrChar (Wgetbkgd (Win)); +- end Get_Background; ++ return Chtype_To_AttrChar (Wgetbkgd (Win)); ++ end Get_Background; + ------------------------------------------------------------------------------ +- procedure Change_Lines_Status (Win : in Window := Standard_Window; +- Start : in Line_Position; +- Count : in Positive; +- State : in Boolean) +- is +- function Wtouchln (Win : Window; +- Sta : C_Int; +- Cnt : C_Int; +- Chg : C_Int) return C_Int; ++ procedure Change_Lines_Status (Win : in Window := Standard_Window; ++ Start : in Line_Position; ++ Count : in Positive; ++ State : in Boolean) ++ is ++ function Wtouchln (Win : Window; ++ Sta : C_Int; ++ Cnt : C_Int; ++ Chg : C_Int) return C_Int; + pragma Import (C, Wtouchln, "wtouchln"); + begin +- if Wtouchln (Win, C_Int (Start), C_Int (Count), +- C_Int (Boolean'Pos (State))) = Curses_Err then ++ if Wtouchln (Win, C_Int (Start), C_Int (Count), ++ C_Int (Boolean'Pos (State))) = Curses_Err then + raise Curses_Exception; + end if; +- end Change_Lines_Status; ++ end Change_Lines_Status; + +- procedure Touch (Win : in Window := Standard_Window) ++ procedure Touch (Win : in Window := Standard_Window) + is +- Y : Line_Position; +- X : Column_Position; ++ Y : Line_Position; ++ X : Column_Position; + begin +- Get_Size (Win, Y, X); +- Change_Lines_Status (Win, 0, Positive (Y), True); +- end Touch; ++ Get_Size (Win, Y, X); ++ Change_Lines_Status (Win, 0, Positive (Y), True); ++ end Touch; + +- procedure Untouch (Win : in Window := Standard_Window) ++ procedure Untouch (Win : in Window := Standard_Window) + is +- Y : Line_Position; +- X : Column_Position; ++ Y : Line_Position; ++ X : Column_Position; + begin +- Get_Size (Win, Y, X); +- Change_Lines_Status (Win, 0, Positive (Y), False); +- end Untouch; ++ Get_Size (Win, Y, X); ++ Change_Lines_Status (Win, 0, Positive (Y), False); ++ end Untouch; + +- procedure Touch (Win : in Window := Standard_Window; +- Start : in Line_Position; +- Count : in Positive) ++ procedure Touch (Win : in Window := Standard_Window; ++ Start : in Line_Position; ++ Count : in Positive) + is + begin +- Change_Lines_Status (Win, Start, Count, True); +- end Touch; ++ Change_Lines_Status (Win, Start, Count, True); ++ end Touch; + +- function Is_Touched +- (Win : Window := Standard_Window; +- Line : Line_Position) return Boolean ++ function Is_Touched ++ (Win : Window := Standard_Window; ++ Line : Line_Position) return Boolean + is +- function WLineTouched (W : Window; L : C_Int) return Curses_Bool; ++ function WLineTouched (W : Window; L : C_Int) return Curses_Bool; + pragma Import (C, WLineTouched, "is_linetouched"); + begin +- if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then ++ if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then + return False; + else + return True; + end if; +- end Is_Touched; ++ end Is_Touched; + +- function Is_Touched +- (Win : Window := Standard_Window) return Boolean ++ function Is_Touched ++ (Win : Window := Standard_Window) return Boolean + is +- function WWinTouched (W : Window) return Curses_Bool; ++ function WWinTouched (W : Window) return Curses_Bool; + pragma Import (C, WWinTouched, "is_wintouched"); + begin +- if WWinTouched (Win) = Curses_Bool_False then ++ if WWinTouched (Win) = Curses_Bool_False then + return False; + else + return True; + end if; +- end Is_Touched; ++ end Is_Touched; + ------------------------------------------------------------------------------ +- procedure Copy +- (Source_Window : in Window; +- Destination_Window : in Window; +- Source_Top_Row : in Line_Position; +- Source_Left_Column : in Column_Position; +- Destination_Top_Row : in Line_Position; +- Destination_Left_Column : in Column_Position; +- Destination_Bottom_Row : in Line_Position; +- Destination_Right_Column : in Column_Position; +- Non_Destructive_Mode : in Boolean := True) +- is +- function Copywin (Src : Window; +- Dst : Window; +- Str : C_Int; +- Slc : C_Int; +- Dtr : C_Int; +- Dlc : C_Int; +- Dbr : C_Int; +- Drc : C_Int; +- Ndm : C_Int) return C_Int; ++ procedure Copy ++ (Source_Window : in Window; ++ Destination_Window : in Window; ++ Source_Top_Row : in Line_Position; ++ Source_Left_Column : in Column_Position; ++ Destination_Top_Row : in Line_Position; ++ Destination_Left_Column : in Column_Position; ++ Destination_Bottom_Row : in Line_Position; ++ Destination_Right_Column : in Column_Position; ++ Non_Destructive_Mode : in Boolean := True) ++ is ++ function Copywin (Src : Window; ++ Dst : Window; ++ Str : C_Int; ++ Slc : C_Int; ++ Dtr : C_Int; ++ Dlc : C_Int; ++ Dbr : C_Int; ++ Drc : C_Int; ++ Ndm : C_Int) return C_Int; + pragma Import (C, Copywin, "copywin"); + begin +- if Copywin (Source_Window, +- Destination_Window, +- C_Int (Source_Top_Row), +- C_Int (Source_Left_Column), +- C_Int (Destination_Top_Row), +- C_Int (Destination_Left_Column), +- C_Int (Destination_Bottom_Row), +- C_Int (Destination_Right_Column), +- Boolean'Pos (Non_Destructive_Mode) ++ if Copywin (Source_Window, ++ Destination_Window, ++ C_Int (Source_Top_Row), ++ C_Int (Source_Left_Column), ++ C_Int (Destination_Top_Row), ++ C_Int (Destination_Left_Column), ++ C_Int (Destination_Bottom_Row), ++ C_Int (Destination_Right_Column), ++ Boolean'Pos (Non_Destructive_Mode) + ) = Curses_Err then + raise Curses_Exception; + end if; +- end Copy; ++ end Copy; + +- procedure Overwrite +- (Source_Window : in Window; +- Destination_Window : in Window) ++ procedure Overwrite ++ (Source_Window : in Window; ++ Destination_Window : in Window) + is +- function Overwrite (Src : Window; Dst : Window) return C_Int; ++ function Overwrite (Src : Window; Dst : Window) return C_Int; + pragma Import (C, Overwrite, "overwrite"); + begin +- if Overwrite (Source_Window, Destination_Window) = Curses_Err then ++ if Overwrite (Source_Window, Destination_Window) = Curses_Err then + raise Curses_Exception; + end if; +- end Overwrite; ++ end Overwrite; + +- procedure Overlay +- (Source_Window : in Window; +- Destination_Window : in Window) ++ procedure Overlay ++ (Source_Window : in Window; ++ Destination_Window : in Window) + is +- function Overlay (Src : Window; Dst : Window) return C_Int; ++ function Overlay (Src : Window; Dst : Window) return C_Int; + pragma Import (C, Overlay, "overlay"); + begin +- if Overlay (Source_Window, Destination_Window) = Curses_Err then ++ if Overlay (Source_Window, Destination_Window) = Curses_Err then + raise Curses_Exception; + end if; +- end Overlay; ++ end Overlay; + + ------------------------------------------------------------------------------ +- procedure Insert_Delete_Lines +- (Win : in Window := Standard_Window; +- Lines : in Integer := 1) -- default is to insert one line above ++ procedure Insert_Delete_Lines ++ (Win : in Window := Standard_Window; ++ Lines : in Integer := 1) -- default is to insert one line above + is +- function Winsdelln (W : Window; N : C_Int) return C_Int; ++ function Winsdelln (W : Window; N : C_Int) return C_Int; + pragma Import (C, Winsdelln, "winsdelln"); + begin +- if Winsdelln (Win, C_Int (Lines)) = Curses_Err then ++ if Winsdelln (Win, C_Int (Lines)) = Curses_Err then + raise Curses_Exception; + end if; +- end Insert_Delete_Lines; ++ end Insert_Delete_Lines; + +- procedure Delete_Line (Win : in Window := Standard_Window) ++ procedure Delete_Line (Win : in Window := Standard_Window) + is + begin +- Insert_Delete_Lines (Win, -1); +- end Delete_Line; ++ Insert_Delete_Lines (Win, -1); ++ end Delete_Line; + +- procedure Insert_Line (Win : in Window := Standard_Window) ++ procedure Insert_Line (Win : in Window := Standard_Window) + is + begin +- Insert_Delete_Lines (Win, 1); +- end Insert_Line; ++ Insert_Delete_Lines (Win, 1); ++ end Insert_Line; + ------------------------------------------------------------------------------ + +- procedure Get_Size +- (Win : in Window := Standard_Window; +- Number_Of_Lines : out Line_Count; +- Number_Of_Columns : out Column_Count) ++ procedure Get_Size ++ (Win : in Window := Standard_Window; ++ Number_Of_Lines : out Line_Count; ++ Number_Of_Columns : out Column_Count) + is +- -- Please note: in ncurses they are one off. +- -- This might be different in other implementations of curses +- 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); ++ function GetMaxY (W : Window) return C_Int; ++ pragma Import (C, GetMaxY, "getmaxy"); ++ ++ function GetMaxX (W : Window) return C_Int; ++ pragma Import (C, GetMaxX, "getmaxx"); ++ ++ Y : constant C_Int := GetMaxY (Win) ++ + C_Int (Offset_XY); ++ X : constant C_Int := GetMaxX (Win) ++ + C_Int (Offset_XY); + begin +- Number_Of_Lines := Line_Count (Y); +- Number_Of_Columns := Column_Count (X); +- end Get_Size; ++ Number_Of_Lines := Line_Count (Y); ++ Number_Of_Columns := Column_Count (X); ++ end Get_Size; + +- procedure Get_Window_Position +- (Win : in Window := Standard_Window; +- Top_Left_Line : out Line_Position; +- Top_Left_Column : out Column_Position) ++ procedure Get_Window_Position ++ (Win : in Window := Standard_Window; ++ Top_Left_Line : out Line_Position; ++ Top_Left_Column : out Column_Position) + is +- Y : constant C_Short := W_Get_Short (Win, Offset_begy); +- X : constant C_Short := W_Get_Short (Win, Offset_begx); ++ function GetBegY (W : Window) return C_Int; ++ pragma Import (C, GetBegY, "getbegy"); ++ ++ function GetBegX (W : Window) return C_Int; ++ pragma Import (C, GetBegX, "getbegx"); ++ ++ Y : constant C_Short := C_Short (GetBegY (Win)); ++ X : constant C_Short := C_Short (GetBegX (Win)); + begin +- Top_Left_Line := Line_Position (Y); +- Top_Left_Column := Column_Position (X); +- end Get_Window_Position; ++ Top_Left_Line := Line_Position (Y); ++ Top_Left_Column := Column_Position (X); ++ end Get_Window_Position; + +- procedure Get_Cursor_Position +- (Win : in Window := Standard_Window; +- Line : out Line_Position; +- Column : out Column_Position) ++ procedure Get_Cursor_Position ++ (Win : in Window := Standard_Window; ++ Line : out Line_Position; ++ Column : out Column_Position) + is +- Y : constant C_Short := W_Get_Short (Win, Offset_cury); +- X : constant C_Short := W_Get_Short (Win, Offset_curx); ++ function GetCurY (W : Window) return C_Int; ++ pragma Import (C, GetCurY, "getcury"); ++ ++ function GetCurX (W : Window) return C_Int; ++ pragma Import (C, GetCurX, "getcurx"); ++ ++ Y : constant C_Short := C_Short (GetCurY (Win)); ++ X : constant C_Short := C_Short (GetCurX (Win)); + begin +- Line := Line_Position (Y); +- Column := Column_Position (X); +- end Get_Cursor_Position; ++ Line := Line_Position (Y); ++ Column := Column_Position (X); ++ end Get_Cursor_Position; + +- procedure Get_Origin_Relative_To_Parent +- (Win : in Window; +- Top_Left_Line : out Line_Position; +- Top_Left_Column : out Column_Position; +- Is_Not_A_Subwindow : out Boolean) ++ procedure Get_Origin_Relative_To_Parent ++ (Win : in Window; ++ Top_Left_Line : out Line_Position; ++ Top_Left_Column : out Column_Position; ++ Is_Not_A_Subwindow : out Boolean) + is +- Y : constant C_Int := W_Get_Int (Win, Offset_pary); +- X : constant C_Int := W_Get_Int (Win, Offset_parx); ++ function GetParY (W : Window) return C_Int; ++ pragma Import (C, GetParY, "getpary"); ++ ++ function GetParX (W : Window) return C_Int; ++ pragma Import (C, GetParX, "getparx"); ++ ++ Y : constant C_Int := GetParY (Win); ++ X : constant C_Int := GetParX (Win); + begin +- if Y = -1 then +- Top_Left_Line := Line_Position'Last; +- Top_Left_Column := Column_Position'Last; +- Is_Not_A_Subwindow := True; ++ if Y = -1 then ++ Top_Left_Line := Line_Position'Last; ++ Top_Left_Column := Column_Position'Last; ++ Is_Not_A_Subwindow := True; + else +- Top_Left_Line := Line_Position (Y); +- Top_Left_Column := Column_Position (X); +- Is_Not_A_Subwindow := False; ++ Top_Left_Line := Line_Position (Y); ++ Top_Left_Column := Column_Position (X); ++ Is_Not_A_Subwindow := False; + end if; +- end Get_Origin_Relative_To_Parent; ++ end Get_Origin_Relative_To_Parent; + ------------------------------------------------------------------------------ +- function New_Pad (Lines : Line_Count; +- Columns : Column_Count) return Window ++ function New_Pad (Lines : Line_Count; ++ Columns : Column_Count) return Window + is +- function Newpad (Lines : C_Int; Columns : C_Int) return Window; ++ function Newpad (Lines : C_Int; Columns : C_Int) return Window; + pragma Import (C, Newpad, "newpad"); + +- W : Window; ++ W : Window; + begin +- W := Newpad (C_Int (Lines), C_Int (Columns)); +- if W = Null_Window then ++ W := Newpad (C_Int (Lines), C_Int (Columns)); ++ if W = Null_Window then + raise Curses_Exception; + end if; +- return W; +- end New_Pad; ++ return W; ++ end New_Pad; + +- function Sub_Pad +- (Pad : Window; +- Number_Of_Lines : Line_Count; +- Number_Of_Columns : Column_Count; +- First_Line_Position : Line_Position; +- First_Column_Position : Column_Position) return Window +- is +- function Subpad +- (Pad : Window; +- Number_Of_Lines : C_Int; +- Number_Of_Columns : C_Int; +- First_Line_Position : C_Int; +- First_Column_Position : C_Int) return Window; ++ function Sub_Pad ++ (Pad : Window; ++ Number_Of_Lines : Line_Count; ++ Number_Of_Columns : Column_Count; ++ First_Line_Position : Line_Position; ++ First_Column_Position : Column_Position) return Window ++ is ++ function Subpad ++ (Pad : Window; ++ Number_Of_Lines : C_Int; ++ Number_Of_Columns : C_Int; ++ First_Line_Position : C_Int; ++ First_Column_Position : C_Int) return Window; + pragma Import (C, Subpad, "subpad"); + +- W : Window; ++ W : Window; + begin +- W := Subpad (Pad, +- C_Int (Number_Of_Lines), +- C_Int (Number_Of_Columns), +- C_Int (First_Line_Position), +- C_Int (First_Column_Position)); +- if W = Null_Window then +- raise Curses_Exception; +- end if; +- return W; +- end Sub_Pad; +- +- procedure Refresh +- (Pad : in Window; +- Source_Top_Row : in Line_Position; +- Source_Left_Column : in Column_Position; +- Destination_Top_Row : in Line_Position; +- Destination_Left_Column : in Column_Position; +- Destination_Bottom_Row : in Line_Position; +- Destination_Right_Column : in Column_Position) +- is +- function Prefresh +- (Pad : Window; +- Source_Top_Row : C_Int; +- Source_Left_Column : C_Int; +- Destination_Top_Row : C_Int; +- Destination_Left_Column : C_Int; +- Destination_Bottom_Row : C_Int; +- Destination_Right_Column : C_Int) return C_Int; ++ W := Subpad (Pad, ++ C_Int (Number_Of_Lines), ++ C_Int (Number_Of_Columns), ++ C_Int (First_Line_Position), ++ C_Int (First_Column_Position)); ++ if W = Null_Window then ++ raise Curses_Exception; ++ end if; ++ return W; ++ end Sub_Pad; ++ ++ procedure Refresh ++ (Pad : in Window; ++ Source_Top_Row : in Line_Position; ++ Source_Left_Column : in Column_Position; ++ Destination_Top_Row : in Line_Position; ++ Destination_Left_Column : in Column_Position; ++ Destination_Bottom_Row : in Line_Position; ++ Destination_Right_Column : in Column_Position) ++ is ++ function Prefresh ++ (Pad : Window; ++ Source_Top_Row : C_Int; ++ Source_Left_Column : C_Int; ++ Destination_Top_Row : C_Int; ++ Destination_Left_Column : C_Int; ++ Destination_Bottom_Row : C_Int; ++ Destination_Right_Column : C_Int) return C_Int; + pragma Import (C, Prefresh, "prefresh"); + begin +- if Prefresh (Pad, +- C_Int (Source_Top_Row), +- C_Int (Source_Left_Column), +- C_Int (Destination_Top_Row), +- C_Int (Destination_Left_Column), +- C_Int (Destination_Bottom_Row), +- C_Int (Destination_Right_Column)) = Curses_Err then +- raise Curses_Exception; +- end if; +- end Refresh; +- +- procedure Refresh_Without_Update +- (Pad : in Window; +- Source_Top_Row : in Line_Position; +- Source_Left_Column : in Column_Position; +- Destination_Top_Row : in Line_Position; +- Destination_Left_Column : in Column_Position; +- Destination_Bottom_Row : in Line_Position; +- Destination_Right_Column : in Column_Position) +- is +- function Pnoutrefresh +- (Pad : Window; +- Source_Top_Row : C_Int; +- Source_Left_Column : C_Int; +- Destination_Top_Row : C_Int; +- Destination_Left_Column : C_Int; +- Destination_Bottom_Row : C_Int; +- Destination_Right_Column : C_Int) return C_Int; ++ if Prefresh (Pad, ++ C_Int (Source_Top_Row), ++ C_Int (Source_Left_Column), ++ C_Int (Destination_Top_Row), ++ C_Int (Destination_Left_Column), ++ C_Int (Destination_Bottom_Row), ++ C_Int (Destination_Right_Column)) = Curses_Err then ++ raise Curses_Exception; ++ end if; ++ end Refresh; ++ ++ procedure Refresh_Without_Update ++ (Pad : in Window; ++ Source_Top_Row : in Line_Position; ++ Source_Left_Column : in Column_Position; ++ Destination_Top_Row : in Line_Position; ++ Destination_Left_Column : in Column_Position; ++ Destination_Bottom_Row : in Line_Position; ++ Destination_Right_Column : in Column_Position) ++ is ++ function Pnoutrefresh ++ (Pad : Window; ++ Source_Top_Row : C_Int; ++ Source_Left_Column : C_Int; ++ Destination_Top_Row : C_Int; ++ Destination_Left_Column : C_Int; ++ Destination_Bottom_Row : C_Int; ++ Destination_Right_Column : C_Int) return C_Int; + pragma Import (C, Pnoutrefresh, "pnoutrefresh"); + begin +- if Pnoutrefresh (Pad, +- C_Int (Source_Top_Row), +- C_Int (Source_Left_Column), +- C_Int (Destination_Top_Row), +- C_Int (Destination_Left_Column), +- C_Int (Destination_Bottom_Row), +- C_Int (Destination_Right_Column)) = Curses_Err then +- raise Curses_Exception; +- end if; +- end Refresh_Without_Update; +- +- procedure Add_Character_To_Pad_And_Echo_It +- (Pad : in Window; +- Ch : in Attributed_Character) ++ if Pnoutrefresh (Pad, ++ C_Int (Source_Top_Row), ++ C_Int (Source_Left_Column), ++ C_Int (Destination_Top_Row), ++ C_Int (Destination_Left_Column), ++ C_Int (Destination_Bottom_Row), ++ C_Int (Destination_Right_Column)) = Curses_Err then ++ raise Curses_Exception; ++ end if; ++ end Refresh_Without_Update; ++ ++ procedure Add_Character_To_Pad_And_Echo_It ++ (Pad : in Window; ++ Ch : in Attributed_Character) + is +- function Pechochar (Pad : Window; Ch : C_Chtype) ++ function Pechochar (Pad : Window; Ch : C_Chtype) + return C_Int; + pragma Import (C, Pechochar, "pechochar"); + begin +- if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Add_Character_To_Pad_And_Echo_It; ++ end Add_Character_To_Pad_And_Echo_It; + +- procedure Add_Character_To_Pad_And_Echo_It +- (Pad : in Window; +- Ch : in Character) ++ procedure Add_Character_To_Pad_And_Echo_It ++ (Pad : in Window; ++ Ch : in Character) + is + begin +- Add_Character_To_Pad_And_Echo_It +- (Pad, +- Attributed_Character'(Ch => Ch, ++ Add_Character_To_Pad_And_Echo_It ++ (Pad, ++ Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); +- end Add_Character_To_Pad_And_Echo_It; ++ end Add_Character_To_Pad_And_Echo_It; + ------------------------------------------------------------------------------ +- procedure Scroll (Win : in Window := Standard_Window; +- Amount : in Integer := 1) ++ procedure Scroll (Win : in Window := Standard_Window; ++ Amount : in Integer := 1) + is +- function Wscrl (Win : Window; N : C_Int) return C_Int; ++ function Wscrl (Win : Window; N : C_Int) return C_Int; + pragma Import (C, Wscrl, "wscrl"); + + begin +- if Wscrl (Win, C_Int (Amount)) = Curses_Err then ++ if Wscrl (Win, C_Int (Amount)) = Curses_Err then + raise Curses_Exception; + end if; +- end Scroll; ++ end Scroll; + + ------------------------------------------------------------------------------ +- procedure Delete_Character (Win : in Window := Standard_Window) ++ procedure Delete_Character (Win : in Window := Standard_Window) + is +- function Wdelch (Win : Window) return C_Int; ++ function Wdelch (Win : Window) return C_Int; + pragma Import (C, Wdelch, "wdelch"); + begin +- if Wdelch (Win) = Curses_Err then ++ if Wdelch (Win) = Curses_Err then + raise Curses_Exception; + end if; +- end Delete_Character; ++ end Delete_Character; + +- procedure Delete_Character +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position) ++ procedure Delete_Character ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position) + is +- function Mvwdelch (Win : Window; +- Lin : C_Int; +- Col : C_Int) return C_Int; ++ function Mvwdelch (Win : Window; ++ Lin : C_Int; ++ Col : C_Int) return C_Int; + pragma Import (C, Mvwdelch, "mvwdelch"); + begin +- if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then ++ if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; + end if; +- end Delete_Character; ++ end Delete_Character; + ------------------------------------------------------------------------------ +- function Peek (Win : Window := Standard_Window) ++ function Peek (Win : Window := Standard_Window) + return Attributed_Character + is +- function Winch (Win : Window) return C_Chtype; ++ function Winch (Win : Window) return C_Chtype; + pragma Import (C, Winch, "winch"); + begin +- return Chtype_To_AttrChar (Winch (Win)); +- end Peek; ++ return Chtype_To_AttrChar (Winch (Win)); ++ end Peek; + +- function Peek +- (Win : Window := Standard_Window; +- Line : Line_Position; +- Column : Column_Position) return Attributed_Character +- is +- function Mvwinch (Win : Window; +- Lin : C_Int; +- Col : C_Int) return C_Chtype; ++ function Peek ++ (Win : Window := Standard_Window; ++ Line : Line_Position; ++ Column : Column_Position) return Attributed_Character ++ is ++ function Mvwinch (Win : Window; ++ Lin : C_Int; ++ Col : C_Int) return C_Chtype; + pragma Import (C, Mvwinch, "mvwinch"); + begin +- return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); +- end Peek; ++ return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); ++ end Peek; + ------------------------------------------------------------------------------ +- procedure Insert (Win : in Window := Standard_Window; +- Ch : in Attributed_Character) ++ procedure Insert (Win : in Window := Standard_Window; ++ Ch : in Attributed_Character) + is +- function Winsch (Win : Window; Ch : C_Chtype) return C_Int; ++ function Winsch (Win : Window; Ch : C_Chtype) return C_Int; + pragma Import (C, Winsch, "winsch"); + begin +- if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Insert; ++ end Insert; + +- procedure Insert +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Ch : in Attributed_Character) +- is +- function Mvwinsch (Win : Window; +- Lin : C_Int; +- Col : C_Int; +- Ch : C_Chtype) return C_Int; ++ procedure Insert ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Ch : in Attributed_Character) ++ is ++ function Mvwinsch (Win : Window; ++ Lin : C_Int; ++ Col : C_Int; ++ Ch : C_Chtype) return C_Int; + pragma Import (C, Mvwinsch, "mvwinsch"); + begin +- if Mvwinsch (Win, +- C_Int (Line), +- C_Int (Column), +- AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if Mvwinsch (Win, ++ C_Int (Line), ++ C_Int (Column), ++ AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Insert; ++ end Insert; + ------------------------------------------------------------------------------ +- procedure Insert (Win : in Window := Standard_Window; +- Str : in String; +- Len : in Integer := -1) +- is +- function Winsnstr (Win : Window; +- Str : char_array; +- Len : Integer := -1) return C_Int; ++ procedure Insert (Win : in Window := Standard_Window; ++ Str : in String; ++ Len : in Integer := -1) ++ is ++ function Winsnstr (Win : Window; ++ Str : char_array; ++ Len : Integer := -1) return C_Int; + pragma Import (C, Winsnstr, "winsnstr"); + +- Txt : char_array (0 .. Str'Length); +- Length : size_t; ++ Txt : char_array (0 .. Str'Length); ++ Length : size_t; + begin +- To_C (Str, Txt, Length); +- if Winsnstr (Win, Txt, Len) = Curses_Err then ++ To_C (Str, Txt, Length); ++ if Winsnstr (Win, Txt, Len) = Curses_Err then + raise Curses_Exception; + end if; +- end Insert; ++ end Insert; + +- procedure Insert +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Str : in String; +- Len : in Integer := -1) +- is +- function Mvwinsnstr (Win : Window; +- Line : C_Int; +- Column : C_Int; +- Str : char_array; +- Len : C_Int) return C_Int; ++ procedure Insert ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Str : in String; ++ Len : in Integer := -1) ++ is ++ function Mvwinsnstr (Win : Window; ++ Line : C_Int; ++ Column : C_Int; ++ Str : char_array; ++ Len : C_Int) return C_Int; + pragma Import (C, Mvwinsnstr, "mvwinsnstr"); + +- Txt : char_array (0 .. Str'Length); +- Length : size_t; ++ Txt : char_array (0 .. Str'Length); ++ Length : size_t; + begin +- To_C (Str, Txt, Length); +- if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) ++ To_C (Str, Txt, Length); ++ if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) + = Curses_Err then + raise Curses_Exception; + end if; +- end Insert; ++ end Insert; + ------------------------------------------------------------------------------ +- procedure Peek (Win : in Window := Standard_Window; +- Str : out String; +- Len : in Integer := -1) +- is +- function Winnstr (Win : Window; +- Str : char_array; +- Len : C_Int) return C_Int; ++ procedure Peek (Win : in Window := Standard_Window; ++ Str : out String; ++ Len : in Integer := -1) ++ is ++ function Winnstr (Win : Window; ++ Str : char_array; ++ Len : C_Int) return C_Int; + pragma Import (C, Winnstr, "winnstr"); + +- N : Integer := Len; +- Txt : char_array (0 .. Str'Length); +- Cnt : Natural; ++ N : Integer := Len; ++ Txt : char_array (0 .. Str'Length); ++ Cnt : Natural; + begin +- if N < 0 then +- N := Str'Length; ++ if N < 0 then ++ N := Str'Length; + end if; +- if N > Str'Length then ++ if N > Str'Length then + raise Constraint_Error; + end if; +- Txt (0) := Interfaces.C.char'First; +- if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then ++ Txt (0) := Interfaces.C.char'First; ++ if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; + end if; +- To_Ada (Txt, Str, Cnt, True); +- if Cnt < Str'Length then +- Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); ++ To_Ada (Txt, Str, Cnt, True); ++ if Cnt < Str'Length then ++ Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + end if; +- end Peek; ++ end Peek; + +- procedure Peek +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Str : out String; +- Len : in Integer := -1) ++ procedure Peek ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Str : out String; ++ Len : in Integer := -1) + is + begin +- Move_Cursor (Win, Line, Column); +- Peek (Win, Str, Len); +- end Peek; ++ Move_Cursor (Win, Line, Column); ++ Peek (Win, Str, Len); ++ end Peek; + ------------------------------------------------------------------------------ +- procedure Peek +- (Win : in Window := Standard_Window; +- Str : out Attributed_String; +- Len : in Integer := -1) ++ procedure Peek ++ (Win : in Window := Standard_Window; ++ Str : out Attributed_String; ++ Len : in Integer := -1) + is +- function Winchnstr (Win : Window; +- Str : chtype_array; -- out +- Len : C_Int) return C_Int; ++ function Winchnstr (Win : Window; ++ Str : chtype_array; -- out ++ Len : C_Int) return C_Int; + pragma Import (C, Winchnstr, "winchnstr"); + +- N : Integer := Len; +- Txt : constant chtype_array (0 .. Str'Length) ++ N : Integer := Len; ++ Txt : constant chtype_array (0 .. Str'Length) + := (0 => Default_Character); +- Cnt : Natural := 0; ++ Cnt : Natural := 0; + begin +- if N < 0 then +- N := Str'Length; ++ if N < 0 then ++ N := Str'Length; + end if; +- if N > Str'Length then ++ if N > Str'Length then + raise Constraint_Error; + end if; +- if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then ++ if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; + end if; +- for To in Str'Range loop +- exit when Txt (size_t (Cnt)) = Default_Character; +- Str (To) := Txt (size_t (Cnt)); +- Cnt := Cnt + 1; ++ for To in Str'Range loop ++ exit when Txt (size_t (Cnt)) = Default_Character; ++ Str (To) := Txt (size_t (Cnt)); ++ Cnt := Cnt + 1; + end loop; +- if Cnt < Str'Length then +- Str ((Str'First + Cnt) .. Str'Last) := ++ if Cnt < Str'Length then ++ Str ((Str'First + Cnt) .. Str'Last) := + (others => (Ch => ' ', + Color => Color_Pair'First, + Attr => Normal_Video)); + end if; +- end Peek; ++ end Peek; + +- procedure Peek +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Str : out Attributed_String; +- Len : in Integer := -1) +- is +- begin +- Move_Cursor (Win, Line, Column); +- Peek (Win, Str, Len); +- end Peek; +------------------------------------------------------------------------------- +- procedure Get (Win : in Window := Standard_Window; +- Str : out String; +- Len : in Integer := -1) +- is +- function Wgetnstr (Win : Window; +- Str : char_array; +- Len : C_Int) return C_Int; ++ procedure Peek ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Str : out Attributed_String; ++ Len : in Integer := -1) ++ is ++ begin ++ Move_Cursor (Win, Line, Column); ++ Peek (Win, Str, Len); ++ end Peek; ++------------------------------------------------------------------------------ ++ procedure Get (Win : in Window := Standard_Window; ++ Str : out String; ++ Len : in Integer := -1) ++ is ++ function Wgetnstr (Win : Window; ++ Str : char_array; ++ Len : C_Int) return C_Int; + pragma Import (C, Wgetnstr, "wgetnstr"); + +- N : Integer := Len; +- Txt : char_array (0 .. Str'Length); +- Cnt : Natural; ++ N : Integer := Len; ++ Txt : char_array (0 .. Str'Length); ++ Cnt : Natural; + begin +- if N < 0 then +- N := Str'Length; ++ if N < 0 then ++ N := Str'Length; + end if; +- if N > Str'Length then ++ if N > Str'Length then + raise Constraint_Error; + end if; +- Txt (0) := Interfaces.C.char'First; +- if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then ++ Txt (0) := Interfaces.C.char'First; ++ if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; + end if; +- To_Ada (Txt, Str, Cnt, True); +- if Cnt < Str'Length then +- Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); ++ To_Ada (Txt, Str, Cnt, True); ++ if Cnt < Str'Length then ++ Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + end if; +- end Get; ++ end Get; + +- procedure Get +- (Win : in Window := Standard_Window; +- Line : in Line_Position; +- Column : in Column_Position; +- Str : out String; +- Len : in Integer := -1) ++ procedure Get ++ (Win : in Window := Standard_Window; ++ Line : in Line_Position; ++ Column : in Column_Position; ++ Str : out String; ++ Len : in Integer := -1) + is + begin +- Move_Cursor (Win, Line, Column); +- Get (Win, Str, Len); +- end Get; ++ Move_Cursor (Win, Line, Column); ++ Get (Win, Str, Len); ++ end Get; + ------------------------------------------------------------------------------ +- procedure Init_Soft_Label_Keys +- (Format : in Soft_Label_Key_Format := Three_Two_Three) ++ procedure Init_Soft_Label_Keys ++ (Format : in Soft_Label_Key_Format := Three_Two_Three) + is +- function Slk_Init (Fmt : C_Int) return C_Int; ++ function Slk_Init (Fmt : C_Int) return C_Int; + pragma Import (C, Slk_Init, "slk_init"); + begin +- if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then ++ if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then + raise Curses_Exception; + end if; +- end Init_Soft_Label_Keys; ++ end Init_Soft_Label_Keys; + +- procedure Set_Soft_Label_Key (Label : in Label_Number; +- Text : in String; +- Fmt : in Label_Justification := Left) ++ procedure Set_Soft_Label_Key (Label : in Label_Number; ++ Text : in String; ++ Fmt : in Label_Justification := Left) + is +- function Slk_Set (Label : C_Int; +- Txt : char_array; +- Fmt : C_Int) return C_Int; ++ function Slk_Set (Label : C_Int; ++ Txt : char_array; ++ Fmt : C_Int) return C_Int; + pragma Import (C, Slk_Set, "slk_set"); + +- Txt : char_array (0 .. Text'Length); +- Len : size_t; ++ Txt : char_array (0 .. Text'Length); ++ Len : size_t; + begin +- To_C (Text, Txt, Len); +- if Slk_Set (C_Int (Label), Txt, +- C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then ++ To_C (Text, Txt, Len); ++ if Slk_Set (C_Int (Label), Txt, ++ C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Soft_Label_Key; ++ end Set_Soft_Label_Key; + +- procedure Refresh_Soft_Label_Keys ++ procedure Refresh_Soft_Label_Keys + is +- function Slk_Refresh return C_Int; ++ function Slk_Refresh return C_Int; + pragma Import (C, Slk_Refresh, "slk_refresh"); + begin +- if Slk_Refresh = Curses_Err then ++ if Slk_Refresh = Curses_Err then + raise Curses_Exception; + end if; +- end Refresh_Soft_Label_Keys; ++ end Refresh_Soft_Label_Keys; + +- procedure Refresh_Soft_Label_Keys_Without_Update ++ procedure Refresh_Soft_Label_Keys_Without_Update + is +- function Slk_Noutrefresh return C_Int; ++ function Slk_Noutrefresh return C_Int; + pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); + begin +- if Slk_Noutrefresh = Curses_Err then ++ if Slk_Noutrefresh = Curses_Err then + raise Curses_Exception; + end if; +- end Refresh_Soft_Label_Keys_Without_Update; ++ end Refresh_Soft_Label_Keys_Without_Update; + +- procedure Get_Soft_Label_Key (Label : in Label_Number; +- Text : out String) ++ procedure Get_Soft_Label_Key (Label : in Label_Number; ++ Text : out String) + is +- function Slk_Label (Label : C_Int) return chars_ptr; ++ function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); + begin +- Fill_String (Slk_Label (C_Int (Label)), Text); +- end Get_Soft_Label_Key; ++ Fill_String (Slk_Label (C_Int (Label)), Text); ++ end Get_Soft_Label_Key; + +- function Get_Soft_Label_Key (Label : in Label_Number) return String ++ function Get_Soft_Label_Key (Label : in Label_Number) return String + is +- function Slk_Label (Label : C_Int) return chars_ptr; ++ function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); + begin +- return Fill_String (Slk_Label (C_Int (Label))); +- end Get_Soft_Label_Key; ++ return Fill_String (Slk_Label (C_Int (Label))); ++ end Get_Soft_Label_Key; + +- procedure Clear_Soft_Label_Keys ++ procedure Clear_Soft_Label_Keys + is +- function Slk_Clear return C_Int; ++ function Slk_Clear return C_Int; + pragma Import (C, Slk_Clear, "slk_clear"); + begin +- if Slk_Clear = Curses_Err then ++ if Slk_Clear = Curses_Err then + raise Curses_Exception; + end if; +- end Clear_Soft_Label_Keys; ++ end Clear_Soft_Label_Keys; + +- procedure Restore_Soft_Label_Keys ++ procedure Restore_Soft_Label_Keys + is +- function Slk_Restore return C_Int; ++ function Slk_Restore return C_Int; + pragma Import (C, Slk_Restore, "slk_restore"); + begin +- if Slk_Restore = Curses_Err then ++ if Slk_Restore = Curses_Err then + raise Curses_Exception; + end if; +- end Restore_Soft_Label_Keys; ++ end Restore_Soft_Label_Keys; + +- procedure Touch_Soft_Label_Keys ++ procedure Touch_Soft_Label_Keys + is +- function Slk_Touch return C_Int; ++ function Slk_Touch return C_Int; + pragma Import (C, Slk_Touch, "slk_touch"); + begin +- if Slk_Touch = Curses_Err then ++ if Slk_Touch = Curses_Err then + raise Curses_Exception; + end if; +- end Touch_Soft_Label_Keys; ++ end Touch_Soft_Label_Keys; + +- procedure Switch_Soft_Label_Key_Attributes +- (Attr : in Character_Attribute_Set; +- On : in Boolean := True) ++ procedure Switch_Soft_Label_Key_Attributes ++ (Attr : in Character_Attribute_Set; ++ On : in Boolean := True) + is +- function Slk_Attron (Ch : C_Chtype) return C_Int; ++ function Slk_Attron (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attron, "slk_attron"); +- function Slk_Attroff (Ch : C_Chtype) return C_Int; ++ function Slk_Attroff (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attroff, "slk_attroff"); + +- Err : C_Int; +- Ch : constant Attributed_Character := (Ch => Character'First, +- Attr => Attr, ++ Err : C_Int; ++ Ch : constant Attributed_Character := (Ch => Character'First, ++ Attr => Attr, + Color => Color_Pair'First); + begin +- if On then +- Err := Slk_Attron (AttrChar_To_Chtype (Ch)); ++ if On then ++ Err := Slk_Attron (AttrChar_To_Chtype (Ch)); + else +- Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); ++ Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); + end if; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Switch_Soft_Label_Key_Attributes; ++ end Switch_Soft_Label_Key_Attributes; + +- procedure Set_Soft_Label_Key_Attributes +- (Attr : in Character_Attribute_Set := Normal_Video; +- Color : in Color_Pair := Color_Pair'First) ++ procedure Set_Soft_Label_Key_Attributes ++ (Attr : in Character_Attribute_Set := Normal_Video; ++ Color : in Color_Pair := Color_Pair'First) + is +- function Slk_Attrset (Ch : C_Chtype) return C_Int; ++ function Slk_Attrset (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attrset, "slk_attrset"); + +- Ch : constant Attributed_Character := (Ch => Character'First, +- Attr => Attr, +- Color => Color); ++ Ch : constant Attributed_Character := (Ch => Character'First, ++ Attr => Attr, ++ Color => Color); + begin +- if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then ++ if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Soft_Label_Key_Attributes; ++ end Set_Soft_Label_Key_Attributes; + +- function Get_Soft_Label_Key_Attributes return Character_Attribute_Set ++ function Get_Soft_Label_Key_Attributes return Character_Attribute_Set + is +- function Slk_Attr return C_Chtype; ++ function Slk_Attr return C_Chtype; + pragma Import (C, Slk_Attr, "slk_attr"); + +- Attr : constant C_Chtype := Slk_Attr; ++ Attr : constant C_Chtype := Slk_Attr; + begin +- return Chtype_To_AttrChar (Attr).Attr; +- end Get_Soft_Label_Key_Attributes; ++ return Chtype_To_AttrChar (Attr).Attr; ++ end Get_Soft_Label_Key_Attributes; + +- function Get_Soft_Label_Key_Attributes return Color_Pair ++ function Get_Soft_Label_Key_Attributes return Color_Pair + is +- function Slk_Attr return C_Chtype; ++ function Slk_Attr return C_Chtype; + pragma Import (C, Slk_Attr, "slk_attr"); + +- Attr : constant C_Chtype := Slk_Attr; ++ Attr : constant C_Chtype := Slk_Attr; + begin +- return Chtype_To_AttrChar (Attr).Color; +- end Get_Soft_Label_Key_Attributes; ++ return Chtype_To_AttrChar (Attr).Color; ++ end Get_Soft_Label_Key_Attributes; + +- procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) ++ procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) + is +- function Slk_Color (Color : in C_Short) return C_Int; ++ function Slk_Color (Color : in C_Short) return C_Int; + pragma Import (C, Slk_Color, "slk_color"); + begin +- if Slk_Color (C_Short (Pair)) = Curses_Err then ++ if Slk_Color (C_Short (Pair)) = Curses_Err then + raise Curses_Exception; + end if; +- end Set_Soft_Label_Key_Color; ++ end Set_Soft_Label_Key_Color; + + ------------------------------------------------------------------------------ +- procedure Enable_Key (Key : in Special_Key_Code; +- Enable : in Boolean := True) ++ procedure Enable_Key (Key : in Special_Key_Code; ++ Enable : in Boolean := True) + is +- function Keyok (Keycode : C_Int; +- On_Off : Curses_Bool) return C_Int; ++ function Keyok (Keycode : C_Int; ++ On_Off : Curses_Bool) return C_Int; + pragma Import (C, Keyok, "keyok"); + begin +- if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) ++ if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) + = Curses_Err then + raise Curses_Exception; + end if; +- end Enable_Key; ++ end Enable_Key; + ------------------------------------------------------------------------------ +- procedure Define_Key (Definition : in String; +- Key : in Special_Key_Code) ++ procedure Define_Key (Definition : in String; ++ Key : in Special_Key_Code) + is +- function Defkey (Def : char_array; +- Key : C_Int) return C_Int; ++ function Defkey (Def : char_array; ++ Key : C_Int) return C_Int; + pragma Import (C, Defkey, "define_key"); + +- Txt : char_array (0 .. Definition'Length); +- Length : size_t; ++ Txt : char_array (0 .. Definition'Length); ++ Length : size_t; + begin +- To_C (Definition, Txt, Length); +- if Defkey (Txt, C_Int (Key)) = Curses_Err then ++ To_C (Definition, Txt, Length); ++ if Defkey (Txt, C_Int (Key)) = Curses_Err then + raise Curses_Exception; + end if; +- end Define_Key; ++ end Define_Key; + ------------------------------------------------------------------------------ +- procedure Un_Control (Ch : in Attributed_Character; +- Str : out String) ++ procedure Un_Control (Ch : in Attributed_Character; ++ Str : out String) + is +- function Unctrl (Ch : C_Chtype) return chars_ptr; ++ function Unctrl (Ch : C_Chtype) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); + begin +- Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); +- end Un_Control; ++ Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); ++ end Un_Control; + +- function Un_Control (Ch : in Attributed_Character) return String ++ function Un_Control (Ch : in Attributed_Character) return String + is +- function Unctrl (Ch : C_Chtype) return chars_ptr; ++ function Unctrl (Ch : C_Chtype) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); + begin +- return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); +- end Un_Control; ++ return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); ++ end Un_Control; + +- procedure Delay_Output (Msecs : in Natural) ++ procedure Delay_Output (Msecs : in Natural) + is +- function Delayoutput (Msecs : C_Int) return C_Int; ++ function Delayoutput (Msecs : C_Int) return C_Int; + pragma Import (C, Delayoutput, "delay_output"); + begin +- if Delayoutput (C_Int (Msecs)) = Curses_Err then ++ if Delayoutput (C_Int (Msecs)) = Curses_Err then + raise Curses_Exception; + end if; +- end Delay_Output; ++ end Delay_Output; + +- procedure Flush_Input ++ procedure Flush_Input + is +- function Flushinp return C_Int; ++ function Flushinp return C_Int; + pragma Import (C, Flushinp, "flushinp"); + begin +- if Flushinp = Curses_Err then -- docu says that never happens, but... ++ if Flushinp = Curses_Err then -- docu says that never happens, but... + raise Curses_Exception; + end if; +- end Flush_Input; ++ end Flush_Input; + ------------------------------------------------------------------------------ +- function Baudrate return Natural ++ function Baudrate return Natural + is +- function Baud return C_Int; ++ function Baud return C_Int; + pragma Import (C, Baud, "baudrate"); + begin +- return Natural (Baud); +- end Baudrate; ++ return Natural (Baud); ++ end Baudrate; + +- function Erase_Character return Character ++ function Erase_Character return Character + is +- function Erasechar return C_Int; ++ function Erasechar return C_Int; + pragma Import (C, Erasechar, "erasechar"); + begin +- return Character'Val (Erasechar); +- end Erase_Character; ++ return Character'Val (Erasechar); ++ end Erase_Character; + +- function Kill_Character return Character ++ function Kill_Character return Character + is +- function Killchar return C_Int; ++ function Killchar return C_Int; + pragma Import (C, Killchar, "killchar"); + begin +- return Character'Val (Killchar); +- end Kill_Character; ++ return Character'Val (Killchar); ++ end Kill_Character; + +- function Has_Insert_Character return Boolean ++ function Has_Insert_Character return Boolean + is +- function Has_Ic return Curses_Bool; ++ function Has_Ic return Curses_Bool; + pragma Import (C, Has_Ic, "has_ic"); + begin +- if Has_Ic = Curses_Bool_False then ++ if Has_Ic = Curses_Bool_False then + return False; + else + return True; + end if; +- end Has_Insert_Character; ++ end Has_Insert_Character; + +- function Has_Insert_Line return Boolean ++ function Has_Insert_Line return Boolean + is +- function Has_Il return Curses_Bool; ++ function Has_Il return Curses_Bool; + pragma Import (C, Has_Il, "has_il"); + begin +- if Has_Il = Curses_Bool_False then ++ if Has_Il = Curses_Bool_False then + return False; + else + return True; + end if; +- end Has_Insert_Line; ++ end Has_Insert_Line; + +- function Supported_Attributes return Character_Attribute_Set ++ function Supported_Attributes return Character_Attribute_Set + is +- function Termattrs return C_Chtype; ++ function Termattrs return C_Chtype; + pragma Import (C, Termattrs, "termattrs"); + +- Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); ++ Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); + begin +- return Ch.Attr; +- end Supported_Attributes; ++ return Ch.Attr; ++ end Supported_Attributes; + +- procedure Long_Name (Name : out String) ++ procedure Long_Name (Name : out String) + is +- function Longname return chars_ptr; ++ function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); + begin +- Fill_String (Longname, Name); +- end Long_Name; ++ Fill_String (Longname, Name); ++ end Long_Name; + +- function Long_Name return String ++ function Long_Name return String + is +- function Longname return chars_ptr; ++ function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); + begin +- return Fill_String (Longname); +- end Long_Name; ++ return Fill_String (Longname); ++ end Long_Name; + +- procedure Terminal_Name (Name : out String) ++ procedure Terminal_Name (Name : out String) + is +- function Termname return chars_ptr; ++ function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); + begin +- Fill_String (Termname, Name); +- end Terminal_Name; ++ Fill_String (Termname, Name); ++ end Terminal_Name; + +- function Terminal_Name return String ++ function Terminal_Name return String + is +- function Termname return chars_ptr; ++ function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); + begin +- return Fill_String (Termname); +- end Terminal_Name; ++ return Fill_String (Termname); ++ end Terminal_Name; + ------------------------------------------------------------------------------ +- procedure Init_Pair (Pair : in Redefinable_Color_Pair; +- Fore : in Color_Number; +- Back : in Color_Number) +- is +- function Initpair (Pair : C_Short; +- Fore : C_Short; +- Back : C_Short) return C_Int; ++ procedure Init_Pair (Pair : in Redefinable_Color_Pair; ++ Fore : in Color_Number; ++ Back : in Color_Number) ++ is ++ function Initpair (Pair : C_Short; ++ Fore : C_Short; ++ Back : C_Short) return C_Int; + pragma Import (C, Initpair, "init_pair"); + begin +- if Integer (Pair) >= Number_Of_Color_Pairs then ++ if Integer (Pair) >= Number_Of_Color_Pairs then + raise Constraint_Error; + end if; +- if Integer (Fore) >= Number_Of_Colors or else +- Integer (Back) >= Number_Of_Colors then raise Constraint_Error; ++ if Integer (Fore) >= Number_Of_Colors or else ++ Integer (Back) >= Number_Of_Colors then raise Constraint_Error; + end if; +- if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) ++ if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) + = Curses_Err then + raise Curses_Exception; + end if; +- end Init_Pair; ++ end Init_Pair; + +- procedure Pair_Content (Pair : in Color_Pair; +- Fore : out Color_Number; +- Back : out Color_Number) +- is +- type C_Short_Access is access all C_Short; +- function Paircontent (Pair : C_Short; +- Fp : C_Short_Access; +- Bp : C_Short_Access) return C_Int; ++ procedure Pair_Content (Pair : in Color_Pair; ++ Fore : out Color_Number; ++ Back : out Color_Number) ++ is ++ type C_Short_Access is access all C_Short; ++ function Paircontent (Pair : C_Short; ++ Fp : C_Short_Access; ++ Bp : C_Short_Access) return C_Int; + pragma Import (C, Paircontent, "pair_content"); + +- F, B : aliased C_Short; ++ F, B : aliased C_Short; + begin +- if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then ++ if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then + raise Curses_Exception; + else +- Fore := Color_Number (F); +- Back := Color_Number (B); ++ Fore := Color_Number (F); ++ Back := Color_Number (B); + end if; +- end Pair_Content; ++ end Pair_Content; + +- function Has_Colors return Boolean ++ function Has_Colors return Boolean + is +- function Hascolors return Curses_Bool; ++ function Hascolors return Curses_Bool; + pragma Import (C, Hascolors, "has_colors"); + begin +- if Hascolors = Curses_Bool_False then ++ if Hascolors = Curses_Bool_False then + return False; + else + return True; + end if; +- end Has_Colors; ++ end Has_Colors; + +- procedure Init_Color (Color : in Color_Number; +- Red : in RGB_Value; +- Green : in RGB_Value; +- Blue : in RGB_Value) +- is +- function Initcolor (Col : C_Short; +- Red : C_Short; +- Green : C_Short; +- Blue : C_Short) return C_Int; ++ procedure Init_Color (Color : in Color_Number; ++ Red : in RGB_Value; ++ Green : in RGB_Value; ++ Blue : in RGB_Value) ++ is ++ function Initcolor (Col : C_Short; ++ Red : C_Short; ++ Green : C_Short; ++ Blue : C_Short) return C_Int; + pragma Import (C, Initcolor, "init_color"); + begin +- if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), +- C_Short (Blue)) = Curses_Err then ++ if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), ++ C_Short (Blue)) = Curses_Err then + raise Curses_Exception; + end if; +- end Init_Color; ++ end Init_Color; + +- function Can_Change_Color return Boolean ++ function Can_Change_Color return Boolean + is +- function Canchangecolor return Curses_Bool; ++ function Canchangecolor return Curses_Bool; + pragma Import (C, Canchangecolor, "can_change_color"); + begin +- if Canchangecolor = Curses_Bool_False then ++ if Canchangecolor = Curses_Bool_False then + return False; + else + return True; + end if; +- end Can_Change_Color; ++ end Can_Change_Color; + +- procedure Color_Content (Color : in Color_Number; +- Red : out RGB_Value; +- Green : out RGB_Value; +- Blue : out RGB_Value) ++ procedure Color_Content (Color : in Color_Number; ++ Red : out RGB_Value; ++ Green : out RGB_Value; ++ Blue : out RGB_Value) + is +- type C_Short_Access is access all C_Short; ++ type C_Short_Access is access all C_Short; + +- function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) ++ function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) + return C_Int; + pragma Import (C, Colorcontent, "color_content"); + +- R, G, B : aliased C_Short; ++ R, G, B : aliased C_Short; + begin +- if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = ++ if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = + Curses_Err then + raise Curses_Exception; + else +- Red := RGB_Value (R); +- Green := RGB_Value (G); +- Blue := RGB_Value (B); ++ Red := RGB_Value (R); ++ Green := RGB_Value (G); ++ Blue := RGB_Value (B); + end if; +- end Color_Content; ++ end Color_Content; + + ------------------------------------------------------------------------------ +- procedure Save_Curses_Mode (Mode : in Curses_Mode) ++ procedure Save_Curses_Mode (Mode : in Curses_Mode) + is +- function Def_Prog_Mode return C_Int; ++ function Def_Prog_Mode return C_Int; + pragma Import (C, Def_Prog_Mode, "def_prog_mode"); +- function Def_Shell_Mode return C_Int; ++ function Def_Shell_Mode return C_Int; + pragma Import (C, Def_Shell_Mode, "def_shell_mode"); + +- Err : C_Int; ++ Err : C_Int; + begin +- case Mode is +- when Curses => Err := Def_Prog_Mode; +- when Shell => Err := Def_Shell_Mode; ++ case Mode is ++ when Curses => Err := Def_Prog_Mode; ++ when Shell => Err := Def_Shell_Mode; + end case; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Save_Curses_Mode; ++ end Save_Curses_Mode; + +- procedure Reset_Curses_Mode (Mode : in Curses_Mode) ++ procedure Reset_Curses_Mode (Mode : in Curses_Mode) + is +- function Reset_Prog_Mode return C_Int; ++ function Reset_Prog_Mode return C_Int; + pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); +- function Reset_Shell_Mode return C_Int; ++ function Reset_Shell_Mode return C_Int; + pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); + +- Err : C_Int; ++ Err : C_Int; + begin +- case Mode is +- when Curses => Err := Reset_Prog_Mode; +- when Shell => Err := Reset_Shell_Mode; ++ case Mode is ++ when Curses => Err := Reset_Prog_Mode; ++ when Shell => Err := Reset_Shell_Mode; + end case; +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Reset_Curses_Mode; ++ end Reset_Curses_Mode; + +- procedure Save_Terminal_State ++ procedure Save_Terminal_State + is +- function Savetty return C_Int; ++ function Savetty return C_Int; + pragma Import (C, Savetty, "savetty"); + begin +- if Savetty = Curses_Err then ++ if Savetty = Curses_Err then + raise Curses_Exception; + end if; +- end Save_Terminal_State; ++ end Save_Terminal_State; + +- procedure Reset_Terminal_State ++ procedure Reset_Terminal_State + is +- function Resetty return C_Int; ++ function Resetty return C_Int; + pragma Import (C, Resetty, "resetty"); + begin +- if Resetty = Curses_Err then ++ if Resetty = Curses_Err then + raise Curses_Exception; + end if; +- end Reset_Terminal_State; ++ end Reset_Terminal_State; + +- procedure Rip_Off_Lines (Lines : in Integer; +- Proc : in Stdscr_Init_Proc) ++ procedure Rip_Off_Lines (Lines : in Integer; ++ Proc : in Stdscr_Init_Proc) + is +- function Ripoffline (Lines : C_Int; +- Proc : Stdscr_Init_Proc) return C_Int; ++ function Ripoffline (Lines : C_Int; ++ Proc : Stdscr_Init_Proc) return C_Int; + pragma Import (C, Ripoffline, "_nc_ripoffline"); + begin +- if Ripoffline (C_Int (Lines), Proc) = Curses_Err then ++ if Ripoffline (C_Int (Lines), Proc) = Curses_Err then + raise Curses_Exception; + end if; +- end Rip_Off_Lines; ++ end Rip_Off_Lines; + +- procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) ++ procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) + is +- function Curs_Set (Curs : C_Int) return C_Int; ++ function Curs_Set (Curs : C_Int) return C_Int; + pragma Import (C, Curs_Set, "curs_set"); + +- Res : C_Int; ++ Res : C_Int; + begin +- Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); +- if Res /= Curses_Err then +- Visibility := Cursor_Visibility'Val (Res); ++ Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); ++ if Res /= Curses_Err then ++ Visibility := Cursor_Visibility'Val (Res); + end if; +- end Set_Cursor_Visibility; ++ end Set_Cursor_Visibility; + +- procedure Nap_Milli_Seconds (Ms : in Natural) ++ procedure Nap_Milli_Seconds (Ms : in Natural) + is +- function Napms (Ms : C_Int) return C_Int; ++ function Napms (Ms : C_Int) return C_Int; + pragma Import (C, Napms, "napms"); + begin +- if Napms (C_Int (Ms)) = Curses_Err then ++ if Napms (C_Int (Ms)) = Curses_Err then + raise Curses_Exception; + end if; +- end Nap_Milli_Seconds; ++ end Nap_Milli_Seconds; + ------------------------------------------------------------------------------ + +- function Standard_Window return Window ++ function Standard_Window return Window ++ is ++ Result : Window; ++ pragma Import (C, Result, "stdscr"); ++ begin ++ return Result; ++ end Standard_Window; ++ ++ function Current_Window return Window + is +- Stdscr : Window; +- pragma Import (C, Stdscr, "stdscr"); ++ Result : Window; ++ pragma Import (C, Result, "curscr"); + begin +- return Stdscr; +- end Standard_Window; ++ return Result; ++ end Current_Window; + +- function Lines return Line_Count ++ function Lines return Line_Count + is +- C_Lines : C_Int; +- pragma Import (C, C_Lines, "LINES"); ++ Result : C_Int; ++ pragma Import (C, Result, "LINES"); + begin +- return Line_Count (C_Lines); ++ return Line_Count (Result); + end Lines; + +- function Columns return Column_Count ++ function Columns return Column_Count + is +- C_Columns : C_Int; +- pragma Import (C, C_Columns, "COLS"); ++ Result : C_Int; ++ pragma Import (C, Result, "COLS"); + begin +- return Column_Count (C_Columns); ++ return Column_Count (Result); + end Columns; + +- function Tab_Size return Natural ++ function Tab_Size return Natural + is +- C_Tab_Size : C_Int; +- pragma Import (C, C_Tab_Size, "TABSIZE"); ++ Result : C_Int; ++ pragma Import (C, Result, "TABSIZE"); + begin +- return Natural (C_Tab_Size); ++ return Natural (Result); + end Tab_Size; + +- function Number_Of_Colors return Natural ++ function Number_Of_Colors return Natural + is +- C_Number_Of_Colors : C_Int; +- pragma Import (C, C_Number_Of_Colors, "COLORS"); ++ Result : C_Int; ++ pragma Import (C, Result, "COLORS"); + begin +- return Natural (C_Number_Of_Colors); ++ return Natural (Result); + end Number_Of_Colors; + +- function Number_Of_Color_Pairs return Natural ++ function Number_Of_Color_Pairs return Natural + is +- C_Number_Of_Color_Pairs : C_Int; +- pragma Import (C, C_Number_Of_Color_Pairs, "COLOR_PAIRS"); ++ Result : C_Int; ++ pragma Import (C, Result, "COLOR_PAIRS"); + begin +- return Natural (C_Number_Of_Color_Pairs); ++ return Natural (Result); + end Number_Of_Color_Pairs; ++ + ------------------------------------------------------------------------------ +- procedure Transform_Coordinates +- (W : in Window := Standard_Window; +- Line : in out Line_Position; +- Column : in out Column_Position; +- Dir : in Transform_Direction := From_Screen) +- is +- type Int_Access is access all C_Int; +- function Transform (W : Window; +- Y, X : Int_Access; +- Dir : Curses_Bool) return C_Int; ++ procedure Transform_Coordinates ++ (W : in Window := Standard_Window; ++ Line : in out Line_Position; ++ Column : in out Column_Position; ++ Dir : in Transform_Direction := From_Screen) ++ is ++ type Int_Access is access all C_Int; ++ function Transform (W : Window; ++ Y, X : Int_Access; ++ Dir : Curses_Bool) return C_Int; + pragma Import (C, Transform, "wmouse_trafo"); + +- X : aliased C_Int := C_Int (Column); +- Y : aliased C_Int := C_Int (Line); +- D : Curses_Bool := Curses_Bool_False; +- R : C_Int; ++ X : aliased C_Int := C_Int (Column); ++ Y : aliased C_Int := C_Int (Line); ++ D : Curses_Bool := Curses_Bool_False; ++ R : C_Int; + begin +- if Dir = To_Screen then +- D := 1; ++ if Dir = To_Screen then ++ D := 1; + end if; +- R := Transform (W, Y'Access, X'Access, D); +- if R = Curses_False then ++ R := Transform (W, Y'Access, X'Access, D); ++ if R = Curses_False then + raise Curses_Exception; + else +- Line := Line_Position (Y); +- Column := Column_Position (X); ++ Line := Line_Position (Y); ++ Column := Column_Position (X); + end if; +- end Transform_Coordinates; ++ end Transform_Coordinates; + ------------------------------------------------------------------------------ +- procedure Use_Default_Colors is +- function C_Use_Default_Colors return C_Int; ++ procedure Use_Default_Colors is ++ function C_Use_Default_Colors return C_Int; + pragma Import (C, C_Use_Default_Colors, "use_default_colors"); +- Err : constant C_Int := C_Use_Default_Colors; ++ Err : constant C_Int := C_Use_Default_Colors; + begin +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Use_Default_Colors; ++ end Use_Default_Colors; + +- procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; +- Back : Color_Number := Default_Color) ++ procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; ++ Back : Color_Number := Default_Color) + is +- function C_Assume_Default_Colors (Fore : C_Int; +- Back : C_Int) return C_Int; ++ function C_Assume_Default_Colors (Fore : C_Int; ++ Back : C_Int) return C_Int; + pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); + +- Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), +- C_Int (Back)); ++ Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), ++ C_Int (Back)); + begin +- if Err = Curses_Err then ++ if Err = Curses_Err then + raise Curses_Exception; + end if; +- end Assume_Default_Colors; ++ end Assume_Default_Colors; + ------------------------------------------------------------------------------ +- function Curses_Version return String ++ function Curses_Version return String + is +- function curses_versionC return chars_ptr; ++ function curses_versionC return chars_ptr; + pragma Import (C, curses_versionC, "curses_version"); +- Result : constant chars_ptr := curses_versionC; ++ Result : constant chars_ptr := curses_versionC; + begin +- return Fill_String (Result); +- end Curses_Version; ++ return Fill_String (Result); ++ end Curses_Version; ++------------------------------------------------------------------------------ ++ procedure Curses_Free_All is ++ procedure curses_freeall; ++ pragma Import (C, curses_freeall, "_nc_freeall"); ++ begin ++ -- Use this only for testing: you cannot use curses after calling it, ++ -- so it has to be the "last" thing done before exiting the program. ++ -- This will not really free ALL of memory used by curses. That is ++ -- because it cannot free the memory used for stdout's setbuf. The ++ -- _nc_free_and_exit() procedure can do that, but it can be invoked ++ -- safely only from C - and again, that only as the "last" thing done ++ -- before exiting the program. ++ curses_freeall; ++ end Curses_Free_All; + ------------------------------------------------------------------------------ +- function Use_Extended_Names (Enable : Boolean) return Boolean ++ function Use_Extended_Names (Enable : Boolean) return Boolean + is +- function use_extended_namesC (e : Curses_Bool) return C_Int; ++ function use_extended_namesC (e : Curses_Bool) return C_Int; + pragma Import (C, use_extended_namesC, "use_extended_names"); + +- Res : constant C_Int := +- use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); ++ Res : constant C_Int := ++ use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); + begin +- if Res = C_Int (Curses_Bool_False) then ++ if Res = C_Int (Curses_Bool_False) then + return False; + else + return True; + end if; +- end Use_Extended_Names; ++ end Use_Extended_Names; + ------------------------------------------------------------------------------ +- procedure Screen_Dump_To_File (Filename : in String) ++ procedure Screen_Dump_To_File (Filename : in String) + is +- function scr_dump (f : char_array) return C_Int; ++ function scr_dump (f : char_array) return C_Int; + pragma Import (C, scr_dump, "scr_dump"); +- Txt : char_array (0 .. Filename'Length); +- Length : size_t; ++ Txt : char_array (0 .. Filename'Length); ++ Length : size_t; + begin +- To_C (Filename, Txt, Length); +- if Curses_Err = scr_dump (Txt) then ++ To_C (Filename, Txt, Length); ++ if Curses_Err = scr_dump (Txt) then + raise Curses_Exception; + end if; +- end Screen_Dump_To_File; ++ end Screen_Dump_To_File; + +- procedure Screen_Restore_From_File (Filename : in String) ++ procedure Screen_Restore_From_File (Filename : in String) + is +- function scr_restore (f : char_array) return C_Int; ++ function scr_restore (f : char_array) return C_Int; + pragma Import (C, scr_restore, "scr_restore"); +- Txt : char_array (0 .. Filename'Length); +- Length : size_t; ++ Txt : char_array (0 .. Filename'Length); ++ Length : size_t; + begin +- To_C (Filename, Txt, Length); +- if Curses_Err = scr_restore (Txt) then ++ To_C (Filename, Txt, Length); ++ if Curses_Err = scr_restore (Txt) then + raise Curses_Exception; + end if; +- end Screen_Restore_From_File; ++ end Screen_Restore_From_File; + +- procedure Screen_Init_From_File (Filename : in String) ++ procedure Screen_Init_From_File (Filename : in String) + is +- function scr_init (f : char_array) return C_Int; ++ function scr_init (f : char_array) return C_Int; + pragma Import (C, scr_init, "scr_init"); +- Txt : char_array (0 .. Filename'Length); +- Length : size_t; ++ Txt : char_array (0 .. Filename'Length); ++ Length : size_t; + begin +- To_C (Filename, Txt, Length); +- if Curses_Err = scr_init (Txt) then ++ To_C (Filename, Txt, Length); ++ if Curses_Err = scr_init (Txt) then + raise Curses_Exception; + end if; +- end Screen_Init_From_File; ++ end Screen_Init_From_File; + +- procedure Screen_Set_File (Filename : in String) ++ procedure Screen_Set_File (Filename : in String) + is +- function scr_set (f : char_array) return C_Int; ++ function scr_set (f : char_array) return C_Int; + pragma Import (C, scr_set, "scr_set"); +- Txt : char_array (0 .. Filename'Length); +- Length : size_t; ++ Txt : char_array (0 .. Filename'Length); ++ Length : size_t; + begin +- To_C (Filename, Txt, Length); +- if Curses_Err = scr_set (Txt) then ++ To_C (Filename, Txt, Length); ++ if Curses_Err = scr_set (Txt) then + raise Curses_Exception; + end if; +- end Screen_Set_File; ++ end Screen_Set_File; + ------------------------------------------------------------------------------ +- procedure Resize (Win : Window := Standard_Window; +- Number_Of_Lines : Line_Count; +- Number_Of_Columns : Column_Count) is +- function wresize (win : Window; +- lines : C_Int; +- columns : C_Int) return C_Int; ++ procedure Resize (Win : Window := Standard_Window; ++ Number_Of_Lines : Line_Count; ++ Number_Of_Columns : Column_Count) is ++ function wresize (win : Window; ++ lines : C_Int; ++ columns : C_Int) return C_Int; + pragma Import (C, wresize); + begin +- if wresize (Win, +- C_Int (Number_Of_Lines), +- C_Int (Number_Of_Columns)) = Curses_Err then ++ if wresize (Win, ++ C_Int (Number_Of_Lines), ++ C_Int (Number_Of_Columns)) = Curses_Err then + raise Curses_Exception; + end if; +- end Resize; ++ end Resize; + ------------------------------------------------------------------------------ + + end Terminal_Interface.Curses; +Index: doc/html/ada/terminal_interface-curses__ads.htm +--- ncurses-5.6/doc/html/ada/terminal_interface-curses__ads.htm 2006-09-23 20:31:33.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/ada/terminal_interface-curses__ads.htm 2007-09-01 23:56:32.000000000 +0000 +@@ -3,7 +3,6 @@ + +

              File : terminal_interface-curses.ads


              +
              +-
              + ------------------------------------------------------------------------------
              + --                                                                          --
              + --                           GNAT ncurses Binding                           --
              +@@ -13,7 +12,7 @@
              + --                                 S P E C                                  --
              + --                                                                          --
              + ------------------------------------------------------------------------------
              +--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              --
              ++-- Copyright (c) 1998-2006,2007 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            --
              +@@ -41,296 +40,296 @@
              + ------------------------------------------------------------------------------
              + --  Author:  Juergen Pfeifer, 1996
              + --  Version Control:
              +---  @Revision: 1.37 @
              +---  @Date: 2006/06/25 14:30:22 @
              ++--  @Revision: 1.41 @
              ++--  @Date: 2007/05/05 20:33:52 @
              + --  Binding Version 01.00
              + ------------------------------------------------------------------------------
              + --  curses binding.
              + --  This module is generated. Please don't change it manually!
              + --  Run the generator instead.
              + --  |
              +-with System.Storage_Elements;
              +-with Interfaces.C;   --  We need this for some assertions.
              ++with System.Storage_Elements;
              ++with Interfaces.C;   --  We need this for some assertions.
              + 
              +-package Terminal_Interface.Curses is
              +-   pragma Preelaborate (Terminal_Interface.Curses);
              ++package Terminal_Interface.Curses is
              ++   pragma Preelaborate (Terminal_Interface.Curses);
              +    pragma Linker_Options ("-lncurses");
              + 
              +-   NC_Major_Version : constant := 5; --  Major version of the library
              +-   NC_Minor_Version : constant := 5; --  Minor version of the library
              +-   NC_Version : constant String := "5.5";  --  Version of library
              ++   NC_Major_Version : constant := 5; --  Major version of the library
              ++   NC_Minor_Version : constant := 6; --  Minor version of the library
              ++   NC_Version : constant String := "5.6";  --  Version of library
              + 
              +-   type Window is private;
              +-   Null_Window : constant Window;
              ++   type Window is private;
              ++   Null_Window : constant Window;
              + 
              +-   type Line_Position   is new Natural; --  line coordinate
              +-   type Column_Position is new Natural; --  column coordinate
              ++   type Line_Position   is new Natural; --  line coordinate
              ++   type Column_Position is new Natural; --  column coordinate
              + 
              +-   subtype Line_Count   is Line_Position   range 1 .. Line_Position'Last;
              ++   subtype Line_Count   is Line_Position   range 1 .. Line_Position'Last;
              +    --  Type to count lines. We do not allow null windows, so must be positive
              +-   subtype Column_Count is Column_Position range 1 .. Column_Position'Last;
              ++   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 Integer;
              ++   type Key_Code is new Integer;
              +    --  That is anything including real characters, special keys and logical
              +    --  request codes.
              + 
              +    --  FIXME: The "-1" should be Curses_Err
              +-   subtype Real_Key_Code is Key_Code range -1 .. 8#777#;
              ++   subtype Real_Key_Code is Key_Code range -1 .. 8#777#;
              +    --  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.
              + 
              +-   subtype Special_Key_Code is Real_Key_Code
              +-     range 8#400# .. Real_Key_Code'Last;
              ++   subtype Special_Key_Code is Real_Key_Code
              ++     range 8#400# .. Real_Key_Code'Last;
              +    --  Type for a function- or special key number
              + 
              +-   subtype Normal_Key_Code is Real_Key_Code range
              ++   subtype Normal_Key_Code is Real_Key_Code range
              +      Character'Pos (Character'First) .. Character'Pos (Character'Last);
              +    --  This are the codes for regular (incl. non-graphical) characters.
              + 
              +    --  Constants for function- and special keys
              +    --
              +-   Key_None                       : constant Special_Key_Code := 8#400#;
              +-   Key_Code_Yes                   : constant Special_Key_Code := 8#400#;
              +-   Key_Min                        : constant Special_Key_Code := 8#401#;
              +-   Key_Break                      : constant Special_Key_Code := 8#401#;
              +-   Key_Cursor_Down                : constant Special_Key_Code := 8#402#;
              +-   Key_Cursor_Up                  : constant Special_Key_Code := 8#403#;
              +-   Key_Cursor_Left                : constant Special_Key_Code := 8#404#;
              +-   Key_Cursor_Right               : constant Special_Key_Code := 8#405#;
              +-   Key_Home                       : constant Special_Key_Code := 8#406#;
              +-   Key_Backspace                  : constant Special_Key_Code := 8#407#;
              +-   Key_F0                         : constant Special_Key_Code := 8#410#;
              +-   Key_F1                         : constant Special_Key_Code := 8#411#;
              +-   Key_F2                         : constant Special_Key_Code := 8#412#;
              +-   Key_F3                         : constant Special_Key_Code := 8#413#;
              +-   Key_F4                         : constant Special_Key_Code := 8#414#;
              +-   Key_F5                         : constant Special_Key_Code := 8#415#;
              +-   Key_F6                         : constant Special_Key_Code := 8#416#;
              +-   Key_F7                         : constant Special_Key_Code := 8#417#;
              +-   Key_F8                         : constant Special_Key_Code := 8#420#;
              +-   Key_F9                         : constant Special_Key_Code := 8#421#;
              +-   Key_F10                        : constant Special_Key_Code := 8#422#;
              +-   Key_F11                        : constant Special_Key_Code := 8#423#;
              +-   Key_F12                        : constant Special_Key_Code := 8#424#;
              +-   Key_F13                        : constant Special_Key_Code := 8#425#;
              +-   Key_F14                        : constant Special_Key_Code := 8#426#;
              +-   Key_F15                        : constant Special_Key_Code := 8#427#;
              +-   Key_F16                        : constant Special_Key_Code := 8#430#;
              +-   Key_F17                        : constant Special_Key_Code := 8#431#;
              +-   Key_F18                        : constant Special_Key_Code := 8#432#;
              +-   Key_F19                        : constant Special_Key_Code := 8#433#;
              +-   Key_F20                        : constant Special_Key_Code := 8#434#;
              +-   Key_F21                        : constant Special_Key_Code := 8#435#;
              +-   Key_F22                        : constant Special_Key_Code := 8#436#;
              +-   Key_F23                        : constant Special_Key_Code := 8#437#;
              +-   Key_F24                        : constant Special_Key_Code := 8#440#;
              +-   Key_Delete_Line                : constant Special_Key_Code := 8#510#;
              +-   Key_Insert_Line                : constant Special_Key_Code := 8#511#;
              +-   Key_Delete_Char                : constant Special_Key_Code := 8#512#;
              +-   Key_Insert_Char                : constant Special_Key_Code := 8#513#;
              +-   Key_Exit_Insert_Mode           : constant Special_Key_Code := 8#514#;
              +-   Key_Clear_Screen               : constant Special_Key_Code := 8#515#;
              +-   Key_Clear_End_Of_Screen        : constant Special_Key_Code := 8#516#;
              +-   Key_Clear_End_Of_Line          : constant Special_Key_Code := 8#517#;
              +-   Key_Scroll_1_Forward           : constant Special_Key_Code := 8#520#;
              +-   Key_Scroll_1_Backward          : constant Special_Key_Code := 8#521#;
              +-   Key_Next_Page                  : constant Special_Key_Code := 8#522#;
              +-   Key_Previous_Page              : constant Special_Key_Code := 8#523#;
              +-   Key_Set_Tab                    : constant Special_Key_Code := 8#524#;
              +-   Key_Clear_Tab                  : constant Special_Key_Code := 8#525#;
              +-   Key_Clear_All_Tabs             : constant Special_Key_Code := 8#526#;
              +-   Key_Enter_Or_Send              : constant Special_Key_Code := 8#527#;
              +-   Key_Soft_Reset                 : constant Special_Key_Code := 8#530#;
              +-   Key_Reset                      : constant Special_Key_Code := 8#531#;
              +-   Key_Print                      : constant Special_Key_Code := 8#532#;
              +-   Key_Bottom                     : constant Special_Key_Code := 8#533#;
              +-   Key_Upper_Left_Of_Keypad       : constant Special_Key_Code := 8#534#;
              +-   Key_Upper_Right_Of_Keypad      : constant Special_Key_Code := 8#535#;
              +-   Key_Center_Of_Keypad           : constant Special_Key_Code := 8#536#;
              +-   Key_Lower_Left_Of_Keypad       : constant Special_Key_Code := 8#537#;
              +-   Key_Lower_Right_Of_Keypad      : constant Special_Key_Code := 8#540#;
              +-   Key_Back_Tab                   : constant Special_Key_Code := 8#541#;
              +-   Key_Beginning                  : constant Special_Key_Code := 8#542#;
              +-   Key_Cancel                     : constant Special_Key_Code := 8#543#;
              +-   Key_Close                      : constant Special_Key_Code := 8#544#;
              +-   Key_Command                    : constant Special_Key_Code := 8#545#;
              +-   Key_Copy                       : constant Special_Key_Code := 8#546#;
              +-   Key_Create                     : constant Special_Key_Code := 8#547#;
              +-   Key_End                        : constant Special_Key_Code := 8#550#;
              +-   Key_Exit                       : constant Special_Key_Code := 8#551#;
              +-   Key_Find                       : constant Special_Key_Code := 8#552#;
              +-   Key_Help                       : constant Special_Key_Code := 8#553#;
              +-   Key_Mark                       : constant Special_Key_Code := 8#554#;
              +-   Key_Message                    : constant Special_Key_Code := 8#555#;
              +-   Key_Move                       : constant Special_Key_Code := 8#556#;
              +-   Key_Next                       : constant Special_Key_Code := 8#557#;
              +-   Key_Open                       : constant Special_Key_Code := 8#560#;
              +-   Key_Options                    : constant Special_Key_Code := 8#561#;
              +-   Key_Previous                   : constant Special_Key_Code := 8#562#;
              +-   Key_Redo                       : constant Special_Key_Code := 8#563#;
              +-   Key_Reference                  : constant Special_Key_Code := 8#564#;
              +-   Key_Refresh                    : constant Special_Key_Code := 8#565#;
              +-   Key_Replace                    : constant Special_Key_Code := 8#566#;
              +-   Key_Restart                    : constant Special_Key_Code := 8#567#;
              +-   Key_Resume                     : constant Special_Key_Code := 8#570#;
              +-   Key_Save                       : constant Special_Key_Code := 8#571#;
              +-   Key_Shift_Begin                : constant Special_Key_Code := 8#572#;
              +-   Key_Shift_Cancel               : constant Special_Key_Code := 8#573#;
              +-   Key_Shift_Command              : constant Special_Key_Code := 8#574#;
              +-   Key_Shift_Copy                 : constant Special_Key_Code := 8#575#;
              +-   Key_Shift_Create               : constant Special_Key_Code := 8#576#;
              +-   Key_Shift_Delete_Char          : constant Special_Key_Code := 8#577#;
              +-   Key_Shift_Delete_Line          : constant Special_Key_Code := 8#600#;
              +-   Key_Select                     : constant Special_Key_Code := 8#601#;
              +-   Key_Shift_End                  : constant Special_Key_Code := 8#602#;
              +-   Key_Shift_Clear_End_Of_Line    : constant Special_Key_Code := 8#603#;
              +-   Key_Shift_Exit                 : constant Special_Key_Code := 8#604#;
              +-   Key_Shift_Find                 : constant Special_Key_Code := 8#605#;
              +-   Key_Shift_Help                 : constant Special_Key_Code := 8#606#;
              +-   Key_Shift_Home                 : constant Special_Key_Code := 8#607#;
              +-   Key_Shift_Insert_Char          : constant Special_Key_Code := 8#610#;
              +-   Key_Shift_Cursor_Left          : constant Special_Key_Code := 8#611#;
              +-   Key_Shift_Message              : constant Special_Key_Code := 8#612#;
              +-   Key_Shift_Move                 : constant Special_Key_Code := 8#613#;
              +-   Key_Shift_Next_Page            : constant Special_Key_Code := 8#614#;
              +-   Key_Shift_Options              : constant Special_Key_Code := 8#615#;
              +-   Key_Shift_Previous_Page        : constant Special_Key_Code := 8#616#;
              +-   Key_Shift_Print                : constant Special_Key_Code := 8#617#;
              +-   Key_Shift_Redo                 : constant Special_Key_Code := 8#620#;
              +-   Key_Shift_Replace              : constant Special_Key_Code := 8#621#;
              +-   Key_Shift_Cursor_Right         : constant Special_Key_Code := 8#622#;
              +-   Key_Shift_Resume               : constant Special_Key_Code := 8#623#;
              +-   Key_Shift_Save                 : constant Special_Key_Code := 8#624#;
              +-   Key_Shift_Suspend              : constant Special_Key_Code := 8#625#;
              +-   Key_Shift_Undo                 : constant Special_Key_Code := 8#626#;
              +-   Key_Suspend                    : constant Special_Key_Code := 8#627#;
              +-   Key_Undo                       : constant Special_Key_Code := 8#630#;
              +-   Key_Mouse                      : constant Special_Key_Code := 8#631#;
              +-   Key_Resize                     : constant Special_Key_Code := 8#632#;
              ++   Key_None                       : constant Special_Key_Code := 8#400#;
              ++   Key_Code_Yes                   : constant Special_Key_Code := 8#400#;
              ++   Key_Min                        : constant Special_Key_Code := 8#401#;
              ++   Key_Break                      : constant Special_Key_Code := 8#401#;
              ++   Key_Cursor_Down                : constant Special_Key_Code := 8#402#;
              ++   Key_Cursor_Up                  : constant Special_Key_Code := 8#403#;
              ++   Key_Cursor_Left                : constant Special_Key_Code := 8#404#;
              ++   Key_Cursor_Right               : constant Special_Key_Code := 8#405#;
              ++   Key_Home                       : constant Special_Key_Code := 8#406#;
              ++   Key_Backspace                  : constant Special_Key_Code := 8#407#;
              ++   Key_F0                         : constant Special_Key_Code := 8#410#;
              ++   Key_F1                         : constant Special_Key_Code := 8#411#;
              ++   Key_F2                         : constant Special_Key_Code := 8#412#;
              ++   Key_F3                         : constant Special_Key_Code := 8#413#;
              ++   Key_F4                         : constant Special_Key_Code := 8#414#;
              ++   Key_F5                         : constant Special_Key_Code := 8#415#;
              ++   Key_F6                         : constant Special_Key_Code := 8#416#;
              ++   Key_F7                         : constant Special_Key_Code := 8#417#;
              ++   Key_F8                         : constant Special_Key_Code := 8#420#;
              ++   Key_F9                         : constant Special_Key_Code := 8#421#;
              ++   Key_F10                        : constant Special_Key_Code := 8#422#;
              ++   Key_F11                        : constant Special_Key_Code := 8#423#;
              ++   Key_F12                        : constant Special_Key_Code := 8#424#;
              ++   Key_F13                        : constant Special_Key_Code := 8#425#;
              ++   Key_F14                        : constant Special_Key_Code := 8#426#;
              ++   Key_F15                        : constant Special_Key_Code := 8#427#;
              ++   Key_F16                        : constant Special_Key_Code := 8#430#;
              ++   Key_F17                        : constant Special_Key_Code := 8#431#;
              ++   Key_F18                        : constant Special_Key_Code := 8#432#;
              ++   Key_F19                        : constant Special_Key_Code := 8#433#;
              ++   Key_F20                        : constant Special_Key_Code := 8#434#;
              ++   Key_F21                        : constant Special_Key_Code := 8#435#;
              ++   Key_F22                        : constant Special_Key_Code := 8#436#;
              ++   Key_F23                        : constant Special_Key_Code := 8#437#;
              ++   Key_F24                        : constant Special_Key_Code := 8#440#;
              ++   Key_Delete_Line                : constant Special_Key_Code := 8#510#;
              ++   Key_Insert_Line                : constant Special_Key_Code := 8#511#;
              ++   Key_Delete_Char                : constant Special_Key_Code := 8#512#;
              ++   Key_Insert_Char                : constant Special_Key_Code := 8#513#;
              ++   Key_Exit_Insert_Mode           : constant Special_Key_Code := 8#514#;
              ++   Key_Clear_Screen               : constant Special_Key_Code := 8#515#;
              ++   Key_Clear_End_Of_Screen        : constant Special_Key_Code := 8#516#;
              ++   Key_Clear_End_Of_Line          : constant Special_Key_Code := 8#517#;
              ++   Key_Scroll_1_Forward           : constant Special_Key_Code := 8#520#;
              ++   Key_Scroll_1_Backward          : constant Special_Key_Code := 8#521#;
              ++   Key_Next_Page                  : constant Special_Key_Code := 8#522#;
              ++   Key_Previous_Page              : constant Special_Key_Code := 8#523#;
              ++   Key_Set_Tab                    : constant Special_Key_Code := 8#524#;
              ++   Key_Clear_Tab                  : constant Special_Key_Code := 8#525#;
              ++   Key_Clear_All_Tabs             : constant Special_Key_Code := 8#526#;
              ++   Key_Enter_Or_Send              : constant Special_Key_Code := 8#527#;
              ++   Key_Soft_Reset                 : constant Special_Key_Code := 8#530#;
              ++   Key_Reset                      : constant Special_Key_Code := 8#531#;
              ++   Key_Print                      : constant Special_Key_Code := 8#532#;
              ++   Key_Bottom                     : constant Special_Key_Code := 8#533#;
              ++   Key_Upper_Left_Of_Keypad       : constant Special_Key_Code := 8#534#;
              ++   Key_Upper_Right_Of_Keypad      : constant Special_Key_Code := 8#535#;
              ++   Key_Center_Of_Keypad           : constant Special_Key_Code := 8#536#;
              ++   Key_Lower_Left_Of_Keypad       : constant Special_Key_Code := 8#537#;
              ++   Key_Lower_Right_Of_Keypad      : constant Special_Key_Code := 8#540#;
              ++   Key_Back_Tab                   : constant Special_Key_Code := 8#541#;
              ++   Key_Beginning                  : constant Special_Key_Code := 8#542#;
              ++   Key_Cancel                     : constant Special_Key_Code := 8#543#;
              ++   Key_Close                      : constant Special_Key_Code := 8#544#;
              ++   Key_Command                    : constant Special_Key_Code := 8#545#;
              ++   Key_Copy                       : constant Special_Key_Code := 8#546#;
              ++   Key_Create                     : constant Special_Key_Code := 8#547#;
              ++   Key_End                        : constant Special_Key_Code := 8#550#;
              ++   Key_Exit                       : constant Special_Key_Code := 8#551#;
              ++   Key_Find                       : constant Special_Key_Code := 8#552#;
              ++   Key_Help                       : constant Special_Key_Code := 8#553#;
              ++   Key_Mark                       : constant Special_Key_Code := 8#554#;
              ++   Key_Message                    : constant Special_Key_Code := 8#555#;
              ++   Key_Move                       : constant Special_Key_Code := 8#556#;
              ++   Key_Next                       : constant Special_Key_Code := 8#557#;
              ++   Key_Open                       : constant Special_Key_Code := 8#560#;
              ++   Key_Options                    : constant Special_Key_Code := 8#561#;
              ++   Key_Previous                   : constant Special_Key_Code := 8#562#;
              ++   Key_Redo                       : constant Special_Key_Code := 8#563#;
              ++   Key_Reference                  : constant Special_Key_Code := 8#564#;
              ++   Key_Refresh                    : constant Special_Key_Code := 8#565#;
              ++   Key_Replace                    : constant Special_Key_Code := 8#566#;
              ++   Key_Restart                    : constant Special_Key_Code := 8#567#;
              ++   Key_Resume                     : constant Special_Key_Code := 8#570#;
              ++   Key_Save                       : constant Special_Key_Code := 8#571#;
              ++   Key_Shift_Begin                : constant Special_Key_Code := 8#572#;
              ++   Key_Shift_Cancel               : constant Special_Key_Code := 8#573#;
              ++   Key_Shift_Command              : constant Special_Key_Code := 8#574#;
              ++   Key_Shift_Copy                 : constant Special_Key_Code := 8#575#;
              ++   Key_Shift_Create               : constant Special_Key_Code := 8#576#;
              ++   Key_Shift_Delete_Char          : constant Special_Key_Code := 8#577#;
              ++   Key_Shift_Delete_Line          : constant Special_Key_Code := 8#600#;
              ++   Key_Select                     : constant Special_Key_Code := 8#601#;
              ++   Key_Shift_End                  : constant Special_Key_Code := 8#602#;
              ++   Key_Shift_Clear_End_Of_Line    : constant Special_Key_Code := 8#603#;
              ++   Key_Shift_Exit                 : constant Special_Key_Code := 8#604#;
              ++   Key_Shift_Find                 : constant Special_Key_Code := 8#605#;
              ++   Key_Shift_Help                 : constant Special_Key_Code := 8#606#;
              ++   Key_Shift_Home                 : constant Special_Key_Code := 8#607#;
              ++   Key_Shift_Insert_Char          : constant Special_Key_Code := 8#610#;
              ++   Key_Shift_Cursor_Left          : constant Special_Key_Code := 8#611#;
              ++   Key_Shift_Message              : constant Special_Key_Code := 8#612#;
              ++   Key_Shift_Move                 : constant Special_Key_Code := 8#613#;
              ++   Key_Shift_Next_Page            : constant Special_Key_Code := 8#614#;
              ++   Key_Shift_Options              : constant Special_Key_Code := 8#615#;
              ++   Key_Shift_Previous_Page        : constant Special_Key_Code := 8#616#;
              ++   Key_Shift_Print                : constant Special_Key_Code := 8#617#;
              ++   Key_Shift_Redo                 : constant Special_Key_Code := 8#620#;
              ++   Key_Shift_Replace              : constant Special_Key_Code := 8#621#;
              ++   Key_Shift_Cursor_Right         : constant Special_Key_Code := 8#622#;
              ++   Key_Shift_Resume               : constant Special_Key_Code := 8#623#;
              ++   Key_Shift_Save                 : constant Special_Key_Code := 8#624#;
              ++   Key_Shift_Suspend              : constant Special_Key_Code := 8#625#;
              ++   Key_Shift_Undo                 : constant Special_Key_Code := 8#626#;
              ++   Key_Suspend                    : constant Special_Key_Code := 8#627#;
              ++   Key_Undo                       : constant Special_Key_Code := 8#630#;
              ++   Key_Mouse                      : constant Special_Key_Code := 8#631#;
              ++   Key_Resize                     : constant Special_Key_Code := 8#632#;
              + 
              +-   Key_Max                        : constant Special_Key_Code
              +-     := Special_Key_Code'Last;
              ++   Key_Max                        : constant Special_Key_Code
              ++     := Special_Key_Code'Last;
              + 
              +-   subtype User_Key_Code is Key_Code
              +-     range (Key_Max + 129) .. Key_Code'Last;
              ++   subtype User_Key_Code is Key_Code
              ++     range (Key_Max + 129) .. Key_Code'Last;
              +    --  This is reserved for user defined key codes. The range between Key_Max
              +    --  and the first user code is reserved for subsystems like menu and forms.
              + 
              +    --  For those who like to use the original key names we produce them were
              +    --  they differ from the original. Please note that they may differ in
              +    --  lower/upper case.
              +-   KEY_DOWN         : Special_Key_Code renames Key_Cursor_Down;
              +-   KEY_UP           : Special_Key_Code renames Key_Cursor_Up;
              +-   KEY_LEFT         : Special_Key_Code renames Key_Cursor_Left;
              +-   KEY_RIGHT        : Special_Key_Code renames Key_Cursor_Right;
              +-   KEY_DL           : Special_Key_Code renames Key_Delete_Line;
              +-   KEY_IL           : Special_Key_Code renames Key_Insert_Line;
              +-   KEY_DC           : Special_Key_Code renames Key_Delete_Char;
              +-   KEY_IC           : Special_Key_Code renames Key_Insert_Char;
              +-   KEY_EIC          : Special_Key_Code renames Key_Exit_Insert_Mode;
              +-   KEY_CLEAR        : Special_Key_Code renames Key_Clear_Screen;
              +-   KEY_EOS          : Special_Key_Code renames Key_Clear_End_Of_Screen;
              +-   KEY_EOL          : Special_Key_Code renames Key_Clear_End_Of_Line;
              +-   KEY_SF           : Special_Key_Code renames Key_Scroll_1_Forward;
              +-   KEY_SR           : Special_Key_Code renames Key_Scroll_1_Backward;
              +-   KEY_NPAGE        : Special_Key_Code renames Key_Next_Page;
              +-   KEY_PPAGE        : Special_Key_Code renames Key_Previous_Page;
              +-   KEY_STAB         : Special_Key_Code renames Key_Set_Tab;
              +-   KEY_CTAB         : Special_Key_Code renames Key_Clear_Tab;
              +-   KEY_CATAB        : Special_Key_Code renames Key_Clear_All_Tabs;
              +-   KEY_ENTER        : Special_Key_Code renames Key_Enter_Or_Send;
              +-   KEY_SRESET       : Special_Key_Code renames Key_Soft_Reset;
              +-   KEY_LL           : Special_Key_Code renames Key_Bottom;
              +-   KEY_A1           : Special_Key_Code renames Key_Upper_Left_Of_Keypad;
              +-   KEY_A3           : Special_Key_Code renames Key_Upper_Right_Of_Keypad;
              +-   KEY_B2           : Special_Key_Code renames Key_Center_Of_Keypad;
              +-   KEY_C1           : Special_Key_Code renames Key_Lower_Left_Of_Keypad;
              +-   KEY_C3           : Special_Key_Code renames Key_Lower_Right_Of_Keypad;
              +-   KEY_BTAB         : Special_Key_Code renames Key_Back_Tab;
              +-   KEY_BEG          : Special_Key_Code renames Key_Beginning;
              +-   KEY_SBEG         : Special_Key_Code renames Key_Shift_Begin;
              +-   KEY_SCANCEL      : Special_Key_Code renames Key_Shift_Cancel;
              +-   KEY_SCOMMAND     : Special_Key_Code renames Key_Shift_Command;
              +-   KEY_SCOPY        : Special_Key_Code renames Key_Shift_Copy;
              +-   KEY_SCREATE      : Special_Key_Code renames Key_Shift_Create;
              +-   KEY_SDC          : Special_Key_Code renames Key_Shift_Delete_Char;
              +-   KEY_SDL          : Special_Key_Code renames Key_Shift_Delete_Line;
              +-   KEY_SEND         : Special_Key_Code renames Key_Shift_End;
              +-   KEY_SEOL         : Special_Key_Code renames Key_Shift_Clear_End_Of_Line;
              +-   KEY_SEXIT        : Special_Key_Code renames Key_Shift_Exit;
              +-   KEY_SFIND        : Special_Key_Code renames Key_Shift_Find;
              +-   KEY_SHELP        : Special_Key_Code renames Key_Shift_Help;
              +-   KEY_SHOME        : Special_Key_Code renames Key_Shift_Home;
              +-   KEY_SIC          : Special_Key_Code renames Key_Shift_Insert_Char;
              +-   KEY_SLEFT        : Special_Key_Code renames Key_Shift_Cursor_Left;
              +-   KEY_SMESSAGE     : Special_Key_Code renames Key_Shift_Message;
              +-   KEY_SMOVE        : Special_Key_Code renames Key_Shift_Move;
              +-   KEY_SNEXT        : Special_Key_Code renames Key_Shift_Next_Page;
              +-   KEY_SOPTIONS     : Special_Key_Code renames Key_Shift_Options;
              +-   KEY_SPREVIOUS    : Special_Key_Code renames Key_Shift_Previous_Page;
              +-   KEY_SPRINT       : Special_Key_Code renames Key_Shift_Print;
              +-   KEY_SREDO        : Special_Key_Code renames Key_Shift_Redo;
              +-   KEY_SREPLACE     : Special_Key_Code renames Key_Shift_Replace;
              +-   KEY_SRIGHT       : Special_Key_Code renames Key_Shift_Cursor_Right;
              +-   KEY_SRSUME       : Special_Key_Code renames Key_Shift_Resume;
              +-   KEY_SSAVE        : Special_Key_Code renames Key_Shift_Save;
              +-   KEY_SSUSPEND     : Special_Key_Code renames Key_Shift_Suspend;
              +-   KEY_SUNDO        : Special_Key_Code renames Key_Shift_Undo;
              ++   KEY_DOWN         : Special_Key_Code renames Key_Cursor_Down;
              ++   KEY_UP           : Special_Key_Code renames Key_Cursor_Up;
              ++   KEY_LEFT         : Special_Key_Code renames Key_Cursor_Left;
              ++   KEY_RIGHT        : Special_Key_Code renames Key_Cursor_Right;
              ++   KEY_DL           : Special_Key_Code renames Key_Delete_Line;
              ++   KEY_IL           : Special_Key_Code renames Key_Insert_Line;
              ++   KEY_DC           : Special_Key_Code renames Key_Delete_Char;
              ++   KEY_IC           : Special_Key_Code renames Key_Insert_Char;
              ++   KEY_EIC          : Special_Key_Code renames Key_Exit_Insert_Mode;
              ++   KEY_CLEAR        : Special_Key_Code renames Key_Clear_Screen;
              ++   KEY_EOS          : Special_Key_Code renames Key_Clear_End_Of_Screen;
              ++   KEY_EOL          : Special_Key_Code renames Key_Clear_End_Of_Line;
              ++   KEY_SF           : Special_Key_Code renames Key_Scroll_1_Forward;
              ++   KEY_SR           : Special_Key_Code renames Key_Scroll_1_Backward;
              ++   KEY_NPAGE        : Special_Key_Code renames Key_Next_Page;
              ++   KEY_PPAGE        : Special_Key_Code renames Key_Previous_Page;
              ++   KEY_STAB         : Special_Key_Code renames Key_Set_Tab;
              ++   KEY_CTAB         : Special_Key_Code renames Key_Clear_Tab;
              ++   KEY_CATAB        : Special_Key_Code renames Key_Clear_All_Tabs;
              ++   KEY_ENTER        : Special_Key_Code renames Key_Enter_Or_Send;
              ++   KEY_SRESET       : Special_Key_Code renames Key_Soft_Reset;
              ++   KEY_LL           : Special_Key_Code renames Key_Bottom;
              ++   KEY_A1           : Special_Key_Code renames Key_Upper_Left_Of_Keypad;
              ++   KEY_A3           : Special_Key_Code renames Key_Upper_Right_Of_Keypad;
              ++   KEY_B2           : Special_Key_Code renames Key_Center_Of_Keypad;
              ++   KEY_C1           : Special_Key_Code renames Key_Lower_Left_Of_Keypad;
              ++   KEY_C3           : Special_Key_Code renames Key_Lower_Right_Of_Keypad;
              ++   KEY_BTAB         : Special_Key_Code renames Key_Back_Tab;
              ++   KEY_BEG          : Special_Key_Code renames Key_Beginning;
              ++   KEY_SBEG         : Special_Key_Code renames Key_Shift_Begin;
              ++   KEY_SCANCEL      : Special_Key_Code renames Key_Shift_Cancel;
              ++   KEY_SCOMMAND     : Special_Key_Code renames Key_Shift_Command;
              ++   KEY_SCOPY        : Special_Key_Code renames Key_Shift_Copy;
              ++   KEY_SCREATE      : Special_Key_Code renames Key_Shift_Create;
              ++   KEY_SDC          : Special_Key_Code renames Key_Shift_Delete_Char;
              ++   KEY_SDL          : Special_Key_Code renames Key_Shift_Delete_Line;
              ++   KEY_SEND         : Special_Key_Code renames Key_Shift_End;
              ++   KEY_SEOL         : Special_Key_Code renames Key_Shift_Clear_End_Of_Line;
              ++   KEY_SEXIT        : Special_Key_Code renames Key_Shift_Exit;
              ++   KEY_SFIND        : Special_Key_Code renames Key_Shift_Find;
              ++   KEY_SHELP        : Special_Key_Code renames Key_Shift_Help;
              ++   KEY_SHOME        : Special_Key_Code renames Key_Shift_Home;
              ++   KEY_SIC          : Special_Key_Code renames Key_Shift_Insert_Char;
              ++   KEY_SLEFT        : Special_Key_Code renames Key_Shift_Cursor_Left;
              ++   KEY_SMESSAGE     : Special_Key_Code renames Key_Shift_Message;
              ++   KEY_SMOVE        : Special_Key_Code renames Key_Shift_Move;
              ++   KEY_SNEXT        : Special_Key_Code renames Key_Shift_Next_Page;
              ++   KEY_SOPTIONS     : Special_Key_Code renames Key_Shift_Options;
              ++   KEY_SPREVIOUS    : Special_Key_Code renames Key_Shift_Previous_Page;
              ++   KEY_SPRINT       : Special_Key_Code renames Key_Shift_Print;
              ++   KEY_SREDO        : Special_Key_Code renames Key_Shift_Redo;
              ++   KEY_SREPLACE     : Special_Key_Code renames Key_Shift_Replace;
              ++   KEY_SRIGHT       : Special_Key_Code renames Key_Shift_Cursor_Right;
              ++   KEY_SRSUME       : Special_Key_Code renames Key_Shift_Resume;
              ++   KEY_SSAVE        : Special_Key_Code renames Key_Shift_Save;
              ++   KEY_SSUSPEND     : Special_Key_Code renames Key_Shift_Suspend;
              ++   KEY_SUNDO        : Special_Key_Code renames Key_Shift_Undo;
              + 
              + ------------------------------------------------------------------------------
              + 
              +-   type Color_Number is range -1 .. Integer (Interfaces.C.short'Last);
              +-   for Color_Number'Size use Interfaces.C.short'Size;
              ++   type Color_Number is range -1 .. Integer (Interfaces.C.short'Last);
              ++   for Color_Number'Size use Interfaces.C.short'Size;
              +    --  (n)curses uses a short for the color index
              +    --  The model is, that a Color_Number is an index into an array of
              +    --  (potentially) definable colors. Some of those indices are
              +    --  predefined (see below), although they may not really exist.
              + 
              +-   Default_Color    : constant Color_Number := -1;
              +-   Black            : constant Color_Number := 0;
              +-   Red              : constant Color_Number := 1;
              +-   Green            : constant Color_Number := 2;
              +-   Yellow           : constant Color_Number := 3;
              +-   Blue             : constant Color_Number := 4;
              +-   Magenta          : constant Color_Number := 5;
              +-   Cyan             : constant Color_Number := 6;
              +-   White            : constant Color_Number := 7;
              ++   Default_Color    : constant Color_Number := -1;
              ++   Black            : constant Color_Number := 0;
              ++   Red              : constant Color_Number := 1;
              ++   Green            : constant Color_Number := 2;
              ++   Yellow           : constant Color_Number := 3;
              ++   Blue             : constant Color_Number := 4;
              ++   Magenta          : constant Color_Number := 5;
              ++   Cyan             : constant Color_Number := 6;
              ++   White            : constant Color_Number := 7;
              + 
              +-   type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last);
              +-   for RGB_Value'Size use Interfaces.C.short'Size;
              ++   type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last);
              ++   for RGB_Value'Size use Interfaces.C.short'Size;
              +    --  Some system may allow to redefine a color by setting RGB values.
              + 
              +-   type Color_Pair is range 0 .. 255;
              +-   for Color_Pair'Size use 8;
              +-   subtype Redefinable_Color_Pair is Color_Pair range 1 .. 255;
              ++   type Color_Pair is range 0 .. 255;
              ++   for Color_Pair'Size use 8;
              ++   subtype Redefinable_Color_Pair is Color_Pair range 1 .. 255;
              +    --  (n)curses reserves 1 Byte for the color-pair number. Color Pair 0
              +    --  is fixed (Black & White). A color pair is simply a combination of
              +    --  two colors described by Color_Numbers, one for the foreground and
              +    --  the other for the background
              + 
              +-   type Character_Attribute_Set is
              ++   type Character_Attribute_Set is
              +       record
              +-         Stand_Out               : Boolean;
              +-         Under_Line              : Boolean;
              +-         Reverse_Video           : Boolean;
              +-         Blink                   : Boolean;
              +-         Dim_Character           : Boolean;
              +-         Bold_Character          : Boolean;
              +-         Alternate_Character_Set : Boolean;
              +-         Invisible_Character     : Boolean;
              +-         Protected_Character     : Boolean;
              +-         Horizontal              : Boolean;
              +-         Left                    : Boolean;
              +-         Low                     : Boolean;
              +-         Right                   : Boolean;
              +-         Top                     : Boolean;
              +-         Vertical                : Boolean;
              ++         Stand_Out               : Boolean;
              ++         Under_Line              : Boolean;
              ++         Reverse_Video           : Boolean;
              ++         Blink                   : Boolean;
              ++         Dim_Character           : Boolean;
              ++         Bold_Character          : Boolean;
              ++         Alternate_Character_Set : Boolean;
              ++         Invisible_Character     : Boolean;
              ++         Protected_Character     : Boolean;
              ++         Horizontal              : Boolean;
              ++         Left                    : Boolean;
              ++         Low                     : Boolean;
              ++         Right                   : Boolean;
              ++         Top                     : Boolean;
              ++         Vertical                : Boolean;
              +       end record;
              +-   pragma Convention (C, Character_Attribute_Set);
              ++   pragma Convention (C, Character_Attribute_Set);
              + 
              +-   for Character_Attribute_Set use
              ++   for Character_Attribute_Set use
              +       record
              +          Stand_Out               at 0 range  0 ..  0;
              +          Under_Line              at 0 range  1 ..  1;
              +@@ -348,64 +347,64 @@
              +          Top                     at 0 range 13 .. 13;
              +          Vertical                at 0 range 14 .. 14;
              +       end record;
              +-   for Character_Attribute_Set'Size use 16;
              ++   for Character_Attribute_Set'Size use 16;
              +    --  Please note: this rep. clause is generated and may be
              +    --               different on your system.
              +    --  (n)curses uses all but the lowest 16 Bits for Attributes.
              + 
              +-   Normal_Video : constant Character_Attribute_Set := (others => False);
              ++   Normal_Video : constant Character_Attribute_Set := (others => False);
              + 
              +-   type Attributed_Character is
              ++   type Attributed_Character is
              +       record
              +-         Attr  : Character_Attribute_Set;
              +-         Color : Color_Pair;
              +-         Ch    : Character;
              ++         Attr  : Character_Attribute_Set;
              ++         Color : Color_Pair;
              ++         Ch    : Character;
              +       end record;
              +-   pragma Convention (C, Attributed_Character);
              ++   pragma Convention (C, Attributed_Character);
              +    --  This is the counterpart for the chtype in C.
              + 
              +-   for Attributed_Character use
              ++   for Attributed_Character use
              +       record
              +          Ch    at 0 range  0 ..  7;
              +          Color at 0 range  8 .. 15;
              +          Attr  at 0 range 16 .. 31;
              +       end record;
              +-   for Attributed_Character'Size use 32;
              ++   for Attributed_Character'Size use 32;
              +       --  Please note: this rep. clause is generated and may be
              +       --               different on your system.
              + 
              +-   Default_Character : constant Attributed_Character
              +-     := (Ch    => Character'First,
              +-         Color => Color_Pair'First,
              +-         Attr  => (others => False));  --  preelaboratable Normal_Video
              ++   Default_Character : constant Attributed_Character
              ++     := (Ch    => Character'First,
              ++         Color => Color_Pair'First,
              ++         Attr  => (others => False));  --  preelaboratable Normal_Video
              + 
              +-   type Attributed_String is array (Positive range <>) of Attributed_Character;
              +-   pragma Pack (Attributed_String);
              ++   type Attributed_String is array (Positive range <>) of Attributed_Character;
              ++   pragma Pack (Attributed_String);
              +    --  In this binding we allow strings of attributed characters.
              + 
              +    ------------------
              +    --  Exceptions  --
              +    ------------------
              +-   Curses_Exception     : exception;
              +-   Wrong_Curses_Version : exception;
              ++   Curses_Exception     : exception;
              ++   Wrong_Curses_Version : exception;
              + 
              +    --  Those exceptions are raised by the ETI (Extended Terminal Interface)
              +    --  subpackets for Menu and Forms handling.
              +    --
              +-   Eti_System_Error    : exception;
              +-   Eti_Bad_Argument    : exception;
              +-   Eti_Posted          : exception;
              +-   Eti_Connected       : exception;
              +-   Eti_Bad_State       : exception;
              +-   Eti_No_Room         : exception;
              +-   Eti_Not_Posted      : exception;
              +-   Eti_Unknown_Command : exception;
              +-   Eti_No_Match        : exception;
              +-   Eti_Not_Selectable  : exception;
              +-   Eti_Not_Connected   : exception;
              +-   Eti_Request_Denied  : exception;
              +-   Eti_Invalid_Field   : exception;
              +-   Eti_Current         : exception;
              ++   Eti_System_Error    : exception;
              ++   Eti_Bad_Argument    : exception;
              ++   Eti_Posted          : exception;
              ++   Eti_Connected       : exception;
              ++   Eti_Bad_State       : exception;
              ++   Eti_No_Room         : exception;
              ++   Eti_Not_Posted      : exception;
              ++   Eti_Unknown_Command : exception;
              ++   Eti_No_Match        : exception;
              ++   Eti_Not_Selectable  : exception;
              ++   Eti_Not_Connected   : exception;
              ++   Eti_Request_Denied  : exception;
              ++   Eti_Invalid_Field   : exception;
              ++   Eti_Current         : exception;
              + 
              +    --------------------------------------------------------------------------
              +    --  External C variables
              +@@ -415,28 +414,29 @@
              +    --  this is to use functions.
              +    --------------------------------------------------------------------------
              + 
              +-   function Lines            return Line_Count;
              +-   pragma Inline (Lines);
              ++   function Lines            return Line_Count;
              ++   pragma Inline (Lines);
              + 
              +-   function Columns          return Column_Count;
              +-   pragma Inline (Columns);
              ++   function Columns          return Column_Count;
              ++   pragma Inline (Columns);
              + 
              +-   function Tab_Size         return Natural;
              +-   pragma Inline (Tab_Size);
              ++   function Tab_Size         return Natural;
              ++   pragma Inline (Tab_Size);
              + 
              +-   function Number_Of_Colors return Natural;
              +-   pragma Inline (Number_Of_Colors);
              ++   function Number_Of_Colors return Natural;
              ++   pragma Inline (Number_Of_Colors);
              + 
              +-   function Number_Of_Color_Pairs return Natural;
              +-   pragma Inline (Number_Of_Color_Pairs);
              ++   function Number_Of_Color_Pairs return Natural;
              ++   pragma Inline (Number_Of_Color_Pairs);
              + 
              +-   ACS_Map : array (Character'Val (0) .. Character'Val (127)) of
              +-     Attributed_Character;
              +-   pragma Import (C, ACS_Map, "acs_map");
              ++   type C_ACS_Map is array (Character'Val (0) .. Character'Val (127))
              ++        of Attributed_Character;
              ++   ACS_Map : C_ACS_Map;
              ++   pragma Import (C, ACS_Map, "acs_map");
              +    --
              +    --
              +    --  Constants for several characters from the Alternate Character Set
              +-   --  You must use this constants as indices into the ACS_Map array
              ++   --  You must use these constants as indices into the ACS_Map array
              +    --  to get the corresponding attributed character at runtime.
              +    --
              +    ACS_Upper_Left_Corner    : constant Character := 'l';
              +@@ -470,93 +470,98 @@
              +    ACS_Greater_Or_Equal     : constant Character := 'z';
              +    ACS_PI                   : constant Character := '{';
              +    ACS_Not_Equal            : constant Character := '|';
              +-   ACS_Sterling             : constant Character := '}';
              ++   ACS_Sterling             : constant Character := '}';
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_initscr.3x
              +    --  |=====================================================================
              +-   --  | Not implemented: newterm, set_term, delscreen, curscr
              ++   --  | Not implemented: newterm, set_term, delscreen
              + 
              +    --  #1A NAME="AFU_1"#2|
              +-   function Standard_Window return Window;
              ++   function Standard_Window return Window;
              +    --  AKA: stdscr
              +-   pragma Inline (Standard_Window);
              ++   pragma Inline (Standard_Window);
              + 
              +    --  #1A NAME="AFU_2"#2|
              +-   procedure Init_Screen;
              ++   function Current_Window return Window;
              ++   --  AKA: curscr
              ++   pragma Inline (Current_Window);
              + 
              +    --  #1A NAME="AFU_3"#2|
              +-   procedure Init_Windows renames Init_Screen;
              ++   procedure Init_Screen;
              ++
              ++   --  #1A NAME="AFU_4"#2|
              ++   procedure Init_Windows renames Init_Screen;
              +    --  AKA: initscr()
              +-   pragma Inline (Init_Screen);
              ++   pragma Inline (Init_Screen);
              +    --  pragma Inline (Init_Windows);
              + 
              +-   --  #1A NAME="AFU_4"#2|
              +-   procedure End_Windows;
              ++   --  #1A NAME="AFU_5"#2|
              ++   procedure End_Windows;
              +    --  AKA: endwin()
              +-   procedure End_Screen renames End_Windows;
              +-   pragma Inline (End_Windows);
              ++   procedure End_Screen renames End_Windows;
              ++   pragma Inline (End_Windows);
              +    --  pragma Inline (End_Screen);
              + 
              +-   --  #1A NAME="AFU_5"#2|
              +-   function Is_End_Window return Boolean;
              ++   --  #1A NAME="AFU_6"#2|
              ++   function Is_End_Window return Boolean;
              +    --  AKA: isendwin()
              +-   pragma Inline (Is_End_Window);
              ++   pragma Inline (Is_End_Window);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_move.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_6"#2|
              +-   procedure Move_Cursor (Win    : in Window := Standard_Window;
              +-                          Line   : in Line_Position;
              +-                          Column : in Column_Position);
              ++   --  #1A NAME="AFU_7"#2|
              ++   procedure Move_Cursor (Win    : in Window := Standard_Window;
              ++                          Line   : in Line_Position;
              ++                          Column : in Column_Position);
              +    --  AKA: wmove()
              +    --  AKA: move()
              +-   pragma Inline (Move_Cursor);
              ++   pragma Inline (Move_Cursor);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_addch.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_7"#2|
              +-   procedure Add (Win :  in Window := Standard_Window;
              +-                  Ch  :  in Attributed_Character);
              ++   --  #1A NAME="AFU_8"#2|
              ++   procedure Add (Win :  in Window := Standard_Window;
              ++                  Ch  :  in Attributed_Character);
              +    --  AKA: waddch()
              +    --  AKA: addch()
              + 
              +-   procedure Add (Win :  in Window := Standard_Window;
              +-                  Ch  :  in Character);
              ++   procedure Add (Win :  in Window := Standard_Window;
              ++                  Ch  :  in Character);
              +    --  Add a single character at the current logical cursor position to
              +    --  the window. Use the current windows attributes.
              + 
              +-   --  #1A NAME="AFU_8"#2|
              +-   procedure Add
              +-     (Win    : in Window := Standard_Window;
              +-      Line   : in Line_Position;
              +-      Column : in Column_Position;
              +-      Ch     : in Attributed_Character);
              ++   --  #1A NAME="AFU_9"#2|
              ++   procedure Add
              ++     (Win    : in Window := Standard_Window;
              ++      Line   : in Line_Position;
              ++      Column : in Column_Position;
              ++      Ch     : in Attributed_Character);
              +    --  AKA: mvwaddch()
              +    --  AKA: mvaddch()
              + 
              +-   procedure Add
              +-     (Win    : in Window := Standard_Window;
              +-      Line   : in Line_Position;
              +-      Column : in Column_Position;
              +-      Ch     : in Character);
              ++   procedure Add
              ++     (Win    : in Window := Standard_Window;
              ++      Line   : in Line_Position;
              ++      Column : in Column_Position;
              ++      Ch     : in Character);
              +    --  Move to the position and add a single character into the window
              +    --  There are more Add routines, so the Inline pragma follows later
              + 
              +-   --  #1A NAME="AFU_9"#2|
              +-   procedure Add_With_Immediate_Echo
              +-     (Win : in Window := Standard_Window;
              +-      Ch  : in Attributed_Character);
              ++   --  #1A NAME="AFU_10"#2|
              ++   procedure Add_With_Immediate_Echo
              ++     (Win : in Window := Standard_Window;
              ++      Ch  : in Attributed_Character);
              +    --  AKA: wechochar()
              +    --  AKA: echochar()
              + 
              +-   procedure Add_With_Immediate_Echo
              +-     (Win : in Window := Standard_Window;
              +-      Ch  : in Character);
              ++   procedure Add_With_Immediate_Echo
              ++     (Win : in Window := Standard_Window;
              ++      Ch  : in Character);
              +    --  Add a character and do an immediate refresh of the screen.
              +    pragma Inline (Add_With_Immediate_Echo);
              + 
              +@@ -565,105 +570,105 @@
              +    --  |=====================================================================
              +    --  Not Implemented: wcursyncup
              + 
              +-   --  #1A NAME="AFU_10"#2|
              +-   function Create
              +-     (Number_Of_Lines       : Line_Count;
              +-      Number_Of_Columns     : Column_Count;
              +-      First_Line_Position   : Line_Position;
              +-      First_Column_Position : Column_Position) return Window;
              ++   --  #1A NAME="AFU_11"#2|
              ++   function Create
              ++     (Number_Of_Lines       : Line_Count;
              ++      Number_Of_Columns     : Column_Count;
              ++      First_Line_Position   : Line_Position;
              ++      First_Column_Position : Column_Position) return Window;
              +    --  Not Implemented: Default Number_Of_Lines, Number_Of_Columns
              +    --  the C version lets them be 0, see the man page.
              +    --  AKA: newwin()
              +-   pragma Inline (Create);
              ++   pragma Inline (Create);
              + 
              +    function New_Window
              +-     (Number_Of_Lines       : Line_Count;
              +-      Number_Of_Columns     : Column_Count;
              +-      First_Line_Position   : Line_Position;
              +-      First_Column_Position : Column_Position) return Window
              +-     renames Create;
              ++     (Number_Of_Lines       : Line_Count;
              ++      Number_Of_Columns     : Column_Count;
              ++      First_Line_Position   : Line_Position;
              ++      First_Column_Position : Column_Position) return Window
              ++     renames Create;
              +    --  pragma Inline (New_Window);
              + 
              +-   --  #1A NAME="AFU_11"#2|
              +-   procedure Delete (Win : in out Window);
              ++   --  #1A NAME="AFU_12"#2|
              ++   procedure Delete (Win : in out Window);
              +    --  AKA: delwin()
              +    --  Reset Win to Null_Window
              +-   pragma Inline (Delete);
              ++   pragma Inline (Delete);
              + 
              +-   --  #1A NAME="AFU_12"#2|
              +-   function Sub_Window
              +-     (Win                   : Window := Standard_Window;
              +-      Number_Of_Lines       : Line_Count;
              +-      Number_Of_Columns     : Column_Count;
              +-      First_Line_Position   : Line_Position;
              +-      First_Column_Position : Column_Position) return Window;
              ++   --  #1A NAME="AFU_13"#2|
              ++   function Sub_Window
              ++     (Win                   : Window := Standard_Window;
              ++      Number_Of_Lines       : Line_Count;
              ++      Number_Of_Columns     : Column_Count;
              ++      First_Line_Position   : Line_Position;
              ++      First_Column_Position : Column_Position) return Window;
              +    --  AKA: subwin()
              +-   pragma Inline (Sub_Window);
              ++   pragma Inline (Sub_Window);
              + 
              +-   --  #1A NAME="AFU_13"#2|
              +-   function Derived_Window
              +-     (Win                   : Window := Standard_Window;
              +-      Number_Of_Lines       : Line_Count;
              +-      Number_Of_Columns     : Column_Count;
              +-      First_Line_Position   : Line_Position;
              +-      First_Column_Position : Column_Position) return Window;
              ++   --  #1A NAME="AFU_14"#2|
              ++   function Derived_Window
              ++     (Win                   : Window := Standard_Window;
              ++      Number_Of_Lines       : Line_Count;
              ++      Number_Of_Columns     : Column_Count;
              ++      First_Line_Position   : Line_Position;
              ++      First_Column_Position : Column_Position) return Window;
              +    --  AKA: derwin()
              +-   pragma Inline (Derived_Window);
              ++   pragma Inline (Derived_Window);
              + 
              +-   --  #1A NAME="AFU_14"#2|
              +-   function Duplicate (Win : Window) return Window;
              ++   --  #1A NAME="AFU_15"#2|
              ++   function Duplicate (Win : Window) return Window;
              +    --  AKA: dupwin()
              +-   pragma Inline (Duplicate);
              ++   pragma Inline (Duplicate);
              + 
              +-   --  #1A NAME="AFU_15"#2|
              +-   procedure Move_Window (Win    : in Window;
              +-                          Line   : in Line_Position;
              +-                          Column : in Column_Position);
              ++   --  #1A NAME="AFU_16"#2|
              ++   procedure Move_Window (Win    : in Window;
              ++                          Line   : in Line_Position;
              ++                          Column : in Column_Position);
              +    --  AKA: mvwin()
              +-   pragma Inline (Move_Window);
              ++   pragma Inline (Move_Window);
              + 
              +-   --  #1A NAME="AFU_16"#2|
              +-   procedure Move_Derived_Window (Win    : in Window;
              +-                                  Line   : in Line_Position;
              +-                                  Column : in Column_Position);
              ++   --  #1A NAME="AFU_17"#2|
              ++   procedure Move_Derived_Window (Win    : in Window;
              ++                                  Line   : in Line_Position;
              ++                                  Column : in Column_Position);
              +    --  AKA: mvderwin()
              +-   pragma Inline (Move_Derived_Window);
              ++   pragma Inline (Move_Derived_Window);
              + 
              +-   --  #1A NAME="AFU_17"#2|
              +-   procedure Synchronize_Upwards (Win : in Window);
              ++   --  #1A NAME="AFU_18"#2|
              ++   procedure Synchronize_Upwards (Win : in Window);
              +    --  AKA: wsyncup()
              +    pragma Import (C, Synchronize_Upwards, "wsyncup");
              + 
              +-   --  #1A NAME="AFU_18"#2|
              +-   procedure Synchronize_Downwards (Win : in Window);
              ++   --  #1A NAME="AFU_19"#2|
              ++   procedure Synchronize_Downwards (Win : in Window);
              +    --  AKA: wsyncdown()
              +    pragma Import (C, Synchronize_Downwards, "wsyncdown");
              + 
              +-   --  #1A NAME="AFU_19"#2|
              +-   procedure Set_Synch_Mode (Win  : in Window := Standard_Window;
              +-                             Mode : in Boolean := False);
              ++   --  #1A NAME="AFU_20"#2|
              ++   procedure Set_Synch_Mode (Win  : in Window := Standard_Window;
              ++                             Mode : in Boolean := False);
              +    --  AKA: syncok()
              +-   pragma Inline (Set_Synch_Mode);
              ++   pragma Inline (Set_Synch_Mode);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_addstr.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_20"#2|
              +-   procedure Add (Win : in Window := Standard_Window;
              +-                  Str : in String;
              +-                  Len : in Integer := -1);
              ++   --  #1A NAME="AFU_21"#2|
              ++   procedure Add (Win : in Window := Standard_Window;
              ++                  Str : in String;
              ++                  Len : in Integer := -1);
              +    --  AKA: waddnstr()
              +    --  AKA: waddstr()
              +    --  AKA: addnstr()
              +    --  AKA: addstr()
              + 
              +-   --  #1A NAME="AFU_21"#2|
              +-   procedure Add (Win    : in Window := Standard_Window;
              +-                  Line   : in Line_Position;
              +-                  Column : in Column_Position;
              +-                  Str    : in String;
              +-                  Len    : in Integer := -1);
              ++   --  #1A NAME="AFU_22"#2|
              ++   procedure Add (Win    : in Window := Standard_Window;
              ++                  Line   : in Line_Position;
              ++                  Column : in Column_Position;
              ++                  Str    : in String;
              ++                  Len    : in Integer := -1);
              +    --  AKA: mvwaddnstr()
              +    --  AKA: mvwaddstr()
              +    --  AKA: mvaddnstr()
              +@@ -673,21 +678,21 @@
              +    --  | Man page curs_addchstr.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_22"#2|
              +-   procedure Add (Win : in Window := Standard_Window;
              +-                  Str : in Attributed_String;
              +-                  Len : in Integer := -1);
              ++   --  #1A NAME="AFU_23"#2|
              ++   procedure Add (Win : in Window := Standard_Window;
              ++                  Str : in Attributed_String;
              ++                  Len : in Integer := -1);
              +    --  AKA: waddchnstr()
              +    --  AKA: waddchstr()
              +    --  AKA: addchnstr()
              +    --  AKA: addchstr()
              + 
              +-   --  #1A NAME="AFU_23"#2|
              +-   procedure Add (Win    : in Window := Standard_Window;
              +-                  Line   : in Line_Position;
              +-                  Column : in Column_Position;
              +-                  Str    : in Attributed_String;
              +-                  Len    : in Integer := -1);
              ++   --  #1A NAME="AFU_24"#2|
              ++   procedure Add (Win    : in Window := Standard_Window;
              ++                  Line   : in Line_Position;
              ++                  Column : in Column_Position;
              ++                  Str    : in Attributed_String;
              ++                  Len    : in Integer := -1);
              +    --  AKA: mvwaddchnstr()
              +    --  AKA: mvwaddchstr()
              +    --  AKA: mvaddchnstr()
              +@@ -700,92 +705,92 @@
              +    --  | Not implemented: mvhline,  mvwhline, mvvline, mvwvline
              +    --  | use Move_Cursor then Horizontal_Line or Vertical_Line
              + 
              +-   --  #1A NAME="AFU_24"#2|
              +-   procedure Border
              +-     (Win                       : in Window := Standard_Window;
              +-      Left_Side_Symbol          : in Attributed_Character := Default_Character;
              +-      Right_Side_Symbol         : in Attributed_Character := Default_Character;
              +-      Top_Side_Symbol           : in Attributed_Character := Default_Character;
              +-      Bottom_Side_Symbol        : in Attributed_Character := Default_Character;
              +-      Upper_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
              +-      Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
              +-      Lower_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
              +-      Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character
              ++   --  #1A NAME="AFU_25"#2|
              ++   procedure Border
              ++     (Win                       : in Window := Standard_Window;
              ++      Left_Side_Symbol          : in Attributed_Character := Default_Character;
              ++      Right_Side_Symbol         : in Attributed_Character := Default_Character;
              ++      Top_Side_Symbol           : in Attributed_Character := Default_Character;
              ++      Bottom_Side_Symbol        : in Attributed_Character := Default_Character;
              ++      Upper_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
              ++      Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
              ++      Lower_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
              ++      Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character
              +      );
              +    --  AKA: wborder()
              +    --  AKA: border()
              +-   pragma Inline (Border);
              ++   pragma Inline (Border);
              + 
              +-   --  #1A NAME="AFU_25"#2|
              +-   procedure Box
              +-     (Win               : in Window := Standard_Window;
              +-      Vertical_Symbol   : in Attributed_Character := Default_Character;
              +-      Horizontal_Symbol : in Attributed_Character := Default_Character);
              ++   --  #1A NAME="AFU_26"#2|
              ++   procedure Box
              ++     (Win               : in Window := Standard_Window;
              ++      Vertical_Symbol   : in Attributed_Character := Default_Character;
              ++      Horizontal_Symbol : in Attributed_Character := Default_Character);
              +    --  AKA: box()
              +-   pragma Inline (Box);
              ++   pragma Inline (Box);
              + 
              +-   --  #1A NAME="AFU_26"#2|
              +-   procedure Horizontal_Line
              +-     (Win         : in Window := Standard_Window;
              +-      Line_Size   : in Natural;
              +-      Line_Symbol : in Attributed_Character := Default_Character);
              ++   --  #1A NAME="AFU_27"#2|
              ++   procedure Horizontal_Line
              ++     (Win         : in Window := Standard_Window;
              ++      Line_Size   : in Natural;
              ++      Line_Symbol : in Attributed_Character := Default_Character);
              +    --  AKA: whline()
              +    --  AKA: hline()
              +-   pragma Inline (Horizontal_Line);
              ++   pragma Inline (Horizontal_Line);
              + 
              +-   --  #1A NAME="AFU_27"#2|
              +-   procedure Vertical_Line
              +-     (Win         : in Window := Standard_Window;
              +-      Line_Size   : in Natural;
              +-      Line_Symbol : in Attributed_Character := Default_Character);
              ++   --  #1A NAME="AFU_28"#2|
              ++   procedure Vertical_Line
              ++     (Win         : in Window := Standard_Window;
              ++      Line_Size   : in Natural;
              ++      Line_Symbol : in Attributed_Character := Default_Character);
              +    --  AKA: wvline()
              +    --  AKA: vline()
              +-   pragma Inline (Vertical_Line);
              ++   pragma Inline (Vertical_Line);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_getch.3x
              +    --  |=====================================================================
              +    --  Not implemented: mvgetch, mvwgetch
              + 
              +-   --  #1A NAME="AFU_28"#2|
              +-   function Get_Keystroke (Win : Window := Standard_Window)
              +-                           return Real_Key_Code;
              ++   --  #1A NAME="AFU_29"#2|
              ++   function Get_Keystroke (Win : Window := Standard_Window)
              ++                           return Real_Key_Code;
              +    --  AKA: wgetch()
              +    --  AKA: getch()
              +    --  Get a character from the keyboard and echo it - if enabled - to the
              +    --  window.
              +    --  If for any reason (i.e. a timeout) we couldn't get a character the
              +    --  returned keycode is Key_None.
              +-   pragma Inline (Get_Keystroke);
              ++   pragma Inline (Get_Keystroke);
              + 
              +-   --  #1A NAME="AFU_29"#2|
              +-   procedure Undo_Keystroke (Key : in Real_Key_Code);
              ++   --  #1A NAME="AFU_30"#2|
              ++   procedure Undo_Keystroke (Key : in Real_Key_Code);
              +    --  AKA: ungetch()
              +-   pragma Inline (Undo_Keystroke);
              ++   pragma Inline (Undo_Keystroke);
              + 
              +-   --  #1A NAME="AFU_30"#2|
              +-   function Has_Key (Key : Special_Key_Code) return Boolean;
              ++   --  #1A NAME="AFU_31"#2|
              ++   function Has_Key (Key : Special_Key_Code) return Boolean;
              +    --  AKA: has_key()
              +-   pragma Inline (Has_Key);
              ++   pragma Inline (Has_Key);
              + 
              +    --  |
              +    --  | Some helper functions
              +    --  |
              +-   function Is_Function_Key (Key : Special_Key_Code) return Boolean;
              ++   function Is_Function_Key (Key : Special_Key_Code) return Boolean;
              +    --  Return True if the Key is a function key (i.e. one of F0 .. F63)
              +-   pragma Inline (Is_Function_Key);
              ++   pragma Inline (Is_Function_Key);
              + 
              +-   subtype Function_Key_Number is Integer range 0 .. 63;
              ++   subtype Function_Key_Number is Integer range 0 .. 63;
              +    --  (n)curses allows for 64 function keys.
              + 
              +-   function Function_Key (Key : Real_Key_Code) return Function_Key_Number;
              ++   function Function_Key (Key : Real_Key_Code) return Function_Key_Number;
              +    --  Return the number of the function key. If the code is not a
              +    --  function key, a CONSTRAINT_ERROR will be raised.
              +-   pragma Inline (Function_Key);
              ++   pragma Inline (Function_Key);
              + 
              +-   function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code;
              ++   function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code;
              +    --  Return the key code for a given function-key number.
              +-   pragma Inline (Function_Key_Code);
              ++   pragma Inline (Function_Key_Code);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_attr.3x
              +@@ -796,68 +801,68 @@
              +    --  PAIR_NUMBER
              +    --  PAIR_NUMBER(c) is the same as c.Color
              + 
              +-   --  #1A NAME="AFU_31"#2|
              +-   procedure Standout (Win : Window  := Standard_Window;
              +-                       On  : Boolean := True);
              ++   --  #1A NAME="AFU_32"#2|
              ++   procedure Standout (Win : Window  := Standard_Window;
              ++                       On  : Boolean := True);
              +    --  AKA: wstandout()
              +    --  AKA: wstandend()
              + 
              +-   --  #1A NAME="AFU_32"#2|
              +-   procedure Switch_Character_Attribute
              +-     (Win  : in Window := Standard_Window;
              +-      Attr : in Character_Attribute_Set := Normal_Video;
              +-      On   : in Boolean := True); --  if False we switch Off.
              ++   --  #1A NAME="AFU_33"#2|
              ++   procedure Switch_Character_Attribute
              ++     (Win  : in Window := Standard_Window;
              ++      Attr : in Character_Attribute_Set := Normal_Video;
              ++      On   : in Boolean := True); --  if False we switch Off.
              +    --  Switches those Attributes set to true in the list.
              +    --  AKA: wattron()
              +    --  AKA: wattroff()
              +    --  AKA: attron()
              +    --  AKA: attroff()
              + 
              +-   --  #1A NAME="AFU_33"#2|
              +-   procedure Set_Character_Attributes
              +-     (Win   : in Window := Standard_Window;
              +-      Attr  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              ++   --  #1A NAME="AFU_34"#2|
              ++   procedure Set_Character_Attributes
              ++     (Win   : in Window := Standard_Window;
              ++      Attr  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              +    --  AKA: wattrset()
              +    --  AKA: attrset()
              +-   pragma Inline (Set_Character_Attributes);
              ++   pragma Inline (Set_Character_Attributes);
              + 
              +-   --  #1A NAME="AFU_34"#2|
              +-   function Get_Character_Attribute
              +-     (Win : in Window := Standard_Window) return Character_Attribute_Set;
              ++   --  #1A NAME="AFU_35"#2|
              ++   function Get_Character_Attribute
              ++     (Win : in Window := Standard_Window) return Character_Attribute_Set;
              +    --  AKA: wattr_get()
              +    --  AKA: attr_get()
              + 
              +-   --  #1A NAME="AFU_35"#2|
              +-   function Get_Character_Attribute
              +-     (Win : in Window := Standard_Window) return Color_Pair;
              ++   --  #1A NAME="AFU_36"#2|
              ++   function Get_Character_Attribute
              ++     (Win : in Window := Standard_Window) return Color_Pair;
              +    --  AKA: wattr_get()
              +    pragma Inline (Get_Character_Attribute);
              + 
              +-   --  #1A NAME="AFU_36"#2|
              +-   procedure Set_Color (Win  : in Window := Standard_Window;
              +-                        Pair : in Color_Pair);
              ++   --  #1A NAME="AFU_37"#2|
              ++   procedure Set_Color (Win  : in Window := Standard_Window;
              ++                        Pair : in Color_Pair);
              +    --  AKA: wcolor_set()
              +    --  AKA: color_set()
              +-   pragma Inline (Set_Color);
              ++   pragma Inline (Set_Color);
              + 
              +-   --  #1A NAME="AFU_37"#2|
              +-   procedure Change_Attributes
              +-     (Win   : in Window := Standard_Window;
              +-      Count : in Integer := -1;
              +-      Attr  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              ++   --  #1A NAME="AFU_38"#2|
              ++   procedure Change_Attributes
              ++     (Win   : in Window := Standard_Window;
              ++      Count : in Integer := -1;
              ++      Attr  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              +    --  AKA: wchgat()
              +    --  AKA: chgat()
              + 
              +-   --  #1A NAME="AFU_38"#2|
              +-   procedure Change_Attributes
              +-     (Win    : in Window := Standard_Window;
              +-      Line   : in Line_Position := Line_Position'First;
              +-      Column : in Column_Position := Column_Position'First;
              +-      Count  : in Integer := -1;
              +-      Attr   : in Character_Attribute_Set := Normal_Video;
              +-      Color  : in Color_Pair := Color_Pair'First);
              ++   --  #1A NAME="AFU_39"#2|
              ++   procedure Change_Attributes
              ++     (Win    : in Window := Standard_Window;
              ++      Line   : in Line_Position := Line_Position'First;
              ++      Column : in Column_Position := Column_Position'First;
              ++      Count  : in Integer := -1;
              ++      Attr   : in Character_Attribute_Set := Normal_Video;
              ++      Color  : in Color_Pair := Color_Pair'First);
              +    --  AKA: mvwchgat()
              +    --  AKA: mvchgat()
              +    pragma Inline (Change_Attributes);
              +@@ -866,15 +871,15 @@
              +    --  | Man page curs_beep.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_39"#2|
              +-   procedure Beep;
              ++   --  #1A NAME="AFU_40"#2|
              ++   procedure Beep;
              +    --  AKA: beep()
              +-   pragma Inline (Beep);
              ++   pragma Inline (Beep);
              + 
              +-   --  #1A NAME="AFU_40"#2|
              +-   procedure Flash_Screen;
              ++   --  #1A NAME="AFU_41"#2|
              ++   procedure Flash_Screen;
              +    --  AKA: flash()
              +-   pragma Inline (Flash_Screen);
              ++   pragma Inline (Flash_Screen);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_inopts.3x
              +@@ -882,76 +887,76 @@
              + 
              +    --  | Not implemented : typeahead
              +    --
              +-   --  #1A NAME="AFU_41"#2|
              +-   procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
              ++   --  #1A NAME="AFU_42"#2|
              ++   procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
              +    --  AKA: cbreak()
              +    --  AKA: nocbreak()
              +-   pragma Inline (Set_Cbreak_Mode);
              ++   pragma Inline (Set_Cbreak_Mode);
              + 
              +-   --  #1A NAME="AFU_42"#2|
              +-   procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
              ++   --  #1A NAME="AFU_43"#2|
              ++   procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
              +    --  AKA: raw()
              +    --  AKA: noraw()
              +-   pragma Inline (Set_Raw_Mode);
              ++   pragma Inline (Set_Raw_Mode);
              + 
              +-   --  #1A NAME="AFU_43"#2|
              +-   procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
              ++   --  #1A NAME="AFU_44"#2|
              ++   procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
              +    --  AKA: echo()
              +    --  AKA: noecho()
              +-   pragma Inline (Set_Echo_Mode);
              ++   pragma Inline (Set_Echo_Mode);
              + 
              +-   --  #1A NAME="AFU_44"#2|
              +-   procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
              +-                            SwitchOn : in Boolean := True);
              ++   --  #1A NAME="AFU_45"#2|
              ++   procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
              ++                            SwitchOn : in Boolean := True);
              +    --  AKA: meta()
              +-   pragma Inline (Set_Meta_Mode);
              ++   pragma Inline (Set_Meta_Mode);
              + 
              +-   --  #1A NAME="AFU_45"#2|
              +-   procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
              +-                              SwitchOn : in Boolean := True);
              ++   --  #1A NAME="AFU_46"#2|
              ++   procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
              ++                              SwitchOn : in Boolean := True);
              +    --  AKA: keypad()
              +-   pragma Inline (Set_KeyPad_Mode);
              ++   pragma Inline (Set_KeyPad_Mode);
              + 
              +-   function Get_KeyPad_Mode (Win : in Window := Standard_Window)
              ++   function Get_KeyPad_Mode (Win : in Window := Standard_Window)
              +                              return Boolean;
              +    --  This has no pendant in C. There you've to look into the WINDOWS
              +    --  structure to get the value. Bad practice, not repeated in Ada.
              + 
              +-   type Half_Delay_Amount is range 1 .. 255;
              ++   type Half_Delay_Amount is range 1 .. 255;
              + 
              +-   --  #1A NAME="AFU_46"#2|
              +-   procedure Half_Delay (Amount : in Half_Delay_Amount);
              ++   --  #1A NAME="AFU_47"#2|
              ++   procedure Half_Delay (Amount : in Half_Delay_Amount);
              +    --  AKA: halfdelay()
              +-   pragma Inline (Half_Delay);
              ++   pragma Inline (Half_Delay);
              + 
              +-   --  #1A NAME="AFU_47"#2|
              +-   procedure Set_Flush_On_Interrupt_Mode
              +-     (Win  : in Window := Standard_Window;
              +-      Mode : in Boolean := True);
              ++   --  #1A NAME="AFU_48"#2|
              ++   procedure Set_Flush_On_Interrupt_Mode
              ++     (Win  : in Window := Standard_Window;
              ++      Mode : in Boolean := True);
              +    --  AKA: intrflush()
              +-   pragma Inline (Set_Flush_On_Interrupt_Mode);
              ++   pragma Inline (Set_Flush_On_Interrupt_Mode);
              + 
              +-   --  #1A NAME="AFU_48"#2|
              +-   procedure Set_Queue_Interrupt_Mode
              +-     (Win   : in Window := Standard_Window;
              +-      Flush : in Boolean := True);
              ++   --  #1A NAME="AFU_49"#2|
              ++   procedure Set_Queue_Interrupt_Mode
              ++     (Win   : in Window := Standard_Window;
              ++      Flush : in Boolean := True);
              +    --  AKA: qiflush()
              +    --  AKA: noqiflush()
              +-   pragma Inline (Set_Queue_Interrupt_Mode);
              ++   pragma Inline (Set_Queue_Interrupt_Mode);
              + 
              +-   --  #1A NAME="AFU_49"#2|
              +-   procedure Set_NoDelay_Mode
              +-     (Win  : in Window := Standard_Window;
              +-      Mode : in Boolean := False);
              ++   --  #1A NAME="AFU_50"#2|
              ++   procedure Set_NoDelay_Mode
              ++     (Win  : in Window := Standard_Window;
              ++      Mode : in Boolean := False);
              +    --  AKA: nodelay()
              +-   pragma Inline (Set_NoDelay_Mode);
              ++   pragma Inline (Set_NoDelay_Mode);
              + 
              +-   type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
              ++   type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
              + 
              +-   --  #1A NAME="AFU_50"#2|
              +-   procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
              +-                               Mode   : in Timeout_Mode;
              +-                               Amount : in Natural); --  in Milliseconds
              ++   --  #1A NAME="AFU_51"#2|
              ++   procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
              ++                               Mode   : in Timeout_Mode;
              ++                               Amount : in Natural); --  in Milliseconds
              +    --  AKA: wtimeout()
              +    --  AKA: timeout()
              +    --  Instead of overloading the semantic of the sign of amount, we
              +@@ -960,109 +965,109 @@
              +    --  evaluated.
              +    --  We don't inline this procedure.
              + 
              +-   --  #1A NAME="AFU_51"#2|
              +-   procedure Set_Escape_Timer_Mode
              +-     (Win       : in Window := Standard_Window;
              +-      Timer_Off : in Boolean := False);
              ++   --  #1A NAME="AFU_52"#2|
              ++   procedure Set_Escape_Timer_Mode
              ++     (Win       : in Window := Standard_Window;
              ++      Timer_Off : in Boolean := False);
              +    --  AKA: notimeout()
              +-   pragma Inline (Set_Escape_Timer_Mode);
              ++   pragma Inline (Set_Escape_Timer_Mode);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_outopts.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_52"#2|
              +-   procedure Set_NL_Mode (SwitchOn : in Boolean := True);
              ++   --  #1A NAME="AFU_53"#2|
              ++   procedure Set_NL_Mode (SwitchOn : in Boolean := True);
              +    --  AKA: nl()
              +    --  AKA: nonl()
              +-   pragma Inline (Set_NL_Mode);
              ++   pragma Inline (Set_NL_Mode);
              + 
              +-   --  #1A NAME="AFU_53"#2|
              +-   procedure Clear_On_Next_Update
              +-     (Win      : in Window := Standard_Window;
              +-      Do_Clear : in Boolean := True);
              ++   --  #1A NAME="AFU_54"#2|
              ++   procedure Clear_On_Next_Update
              ++     (Win      : in Window := Standard_Window;
              ++      Do_Clear : in Boolean := True);
              +    --  AKA: clearok()
              +-   pragma Inline (Clear_On_Next_Update);
              ++   pragma Inline (Clear_On_Next_Update);
              + 
              +-   --  #1A NAME="AFU_54"#2|
              +-   procedure Use_Insert_Delete_Line
              +-     (Win    : in Window := Standard_Window;
              +-      Do_Idl : in Boolean := True);
              ++   --  #1A NAME="AFU_55"#2|
              ++   procedure Use_Insert_Delete_Line
              ++     (Win    : in Window := Standard_Window;
              ++      Do_Idl : in Boolean := True);
              +    --  AKA: idlok()
              +-   pragma Inline (Use_Insert_Delete_Line);
              ++   pragma Inline (Use_Insert_Delete_Line);
              + 
              +-   --  #1A NAME="AFU_55"#2|
              +-   procedure Use_Insert_Delete_Character
              +-     (Win    : in Window := Standard_Window;
              +-      Do_Idc : in Boolean := True);
              ++   --  #1A NAME="AFU_56"#2|
              ++   procedure Use_Insert_Delete_Character
              ++     (Win    : in Window := Standard_Window;
              ++      Do_Idc : in Boolean := True);
              +    --  AKA: idcok()
              +-   pragma Inline (Use_Insert_Delete_Character);
              ++   pragma Inline (Use_Insert_Delete_Character);
              + 
              +-   --  #1A NAME="AFU_56"#2|
              +-   procedure Leave_Cursor_After_Update
              +-     (Win      : in Window := Standard_Window;
              +-      Do_Leave : in Boolean := True);
              ++   --  #1A NAME="AFU_57"#2|
              ++   procedure Leave_Cursor_After_Update
              ++     (Win      : in Window := Standard_Window;
              ++      Do_Leave : in Boolean := True);
              +    --  AKA: leaveok()
              +-   pragma Inline (Leave_Cursor_After_Update);
              ++   pragma Inline (Leave_Cursor_After_Update);
              + 
              +-   --  #1A NAME="AFU_57"#2|
              +-   procedure Immediate_Update_Mode
              +-     (Win  : in Window := Standard_Window;
              +-      Mode : in Boolean := False);
              ++   --  #1A NAME="AFU_58"#2|
              ++   procedure Immediate_Update_Mode
              ++     (Win  : in Window := Standard_Window;
              ++      Mode : in Boolean := False);
              +    --  AKA: immedok()
              +-   pragma Inline (Immediate_Update_Mode);
              ++   pragma Inline (Immediate_Update_Mode);
              + 
              +-   --  #1A NAME="AFU_58"#2|
              +-   procedure Allow_Scrolling
              +-     (Win  : in Window := Standard_Window;
              +-      Mode : in Boolean := False);
              ++   --  #1A NAME="AFU_59"#2|
              ++   procedure Allow_Scrolling
              ++     (Win  : in Window := Standard_Window;
              ++      Mode : in Boolean := False);
              +    --  AKA: scrollok()
              +-   pragma Inline (Allow_Scrolling);
              ++   pragma Inline (Allow_Scrolling);
              + 
              +-   function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
              ++   function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
              +    --  There is no such function in the C interface.
              +-   pragma Inline (Scrolling_Allowed);
              ++   pragma Inline (Scrolling_Allowed);
              + 
              +-   --  #1A NAME="AFU_59"#2|
              +-   procedure Set_Scroll_Region
              +-     (Win         : in Window := Standard_Window;
              +-      Top_Line    : in Line_Position;
              +-      Bottom_Line : in Line_Position);
              ++   --  #1A NAME="AFU_60"#2|
              ++   procedure Set_Scroll_Region
              ++     (Win         : in Window := Standard_Window;
              ++      Top_Line    : in Line_Position;
              ++      Bottom_Line : in Line_Position);
              +    --  AKA: wsetscrreg()
              +    --  AKA: setscrreg()
              +-   pragma Inline (Set_Scroll_Region);
              ++   pragma Inline (Set_Scroll_Region);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_refresh.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_60"#2|
              +-   procedure Update_Screen;
              ++   --  #1A NAME="AFU_61"#2|
              ++   procedure Update_Screen;
              +    --  AKA: doupdate()
              +-   pragma Inline (Update_Screen);
              ++   pragma Inline (Update_Screen);
              + 
              +-   --  #1A NAME="AFU_61"#2|
              +-   procedure Refresh (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_62"#2|
              ++   procedure Refresh (Win : in Window := Standard_Window);
              +    --  AKA: wrefresh()
              +    --  There is an overloaded Refresh for Pads.
              +    --  The Inline pragma appears there
              +    --  AKA: refresh()
              + 
              +-   --  #1A NAME="AFU_62"#2|
              +-   procedure Refresh_Without_Update
              +-     (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_63"#2|
              ++   procedure Refresh_Without_Update
              ++     (Win : in Window := Standard_Window);
              +    --  AKA: wnoutrefresh()
              +    --  There is an overloaded Refresh_Without_Update for Pads.
              +    --  The Inline pragma appears there
              + 
              +-   --  #1A NAME="AFU_63"#2|
              +-   procedure Redraw (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_64"#2|
              ++   procedure Redraw (Win : in Window := Standard_Window);
              +    --  AKA: redrawwin()
              + 
              +-   --  #1A NAME="AFU_64"#2|
              +-   procedure Redraw (Win        : in Window := Standard_Window;
              +-                     Begin_Line : in Line_Position;
              +-                     Line_Count : in Positive);
              ++   --  #1A NAME="AFU_65"#2|
              ++   procedure Redraw (Win        : in Window := Standard_Window;
              ++                     Begin_Line : in Line_Position;
              ++                     Line_Count : in Positive);
              +    --  AKA: wredrawln()
              +    pragma Inline (Redraw);
              + 
              +@@ -1070,99 +1075,99 @@
              +    --  | Man page curs_clear.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_65"#2|
              +-   procedure Erase (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_66"#2|
              ++   procedure Erase (Win : in Window := Standard_Window);
              +    --  AKA: werase()
              +    --  AKA: erase()
              +-   pragma Inline (Erase);
              ++   pragma Inline (Erase);
              + 
              +-   --  #1A NAME="AFU_66"#2|
              +-   procedure Clear
              +-     (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_67"#2|
              ++   procedure Clear
              ++     (Win : in Window := Standard_Window);
              +    --  AKA: wclear()
              +    --  AKA: clear()
              +-   pragma Inline (Clear);
              ++   pragma Inline (Clear);
              + 
              +-   --  #1A NAME="AFU_67"#2|
              +-   procedure Clear_To_End_Of_Screen
              +-     (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_68"#2|
              ++   procedure Clear_To_End_Of_Screen
              ++     (Win : in Window := Standard_Window);
              +    --  AKA: wclrtobot()
              +    --  AKA: clrtobot()
              +-   pragma Inline (Clear_To_End_Of_Screen);
              ++   pragma Inline (Clear_To_End_Of_Screen);
              + 
              +-   --  #1A NAME="AFU_68"#2|
              +-   procedure Clear_To_End_Of_Line
              +-     (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_69"#2|
              ++   procedure Clear_To_End_Of_Line
              ++     (Win : in Window := Standard_Window);
              +    --  AKA: wclrtoeol()
              +    --  AKA: clrtoeol()
              +-   pragma Inline (Clear_To_End_Of_Line);
              ++   pragma Inline (Clear_To_End_Of_Line);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_bkgd.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_69"#2|
              ++   --  #1A NAME="AFU_70"#2|
              +    --  TODO: we could have Set_Background(Window; Character_Attribute_Set)
              +    --  because in C it is common to see bkgdset(A_BOLD) or
              +    --  bkgdset(COLOR_PAIR(n))
              +-   procedure Set_Background
              +-     (Win : in Window := Standard_Window;
              +-      Ch  : in Attributed_Character);
              ++   procedure Set_Background
              ++     (Win : in Window := Standard_Window;
              ++      Ch  : in Attributed_Character);
              +    --  AKA: wbkgdset()
              +    --  AKA: bkgdset()
              +-   pragma Inline (Set_Background);
              ++   pragma Inline (Set_Background);
              + 
              +-   --  #1A NAME="AFU_70"#2|
              +-   procedure Change_Background
              +-     (Win : in Window := Standard_Window;
              +-      Ch  : in Attributed_Character);
              ++   --  #1A NAME="AFU_71"#2|
              ++   procedure Change_Background
              ++     (Win : in Window := Standard_Window;
              ++      Ch  : in Attributed_Character);
              +    --  AKA: wbkgd()
              +    --  AKA: bkgd()
              +-   pragma Inline (Change_Background);
              ++   pragma Inline (Change_Background);
              + 
              +-   --  #1A NAME="AFU_71"#2|
              ++   --  #1A NAME="AFU_72"#2|
              +    --  ? wbkgdget is not listed in curs_bkgd, getbkgd is thpough.
              +-   function Get_Background (Win : Window := Standard_Window)
              +-     return Attributed_Character;
              ++   function Get_Background (Win : Window := Standard_Window)
              ++     return Attributed_Character;
              +    --  AKA: wbkgdget()
              +    --  AKA: bkgdget()
              +-   pragma Inline (Get_Background);
              ++   pragma Inline (Get_Background);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_touch.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_72"#2|
              +-   procedure Untouch (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_73"#2|
              ++   procedure Untouch (Win : in Window := Standard_Window);
              +    --  AKA: untouchwin()
              +-   pragma Inline (Untouch);
              ++   pragma Inline (Untouch);
              + 
              +-   --  #1A NAME="AFU_73"#2|
              +-   procedure Touch (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_74"#2|
              ++   procedure Touch (Win : in Window := Standard_Window);
              +    --  AKA: touchwin()
              + 
              +-   --  #1A NAME="AFU_74"#2|
              +-   procedure Touch (Win   : in Window := Standard_Window;
              +-                    Start : in Line_Position;
              +-                    Count : in Positive);
              ++   --  #1A NAME="AFU_75"#2|
              ++   procedure Touch (Win   : in Window := Standard_Window;
              ++                    Start : in Line_Position;
              ++                    Count : in Positive);
              +    --  AKA: touchline()
              +    pragma Inline (Touch);
              + 
              +-   --  #1A NAME="AFU_75"#2|
              +-   procedure Change_Lines_Status (Win   : in Window := Standard_Window;
              +-                                  Start : in Line_Position;
              +-                                  Count : in Positive;
              +-                                  State : in Boolean);
              ++   --  #1A NAME="AFU_76"#2|
              ++   procedure Change_Lines_Status (Win   : in Window := Standard_Window;
              ++                                  Start : in Line_Position;
              ++                                  Count : in Positive;
              ++                                  State : in Boolean);
              +    --  AKA: wtouchln()
              +-   pragma Inline (Change_Lines_Status);
              ++   pragma Inline (Change_Lines_Status);
              + 
              +-   --  #1A NAME="AFU_76"#2|
              +-   function Is_Touched (Win  : Window := Standard_Window;
              +-                        Line : Line_Position) return Boolean;
              ++   --  #1A NAME="AFU_77"#2|
              ++   function Is_Touched (Win  : Window := Standard_Window;
              ++                        Line : Line_Position) return Boolean;
              +    --  AKA: is_linetouched()
              + 
              +-   --  #1A NAME="AFU_77"#2|
              +-   function Is_Touched (Win : Window := Standard_Window) return Boolean;
              ++   --  #1A NAME="AFU_78"#2|
              ++   function Is_Touched (Win : Window := Standard_Window) return Boolean;
              +    --  AKA: is_wintouched()
              +    pragma Inline (Is_Touched);
              + 
              +@@ -1170,176 +1175,176 @@
              +    --  | Man page curs_overlay.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_78"#2|
              +-   procedure Copy
              +-     (Source_Window            : in Window;
              +-      Destination_Window       : in Window;
              +-      Source_Top_Row           : in Line_Position;
              +-      Source_Left_Column       : in Column_Position;
              +-      Destination_Top_Row      : in Line_Position;
              +-      Destination_Left_Column  : in Column_Position;
              +-      Destination_Bottom_Row   : in Line_Position;
              +-      Destination_Right_Column : in Column_Position;
              +-      Non_Destructive_Mode     : in Boolean := True);
              ++   --  #1A NAME="AFU_79"#2|
              ++   procedure Copy
              ++     (Source_Window            : in Window;
              ++      Destination_Window       : in Window;
              ++      Source_Top_Row           : in Line_Position;
              ++      Source_Left_Column       : in Column_Position;
              ++      Destination_Top_Row      : in Line_Position;
              ++      Destination_Left_Column  : in Column_Position;
              ++      Destination_Bottom_Row   : in Line_Position;
              ++      Destination_Right_Column : in Column_Position;
              ++      Non_Destructive_Mode     : in Boolean := True);
              +    --  AKA: copywin()
              +-   pragma Inline (Copy);
              ++   pragma Inline (Copy);
              + 
              +-   --  #1A NAME="AFU_79"#2|
              +-   procedure Overwrite (Source_Window      : in Window;
              +-                        Destination_Window : in Window);
              ++   --  #1A NAME="AFU_80"#2|
              ++   procedure Overwrite (Source_Window      : in Window;
              ++                        Destination_Window : in Window);
              +    --  AKA: overwrite()
              +-   pragma Inline (Overwrite);
              ++   pragma Inline (Overwrite);
              + 
              +-   --  #1A NAME="AFU_80"#2|
              +-   procedure Overlay (Source_Window      : in Window;
              +-                      Destination_Window : in Window);
              ++   --  #1A NAME="AFU_81"#2|
              ++   procedure Overlay (Source_Window      : in Window;
              ++                      Destination_Window : in Window);
              +    --  AKA: overlay()
              +-   pragma Inline (Overlay);
              ++   pragma Inline (Overlay);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_deleteln.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_81"#2|
              +-   procedure Insert_Delete_Lines
              +-     (Win   : in Window  := Standard_Window;
              +-      Lines : in Integer := 1); --  default is to insert one line above
              ++   --  #1A NAME="AFU_82"#2|
              ++   procedure Insert_Delete_Lines
              ++     (Win   : in Window  := Standard_Window;
              ++      Lines : in Integer := 1); --  default is to insert one line above
              +    --  AKA: winsdelln()
              +    --  AKA: insdelln()
              +-   pragma Inline (Insert_Delete_Lines);
              ++   pragma Inline (Insert_Delete_Lines);
              + 
              +-   --  #1A NAME="AFU_82"#2|
              +-   procedure Delete_Line (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_83"#2|
              ++   procedure Delete_Line (Win : in Window := Standard_Window);
              +    --  AKA: wdeleteln()
              +    --  AKA: deleteln()
              +-   pragma Inline (Delete_Line);
              ++   pragma Inline (Delete_Line);
              + 
              +-   --  #1A NAME="AFU_83"#2|
              +-   procedure Insert_Line (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_84"#2|
              ++   procedure Insert_Line (Win : in Window := Standard_Window);
              +    --  AKA: winsertln()
              +    --  AKA: insertln()
              +-   pragma Inline (Insert_Line);
              ++   pragma Inline (Insert_Line);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_getyx.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_84"#2|
              +-   procedure Get_Size
              +-     (Win               : in Window := Standard_Window;
              +-      Number_Of_Lines   : out Line_Count;
              +-      Number_Of_Columns : out Column_Count);
              ++   --  #1A NAME="AFU_85"#2|
              ++   procedure Get_Size
              ++     (Win               : in Window := Standard_Window;
              ++      Number_Of_Lines   : out Line_Count;
              ++      Number_Of_Columns : out Column_Count);
              +    --  AKA: getmaxyx()
              +-   pragma Inline (Get_Size);
              ++   pragma Inline (Get_Size);
              + 
              +-   --  #1A NAME="AFU_85"#2|
              +-   procedure Get_Window_Position
              +-     (Win             : in Window := Standard_Window;
              +-      Top_Left_Line   : out Line_Position;
              +-      Top_Left_Column : out Column_Position);
              ++   --  #1A NAME="AFU_86"#2|
              ++   procedure Get_Window_Position
              ++     (Win             : in Window := Standard_Window;
              ++      Top_Left_Line   : out Line_Position;
              ++      Top_Left_Column : out Column_Position);
              +    --  AKA: getbegyx()
              +-   pragma Inline (Get_Window_Position);
              ++   pragma Inline (Get_Window_Position);
              + 
              +-   --  #1A NAME="AFU_86"#2|
              +-   procedure Get_Cursor_Position
              +-     (Win    : in  Window := Standard_Window;
              +-      Line   : out Line_Position;
              +-      Column : out Column_Position);
              ++   --  #1A NAME="AFU_87"#2|
              ++   procedure Get_Cursor_Position
              ++     (Win    : in  Window := Standard_Window;
              ++      Line   : out Line_Position;
              ++      Column : out Column_Position);
              +    --  AKA: getyx()
              +-   pragma Inline (Get_Cursor_Position);
              ++   pragma Inline (Get_Cursor_Position);
              + 
              +-   --  #1A NAME="AFU_87"#2|
              +-   procedure Get_Origin_Relative_To_Parent
              +-     (Win                : in  Window;
              +-      Top_Left_Line      : out Line_Position;
              +-      Top_Left_Column    : out Column_Position;
              +-      Is_Not_A_Subwindow : out Boolean);
              ++   --  #1A NAME="AFU_88"#2|
              ++   procedure Get_Origin_Relative_To_Parent
              ++     (Win                : in  Window;
              ++      Top_Left_Line      : out Line_Position;
              ++      Top_Left_Column    : out Column_Position;
              ++      Is_Not_A_Subwindow : out Boolean);
              +    --  AKA: getparyx()
              +    --  Instead of placing -1 in the coordinates as return, we use a boolean
              +    --  to return the info that the window has no parent.
              +-   pragma Inline (Get_Origin_Relative_To_Parent);
              ++   pragma Inline (Get_Origin_Relative_To_Parent);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_pad.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_88"#2|
              +-   function New_Pad (Lines   : Line_Count;
              +-                     Columns : Column_Count) return Window;
              ++   --  #1A NAME="AFU_89"#2|
              ++   function New_Pad (Lines   : Line_Count;
              ++                     Columns : Column_Count) return Window;
              +    --  AKA: newpad()
              +-   pragma Inline (New_Pad);
              ++   pragma Inline (New_Pad);
              + 
              +-   --  #1A NAME="AFU_89"#2|
              +-   function Sub_Pad
              +-     (Pad                   : Window;
              +-      Number_Of_Lines       : Line_Count;
              +-      Number_Of_Columns     : Column_Count;
              +-      First_Line_Position   : Line_Position;
              +-      First_Column_Position : Column_Position) return Window;
              ++   --  #1A NAME="AFU_90"#2|
              ++   function Sub_Pad
              ++     (Pad                   : Window;
              ++      Number_Of_Lines       : Line_Count;
              ++      Number_Of_Columns     : Column_Count;
              ++      First_Line_Position   : Line_Position;
              ++      First_Column_Position : Column_Position) return Window;
              +    --  AKA: subpad()
              +-   pragma Inline (Sub_Pad);
              ++   pragma Inline (Sub_Pad);
              + 
              +-   --  #1A NAME="AFU_90"#2|
              +-   procedure Refresh
              +-     (Pad                      : in Window;
              +-      Source_Top_Row           : in Line_Position;
              +-      Source_Left_Column       : in Column_Position;
              +-      Destination_Top_Row      : in Line_Position;
              +-      Destination_Left_Column  : in Column_Position;
              +-      Destination_Bottom_Row   : in Line_Position;
              +-      Destination_Right_Column : in Column_Position);
              ++   --  #1A NAME="AFU_91"#2|
              ++   procedure Refresh
              ++     (Pad                      : in Window;
              ++      Source_Top_Row           : in Line_Position;
              ++      Source_Left_Column       : in Column_Position;
              ++      Destination_Top_Row      : in Line_Position;
              ++      Destination_Left_Column  : in Column_Position;
              ++      Destination_Bottom_Row   : in Line_Position;
              ++      Destination_Right_Column : in Column_Position);
              +    --  AKA: prefresh()
              +    pragma Inline (Refresh);
              + 
              +-   --  #1A NAME="AFU_91"#2|
              +-   procedure Refresh_Without_Update
              +-     (Pad                      : in Window;
              +-      Source_Top_Row           : in Line_Position;
              +-      Source_Left_Column       : in Column_Position;
              +-      Destination_Top_Row      : in Line_Position;
              +-      Destination_Left_Column  : in Column_Position;
              +-      Destination_Bottom_Row   : in Line_Position;
              +-      Destination_Right_Column : in Column_Position);
              ++   --  #1A NAME="AFU_92"#2|
              ++   procedure Refresh_Without_Update
              ++     (Pad                      : in Window;
              ++      Source_Top_Row           : in Line_Position;
              ++      Source_Left_Column       : in Column_Position;
              ++      Destination_Top_Row      : in Line_Position;
              ++      Destination_Left_Column  : in Column_Position;
              ++      Destination_Bottom_Row   : in Line_Position;
              ++      Destination_Right_Column : in Column_Position);
              +    --  AKA: pnoutrefresh()
              +    pragma Inline (Refresh_Without_Update);
              + 
              +-   --  #1A NAME="AFU_92"#2|
              +-   procedure Add_Character_To_Pad_And_Echo_It
              +-     (Pad : in Window;
              +-      Ch  : in Attributed_Character);
              ++   --  #1A NAME="AFU_93"#2|
              ++   procedure Add_Character_To_Pad_And_Echo_It
              ++     (Pad : in Window;
              ++      Ch  : in Attributed_Character);
              +    --  AKA: pechochar()
              + 
              +-   procedure Add_Character_To_Pad_And_Echo_It
              +-     (Pad : in Window;
              +-      Ch  : in Character);
              ++   procedure Add_Character_To_Pad_And_Echo_It
              ++     (Pad : in Window;
              ++      Ch  : in Character);
              +    pragma Inline (Add_Character_To_Pad_And_Echo_It);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_scroll.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_93"#2|
              +-   procedure Scroll (Win    : in Window  := Standard_Window;
              +-                     Amount : in Integer := 1);
              ++   --  #1A NAME="AFU_94"#2|
              ++   procedure Scroll (Win    : in Window  := Standard_Window;
              ++                     Amount : in Integer := 1);
              +    --  AKA: wscrl()
              +    --  AKA: scroll()
              +    --  AKA: scrl()
              +-   pragma Inline (Scroll);
              ++   pragma Inline (Scroll);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_delch.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_94"#2|
              +-   procedure Delete_Character (Win : in Window := Standard_Window);
              ++   --  #1A NAME="AFU_95"#2|
              ++   procedure Delete_Character (Win : in Window := Standard_Window);
              +    --  AKA: wdelch()
              +    --  AKA: delch()
              + 
              +-   --  #1A NAME="AFU_95"#2|
              +-   procedure Delete_Character
              +-     (Win    : in Window := Standard_Window;
              +-      Line   : in Line_Position;
              +-      Column : in Column_Position);
              ++   --  #1A NAME="AFU_96"#2|
              ++   procedure Delete_Character
              ++     (Win    : in Window := Standard_Window;
              ++      Line   : in Line_Position;
              ++      Column : in Column_Position);
              +    --  AKA: mvwdelch()
              +    --  AKA: mvdelch()
              +    pragma Inline (Delete_Character);
              +@@ -1348,17 +1353,17 @@
              +    --  | Man page curs_inch.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_96"#2|
              +-   function Peek (Win : Window := Standard_Window)
              +-     return Attributed_Character;
              ++   --  #1A NAME="AFU_97"#2|
              ++   function Peek (Win : Window := Standard_Window)
              ++     return Attributed_Character;
              +    --  AKA: inch()
              +    --  AKA: winch()
              + 
              +-   --  #1A NAME="AFU_97"#2|
              +-   function Peek
              +-     (Win    : Window := Standard_Window;
              +-      Line   : Line_Position;
              +-      Column : Column_Position) return Attributed_Character;
              ++   --  #1A NAME="AFU_98"#2|
              ++   function Peek
              ++     (Win    : Window := Standard_Window;
              ++      Line   : Line_Position;
              ++      Column : Column_Position) return Attributed_Character;
              +    --  AKA: mvwinch()
              +    --  AKA: mvinch()
              +    --  More Peek's follow, pragma Inline appears later.
              +@@ -1367,17 +1372,17 @@
              +    --  | Man page curs_insch.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_98"#2|
              +-   procedure Insert (Win : in Window := Standard_Window;
              +-                     Ch  : in Attributed_Character);
              ++   --  #1A NAME="AFU_99"#2|
              ++   procedure Insert (Win : in Window := Standard_Window;
              ++                     Ch  : in Attributed_Character);
              +    --  AKA: winsch()
              +    --  AKA: insch()
              + 
              +-   --  #1A NAME="AFU_99"#2|
              +-   procedure Insert (Win    : in Window := Standard_Window;
              +-                     Line   : in Line_Position;
              +-                     Column : in Column_Position;
              +-                     Ch     : in Attributed_Character);
              ++   --  #1A NAME="AFU_100"#2|
              ++   procedure Insert (Win    : in Window := Standard_Window;
              ++                     Line   : in Line_Position;
              ++                     Column : in Column_Position;
              ++                     Ch     : in Attributed_Character);
              +    --  AKA: mvwinsch()
              +    --  AKA: mvinsch()
              + 
              +@@ -1385,21 +1390,21 @@
              +    --  | Man page curs_insstr.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_100"#2|
              +-   procedure Insert (Win : in Window := Standard_Window;
              +-                     Str : in String;
              +-                     Len : in Integer := -1);
              ++   --  #1A NAME="AFU_101"#2|
              ++   procedure Insert (Win : in Window := Standard_Window;
              ++                     Str : in String;
              ++                     Len : in Integer := -1);
              +    --  AKA: winsnstr()
              +    --  AKA: winsstr()
              +    --  AKA: insnstr()
              +    --  AKA: insstr()
              + 
              +-   --  #1A NAME="AFU_101"#2|
              +-   procedure Insert (Win    : in Window := Standard_Window;
              +-                     Line   : in Line_Position;
              +-                     Column : in Column_Position;
              +-                     Str    : in String;
              +-                     Len    : in Integer := -1);
              ++   --  #1A NAME="AFU_102"#2|
              ++   procedure Insert (Win    : in Window := Standard_Window;
              ++                     Line   : in Line_Position;
              ++                     Column : in Column_Position;
              ++                     Str    : in String;
              ++                     Len    : in Integer := -1);
              +    --  AKA: mvwinsnstr()
              +    --  AKA: mvwinsstr()
              +    --  AKA: mvinsnstr()
              +@@ -1410,21 +1415,21 @@
              +    --  | Man page curs_instr.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_102"#2|
              +-   procedure Peek (Win : in  Window := Standard_Window;
              +-                   Str : out String;
              +-                   Len : in  Integer := -1);
              ++   --  #1A NAME="AFU_103"#2|
              ++   procedure Peek (Win : in  Window := Standard_Window;
              ++                   Str : out String;
              ++                   Len : in  Integer := -1);
              +    --  AKA: winnstr()
              +    --  AKA: winstr()
              +    --  AKA: innstr()
              +    --  AKA: instr()
              + 
              +-   --  #1A NAME="AFU_103"#2|
              +-   procedure Peek (Win    : in  Window := Standard_Window;
              +-                   Line   : in  Line_Position;
              +-                   Column : in  Column_Position;
              +-                   Str    : out String;
              +-                   Len    : in  Integer := -1);
              ++   --  #1A NAME="AFU_104"#2|
              ++   procedure Peek (Win    : in  Window := Standard_Window;
              ++                   Line   : in  Line_Position;
              ++                   Column : in  Column_Position;
              ++                   Str    : out String;
              ++                   Len    : in  Integer := -1);
              +    --  AKA: mvwinnstr()
              +    --  AKA: mvwinstr()
              +    --  AKA: mvinnstr()
              +@@ -1434,21 +1439,21 @@
              +    --  | Man page curs_inchstr.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_104"#2|
              +-   procedure Peek (Win : in  Window := Standard_Window;
              +-                   Str : out Attributed_String;
              +-                   Len : in  Integer := -1);
              ++   --  #1A NAME="AFU_105"#2|
              ++   procedure Peek (Win : in  Window := Standard_Window;
              ++                   Str : out Attributed_String;
              ++                   Len : in  Integer := -1);
              +    --  AKA: winchnstr()
              +    --  AKA: winchstr()
              +    --  AKA: inchnstr()
              +    --  AKA: inchstr()
              + 
              +-   --  #1A NAME="AFU_105"#2|
              +-   procedure Peek (Win    : in  Window := Standard_Window;
              +-                   Line   : in  Line_Position;
              +-                   Column : in  Column_Position;
              +-                   Str    : out Attributed_String;
              +-                   Len    : in  Integer := -1);
              ++   --  #1A NAME="AFU_106"#2|
              ++   procedure Peek (Win    : in  Window := Standard_Window;
              ++                   Line   : in  Line_Position;
              ++                   Column : in  Column_Position;
              ++                   Str    : out Attributed_String;
              ++                   Len    : in  Integer := -1);
              +    --  AKA: mvwinchnstr()
              +    --  AKA: mvwinchstr()
              +    --  AKA: mvinchnstr()
              +@@ -1459,10 +1464,10 @@
              +    --  | Man page curs_getstr.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_106"#2|
              +-   procedure Get (Win : in  Window := Standard_Window;
              +-                  Str : out String;
              +-                  Len : in  Integer := -1);
              ++   --  #1A NAME="AFU_107"#2|
              ++   procedure Get (Win : in  Window := Standard_Window;
              ++                  Str : out String;
              ++                  Len : in  Integer := -1);
              +    --  AKA: wgetnstr()
              +    --  AKA: wgetstr()
              +    --  AKA: getnstr()
              +@@ -1470,12 +1475,12 @@
              +    --  actually getstr is not supported because that results in buffer
              +    --  overflows.
              + 
              +-   --  #1A NAME="AFU_107"#2|
              +-   procedure Get (Win    : in  Window := Standard_Window;
              +-                  Line   : in  Line_Position;
              +-                  Column : in  Column_Position;
              +-                  Str    : out String;
              +-                  Len    : in  Integer := -1);
              ++   --  #1A NAME="AFU_108"#2|
              ++   procedure Get (Win    : in  Window := Standard_Window;
              ++                  Line   : in  Line_Position;
              ++                  Column : in  Column_Position;
              ++                  Str    : out String;
              ++                  Len    : in  Integer := -1);
              +    --  AKA: mvwgetnstr()
              +    --  AKA: mvwgetstr()
              +    --  AKA: mvgetnstr()
              +@@ -1488,90 +1493,90 @@
              + 
              +    --  Not Implemented: slk_attr_on, slk_attr_off, slk_attr_set
              + 
              +-   type Soft_Label_Key_Format is (Three_Two_Three,
              +-                                  Four_Four,
              +-                                  PC_Style,              --  ncurses specific
              +-                                  PC_Style_With_Index);  --  "
              +-   type Label_Number is new Positive range 1 .. 12;
              +-   type Label_Justification is (Left, Centered, Right);
              ++   type Soft_Label_Key_Format is (Three_Two_Three,
              ++                                  Four_Four,
              ++                                  PC_Style,              --  ncurses specific
              ++                                  PC_Style_With_Index);  --  "
              ++   type Label_Number is new Positive range 1 .. 12;
              ++   type Label_Justification is (Left, Centered, Right);
              + 
              +-   --  #1A NAME="AFU_108"#2|
              +-   procedure Init_Soft_Label_Keys
              +-     (Format : in Soft_Label_Key_Format := Three_Two_Three);
              ++   --  #1A NAME="AFU_109"#2|
              ++   procedure Init_Soft_Label_Keys
              ++     (Format : in Soft_Label_Key_Format := Three_Two_Three);
              +    --  AKA: slk_init()
              +-   pragma Inline (Init_Soft_Label_Keys);
              ++   pragma Inline (Init_Soft_Label_Keys);
              + 
              +-   --  #1A NAME="AFU_109"#2|
              +-   procedure Set_Soft_Label_Key (Label : in Label_Number;
              +-                                 Text  : in String;
              +-                                 Fmt   : in Label_Justification := Left);
              ++   --  #1A NAME="AFU_110"#2|
              ++   procedure Set_Soft_Label_Key (Label : in Label_Number;
              ++                                 Text  : in String;
              ++                                 Fmt   : in Label_Justification := Left);
              +    --  AKA: slk_set()
              +    --  We don't inline this procedure
              + 
              +-   --  #1A NAME="AFU_110"#2|
              +-   procedure Refresh_Soft_Label_Keys;
              ++   --  #1A NAME="AFU_111"#2|
              ++   procedure Refresh_Soft_Label_Keys;
              +    --  AKA: slk_refresh()
              +-   pragma Inline (Refresh_Soft_Label_Keys);
              ++   pragma Inline (Refresh_Soft_Label_Keys);
              + 
              +-   --  #1A NAME="AFU_111"#2|
              +-   procedure Refresh_Soft_Label_Keys_Without_Update;
              ++   --  #1A NAME="AFU_112"#2|
              ++   procedure Refresh_Soft_Label_Keys_Without_Update;
              +    --  AKA: slk_noutrefresh()
              +-   pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
              ++   pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
              + 
              +-   --  #1A NAME="AFU_112"#2|
              +-   procedure Get_Soft_Label_Key (Label : in Label_Number;
              +-                                 Text  : out String);
              ++   --  #1A NAME="AFU_113"#2|
              ++   procedure Get_Soft_Label_Key (Label : in Label_Number;
              ++                                 Text  : out String);
              +    --  AKA: slk_label()
              + 
              +-   --  #1A NAME="AFU_113"#2|
              +-   function Get_Soft_Label_Key (Label : in Label_Number) return String;
              ++   --  #1A NAME="AFU_114"#2|
              ++   function Get_Soft_Label_Key (Label : in Label_Number) return String;
              +    --  AKA: slk_label()
              +    --  Same as function
              +    pragma Inline (Get_Soft_Label_Key);
              + 
              +-   --  #1A NAME="AFU_114"#2|
              +-   procedure Clear_Soft_Label_Keys;
              ++   --  #1A NAME="AFU_115"#2|
              ++   procedure Clear_Soft_Label_Keys;
              +    --  AKA: slk_clear()
              +-   pragma Inline (Clear_Soft_Label_Keys);
              ++   pragma Inline (Clear_Soft_Label_Keys);
              + 
              +-   --  #1A NAME="AFU_115"#2|
              +-   procedure Restore_Soft_Label_Keys;
              ++   --  #1A NAME="AFU_116"#2|
              ++   procedure Restore_Soft_Label_Keys;
              +    --  AKA: slk_restore()
              +-   pragma Inline (Restore_Soft_Label_Keys);
              ++   pragma Inline (Restore_Soft_Label_Keys);
              + 
              +-   --  #1A NAME="AFU_116"#2|
              +-   procedure Touch_Soft_Label_Keys;
              ++   --  #1A NAME="AFU_117"#2|
              ++   procedure Touch_Soft_Label_Keys;
              +    --  AKA: slk_touch()
              +-   pragma Inline (Touch_Soft_Label_Keys);
              ++   pragma Inline (Touch_Soft_Label_Keys);
              + 
              +-   --  #1A NAME="AFU_117"#2|
              +-   procedure Switch_Soft_Label_Key_Attributes
              +-     (Attr : in Character_Attribute_Set;
              +-      On   : in Boolean := True);
              ++   --  #1A NAME="AFU_118"#2|
              ++   procedure Switch_Soft_Label_Key_Attributes
              ++     (Attr : in Character_Attribute_Set;
              ++      On   : in Boolean := True);
              +    --  AKA: slk_attron()
              +    --  AKA: slk_attroff()
              +-   pragma Inline (Switch_Soft_Label_Key_Attributes);
              ++   pragma Inline (Switch_Soft_Label_Key_Attributes);
              + 
              +-   --  #1A NAME="AFU_118"#2|
              +-   procedure Set_Soft_Label_Key_Attributes
              +-     (Attr  : in Character_Attribute_Set := Normal_Video;
              +-      Color : in Color_Pair := Color_Pair'First);
              ++   --  #1A NAME="AFU_119"#2|
              ++   procedure Set_Soft_Label_Key_Attributes
              ++     (Attr  : in Character_Attribute_Set := Normal_Video;
              ++      Color : in Color_Pair := Color_Pair'First);
              +    --  AKA: slk_attrset()
              +-   pragma Inline (Set_Soft_Label_Key_Attributes);
              ++   pragma Inline (Set_Soft_Label_Key_Attributes);
              + 
              +-   --  #1A NAME="AFU_119"#2|
              +-   function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
              ++   --  #1A NAME="AFU_120"#2|
              ++   function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
              +    --  AKA: slk_attr()
              + 
              +-   --  #1A NAME="AFU_120"#2|
              +-   function Get_Soft_Label_Key_Attributes return Color_Pair;
              ++   --  #1A NAME="AFU_121"#2|
              ++   function Get_Soft_Label_Key_Attributes return Color_Pair;
              +    --  AKA: slk_attr()
              +    pragma Inline (Get_Soft_Label_Key_Attributes);
              + 
              +-   --  #1A NAME="AFU_121"#2|
              +-   procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
              ++   --  #1A NAME="AFU_122"#2|
              ++   procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
              +    --  AKA: slk_color()
              +-   pragma Inline (Set_Soft_Label_Key_Color);
              ++   pragma Inline (Set_Soft_Label_Key_Color);
              + 
              +    --  |=====================================================================
              +    --  | Man page keybound.3x
              +@@ -1582,21 +1587,21 @@
              +    --  | Man page keyok.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_122"#2|
              +-   procedure Enable_Key (Key    : in Special_Key_Code;
              +-                         Enable : in Boolean := True);
              ++   --  #1A NAME="AFU_123"#2|
              ++   procedure Enable_Key (Key    : in Special_Key_Code;
              ++                         Enable : in Boolean := True);
              +    --  AKA: keyok()
              +-   pragma Inline (Enable_Key);
              ++   pragma Inline (Enable_Key);
              + 
              +    --  |=====================================================================
              +    --  | Man page define_key.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_123"#2|
              +-   procedure Define_Key (Definition : in String;
              +-                         Key        : in Special_Key_Code);
              ++   --  #1A NAME="AFU_124"#2|
              ++   procedure Define_Key (Definition : in String;
              ++                         Key        : in Special_Key_Code);
              +    --  AKA: define_key()
              +-   pragma Inline (Define_Key);
              ++   pragma Inline (Define_Key);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_util.3x
              +@@ -1606,89 +1611,89 @@
              +    --  | putwin, getwin are in the child package PutWin
              +    --
              + 
              +-   --  #1A NAME="AFU_124"#2|
              +-   procedure Key_Name (Key  : in  Real_Key_Code;
              +-                       Name : out String);
              ++   --  #1A NAME="AFU_125"#2|
              ++   procedure Key_Name (Key  : in  Real_Key_Code;
              ++                       Name : out String);
              +    --  AKA: keyname()
              +    --  The external name for a real keystroke.
              + 
              +-   --  #1A NAME="AFU_125"#2|
              +-   function Key_Name (Key  : in  Real_Key_Code) return String;
              ++   --  #1A NAME="AFU_126"#2|
              ++   function Key_Name (Key  : in  Real_Key_Code) return String;
              +    --  AKA: keyname()
              +    --  Same as function
              +    --  We don't inline this routine
              + 
              +-   --  #1A NAME="AFU_126"#2|
              +-   procedure Un_Control (Ch  : in Attributed_Character;
              +-                         Str : out String);
              ++   --  #1A NAME="AFU_127"#2|
              ++   procedure Un_Control (Ch  : in Attributed_Character;
              ++                         Str : out String);
              +    --  AKA: unctrl()
              + 
              +-   --  #1A NAME="AFU_127"#2|
              +-   function Un_Control (Ch  : in Attributed_Character) return String;
              ++   --  #1A NAME="AFU_128"#2|
              ++   function Un_Control (Ch  : in Attributed_Character) return String;
              +    --  AKA: unctrl()
              +    --  Same as function
              +    pragma Inline (Un_Control);
              + 
              +-   --  #1A NAME="AFU_128"#2|
              +-   procedure Delay_Output (Msecs : in Natural);
              ++   --  #1A NAME="AFU_129"#2|
              ++   procedure Delay_Output (Msecs : in Natural);
              +    --  AKA: delay_output()
              +-   pragma Inline (Delay_Output);
              ++   pragma Inline (Delay_Output);
              + 
              +-   --  #1A NAME="AFU_129"#2|
              +-   procedure Flush_Input;
              ++   --  #1A NAME="AFU_130"#2|
              ++   procedure Flush_Input;
              +    --  AKA: flushinp()
              +-   pragma Inline (Flush_Input);
              ++   pragma Inline (Flush_Input);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_termattrs.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_130"#2|
              +-   function Baudrate return Natural;
              ++   --  #1A NAME="AFU_131"#2|
              ++   function Baudrate return Natural;
              +    --  AKA: baudrate()
              +-   pragma Inline (Baudrate);
              ++   pragma Inline (Baudrate);
              + 
              +-   --  #1A NAME="AFU_131"#2|
              +-   function Erase_Character return Character;
              ++   --  #1A NAME="AFU_132"#2|
              ++   function Erase_Character return Character;
              +    --  AKA: erasechar()
              +-   pragma Inline (Erase_Character);
              ++   pragma Inline (Erase_Character);
              + 
              +-   --  #1A NAME="AFU_132"#2|
              +-   function Kill_Character return Character;
              ++   --  #1A NAME="AFU_133"#2|
              ++   function Kill_Character return Character;
              +    --  AKA: killchar()
              +-   pragma Inline (Kill_Character);
              ++   pragma Inline (Kill_Character);
              + 
              +-   --  #1A NAME="AFU_133"#2|
              +-   function Has_Insert_Character return Boolean;
              ++   --  #1A NAME="AFU_134"#2|
              ++   function Has_Insert_Character return Boolean;
              +    --  AKA: has_ic()
              +-   pragma Inline (Has_Insert_Character);
              ++   pragma Inline (Has_Insert_Character);
              + 
              +-   --  #1A NAME="AFU_134"#2|
              +-   function Has_Insert_Line return Boolean;
              ++   --  #1A NAME="AFU_135"#2|
              ++   function Has_Insert_Line return Boolean;
              +    --  AKA: has_il()
              +-   pragma Inline (Has_Insert_Line);
              ++   pragma Inline (Has_Insert_Line);
              + 
              +-   --  #1A NAME="AFU_135"#2|
              +-   function Supported_Attributes return Character_Attribute_Set;
              ++   --  #1A NAME="AFU_136"#2|
              ++   function Supported_Attributes return Character_Attribute_Set;
              +    --  AKA: termattrs()
              +-   pragma Inline (Supported_Attributes);
              ++   pragma Inline (Supported_Attributes);
              + 
              +-   --  #1A NAME="AFU_136"#2|
              +-   procedure Long_Name (Name : out String);
              ++   --  #1A NAME="AFU_137"#2|
              ++   procedure Long_Name (Name : out String);
              +    --  AKA: longname()
              + 
              +-   --  #1A NAME="AFU_137"#2|
              +-   function Long_Name return String;
              ++   --  #1A NAME="AFU_138"#2|
              ++   function Long_Name return String;
              +    --  AKA: longname()
              +    --  Same as function
              +    pragma Inline (Long_Name);
              + 
              +-   --  #1A NAME="AFU_138"#2|
              +-   procedure Terminal_Name (Name : out String);
              ++   --  #1A NAME="AFU_139"#2|
              ++   procedure Terminal_Name (Name : out String);
              +    --  AKA: termname()
              + 
              +-   --  #1A NAME="AFU_139"#2|
              +-   function Terminal_Name return String;
              ++   --  #1A NAME="AFU_140"#2|
              ++   function Terminal_Name return String;
              +    --  AKA: termname()
              +    --  Same as function
              +    pragma Inline (Terminal_Name);
              +@@ -1703,119 +1708,119 @@
              +    --  In C you often see something like c = c | COLOR_PAIR(n);
              +    --  This is equivalent to c.Color := n;
              + 
              +-   --  #1A NAME="AFU_140"#2|
              +-   procedure Start_Color;
              ++   --  #1A NAME="AFU_141"#2|
              ++   procedure Start_Color;
              +    --  AKA: start_color()
              +    pragma Import (C, Start_Color, "start_color");
              + 
              +-   --  #1A NAME="AFU_141"#2|
              +-   procedure Init_Pair (Pair : in Redefinable_Color_Pair;
              +-                        Fore : in Color_Number;
              +-                        Back : in Color_Number);
              ++   --  #1A NAME="AFU_142"#2|
              ++   procedure Init_Pair (Pair : in Redefinable_Color_Pair;
              ++                        Fore : in Color_Number;
              ++                        Back : in Color_Number);
              +    --  AKA: init_pair()
              +-   pragma Inline (Init_Pair);
              ++   pragma Inline (Init_Pair);
              + 
              +-   --  #1A NAME="AFU_142"#2|
              +-   procedure Pair_Content (Pair : in Color_Pair;
              +-                           Fore : out Color_Number;
              +-                           Back : out Color_Number);
              ++   --  #1A NAME="AFU_143"#2|
              ++   procedure Pair_Content (Pair : in Color_Pair;
              ++                           Fore : out Color_Number;
              ++                           Back : out Color_Number);
              +    --  AKA: pair_content()
              +-   pragma Inline (Pair_Content);
              ++   pragma Inline (Pair_Content);
              + 
              +-   --  #1A NAME="AFU_143"#2|
              +-   function Has_Colors return Boolean;
              ++   --  #1A NAME="AFU_144"#2|
              ++   function Has_Colors return Boolean;
              +    --  AKA: has_colors()
              +-   pragma Inline (Has_Colors);
              ++   pragma Inline (Has_Colors);
              + 
              +-   --  #1A NAME="AFU_144"#2|
              +-   procedure Init_Color (Color : in Color_Number;
              +-                         Red   : in RGB_Value;
              +-                         Green : in RGB_Value;
              +-                         Blue  : in RGB_Value);
              ++   --  #1A NAME="AFU_145"#2|
              ++   procedure Init_Color (Color : in Color_Number;
              ++                         Red   : in RGB_Value;
              ++                         Green : in RGB_Value;
              ++                         Blue  : in RGB_Value);
              +    --  AKA: init_color()
              +-   pragma Inline (Init_Color);
              ++   pragma Inline (Init_Color);
              + 
              +-   --  #1A NAME="AFU_145"#2|
              +-   function Can_Change_Color return Boolean;
              ++   --  #1A NAME="AFU_146"#2|
              ++   function Can_Change_Color return Boolean;
              +    --  AKA: can_change_color()
              +-   pragma Inline (Can_Change_Color);
              ++   pragma Inline (Can_Change_Color);
              + 
              +-   --  #1A NAME="AFU_146"#2|
              +-   procedure Color_Content (Color : in  Color_Number;
              +-                            Red   : out RGB_Value;
              +-                            Green : out RGB_Value;
              +-                            Blue  : out RGB_Value);
              ++   --  #1A NAME="AFU_147"#2|
              ++   procedure Color_Content (Color : in  Color_Number;
              ++                            Red   : out RGB_Value;
              ++                            Green : out RGB_Value;
              ++                            Blue  : out RGB_Value);
              +    --  AKA: color_content()
              +-   pragma Inline (Color_Content);
              ++   pragma Inline (Color_Content);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_kernel.3x
              +    --  |=====================================================================
              +    --  | Not implemented: getsyx, setsyx
              +    --
              +-   type Curses_Mode is (Curses, Shell);
              ++   type Curses_Mode is (Curses, Shell);
              + 
              +-   --  #1A NAME="AFU_147"#2|
              +-   procedure Save_Curses_Mode (Mode : in Curses_Mode);
              ++   --  #1A NAME="AFU_148"#2|
              ++   procedure Save_Curses_Mode (Mode : in Curses_Mode);
              +    --  AKA: def_prog_mode()
              +    --  AKA: def_shell_mode()
              +-   pragma Inline (Save_Curses_Mode);
              ++   pragma Inline (Save_Curses_Mode);
              + 
              +-   --  #1A NAME="AFU_148"#2|
              +-   procedure Reset_Curses_Mode (Mode : in Curses_Mode);
              ++   --  #1A NAME="AFU_149"#2|
              ++   procedure Reset_Curses_Mode (Mode : in Curses_Mode);
              +    --  AKA: reset_prog_mode()
              +    --  AKA: reset_shell_mode()
              +-   pragma Inline (Reset_Curses_Mode);
              ++   pragma Inline (Reset_Curses_Mode);
              + 
              +-   --  #1A NAME="AFU_149"#2|
              +-   procedure Save_Terminal_State;
              ++   --  #1A NAME="AFU_150"#2|
              ++   procedure Save_Terminal_State;
              +    --  AKA: savetty()
              +-   pragma Inline (Save_Terminal_State);
              ++   pragma Inline (Save_Terminal_State);
              + 
              +-   --  #1A NAME="AFU_150"#2|
              +-   procedure Reset_Terminal_State;
              ++   --  #1A NAME="AFU_151"#2|
              ++   procedure Reset_Terminal_State;
              +    --  AKA: resetty();
              +-   pragma Inline (Reset_Terminal_State);
              ++   pragma Inline (Reset_Terminal_State);
              + 
              +-   type Stdscr_Init_Proc is access
              +-      function (Win     : Window;
              +-                Columns : Column_Count) return Integer;
              +-   pragma Convention (C, Stdscr_Init_Proc);
              ++   type Stdscr_Init_Proc is access
              ++      function (Win     : Window;
              ++                Columns : Column_Count) return Integer;
              ++   pragma Convention (C, Stdscr_Init_Proc);
              +    --  N.B.: the return value is actually ignored, but it seems to be
              +    --        a good practice to return 0 if you think all went fine
              +    --        and -1 otherwise.
              + 
              +-   --  #1A NAME="AFU_151"#2|
              +-   procedure Rip_Off_Lines (Lines : in Integer;
              +-                            Proc  : in Stdscr_Init_Proc);
              ++   --  #1A NAME="AFU_152"#2|
              ++   procedure Rip_Off_Lines (Lines : in Integer;
              ++                            Proc  : in Stdscr_Init_Proc);
              +    --  AKA: ripoffline()
              +    --  N.B.: to be more precise, this uses a ncurses specific enhancement of
              +    --        ripoffline(), in which the Lines argument absolute value is the
              +    --        number of lines to be ripped of. The official ripoffline() only
              +    --        uses the sign of Lines to rip of a single line from bottom or top.
              +-   pragma Inline (Rip_Off_Lines);
              ++   pragma Inline (Rip_Off_Lines);
              + 
              +-   type Cursor_Visibility is (Invisible, Normal, Very_Visible);
              ++   type Cursor_Visibility is (Invisible, Normal, Very_Visible);
              + 
              +-   --  #1A NAME="AFU_152"#2|
              +-   procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
              ++   --  #1A NAME="AFU_153"#2|
              ++   procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
              +    --  AKA: curs_set()
              +-   pragma Inline (Set_Cursor_Visibility);
              ++   pragma Inline (Set_Cursor_Visibility);
              + 
              +-   --  #1A NAME="AFU_153"#2|
              +-   procedure Nap_Milli_Seconds (Ms : in Natural);
              ++   --  #1A NAME="AFU_154"#2|
              ++   procedure Nap_Milli_Seconds (Ms : in Natural);
              +    --  AKA: napms()
              +-   pragma Inline (Nap_Milli_Seconds);
              ++   pragma Inline (Nap_Milli_Seconds);
              + 
              +    --  |=====================================================================
              +    --  | Some useful helpers.
              +    --  |=====================================================================
              +-   type Transform_Direction is (From_Screen, To_Screen);
              +-   procedure Transform_Coordinates
              +-     (W      : in Window := Standard_Window;
              +-      Line   : in out Line_Position;
              +-      Column : in out Column_Position;
              +-      Dir    : in Transform_Direction := From_Screen);
              ++   type Transform_Direction is (From_Screen, To_Screen);
              ++   procedure Transform_Coordinates
              ++     (W      : in Window := Standard_Window;
              ++      Line   : in out Line_Position;
              ++      Column : in out Column_Position;
              ++      Dir    : in Transform_Direction := From_Screen);
              +    --  This procedure transforms screen coordinates into coordinates relative
              +    --  to the window and vice versa, depending on the Dir parameter.
              +    --  Screen coordinates are the position informations on the physical device.
              +@@ -1824,51 +1829,59 @@
              +    --  We don't inline this procedure
              + 
              +    --  |=====================================================================
              +-   --  | Man page dft_fgbg.3x
              ++   --  | Man page default_colors.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_154"#2|
              +-   procedure Use_Default_Colors;
              +-   --  AKA: use_default_colors()
              +-   pragma Inline (Use_Default_Colors);
              +-
              +    --  #1A NAME="AFU_155"#2|
              +-   procedure Assume_Default_Colors (Fore : Color_Number := Default_Color;
              +-                                    Back : Color_Number := Default_Color);
              +-   --  AKA: assume_default_colors()
              +-   pragma Inline (Assume_Default_Colors);
              ++   procedure Use_Default_Colors;
              ++   --  AKA: use_default_colors()
              ++   pragma Inline (Use_Default_Colors);
              ++
              ++   --  #1A NAME="AFU_156"#2|
              ++   procedure Assume_Default_Colors (Fore : Color_Number := Default_Color;
              ++                                    Back : Color_Number := Default_Color);
              ++   --  AKA: assume_default_colors()
              ++   pragma Inline (Assume_Default_Colors);
              + 
              +    --  |=====================================================================
              +    --  | Man page curs_extend.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_156"#2|
              +-   function Curses_Version return String;
              ++   --  #1A NAME="AFU_157"#2|
              ++   function Curses_Version return String;
              +    --  AKA: curses_version()
              + 
              +-   --  #1A NAME="AFU_157"#2|
              ++   --  #1A NAME="AFU_158"#2|
              +    --  The returnvalue is the previous setting of the flag
              +-   function Use_Extended_Names (Enable : Boolean) return Boolean;
              ++   function Use_Extended_Names (Enable : Boolean) return Boolean;
              +    --  AKA: use_extended_names()
              + 
              +    --  |=====================================================================
              ++   --  | Man page curs_trace.3x
              ++   --  |=====================================================================
              ++
              ++   --  #1A NAME="AFU_159"#2|
              ++   procedure Curses_Free_All;
              ++   --  AKA: _nc_freeall()
              ++
              ++   --  |=====================================================================
              +    --  | Man page curs_scr_dump.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_158"#2|
              +-   procedure Screen_Dump_To_File (Filename : in String);
              ++   --  #1A NAME="AFU_160"#2|
              ++   procedure Screen_Dump_To_File (Filename : in String);
              +    --  AKA: scr_dump()
              + 
              +-   --  #1A NAME="AFU_159"#2|
              +-   procedure Screen_Restore_From_File (Filename : in String);
              ++   --  #1A NAME="AFU_161"#2|
              ++   procedure Screen_Restore_From_File (Filename : in String);
              +    --  AKA: scr_restore()
              + 
              +-   --  #1A NAME="AFU_160"#2|
              +-   procedure Screen_Init_From_File (Filename : in String);
              ++   --  #1A NAME="AFU_162"#2|
              ++   procedure Screen_Init_From_File (Filename : in String);
              +    --  AKA: scr_init()
              + 
              +-   --  #1A NAME="AFU_161"#2|
              +-   procedure Screen_Set_File (Filename : in String);
              ++   --  #1A NAME="AFU_163"#2|
              ++   procedure Screen_Set_File (Filename : in String);
              +    --  AKA: scr_set()
              + 
              +    --  |=====================================================================
              +@@ -1899,42 +1912,24 @@
              +    --  | Man page wresize.3x
              +    --  |=====================================================================
              + 
              +-   --  #1A NAME="AFU_162"#2|
              +-   procedure Resize (Win               : Window := Standard_Window;
              +-                     Number_Of_Lines   : Line_Count;
              +-                     Number_Of_Columns : Column_Count);
              ++   --  #1A NAME="AFU_164"#2|
              ++   procedure Resize (Win               : Window := Standard_Window;
              ++                     Number_Of_Lines   : Line_Count;
              ++                     Number_Of_Columns : Column_Count);
              +    --  AKA: wresize()
              + 
              + private
              +-   type Window is new System.Storage_Elements.Integer_Address;
              +-   Null_Window : constant Window := 0;
              ++   type Window is new System.Storage_Elements.Integer_Address;
              ++   Null_Window : constant Window := 0;
              + 
              +    --  The next constants are generated and may be different on your
              +    --  architecture.
              +    --
              +-   Offset_maxy        : constant Natural :=  2; --  short
              +-   Offset_maxx        : constant Natural :=  3; --  short
              +-   Offset_begy        : constant Natural :=  4; --  short
              +-   Offset_begx        : constant Natural :=  5; --  short
              +-   Offset_cury        : constant Natural :=  0; --  short
              +-   Offset_curx        : constant Natural :=  1; --  short
              +-   Offset_yoffset     : constant Natural := 36; --  short
              +-   Offset_pary        : constant Natural := 13; --  int
              +-   Offset_parx        : constant Natural := 12; --  int
              +-   Offset_notimeout   : constant Natural := 24; --  char
              +-   Offset_clear       : constant Natural := 25; --  char
              +-   Offset_leaveok     : constant Natural := 26; --  char
              +-   Offset_scroll      : constant Natural := 27; --  char
              +-   Offset_idlok       : constant Natural := 28; --  char
              +-   Offset_idcok       : constant Natural := 29; --  char
              +-   Offset_immed       : constant Natural := 30; --  char
              +-   Offset_sync        : constant Natural := 31; --  char
              +-   Offset_use_keypad  : constant Natural := 32; --  char
              +-   Sizeof_bool        : constant Natural :=  1; --  bool
              +-   Offset_XY          : constant Natural :=  1; --  int
              ++   Sizeof_bool        : constant Natural :=  1; --  bool
              ++   Offset_XY          : constant Natural :=  1; --  int
              + 
              +-   type Curses_Bool is mod 2 ** Interfaces.C.char'Size;
              +-   Curses_Bool_False : constant Curses_Bool := 0;
              ++   type Curses_Bool is mod 2 ** Interfaces.C.char'Size;
              ++   Curses_Bool_False : constant Curses_Bool := 0;
              + 
              +-end Terminal_Interface.Curses;
              ++end Terminal_Interface.Curses;
              + 
              +Index: doc/html/man/captoinfo.1m.html +--- ncurses-5.6/doc/html/man/captoinfo.1m.html 2006-12-16 22:51:21.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/captoinfo.1m.html 2007-03-04 00:10:34.000000000 +0000 +@@ -28,7 +28,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: captoinfo.1m,v 1.20 2006/05/13 15:14:01 tom Exp @ ++ * @Id: captoinfo.1m,v 1.21 2006/12/24 18:07:15 tom Exp @ + --> + + +@@ -166,7 +166,7 @@ + GG acs magic cookie count + + If the single-line capabilities occur in an entry, they +- will automatically be composed into an acsc string. The ++ will automatically be composed into an acsc string. The + double-line capabilities and GG are discarded with a warn- + ing message. + +@@ -183,11 +183,11 @@ + font2 s2ds + font3 s3ds + +- Additionally, the AIX box1 capability will be automati- +- cally translated to an acsc string. ++ Additionally, the AIX box1 capability will be automati- ++ cally translated to an acsc string. + + Hewlett-Packard's terminfo library supports two nonstan- +- dard terminfo capabilities meml (memory lock) and memu ++ dard terminfo capabilities meml (memory lock) and memu + (memory unlock). These will be discarded with a warning + message. + +@@ -195,7 +195,7 @@ + +

              NOTES

              +        This utility is actually a link to tic(1m), running in  -I
              +-       mode.  You can use other tic options such as -f and  -x.
              ++       mode.  You can use other tic options such as -f and  -x.
              + 
              +        The  trace  option isn't identical to SVr4's.  Under SVr4,
              +        instead of following the -v with  a  trace  level  n,  you
              +@@ -206,7 +206,7 @@
              + 

              SEE ALSO

              +        infocmp(1m), curses(3x), terminfo(5)
              + 
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/clear.1.html +--- ncurses-5.6/doc/html/man/clear.1.html 2006-12-16 22:51:21.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/clear.1.html 2007-03-04 00:10:34.000000000 +0000 +@@ -27,7 +27,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: clear.1,v 1.5 2006/07/01 21:55:09 tom Exp @ ++ * @Id: clear.1,v 1.6 2006/12/24 18:07:53 tom Exp @ + --> + + +@@ -69,7 +69,7 @@ +

              SEE ALSO

              +        tput(1), terminfo(5)
              + 
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/curs_add_wch.3x.html
              +--- ncurses-5.6/doc/html/man/curs_add_wch.3x.html	2006-12-16 22:51:22.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_add_wch.3x.html	2006-12-24 15:50:48.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_add_wch.3x,v 1.5 2006/12/02 17:02:35 tom Exp @
              ++  * @Id: curs_add_wch.3x,v 1.6 2006/12/24 15:22:22 tom Exp @
              + -->
              + 
              + 
              +@@ -87,8 +87,7 @@
              + 
              +        -    If  the  character  part  of  wch  is a tab, newline,
              +             backspace or other control character, the  window  is
              +-            updated  and  the  cursor  moves as if addch(3x) were
              +-            called.
              ++            updated and the cursor moves as if addch were called.
              + 
              +        The echo_wchar function is functionally  equivalent  to  a
              +        call to add_wch followed by a call to refresh.  Similarly,
              +@@ -125,9 +124,8 @@
              + 
              + 
              +

              SEE ALSO

              +-       curses(3x),       curs_addch(3x),       curs_attr_get(3x),
              +-       curs_clear(3x),    curs_outopts(3x),     curs_refresh(3x),
              +-       putwc(3)
              ++       curses(3x), curs_addch(3x), curs_attr(3x), curs_clear(3x),
              ++       curs_outopts(3x), curs_refresh(3x), putwc(3)
              + 
              + 
              + 
              +Index: doc/html/man/curs_addch.3x.html
              +--- ncurses-5.6/doc/html/man/curs_addch.3x.html	2006-12-16 22:51:22.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_addch.3x.html	2006-12-24 17:02:31.000000000 +0000
              +@@ -28,7 +28,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_addch.3x,v 1.25 2006/12/02 17:02:22 tom Exp @
              ++  * @Id: curs_addch.3x,v 1.26 2006/12/24 16:05:17 tom Exp @
              + -->
              + 
              + 
              +@@ -192,7 +192,7 @@
              + 
              +

              SEE ALSO

              +        curses(3x), curs_attr(3x), curs_clear(3x),  curs_inch(3x),
              +-       curs_outopts(3x), curs_refresh(3x), putc(3S).
              ++       curs_outopts(3x), curs_refresh(3x), putc(3).
              + 
              +        Comparable  functions  in  the  wide-character  (ncursesw)
              +        library are described in curs_add_wch(3x).
              +Index: doc/html/man/curs_border.3x.html
              +--- ncurses-5.6/doc/html/man/curs_border.3x.html	2006-09-23 20:43:00.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_border.3x.html	2007-03-04 00:10:36.000000000 +0000
              +@@ -1,7 +1,7 @@
              + 
              + 
              + 
              + 
              +@@ -65,8 +65,8 @@
              +        int whline(WINDOW *win, chtype ch, int n);
              +        int vline(chtype ch, int n);
              +        int wvline(WINDOW *win, chtype ch, int n);
              +-       mvhline(int y, int x, chtype ch, int n);
              +-       mvwhline(WINDOW *, int y, int x, chtype ch, int n);
              ++       int mvhline(int y, int x, chtype ch, int n);
              ++       int mvwhline(WINDOW *, int y, int x, chtype ch, int n);
              +        int mvvline(int y, int x, chtype ch, int n);
              +        int mvwvline(WINDOW *, int y, int x, chtype ch, int n);
              + 
              +Index: doc/html/man/curs_extend.3x.html
              +--- ncurses-5.6/doc/html/man/curs_extend.3x.html	2006-09-23 20:43:01.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_extend.3x.html	2007-03-04 00:10:37.000000000 +0000
              +@@ -28,7 +28,7 @@
              +   * authorization.                                                           *
              +   ****************************************************************************
              +   * Author: Thomas E. Dickey 1999-on
              +-  * @Id: curs_extend.3x,v 1.15 2006/02/25 21:04:43 tom Exp @
              ++  * @Id: curs_extend.3x,v 1.17 2006/12/24 18:01:48 tom Exp @
              + -->
              + 
              + 
              +@@ -73,7 +73,7 @@
              +        standard names which may be  compiled  into  the  terminfo
              +        description, i.e., via the terminfo or termcap interfaces.
              +        Normally these names are  available  for  use,  since  the
              +-       essential  decision  is made by using the -x option of tic
              ++       essential  decision  is made by using the -x option of tic
              +        to compile extended terminal definitions.  However you can
              +        disable  this  feature  to ensure compatibility with other
              +        implementations of curses.
              +@@ -90,8 +90,8 @@
              + 
              +

              SEE ALSO

              +        curs_getch(3x),       curs_mouse(3x),      curs_print(3x),
              +-       default_colors(3x),     define_key(3x),      keybound(3x),
              +-       keyok(3x), nofilter(3x), resizeterm(3x), wresize(3x).
              ++       curs_util(3x),  default_colors(3x),  define_key(3x),  key-
              ++       bound(3x), keyok(3x), resizeterm(3x), wresize(3x).
              + 
              + 
              + 
              +Index: doc/html/man/curs_getcchar.3x.html +--- ncurses-5.6/doc/html/man/curs_getcchar.3x.html 2006-09-23 20:43:01.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/curs_getcchar.3x.html 2006-12-24 17:02:34.000000000 +0000 +@@ -27,7 +27,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_getcchar.3x,v 1.8 2006/07/15 22:51:07 wcmbrine Exp @ ++ * @Id: curs_getcchar.3x,v 1.10 2006/12/24 16:00:02 tom Exp @ + --> + + +@@ -136,8 +136,8 @@ + +
              +

              SEE ALSO

              +-       Functions:   curses(3x),  wcwidth(3x),  curs_attr_get(3x),
              +-       can_change_color(3x).
              ++       Functions:   curs_attr(3x),   curs_color(3x),  curses(3x),
              ++       wcwidth(3).
              + 
              + 
              + 
              +Index: doc/html/man/curs_insstr.3x.html
              +--- ncurses-5.6/doc/html/man/curs_insstr.3x.html	2006-09-23 20:43:04.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_insstr.3x.html	2006-12-24 15:50:54.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_insstr.3x,v 1.17 2006/02/25 21:49:19 tom Exp @
              ++  * @Id: curs_insstr.3x,v 1.18 2006/12/24 14:59:30 tom Exp @
              + -->
              + 
              + 
              +@@ -112,7 +112,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       curses(3x), unctrl(3x), curs_clear(3x), curs_inch(3x).
              ++       curses(3x),  curs_util(3x), curs_clear(3x), curs_inch(3x).
              + 
              + 
              + 
              +Index: doc/html/man/curs_mouse.3x.html
              +--- ncurses-5.6/doc/html/man/curs_mouse.3x.html	2005-05-15 17:05:53.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_mouse.3x.html	2007-03-04 00:10:40.000000000 +0000
              +@@ -2,7 +2,7 @@
              + 
              + 
              + 
              +@@ -162,45 +162,48 @@
              +        screen windows enclose the location of a mouse event.
              + 
              +        The wmouse_trafo function transforms a given pair of coor-
              +-       dinates from stdscr-relative coordinates  to  screen-rela-
              +-       tive  coordinates  or  vice  versa.  Please remember, that
              +-       stdscr-relative coordinates are not  always  identical  to
              +-       screen-relative  coordinates  due  to the mechanism to re-
              +-       serve lines on top or bottom of the screen for other  pur-
              +-       poses  (ripoff()  call,  see also slk_...  functions).  If
              +-       the parameter to_screen is TRUE, the pointers pY, pX  must
              +-       reference  the coordinates of a location inside the window
              +-       win.  They are converted  to  screen-relative  coordinates
              +-       and  returned through the pointers.  If the conversion was
              +-       successful, the function returns TRUE.  If one of the  pa-
              +-       rameters  was  NULL or the location is not inside the win-
              +-       dow, FALSE is returned.  If to_screen is FALSE, the point-
              +-       ers  pY,  pX  must  reference screen-relative coordinates.
              +-       They are converted to stdscr-relative coordinates  if  the
              +-       window win encloses this point.  In this case the function
              +-       returns TRUE.  If one of the parameters  is  NULL  or  the
              +-       point is not inside the window, FALSE is returned.  Please
              +-       notice, that the referenced coordinates are only  replaced
              +-       by  the  converted  coordinates  if the transformation was
              +-       successful.
              ++       dinates from stdscr-relative  coordinates  to  coordinates
              ++       relative to the given window or vice versa.  Please remem-
              ++       ber, that stdscr-relative coordinates are not always iden-
              ++       tical  to window-relative coordinates due to the mechanism
              ++       to reserve lines on top or bottom of the screen for  other
              ++       purposes (see the ripoffline() and slk_init calls, for ex-
              ++       ample).  If the parameter to_screen is TRUE, the  pointers
              ++       pY, pX must reference the coordinates of a location inside
              ++       the window win.  They are converted to window-relative co-
              ++       ordinates  and returned through the pointers.  If the con-
              ++       version was successful, the function returns TRUE.  If one
              ++       of  the  parameters was NULL or the location is not inside
              ++       the window, FALSE is returned.  If to_screen is FALSE, the
              ++       pointers  pY,  pX  must  reference window-relative coordi-
              ++       nates.  They are converted to stdscr-relative  coordinates
              ++       if  the  window win encloses this point.  In this case the
              ++       function returns TRUE.  If one of the parameters  is  NULL
              ++       or  the point is not inside the window, FALSE is returned.
              ++       Please notice, that the referenced  coordinates  are  only
              ++       replaced  by  the converted coordinates if the transforma-
              ++       tion was successful.
              ++
              ++       The mouse_trafo function performs the same translation  as
              ++       wmouse_trafo, using stdscr for win.
              + 
              +        The mouseinterval function sets the maximum time (in thou-
              +-       sands  of  a second) that can elapse between press and re-
              +-       lease events for them to be recognized as  a  click.   Use
              +-       mouseinterval(0)  to disable click resolution.  This func-
              ++       sands of a second) that can elapse between press  and  re-
              ++       lease  events  for  them to be recognized as a click.  Use
              ++       mouseinterval(0) to disable click resolution.  This  func-
              +        tion returns the previous interval value.  Use mouseinter-
              +-       val(-1)  to  obtain the interval without altering it.  The
              ++       val(-1) 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  get-
              ++       is  being simulated in a window by a function such as get-
              +        str that expects a linefeed for input-loop termination.
              + 
              + 
              + 
              +

              RETURN VALUE

              +-       getmouse  and ungetmouse return the integer ERR upon fail-
              ++       getmouse and ungetmouse return the integer ERR upon  fail-
              +        ure or OK upon successful completion.
              + 
              +               getmouse
              +@@ -212,83 +215,85 @@
              + 
              +        mousemask returns the mask of reportable events.
              + 
              +-       mouseinterval  returns the previous interval value, unless
              +-       the terminal was not initialized.  In that  case,  it  re-
              ++       mouseinterval returns the previous interval value,  unless
              ++       the  terminal  was  not initialized.  In that case, it re-
              +        turns the maximum interval value (166).
              + 
              +-       wenclose  and wmouse_trafo are boolean functions returning
              ++       wenclose and wmouse_trafo are boolean functions  returning
              +        TRUE or FALSE depending on their test result.
              + 
              + 
              + 
              +

              PORTABILITY

              +-       These calls were designed for  ncurses(3x),  and  are  not
              ++       These  calls  were  designed  for ncurses(3x), and are not
              +        found in SVr4 curses, 4.4BSD curses, or any other previous
              +        version of curses.
              + 
              +        The feature macro NCURSES_MOUSE_VERSION is provided so the
              +-       preprocessor  can  be  used to test whether these features
              +-       are present.  If the interface is changed,  the  value  of
              +-       NCURSES_MOUSE_VERSION  will  be incremented.  These values
              +-       for NCURSES_MOUSE_VERSION may be specified when  configur-
              ++       preprocessor can be used to test  whether  these  features
              ++       are  present.   If  the interface is changed, the value of
              ++       NCURSES_MOUSE_VERSION will be incremented.   These  values
              ++       for  NCURSES_MOUSE_VERSION may be specified when configur-
              +        ing ncurses:
              + 
              +-              1  has  definitions  for reserved events.  The mask
              ++              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
              ++                 nitions for reserved events.  The mask  uses  29
              +                  bits.
              + 
              +-       The order of the MEVENT structure members is  not  guaran-
              +-       teed.   Additional fields may be added to the structure in
              ++       The  order  of the MEVENT structure members is not guaran-
              ++       teed.  Additional fields may be added to the structure  in
              +        the future.
              + 
              +-       Under ncurses(3x), these calls are implemented  using  ei-
              +-       ther  xterm's built-in mouse-tracking API or platform-spe-
              ++       Under  ncurses(3x),  these calls are implemented using ei-
              ++       ther xterm's built-in mouse-tracking API or  platform-spe-
              +        cific drivers including
              +               Alessandro Rubini's gpm server.
              +               FreeBSD sysmouse
              +               OS/2 EMX
              +-       If you  are  using  an  unsupported  configuration,  mouse
              +-       events will not be visible to ncurses(3x) (and the wmouse-
              ++       If  you  are  using  an  unsupported  configuration, mouse
              ++       events will not be visible to ncurses(3x) (and the  mouse-
              +        mask function will always return 0).
              + 
              +-       If the terminfo entry contains a XM string, this  is  used
              +-       in  the xterm mouse driver to control the way the terminal
              ++       If  the  terminfo entry contains a XM string, this is used
              ++       in the xterm mouse driver to control the way the  terminal
              +        is initialized for mouse operation.  The default, if XM 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.
              + 
              + 
              + 
              +

              BUGS

              +-       Mouse events under xterm will not in fact be ignored  dur-
              +-       ing  cooked mode, if they have been enabled by wmousemask.
              +-       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  mousemask.
              ++       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 de-
              +-       scription must have kmous 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,  ncurses assumes that if your $TERM envi-
              +-       ronment variable contains "xterm", or kmous is defined  in
              ++       a  window  with  its keypad bit off, since they are inter-
              ++       preted as a variety of function key.   Your  terminfo  de-
              ++       scription  should  have kmous set to "\E[M" (the beginning
              ++       of the response from xterm for mouse clicks).  Other  val-
              ++       ues  for  kmous  are permitted, but under the same assump-
              ++       tion, i.e., it is the beginning of the response.
              ++
              ++       Because there are  no  standard  terminal  responses  that
              ++       would  serve to identify terminals which support the xterm
              ++       mouse protocol, ncurses assumes that if your  $TERM  envi-
              ++       ronment  variable contains "xterm", or kmous is defined in
              +        the terminal description, then the terminal may send mouse
              +        events.
              + 
              + 
              + 
              +

              SEE ALSO

              +-       curses(3x).
              ++       curses(3x), curs_kernel(3x), curs_slk(3x).
              + 
              + 
              + 
              +Index: doc/html/man/curs_printw.3x.html
              +--- ncurses-5.6/doc/html/man/curs_printw.3x.html	2006-09-23 20:43:06.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_printw.3x.html	2006-12-24 17:02:39.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_printw.3x,v 1.16 2006/02/25 21:49:19 tom Exp @
              ++  * @Id: curs_printw.3x,v 1.17 2006/12/24 16:05:17 tom Exp @
              + -->
              + 
              + 
              +@@ -69,12 +69,12 @@
              + 
              +

              DESCRIPTION

              +        The  printw,  wprintw, mvprintw and mvwprintw routines are
              +-       analogous to printf  [see  printf(3S)].   In  effect,  the
              ++       analogous to  printf  [see  printf(3)].   In  effect,  the
              +        string that would be output by printf is output instead as
              +        though waddstr were used on the given window.
              + 
              +        The vwprintw  and  wv_printw  routines  are  analogous  to
              +-       vprintf  [see  printf(3S)]  and  perform a wprintw using a
              ++       vprintf  [see  printf(3)]  and  perform  a wprintw using a
              +        variable argument list.  The third argument is a  va_list,
              +        a   pointer   to  a  list  of  arguments,  as  defined  in
              +        <stdarg.h>.
              +@@ -107,7 +107,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       curses(3x), printf(3S), vprintf(3S)
              ++       curses(3x), printf(3), vprintf(3)
              + 
              + 
              + 
              +Index: doc/html/man/curs_scanw.3x.html
              +--- ncurses-5.6/doc/html/man/curs_scanw.3x.html	2006-09-23 20:43:07.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_scanw.3x.html	2006-12-24 17:02:39.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_scanw.3x,v 1.13 2006/02/25 21:42:22 tom Exp @
              ++  * @Id: curs_scanw.3x,v 1.14 2006/12/24 16:05:49 tom Exp @
              + -->
              + 
              + 
              +@@ -66,7 +66,7 @@
              + 
              +

              DESCRIPTION

              +        The scanw, wscanw and mvscanw routines  are  analogous  to
              +-       scanf [see scanf(3S)].  The effect of these routines is as
              ++       scanf  [see scanf(3)].  The effect of these routines is as
              +        though wgetstr were called on the window, and the  result-
              +        ing line used as input for sscanf(3).  Fields which do not
              +        map to a variable in the fmt field are lost.
              +@@ -114,7 +114,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       curses(3x), curs_getstr(3x), curs_printw(3x), scanf(3S)
              ++       curses(3x), curs_getstr(3x), curs_printw(3x), scanf(3)
              + 
              + 
              + 
              +Index: doc/html/man/curs_scr_dump.3x.html
              +--- ncurses-5.6/doc/html/man/curs_scr_dump.3x.html	2006-09-23 20:43:07.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_scr_dump.3x.html	2006-12-24 17:02:39.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_scr_dump.3x,v 1.6 2006/02/25 21:49:19 tom Exp @
              ++  * @Id: curs_scr_dump.3x,v 1.7 2006/12/24 16:05:49 tom Exp @
              + -->
              + 
              + 
              +@@ -122,7 +122,7 @@
              + 
              +

              SEE ALSO

              +        curses(3x),      curs_initscr(3x),       curs_refresh(3x),
              +-       curs_util(3x), system(3S)
              ++       curs_util(3x), system(3)
              + 
              + 
              + 
              +Index: doc/html/man/curs_termcap.3x.html
              +--- ncurses-5.6/doc/html/man/curs_termcap.3x.html	2006-09-23 20:43:08.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_termcap.3x.html	2006-12-24 17:02:40.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: curs_termcap.3x,v 1.20 2006/02/25 21:50:01 tom Exp @
              ++  * @Id: curs_termcap.3x,v 1.21 2006/12/24 16:05:49 tom Exp @
              + -->
              + 
              + 
              +@@ -175,7 +175,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       curses(3x), terminfo(5), putc(3S).
              ++       curses(3x), terminfo(5), putc(3).
              + 
              + 
              + 
              +Index: doc/html/man/curs_terminfo.3x.html
              +--- ncurses-5.6/doc/html/man/curs_terminfo.3x.html	2006-12-16 22:51:32.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_terminfo.3x.html	2007-03-04 00:10:43.000000000 +0000
              +@@ -1,7 +1,7 @@
              + 
              + 
              + 
              + 
              +@@ -62,7 +62,7 @@
              +        int setterm(char *term);
              +        TERMINAL *set_curterm(TERMINAL *nterm);
              +        int del_curterm(TERMINAL *oterm);
              +-       int restartterm(const char *term, int fildes, int *errret);
              ++       int restartterm(char *term, int fildes, int *errret);
              +        char *tparm(char *str, ...);
              +        int tputs(const char *str, int affcnt, int (*putc)(int));
              +        int putp(const char *str);
              +@@ -318,7 +318,7 @@
              + 
              +

              SEE ALSO

              +        curses(3x),  curs_initscr(3x), curs_kernel(3x), curs_term-
              +-       cap(3x), putc(3S), terminfo(5)
              ++       cap(3x), putc(3), terminfo(5)
              + 
              + 
              + 
              +Index: doc/html/man/curs_trace.3x.html
              +--- ncurses-5.6/doc/html/man/curs_trace.3x.html	2005-05-15 17:05:56.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_trace.3x.html	2007-03-04 00:10:43.000000000 +0000
              +@@ -1,7 +1,7 @@
              + 
              + 
              + 
              + 
              +@@ -61,7 +61,7 @@
              +        char *_traceattr(attr_t attr);
              +        char *_traceattr2(int buffer, chtype ch);
              +        char *_nc_tracebits(void);
              +-       char *_tracechar(const unsigned char ch);
              ++       char *_tracechar(int);
              +        char *_tracechtype(chtype ch);
              +        char *_tracechtype2(int buffer, chtype ch);
              +        char *_tracemouse(const MEVENT *event);
              +Index: doc/html/man/curs_util.3x.html
              +--- ncurses-5.6/doc/html/man/curs_util.3x.html	2006-09-23 20:43:09.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/curs_util.3x.html	2007-03-04 00:10:43.000000000 +0000
              +@@ -1,7 +1,7 @@
              + 
              + 
              + 
              + 
              +@@ -57,7 +57,7 @@
              +        #include <curses.h>
              + 
              +        char *unctrl(chtype c);
              +-       char *wunctrl(cchar_t *c);
              ++       wchar_t *wunctrl(cchar_t *c);
              +        char *keyname(int c);
              +        char *key_name(wchar_t w);
              +        void filter(void);
              +@@ -191,8 +191,8 @@
              + 
              + 
              +

              SEE ALSO

              +-       use_legacy_coding(3),    curses(3x),     curs_initscr(3x),
              +-       curs_kernel(3x), curs_scr_dump(3x).
              ++       legacy_coding(3x), curses(3x), curs_initscr(3x), curs_ker-
              ++       nel(3x), curs_scr_dump(3x).
              + 
              + 
              + 
              +Index: doc/html/man/default_colors.3x.html
              +--- ncurses-5.6/doc/html/man/default_colors.3x.html	2006-09-23 20:43:09.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/default_colors.3x.html	2006-12-24 15:50:59.000000000 +0000
              +@@ -28,7 +28,7 @@
              +   * authorization.                                                           *
              +   ****************************************************************************
              +   * Author: Thomas E. Dickey 1997,1999,2000,2005
              +-  * @Id: default_colors.3x,v 1.19 2006/02/25 21:49:19 tom Exp @
              ++  * @Id: default_colors.3x,v 1.20 2006/12/24 15:02:53 tom Exp @
              + -->
              + 
              + 
              +@@ -121,7 +121,7 @@
              + 
              + 
              +

              NOTES

              +-       Associated with this extension, the init_pair(3x) function
              ++       Associated  with  this  extension,  the init_pair function
              +        accepts negative arguments to specify  default  foreground
              +        or background colors.
              + 
              +Index: doc/html/man/form.3x.html
              +--- ncurses-5.6/doc/html/man/form.3x.html	2006-12-16 22:51:33.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/form.3x.html	2007-03-04 00:10:44.000000000 +0000
              +@@ -236,7 +236,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/form_field_new.3x.html
              +--- ncurses-5.6/doc/html/man/form_field_new.3x.html	2006-12-16 22:51:35.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/form_field_new.3x.html	2006-12-24 15:51:01.000000000 +0000
              +@@ -28,7 +28,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: form_field_new.3x,v 1.14 2006/11/04 17:12:00 tom Exp @
              ++  * @Id: form_field_new.3x,v 1.15 2006/12/24 14:56:41 tom Exp @
              + -->
              + 
              + 
              +@@ -127,9 +127,9 @@
              +        were not supported on Version 7 or BSD versions.
              + 
              +        It may be unwise to count on the set of attributes  copied
              +-       by  dup_field(3x)  being  portable;  the  System  V  forms
              +-       library documents are not very explicit  about  what  gets
              +-       copied and what doesn't.
              ++       by  dup_field  being  portable; the System V forms library
              ++       documents are not very explicit about what gets copied and
              ++       what doesn't.
              + 
              + 
              + 
              +Index: doc/html/man/form_field_opts.3x.html +--- ncurses-5.6/doc/html/man/form_field_opts.3x.html 2006-12-16 22:51:36.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/form_field_opts.3x.html 2007-03-04 00:10:46.000000000 +0000 +@@ -2,7 +2,7 @@ + + + +@@ -54,10 +54,10 @@ + +

              SYNOPSIS

              +        #include <form.h>
              +-       int set_field_opts(FIELD *field, OPTIONS opts);
              +-       int field_opts_on(FIELD *field, OPTIONS opts);
              +-       int field_opts_off(FIELD *field, OPTIONS opts);
              +-       OPTIONS field_opts(const FIELD *field);
              ++       int set_field_opts(FIELD *field, Field_Options opts);
              ++       int field_opts_on(FIELD *field, Field_Options opts);
              ++       int field_opts_off(FIELD *field, Field_Options opts);
              ++       Field_Options field_opts(const FIELD *field);
              + 
              + 
              + 
              +Index: doc/html/man/form_field_validation.3x.html +--- ncurses-5.6/doc/html/man/form_field_validation.3x.html 2006-12-16 22:51:36.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/form_field_validation.3x.html 2006-12-24 17:02:44.000000000 +0000 +@@ -27,7 +27,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: form_field_validation.3x,v 1.15 2006/11/04 17:14:19 tom Exp @ ++ * @Id: form_field_validation.3x,v 1.16 2006/12/24 16:08:08 tom Exp @ + --> + + +@@ -124,16 +124,16 @@ + Regular expression data. Requires a regular expres- + sion (char *) third argument; the data is valid if + the regular expression matches it. Regular expres- +- sions are in the format of regcomp(3x) and +- regexec(3x). Please notice that the regular expres- +- sion must match the whole field. If you have for +- example an eight character wide field, a regular +- expression "^[0-9]*$" always means that you have to +- fill all eight positions with digits. If you want to +- allow fewer digits, you may use for example "^[0-9]* +- *$" which is good for trailing spaces (up to an empty +- field), or "^ *[0-9]* *$" which is good for leading +- and trailing spaces around the digits. ++ sions are in the format of regcomp and regexec. ++ Please notice that the regular expression must match ++ the whole field. If you have for example an eight ++ character wide field, a regular expression "^[0-9]*$" ++ always means that you have to fill all eight posi- ++ tions with digits. If you want to allow fewer digits, ++ you may use for example "^[0-9]* *$" which is good ++ for trailing spaces (up to an empty field), or "^ ++ *[0-9]* *$" which is good for leading and trailing ++ spaces around the digits. + + TYPE_IPV4 + An Internet Protocol Version 4 address. This requires +Index: doc/html/man/form_hook.3x.html +--- ncurses-5.6/doc/html/man/form_hook.3x.html 2006-12-16 22:51:36.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/form_hook.3x.html 2007-03-04 00:10:46.000000000 +0000 +@@ -2,7 +2,7 @@ + + + +@@ -55,14 +55,14 @@ + +

              SYNOPSIS

              +        #include <form.h>
              +-       int set_field_init(FORM *form, void (*func)(FORM *));
              +-       void (*)(FORM *) field_init(const FORM *form);
              +-       int set_field_term(FORM *form, void (*func)(FORM *));
              +-       void (*)(FORM *) field_term(const FORM *form);
              +-       int set_form_init(FORM *form, void (*func)(FORM *));
              +-       void (*)(FORM *) form_init(const FORM *form);
              +-       int set_form_term(FORM *form, void (*func)(FORM *));
              +-       void (*)(FORM *) form_term(const FORM *form);
              ++       int set_field_init(FORM *form, Form_Hook func);
              ++       Form_Hook field_init(const FORM *form);
              ++       int set_field_term(FORM *form, Form_Hook func);
              ++       Form_Hook field_term(const FORM *form);
              ++       int set_form_init(FORM *form, Form_Hook func);
              ++       Form_Hook form_init(const FORM *form);
              ++       int set_form_term(FORM *form, Form_Hook func);
              ++       Form_Hook form_term(const FORM *form);
              + 
              + 
              + 
              +Index: doc/html/man/form_opts.3x.html +--- ncurses-5.6/doc/html/man/form_opts.3x.html 2006-12-16 22:51:37.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/form_opts.3x.html 2007-03-04 00:10:47.000000000 +0000 +@@ -2,7 +2,7 @@ + + + +@@ -54,10 +54,10 @@ + +

              SYNOPSIS

              +        #include <form.h>
              +-       int set_form_opts(FORM *form, OPTIONS opts);
              +-       int form_opts_on(FORM *form, OPTIONS opts);
              +-       int form_opts_off(FORM *form, OPTIONS opts);
              +-       OPTIONS form_opts(const FORM *form);
              ++       int set_form_opts(FORM *form, Field_Options opts);
              ++       int form_opts_on(FORM *form, Field_Options opts);
              ++       int form_opts_off(FORM *form, Field_Options opts);
              ++       Field_Options form_opts(const FORM *form);
              + 
              + 
              + 
              +Index: doc/html/man/index.html +Prereq: 1.2 +--- ncurses-5.6/doc/html/man/index.html 2006-04-22 22:29:12.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/index.html 2006-12-24 23:05:35.000000000 +0000 +@@ -1,6 +1,6 @@ + + + + +@@ -423,7 +423,7 @@ + captoinfo(1m), infotocap(1m), tic(1m), toe(1m), + curses(3x), terminfo(5). + +- This describes ncurses version 5.5 (patch 20061209). ++ This describes ncurses version 5.6 (patch 20070303). + + + +Index: doc/html/man/infotocap.1m.html +--- ncurses-5.6/doc/html/man/infotocap.1m.html 2006-12-16 22:51:38.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/infotocap.1m.html 2007-03-04 00:10:48.000000000 +0000 +@@ -28,7 +28,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: infotocap.1m,v 1.6 2006/05/13 15:35:45 tom Exp @ ++ * @Id: infotocap.1m,v 1.8 2006/12/24 20:13:56 tom Exp @ + --> + + +@@ -85,7 +85,7 @@ + + +

              NOTES

              +-       This utility is actually a link to tic(1m), running in  -C
              ++       This utility is actually a link  to  tic,  running  in  -C
              +        mode.  You can use other tic options such as -f and  -x.
              + 
              + 
              +@@ -93,7 +93,7 @@
              + 

              SEE ALSO

              +        curses(3x), tic(1m), infocmp(1m), terminfo(5)
              + 
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/legacy_coding.3x.html
              +--- ncurses-5.6/doc/html/man/legacy_coding.3x.html	2006-09-23 20:43:15.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/legacy_coding.3x.html	2006-12-24 15:51:05.000000000 +0000
              +@@ -28,7 +28,7 @@
              +   * authorization.                                                           *
              +   ****************************************************************************
              +   * Author: Thomas E. Dickey
              +-  * @Id: legacy_coding.3x,v 1.2 2006/02/25 21:50:01 tom Exp @
              ++  * @Id: legacy_coding.3x,v 1.3 2006/12/24 15:12:55 tom Exp @
              + -->
              + 
              + 
              +@@ -70,21 +70,20 @@
              +        The level parameter controls the result:
              + 
              +               0    the library functions normally, rendering non-
              +-                   printing   characters  as  described  in  unc-
              +-                   trl(3x).
              ++                   printing characters as described in unctrl.
              + 
              +-              1    the library ignores isprintf for codes in  the
              ++              1    the  library ignores isprintf for codes in the
              +                    range 160-255.
              + 
              +-              2    the  library ignores isprintf for codes in the
              ++              2    the library ignores isprintf for codes in  the
              +                    range 128-255.  It also modifies the output of
              +-                   unctrl,  showing codes in the range 128-159 as
              ++                   unctrl, showing codes in the range 128-159  as
              +                    is.
              + 
              + 
              + 
              +

              RETURN VALUE

              +-       If the screen has  not  been  initialized,  or  the  level
              ++       If  the  screen  has  not  been  initialized, or the level
              +        parameter is out of range, the function returns ERR.  Oth-
              +        erwise, it returns the previous level: 0, 1 or 2.
              + 
              +@@ -93,7 +92,7 @@
              + 

              PORTABILITY

              +        This routine is specific to ncurses.  It was not supported
              +        on Version 7, BSD or System V implementations.  It is rec-
              +-       ommended that any code depending on ncurses extensions  be
              ++       ommended  that any code depending on ncurses extensions be
              +        conditioned using NCURSES_VERSION.
              + 
              + 
              +@@ -104,7 +103,7 @@
              + 
              + 
              +

              AUTHOR

              +-       Thomas  Dickey (to support lynx's font-switching feature).
              ++       Thomas Dickey (to support lynx's font-switching  feature).
              + 
              + 
              + 
              +Index: doc/html/man/menu.3x.html
              +--- ncurses-5.6/doc/html/man/menu.3x.html	2006-12-16 22:51:40.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/menu.3x.html	2007-03-04 00:10:49.000000000 +0000
              +@@ -226,7 +226,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/menu_hook.3x.html
              +--- ncurses-5.6/doc/html/man/menu_hook.3x.html	2006-12-16 22:51:41.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/menu_hook.3x.html	2007-03-04 00:10:50.000000000 +0000
              +@@ -2,7 +2,7 @@
              + 
              + 
              + 
              +@@ -55,14 +55,14 @@
              + 
              +

              SYNOPSIS

              +        #include <menu.h>
              +-       int set_item_init(MENU *menu, void (*func)(MENU *));
              +-       void (*)(MENU *) item_init(const MENU *menu);
              +-       int set_item_term(MENU *menu, void (*func)(MENU *));
              +-       void (*)(MENU *) item_term(const MENU *menu);
              +-       int set_menu_init(MENU *menu, void (*func)(MENU *));
              +-       void (*)(MENU *) menu_init(const MENU *menu);
              +-       int set_menu_term(MENU *menu, void (*func)(MENU *));
              +-       void (*)(MENU *) menu_term(const MENU *menu);
              ++       int set_item_init(MENU *menu, Menu_Hook func);
              ++       Menu_Hook item_init(const MENU *menu);
              ++       int set_item_term(MENU *menu, Menu_Hook func);
              ++       Menu_Hook item_term(const MENU *menu);
              ++       int set_menu_init(MENU *menu, Menu_Hook func);
              ++       Menu_Hook menu_init(const MENU *menu);
              ++       int set_menu_term(MENU *menu, Menu_Hook func);
              ++       Menu_Hook menu_term(const MENU *menu);
              + 
              + 
              + 
              +Index: doc/html/man/menu_opts.3x.html +--- ncurses-5.6/doc/html/man/menu_opts.3x.html 2006-12-16 22:51:42.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/menu_opts.3x.html 2007-03-04 00:10:50.000000000 +0000 +@@ -2,7 +2,7 @@ + + + +@@ -54,10 +54,10 @@ +
              +

              SYNOPSIS

              +        #include <menu.h>
              +-       int set_menu_opts(MENU *menu, OPTIONS opts);
              +-       int menu_opts_on(MENU *menu, OPTIONS opts);
              +-       int menu_opts_off(MENU *menu, OPTIONS opts);
              +-       OPTIONS menu_opts(const MENU *menu);
              ++       int set_menu_opts(MENU *menu, Menu_Options opts);
              ++       int menu_opts_on(MENU *menu, Menu_Options opts);
              ++       int menu_opts_off(MENU *menu, Menu_Options opts);
              ++       Menu_Options menu_opts(const MENU *menu);
              + 
              + 
              + 
              +Index: doc/html/man/mitem_opts.3x.html +--- ncurses-5.6/doc/html/man/mitem_opts.3x.html 2006-12-16 22:51:44.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/mitem_opts.3x.html 2007-03-04 00:10:52.000000000 +0000 +@@ -2,7 +2,7 @@ + + + +@@ -54,10 +54,10 @@ +
              +

              SYNOPSIS

              +        #include <menu.h>
              +-       int set_item_opts(ITEM *item, OPTIONS opts);
              +-       int item_opts_on(ITEM *item, OPTIONS opts);
              +-       int item_opts_off(ITEM *item, OPTIONS opts);
              +-       OPTIONS item_opts(const ITEM *item);
              ++       int set_item_opts(ITEM *item, Item_Options opts);
              ++       int item_opts_on(ITEM *item, Item_Options opts);
              ++       int item_opts_off(ITEM *item, Item_Options opts);
              ++       Item_Options item_opts(const ITEM *item);
              + 
              + 
              + 
              +Index: doc/html/man/ncurses.3x.html +--- ncurses-5.6/doc/html/man/ncurses.3x.html 2006-12-16 22:51:45.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/ncurses.3x.html 2007-03-04 00:10:53.000000000 +0000 +@@ -28,7 +28,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: ncurses.3x,v 1.81 2006/12/02 19:23:11 tom Exp @ ++ * @Id: ncurses.3x,v 1.82 2006/12/24 14:44:05 tom Exp @ + --> + + +@@ -63,7 +63,7 @@ + sonable optimization. This implementation is ``new + curses'' (ncurses) and is the approved replacement for + 4.4BSD classic curses, which has been discontinued. This +- describes ncurses version 5.5 (patch 20061209). ++ describes ncurses version 5.6 (patch 20070303). + + The ncurses routines emulate the curses(3x) library of + System V Release 4 UNIX, and the XPG4 curses standard (XSI +@@ -774,9 +774,9 @@ + NCURSES_ASSUMED_COLORS + Override the compiled-in assumption that the termi- + nal's default colors are white-on-black (see +- assume_default_colors(3x)). You may set the fore- +- ground and background color values with this environ- +- ment variable by proving a 2-element list: ++ default_colors(3x)). You may set the foreground and ++ background color values with this environment vari- ++ able by proving a 2-element list: + foreground,background. For example, to tell ncurses + to not assume anything about the colors, set this to + "-1,-1". To make it green-on-black, set it to "2,0". +Index: doc/html/man/panel.3x.html +--- ncurses-5.6/doc/html/man/panel.3x.html 2006-12-16 22:51:45.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/panel.3x.html 2007-03-04 00:10:53.000000000 +0000 +@@ -213,7 +213,7 @@ +

              SEE ALSO

              +        curses(3x)
              + 
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/term.5.html +--- ncurses-5.6/doc/html/man/term.5.html 2006-12-16 22:51:45.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/term.5.html 2007-03-04 00:10:54.000000000 +0000 +@@ -27,20 +27,20 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: term.5,v 1.17 2006/12/03 01:08:16 tom Exp @ ++ * @Id: term.5,v 1.19 2006/12/24 18:12:38 tom Exp @ + --> + + +-TERM 5 ++term 5 + + + + +-

              TERM 5

              ++

              term 5

              +
              +
              + 
              +-TERM(5)                                                         TERM(5)
              ++term(5)                                                         term(5)
              + 
              + 
              + 
              +@@ -95,7 +95,7 @@
              +        assumptions about byte  ordering  or  sign  extension  are
              +        made.
              + 
              +-       The  compiled  file  is  created with the tic program, and
              ++       The  compiled  file  is  created with the tic program, and
              +        read by the routine setupterm.  The file is  divided  into
              +        six parts: the header, terminal names, boolean flags, num-
              +        bers, strings, and string table.
              +@@ -297,7 +297,7 @@
              + 
              + 
              + 
              +-                                                                TERM(5)
              ++                                                                term(5)
              + 
              +
              +
              +Index: doc/html/man/term.7.html +--- ncurses-5.6/doc/html/man/term.7.html 2006-09-23 20:43:22.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/term.7.html 2007-03-04 00:10:54.000000000 +0000 +@@ -27,20 +27,20 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: term.7,v 1.15 2006/02/25 21:47:06 tom Exp @ ++ * @Id: term.7,v 1.17 2006/12/24 18:14:09 tom Exp @ + --> + + +-TERM 7 ++term 7 + + + + +-

              TERM 7

              ++

              term 7

              +
              +
              + 
              +-TERM(7)                                                         TERM(7)
              ++term(7)                                                         term(7)
              + 
              + 
              + 
              +@@ -98,7 +98,7 @@
              +        from your shell.  These capability files are in  a  binary
              +        format optimized for retrieval speed (unlike the old text-
              +        based termcap format they replace); to examine  an  entry,
              +-       you  must  use  the infocmp(1) command.  Invoke it as fol-
              ++       you  must  use the infocmp(1m) command.  Invoke it as fol-
              +        lows:
              + 
              +             infocmp entry-name
              +@@ -240,7 +240,7 @@
              + 
              + 
              + 
              +-                                                                TERM(7)
              ++                                                                term(7)
              + 
              +
              +
              +Index: doc/html/man/terminfo.5.html +--- ncurses-5.6/doc/html/man/terminfo.5.html 2006-12-16 22:51:46.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/terminfo.5.html 2007-03-04 00:10:54.000000000 +0000 +@@ -32,9 +32,9 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: terminfo.head,v 1.13 2006/05/13 15:35:45 tom Exp @ ++ * @Id: terminfo.head,v 1.15 2006/12/24 18:04:42 tom Exp @ + * Head of terminfo man page ends here +- * @Id: terminfo.tail,v 1.44 2006/04/01 22:47:01 tom Exp @ ++ * @Id: terminfo.tail,v 1.47 2006/12/24 18:14:22 tom Exp @ + * Beginning of terminfo.tail file + * This file is part of ncurses. + * See "terminfo.head" for copyright. +@@ -46,16 +46,16 @@ + --> + + +-TERMINFO 5 File Formats ++terminfo 5 File Formats + + + + +-

              TERMINFO 5 File Formats

              ++

              terminfo 5 File Formats

              +
              +
              + 
              +-TERMINFO(5)                   File Formats                  TERMINFO(5)
              ++terminfo(5)                   File Formats                  terminfo(5)
              + 
              + 
              + 
              +@@ -78,7 +78,7 @@
              +        nals by giving a set of capabilities which they  have,  by
              +        specifying how to perform screen operations, and by speci-
              +        fying padding requirements and  initialization  sequences.
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              +        Entries in terminfo consist of a sequence of `,' separated
              +        fields (embedded commas may be escaped with a backslash or
              +@@ -95,13 +95,13 @@
              + 
              +        Lines beginning with a `#' in the first column are treated
              +        as  comments.  While comment lines are legal at any point,
              +-       the output of captoinfo and infotocap  (aliases  for  tic)
              ++       the output of captoinfo and infotocap  (aliases  for  tic)
              +        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  infocmp -f option relies on this to format
              +-       if-then-else expressions: the result can be read by tic.
              ++       entries.   The  infocmp -f option relies on this to format
              ++       if-then-else expressions: the result can be read by tic.
              + 
              +        Terminal names (except for the last, verbose entry) should
              +        be chosen using the following conventions.  The particular
              +@@ -1234,7 +1234,7 @@
              +    Parameterized Strings
              +        Cursor addressing and other strings  requiring  parameters
              +        in  the  terminal  are described by a parameterized string
              +-       capability, with printf(3S) like escapes %x  in  it.   For
              ++       capability, with printf(3) like escapes  %x  in  it.   For
              +        example,  to  address  the  cursor,  the cup capability is
              +        given, using two parameters: the row and column to address
              +        to.  (Rows and columns are numbered from zero and refer to
              +@@ -2269,7 +2269,7 @@
              +        termcap entry.
              + 
              +        When in -C (translate to termcap) mode, the ncurses imple-
              +-       mentation  of tic(1) issues warning messages when the pre-
              ++       mentation of tic(1m) 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.
              +@@ -2351,7 +2351,7 @@
              + 
              + 
              +

              SEE ALSO

              +-       tic(1m), infocmp(1m), curses(3x), printf(3S), term(5).
              ++       tic(1m), infocmp(1m), curses(3x), printf(3), term(5).
              + 
              + 
              + 
              +@@ -2361,7 +2361,7 @@ + + + +- TERMINFO(5) ++ terminfo(5) + +
              +
              +Index: doc/html/man/tic.1m.html +--- ncurses-5.6/doc/html/man/tic.1m.html 2006-12-16 22:51:46.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/tic.1m.html 2007-03-04 00:10:55.000000000 +0000 +@@ -27,7 +27,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: tic.1m,v 1.43 2006/05/13 15:14:01 tom Exp @ ++ * @Id: tic.1m,v 1.44 2006/12/24 17:59:11 tom Exp @ + --> + + +@@ -309,7 +309,7 @@ + infocmp(1m), captoinfo(1m), infotocap(1m), toe(1m), + curses(3x), terminfo(5). + +- This describes ncurses version 5.5 (patch 20061209). ++ This describes ncurses version 5.6 (patch 20070303). + + + +Index: doc/html/man/toe.1m.html +--- ncurses-5.6/doc/html/man/toe.1m.html 2006-12-16 22:51:47.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/toe.1m.html 2007-03-04 00:10:55.000000000 +0000 +@@ -27,7 +27,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: toe.1m,v 1.18 2006/05/13 15:14:01 tom Exp @ ++ * @Id: toe.1m,v 1.20 2006/12/24 17:20:37 tom Exp @ + --> + + +@@ -92,7 +92,7 @@ + -vn specifies that (verbose) output be written to stan- + dard error, showing toe's progress. The optional + parameter n is a number from 1 to 10, interpreted +- as for tic(1). ++ as for tic(1m). + + -V reports the version of ncurses which was used in + this program, and exits. +@@ -109,7 +109,7 @@ + tic(1m), infocmp(1m), captoinfo(1m), infotocap(1m), + curses(3x), terminfo(5). + +- This describes ncurses version 5.5 (patch 20061209). ++ This describes ncurses version 5.6 (patch 20070303). + + + +Index: doc/html/man/tput.1.html +--- ncurses-5.6/doc/html/man/tput.1.html 2006-12-16 22:51:47.000000000 +0000 ++++ ncurses-5.6-20071201/doc/html/man/tput.1.html 2007-03-04 00:10:55.000000000 +0000 +@@ -28,7 +28,7 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: tput.1,v 1.25 2006/05/13 15:14:01 tom Exp @ ++ * @Id: tput.1,v 1.27 2006/12/24 18:11:31 tom Exp @ + --> + + +@@ -89,7 +89,7 @@ + application should test the exit code (e.g., $?, see + sh(1)) to be sure it is 0. (See the EXIT CODES and DIAG- + NOSTICS sections.) For a complete list of capabilities +- and the capname associated with each, see terminfo(1). ++ and the capname associated with each, see terminfo(5). + + -Ttype indicates the type of terminal. Normally this + option is unnecessary, because the default is taken +@@ -298,7 +298,7 @@ + exit code error message + --------------------------------------------------------------------- + 0 (capname is a numeric variable that is not specified in +- the terminfo(1) database for this terminal type, e.g. ++ the terminfo(5) database for this terminal type, e.g. + tput -T450 lines and tput -T2621 xmc) + 1 no error message is printed, see the EXIT CODES section. + 2 usage error +@@ -328,7 +328,7 @@ +

              SEE ALSO

              +        clear(1), stty(1), tabs(1), terminfo(5).
              + 
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/man/tset.1.html
              +--- ncurses-5.6/doc/html/man/tset.1.html	2006-12-16 22:51:47.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/man/tset.1.html	2007-03-04 00:10:55.000000000 +0000
              +@@ -27,7 +27,7 @@
              +   * sale, use or other dealings in this Software without prior written       *
              +   * authorization.                                                           *
              +   ****************************************************************************
              +-  * @Id: tset.1,v 1.18 2006/07/29 11:34:07 tom Exp @
              ++  * @Id: tset.1,v 1.19 2006/12/24 15:00:30 tom Exp @
              + -->
              + 
              + 
              +@@ -315,10 +315,10 @@
              + 
              + 
              +

              SEE ALSO

              +-       csh(1),  sh(1),  stty(1),  setupterm(3x),   tty(4),   ter-
              ++       csh(1), sh(1), stty(1),  curs_terminfo(3x),  tty(4),  ter-
              +        minfo(5), ttys(5), environ(7)
              + 
              +-       This describes ncurses version 5.5 (patch 20061209).
              ++       This describes ncurses version 5.6 (patch 20070303).
              + 
              + 
              + 
              +Index: doc/html/ncurses-intro.html
              +Prereq:  1.41 
              +--- ncurses-5.6/doc/html/ncurses-intro.html	2005-12-24 15:47:05.000000000 +0000
              ++++ ncurses-5.6-20071201/doc/html/ncurses-intro.html	2007-03-03 19:31:50.000000000 +0000
              +@@ -1,8 +1,8 @@
              + 
              + |   ----+-->|  NULL |   next
              +- *	  |-------|   |-------|   |-------|
              +- *	  |  NULL |<--+----   |<--+----   |   last
              +- *	  ---------   ---------   ---------
              +- *	      ^                       ^
              +- *	      |                       |
              +- *	      |                       |
              +- *	   _nc_head                _nc_tail
              +- */
              +-
              +-NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0;
              +-NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0;
              +-
              + static void
              + enqueue(ENTRY * ep)
              + /* add an entry to the in-core list */
              +@@ -103,51 +79,6 @@
              + 	newp->last->next = newp;
              + }
              + 
              +-NCURSES_EXPORT(void)
              +-_nc_free_entries(ENTRY * headp)
              +-/* free the allocated storage consumed by list entries */
              +-{
              +-    (void) headp;		/* unused - _nc_head is altered here! */
              +-
              +-    while (_nc_head != 0) {
              +-	_nc_free_termtype(&(_nc_head->tterm));
              +-    }
              +-}
              +-
              +-NCURSES_EXPORT(ENTRY *)
              +-_nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
              +-/* delink the allocated storage for the given list entry */
              +-{
              +-    ENTRY *ep, *last;
              +-
              +-    for (last = 0, ep = headp; ep != 0; last = ep, ep = ep->next) {
              +-	if (&(ep->tterm) == tterm) {
              +-	    if (last != 0) {
              +-		last->next = ep->next;
              +-	    }
              +-	    if (ep == _nc_head) {
              +-		_nc_head = ep->next;
              +-	    }
              +-	    if (ep == _nc_tail) {
              +-		_nc_tail = last;
              +-	    }
              +-	    break;
              +-	}
              +-    }
              +-    return ep;
              +-}
              +-
              +-NCURSES_EXPORT(void)
              +-_nc_free_entry(ENTRY * headp, TERMTYPE *tterm)
              +-/* free the allocated storage consumed by the given list entry */
              +-{
              +-    ENTRY *ep;
              +-
              +-    if ((ep = _nc_delink_entry(headp, tterm)) != 0) {
              +-	free(ep);
              +-    }
              +-}
              +-
              + static char *
              + force_bar(char *dst, char *src)
              + {
              +@@ -534,3 +465,26 @@
              + {
              +     sanity_check2(tp, FALSE);
              + }
              ++
              ++#if NO_LEAKS
              ++NCURSES_EXPORT(void)
              ++_nc_leaks_tic(void)
              ++{
              ++    _nc_alloc_entry_leaks();
              ++    _nc_captoinfo_leaks();
              ++    _nc_comp_captab_leaks();
              ++    _nc_comp_scan_leaks();
              ++#if BROKEN_LINKER || USE_REENTRANT
              ++    _nc_names_leaks();
              ++    _nc_codes_leaks();
              ++#endif
              ++    _nc_tic_expand(0, FALSE, 0);
              ++}
              ++
              ++NCURSES_EXPORT(void)
              ++_nc_free_tic(int code)
              ++{
              ++    _nc_leaks_tic();
              ++    _nc_free_tinfo(code);
              ++}
              ++#endif
              +Index: ncurses/tinfo/db_iterator.c
              +Prereq:  1.5 
              +--- ncurses-5.6/ncurses/tinfo/db_iterator.c	2006-12-16 19:06:42.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/db_iterator.c	2007-04-22 00:00:26.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2006,2007 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 @@
              +  ****************************************************************************/
              + 
              + /****************************************************************************
              +- *  Author: Thomas E. Dickey                     2006                       *
              ++ *  Author: Thomas E. Dickey                                                *
              +  ****************************************************************************/
              + 
              + /*
              +@@ -38,10 +38,11 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: db_iterator.c,v 1.5 2006/12/16 19:06:42 tom Exp $")
              ++MODULE_ID("$Id: db_iterator.c,v 1.6 2007/04/22 00:00:26 tom Exp $")
              + 
              +-static bool have_tic_directory = FALSE;
              +-static bool keep_tic_directory = FALSE;
              ++#define HaveTicDirectory _nc_globals.have_tic_directory
              ++#define KeepTicDirectory _nc_globals.keep_tic_directory
              ++#define TicDirectory     _nc_globals.tic_directory
              + 
              + /*
              +  * Record the "official" location of the terminfo directory, according to
              +@@ -50,19 +51,17 @@
              + NCURSES_EXPORT(const char *)
              + _nc_tic_dir(const char *path)
              + {
              +-    static const char *result = TERMINFO;
              +-
              +-    if (!keep_tic_directory) {
              ++    if (!KeepTicDirectory) {
              + 	if (path != 0) {
              +-	    result = path;
              +-	    have_tic_directory = TRUE;
              +-	} else if (!have_tic_directory && use_terminfo_vars()) {
              ++	    TicDirectory = path;
              ++	    HaveTicDirectory = TRUE;
              ++	} else if (!HaveTicDirectory && use_terminfo_vars()) {
              + 	    char *envp;
              + 	    if ((envp = getenv("TERMINFO")) != 0)
              + 		return _nc_tic_dir(envp);
              + 	}
              +     }
              +-    return result;
              ++    return TicDirectory;
              + }
              + 
              + /*
              +@@ -74,16 +73,15 @@
              + _nc_keep_tic_dir(const char *path)
              + {
              +     _nc_tic_dir(path);
              +-    keep_tic_directory = TRUE;
              ++    KeepTicDirectory = TRUE;
              + }
              + 
              + /*
              +  * Process the list of :-separated directories, looking for the terminal type.
              +  * We don't use strtok because it does not show us empty tokens.
              +  */
              +-
              +-static char *this_db_list = 0;
              +-static int size_db_list;
              ++#define ThisDbList	_nc_globals.dbi_list
              ++#define ThisDbSize	_nc_globals.dbi_size
              + 
              + /*
              +  * Cleanup.
              +@@ -91,10 +89,10 @@
              + NCURSES_EXPORT(void)
              + _nc_last_db(void)
              + {
              +-    if (this_db_list != 0) {
              +-	FreeAndNull(this_db_list);
              ++    if (ThisDbList != 0) {
              ++	FreeAndNull(ThisDbList);
              +     }
              +-    size_db_list = 0;
              ++    ThisDbSize = 0;
              + }
              + 
              + /* The TERMINFO_DIRS value, if defined by the configure script, begins with a
              +@@ -104,14 +102,14 @@
              + next_list_item(const char *source, int *offset)
              + {
              +     if (source != 0) {
              +-	FreeIfNeeded(this_db_list);
              +-	this_db_list = strdup(source);
              +-	size_db_list = strlen(source);
              ++	FreeIfNeeded(ThisDbList);
              ++	ThisDbList = strdup(source);
              ++	ThisDbSize = strlen(source);
              +     }
              + 
              +-    if (this_db_list != 0 && size_db_list && *offset < size_db_list) {
              ++    if (ThisDbList != 0 && ThisDbSize && *offset < ThisDbSize) {
              + 	static char system_db[] = TERMINFO;
              +-	char *result = this_db_list + *offset;
              ++	char *result = ThisDbList + *offset;
              + 	char *marker = strchr(result, NCURSES_PATHSEP);
              + 
              + 	/*
              +@@ -124,9 +122,9 @@
              + 	    marker = result + *offset;
              + 	} else {
              + 	    *marker++ = 0;
              +-	    *offset = marker - this_db_list;
              ++	    *offset = marker - ThisDbList;
              + 	}
              +-	if (*result == 0 && result != (this_db_list + size_db_list))
              ++	if (*result == 0 && result != (ThisDbList + ThisDbSize))
              + 	    result = system_db;
              + 	return result;
              +     }
              +@@ -153,7 +151,7 @@
              + 
              + 	switch (*state) {
              + 	case dbdTIC:
              +-	    if (have_tic_directory)
              ++	    if (HaveTicDirectory)
              + 		result = _nc_tic_dir(0);
              + 	    break;
              + #if USE_DATABASE
              +Index: ncurses/tinfo/entries.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/entries.c	2007-11-03 21:00:27.000000000 +0000
              +@@ -0,0 +1,144 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2006,2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++
              ++/****************************************************************************
              ++ *  Author: Thomas E. Dickey                                                *
              ++ ****************************************************************************/
              ++
              ++#include 
              ++
              ++#include 
              ++
              ++#include 
              ++#include 
              ++
              ++MODULE_ID("$Id: entries.c,v 1.4 2007/11/03 21:00:27 tom Exp $")
              ++
              ++/****************************************************************************
              ++ *
              ++ * Entry queue handling
              ++ *
              ++ ****************************************************************************/
              ++/*
              ++ *  The entry list is a doubly linked list with NULLs terminating the lists:
              ++ *
              ++ *	  ---------   ---------   ---------
              ++ *	  |       |   |       |   |       |   offset
              ++ *        |-------|   |-------|   |-------|
              ++ *	  |   ----+-->|   ----+-->|  NULL |   next
              ++ *	  |-------|   |-------|   |-------|
              ++ *	  |  NULL |<--+----   |<--+----   |   last
              ++ *	  ---------   ---------   ---------
              ++ *	      ^                       ^
              ++ *	      |                       |
              ++ *	      |                       |
              ++ *	   _nc_head                _nc_tail
              ++ */
              ++
              ++NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0;
              ++NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0;
              ++
              ++NCURSES_EXPORT(void)
              ++_nc_free_entry(ENTRY * headp, TERMTYPE *tterm)
              ++/* free the allocated storage consumed by the given list entry */
              ++{
              ++    ENTRY *ep;
              ++
              ++    if ((ep = _nc_delink_entry(headp, tterm)) != 0) {
              ++	free(ep);
              ++    }
              ++}
              ++
              ++NCURSES_EXPORT(void)
              ++_nc_free_entries(ENTRY * headp)
              ++/* free the allocated storage consumed by list entries */
              ++{
              ++    (void) headp;		/* unused - _nc_head is altered here! */
              ++
              ++    while (_nc_head != 0) {
              ++	_nc_free_termtype(&(_nc_head->tterm));
              ++    }
              ++}
              ++
              ++NCURSES_EXPORT(ENTRY *)
              ++_nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
              ++/* delink the allocated storage for the given list entry */
              ++{
              ++    ENTRY *ep, *last;
              ++
              ++    for (last = 0, ep = headp; ep != 0; last = ep, ep = ep->next) {
              ++	if (&(ep->tterm) == tterm) {
              ++	    if (last != 0) {
              ++		last->next = ep->next;
              ++	    }
              ++	    if (ep == _nc_head) {
              ++		_nc_head = ep->next;
              ++	    }
              ++	    if (ep == _nc_tail) {
              ++		_nc_tail = last;
              ++	    }
              ++	    break;
              ++	}
              ++    }
              ++    return ep;
              ++}
              ++
              ++NCURSES_EXPORT(void)
              ++_nc_leaks_tinfo(void)
              ++{
              ++    char *s;
              ++
              ++    T((T_CALLED("_nc_free_tinfo()")));
              ++#if NO_LEAKS
              ++    _nc_free_tparm();
              ++    _nc_tgetent_leaks();
              ++#endif
              ++    _nc_free_entries(_nc_head);
              ++    _nc_get_type(0);
              ++    _nc_first_name(0);
              ++#if NO_LEAKS
              ++    _nc_keyname_leaks();
              ++#endif
              ++#if BROKEN_LINKER || USE_REENTRANT
              ++    _nc_names_leaks();
              ++    _nc_codes_leaks();
              ++#endif
              ++
              ++    if ((s = _nc_home_terminfo()) != 0)
              ++	free(s);
              ++    returnVoid;
              ++}
              ++
              ++#if NO_LEAKS
              ++NCURSES_EXPORT(void)
              ++_nc_free_tinfo(int code)
              ++{
              ++    _nc_leaks_tinfo();
              ++    exit(code);
              ++}
              ++#endif
              +Index: ncurses/tinfo/home_terminfo.c
              +Prereq:  1.9 
              +--- ncurses-5.6/ncurses/tinfo/home_terminfo.c	2005-07-02 19:43:38.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/home_terminfo.c	2007-04-21 23:11:53.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2005,2007 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 @@
              +  ****************************************************************************/
              + 
              + /****************************************************************************
              +- *  Author: Thomas E. Dickey 1998,2000,2004,2005                            *
              ++ *  Author: Thomas E. Dickey                                                *
              +  ****************************************************************************/
              + 
              + /*
              +@@ -37,31 +37,32 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: home_terminfo.c,v 1.9 2005/07/02 19:43:38 tom Exp $")
              ++MODULE_ID("$Id: home_terminfo.c,v 1.10 2007/04/21 23:11:53 tom Exp $")
              + 
              + #define my_length (strlen(home) + sizeof(PRIVATE_INFO))
              + 
              + /* ncurses extension...fall back on user's private directory */
              + 
              ++#define MyBuffer _nc_globals.home_terminfo
              ++
              + NCURSES_EXPORT(char *)
              + _nc_home_terminfo(void)
              + {
              +     char *result = 0;
              +-#ifdef USE_HOME_TERMINFO
              ++#if USE_HOME_TERMINFO
              +     char *home;
              +-    static char *temp = 0;
              + 
              +     if (use_terminfo_vars()) {
              +-	if (temp == 0) {
              ++	if (MyBuffer == 0) {
              + 	    if ((home = getenv("HOME")) != 0
              + 		&& my_length <= PATH_MAX) {
              +-		temp = typeMalloc(char, my_length);
              +-		if (temp == 0)
              ++		MyBuffer = typeMalloc(char, my_length);
              ++		if (MyBuffer == 0)
              + 		    _nc_err_abort(MSG_NO_MEMORY);
              +-		(void) sprintf(temp, PRIVATE_INFO, home);
              ++		(void) sprintf(MyBuffer, PRIVATE_INFO, home);
              + 	    }
              + 	}
              +-	result = temp;
              ++	result = MyBuffer;
              +     }
              + #endif
              +     return result;
              +Index: ncurses/tinfo/init_keytry.c
              +Prereq:  1.8 
              +--- ncurses-5.6/ncurses/tinfo/init_keytry.c	2006-01-21 23:43:28.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/init_keytry.c	2007-04-29 22:57:50.000000000 +0000
              +@@ -36,7 +36,7 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: init_keytry.c,v 1.8 2006/01/21 23:43:28 tom Exp $")
              ++MODULE_ID("$Id: init_keytry.c,v 1.10 2007/04/29 22:57:50 tom Exp $")
              + 
              + /*
              + **      _nc_init_keytry()
              +@@ -56,7 +56,7 @@
              + #endif*/
              + 
              + #if	BROKEN_LINKER
              +-struct tinfo_fkeys *
              ++const struct tinfo_fkeys *
              + _nc_tinfo_fkeysf(void)
              + {
              +     return _nc_tinfo_fkeys;
              +@@ -76,9 +76,9 @@
              +     if (SP != 0) {
              + 	for (n = 0; _nc_tinfo_fkeys[n].code; n++) {
              + 	    if (_nc_tinfo_fkeys[n].offset < STRCOUNT) {
              +-		_nc_add_to_try(&(SP->_keytry),
              +-			       CUR Strings[_nc_tinfo_fkeys[n].offset],
              +-			       _nc_tinfo_fkeys[n].code);
              ++		(void) _nc_add_to_try(&(SP->_keytry),
              ++				      CUR Strings[_nc_tinfo_fkeys[n].offset],
              ++				      _nc_tinfo_fkeys[n].code);
              + 	    }
              + 	}
              + #if NCURSES_XNAMES
              +@@ -96,9 +96,9 @@
              + 		    && *name == 'k'
              + 		    && value != 0
              + 		    && key_defined(value) == 0) {
              +-		    _nc_add_to_try(&(SP->_keytry),
              +-				   value,
              +-				   n - STRCOUNT + KEY_MAX);
              ++		    (void) _nc_add_to_try(&(SP->_keytry),
              ++					  value,
              ++					  n - STRCOUNT + KEY_MAX);
              + 		}
              + 	    }
              + 	}
              +Index: ncurses/tinfo/lib_acs.c
              +Prereq:  1.30 
              +--- ncurses-5.6/ncurses/tinfo/lib_acs.c	2006-01-07 21:27:15.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_acs.c	2007-09-29 20:37:13.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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,18 @@
              + #include 
              + #include 		/* ena_acs, acs_chars */
              + 
              +-MODULE_ID("$Id: lib_acs.c,v 1.30 2006/01/07 21:27:15 tom Exp $")
              ++MODULE_ID("$Id: lib_acs.c,v 1.34 2007/09/29 20:37:13 tom Exp $")
              + 
              +-#if BROKEN_LINKER
              ++#if BROKEN_LINKER || USE_REENTRANT
              ++#define MyBuffer _nc_prescreen.real_acs_map
              + NCURSES_EXPORT_VAR(chtype *)
              + _nc_acs_map(void)
              + {
              +-    static chtype *the_map = 0;
              +-    if (the_map == 0)
              +-	the_map = typeCalloc(chtype, ACS_LEN);
              +-    return the_map;
              ++    if (MyBuffer == 0)
              ++	MyBuffer = typeCalloc(chtype, ACS_LEN);
              ++    return MyBuffer;
              + }
              ++#undef MyBuffer
              + #else
              + NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
              + {
              +@@ -117,16 +118,6 @@
              +     real_map['|'] = '!';	/* should be not-equal */
              +     real_map['}'] = 'f';	/* should be pound-sterling symbol */
              + 
              +-#if !USE_WIDEC_SUPPORT
              +-    if (_nc_unicode_locale() && _nc_locale_breaks_acs()) {
              +-	acs_chars = NULL;
              +-	ena_acs = NULL;
              +-	enter_alt_charset_mode = NULL;
              +-	exit_alt_charset_mode = NULL;
              +-	set_attributes = NULL;
              +-    }
              +-#endif
              +-
              +     if (ena_acs != NULL) {
              + 	TPUTS_TRACE("ena_acs");
              + 	putp(ena_acs);
              +@@ -175,7 +166,7 @@
              +     /* Show the equivalent mapping, noting if it does not match the
              +      * given attribute, whether by re-ordering or duplication.
              +      */
              +-    if (_nc_tracing & TRACE_CALLS) {
              ++    if (USE_TRACEF(TRACE_CALLS)) {
              + 	size_t n, m;
              + 	char show[ACS_LEN * 2 + 1];
              + 	for (n = 1, m = 0; n < ACS_LEN; n++) {
              +@@ -196,6 +187,7 @@
              + 		   ? "DIFF"
              + 		   : "SAME"),
              + 		_nc_visbuf(show));
              ++	_nc_unlock_global(tracef);
              +     }
              + #endif /* TRACE */
              + }
              +Index: ncurses/tinfo/lib_baudrate.c
              +Prereq:  1.22 
              +--- ncurses-5.6/ncurses/tinfo/lib_baudrate.c	2002-01-19 23:07:53.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_baudrate.c	2007-10-20 15:00:41.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998,2000,2002 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -29,6 +29,7 @@
              + /****************************************************************************
              +  *  Author: Zeyd M. Ben-Halim  1992,1995               *
              +  *     and: Eric S. Raymond                          *
              ++ *     and: Thomas E. Dickey                        1996-on                 *
              +  ****************************************************************************/
              + 
              + /*
              +@@ -39,6 +40,9 @@
              + #include 
              + #include 		/* cur_term, pad_char */
              + #include 		/* ospeed */
              ++#if defined(__FreeBSD__)
              ++#include 
              ++#endif
              + 
              + /*
              +  * These systems use similar header files, which define B1200 as 1200, etc.,
              +@@ -46,7 +50,7 @@
              +  * of the indices up to B115200 fit nicely in a 'short', allowing us to retain
              +  * ospeed's type for compatibility.
              +  */
              +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
              ++#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__)
              + #undef B0
              + #undef B50
              + #undef B75
              +@@ -76,7 +80,7 @@
              + #undef USE_OLD_TTY
              + #endif /* USE_OLD_TTY */
              + 
              +-MODULE_ID("$Id: lib_baudrate.c,v 1.22 2002/01/19 23:07:53 Andrey.A.Chernov Exp $")
              ++MODULE_ID("$Id: lib_baudrate.c,v 1.25 2007/10/20 15:00:41 Rong-En.Fan Exp $")
              + 
              + /*
              +  *	int
              +@@ -141,16 +145,20 @@
              + NCURSES_EXPORT(int)
              + _nc_baudrate(int OSpeed)
              + {
              ++#if !USE_REENTRANT
              +     static int last_OSpeed;
              +     static int last_baudrate;
              ++#endif
              + 
              +-    int result;
              ++    int result = ERR;
              +     unsigned i;
              + 
              ++#if !USE_REENTRANT
              +     if (OSpeed == last_OSpeed) {
              + 	result = last_baudrate;
              +-    } else {
              +-	result = ERR;
              ++    }
              ++#endif
              ++    if (result == ERR) {
              + 	if (OSpeed >= 0) {
              + 	    for (i = 0; i < SIZEOF(speeds); i++) {
              + 		if (speeds[i].s == OSpeed) {
              +@@ -159,7 +167,12 @@
              + 		}
              + 	    }
              + 	}
              +-	last_baudrate = result;
              ++#if !USE_REENTRANT
              ++	if (OSpeed == last_OSpeed) {
              ++	    last_OSpeed = OSpeed;
              ++	    last_baudrate = result;
              ++	}
              ++#endif
              +     }
              +     return (result);
              + }
              +Index: ncurses/tinfo/lib_data.c
              +Prereq:  1.17 
              +--- ncurses-5.6/ncurses/tinfo/lib_data.c	2005-01-22 17:39:22.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_data.c	2007-11-03 20:24:15.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2005,2007 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            *
              +@@ -41,15 +41,33 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_data.c,v 1.17 2005/01/22 17:39:22 tom Exp $")
              ++MODULE_ID("$Id: lib_data.c,v 1.34 2007/10/20 21:49:10 tom Exp $")
              + 
              + /*
              +  * OS/2's native linker complains if we don't initialize public data when
              +  * constructing a dll (reported by J.J.G.Ripoll).
              +  */
              ++#if USE_REENTRANT
              ++NCURSES_EXPORT(WINDOW *)
              ++NCURSES_PUBLIC_VAR(stdscr) (void)
              ++{
              ++    return SP ? SP->_stdscr : 0;
              ++}
              ++NCURSES_EXPORT(WINDOW *)
              ++NCURSES_PUBLIC_VAR(curscr) (void)
              ++{
              ++    return SP ? SP->_curscr : 0;
              ++}
              ++NCURSES_EXPORT(WINDOW *)
              ++NCURSES_PUBLIC_VAR(newscr) (void)
              ++{
              ++    return SP ? SP->_newscr : 0;
              ++}
              ++#else
              + NCURSES_EXPORT_VAR(WINDOW *) stdscr = 0;
              + NCURSES_EXPORT_VAR(WINDOW *) curscr = 0;
              + NCURSES_EXPORT_VAR(WINDOW *) newscr = 0;
              ++#endif
              + 
              + NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain = 0;
              + 
              +@@ -87,3 +105,129 @@
              + #else
              + NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */
              + #endif
              ++/* *INDENT-OFF* */
              ++#define CHARS_0s { '\0' }
              ++
              ++#define TGETENT_0 { 0L, FALSE, NULL, NULL, NULL }
              ++#define TGETENT_0s { TGETENT_0, TGETENT_0, TGETENT_0, TGETENT_0 } 
              ++
              ++NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
              ++    0,				/* have_sigwinch */
              ++    0,				/* cleanup_nested */
              ++
              ++    FALSE,			/* init_signals */
              ++    FALSE,			/* init_screen */
              ++
              ++    NULL,			/* comp_sourcename */
              ++    NULL,			/* comp_termtype */
              ++
              ++    FALSE,			/* have_tic_directory */
              ++    FALSE,			/* keep_tic_directory */
              ++    TERMINFO,			/* tic_directory */
              ++
              ++    NULL,			/* dbi_list */
              ++    0,				/* dbi_size */
              ++
              ++    NULL,			/* first_name */
              ++    NULL,			/* keyname_table */
              ++
              ++    NULL,			/* safeprint_buf */
              ++    0,				/* safeprint_used */
              ++
              ++    TGETENT_0s,			/* tgetent_cache */
              ++    0,				/* tgetent_index */
              ++    0,				/* tgetent_sequence */
              ++
              ++#if USE_HOME_TERMINFO
              ++    NULL,			/* home_terminfo */
              ++#endif
              ++
              ++#if !USE_SAFE_SPRINTF
              ++    0,				/* safeprint_cols */
              ++    0,				/* safeprint_rows */
              ++#endif
              ++
              ++#ifdef TRACE
              ++    FALSE,			/* init_trace */
              ++    CHARS_0s,			/* trace_fname */
              ++    0,				/* trace_level */
              ++    NULL,			/* trace_fp */
              ++
              ++    NULL,			/* tracearg_buf */
              ++    0,				/* tracearg_used */
              ++
              ++    NULL,			/* tracebuf_ptr */
              ++    0,				/* tracebuf_used */
              ++
              ++    CHARS_0s,			/* tracechr_buf */
              ++
              ++    NULL,			/* tracedmp_buf */
              ++    0,				/* tracedmp_used */
              ++
              ++    CHARS_0s,			/* tracemse_buf */
              ++
              ++    NULL,			/* tracetry_buf */
              ++    0,				/* tracetry_used */
              ++
              ++#ifndef USE_TERMLIB
              ++    { CHARS_0s, CHARS_0s },	/* traceatr_color_buf */
              ++    0,				/* traceatr_color_sel */
              ++    -1,				/* traceatr_color_last */
              ++#endif /* USE_TERMLIB */
              ++
              ++#endif /* TRACE */
              ++#ifdef USE_PTHREADS
              ++    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_set_SP */
              ++    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_use_screen */
              ++    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_use_window */
              ++    PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,	/* mutex_windowlist */
              ++    PTHREAD_MUTEX_INITIALIZER,	/* mutex_tst_tracef */
              ++    PTHREAD_MUTEX_INITIALIZER,	/* mutex_tracef */
              ++    0,				/* nested_tracef */
              ++#endif
              ++};
              ++
              ++#define STACK_FRAME_0	{ { 0 }, 0 }
              ++#define STACK_FRAME_0s	{ STACK_FRAME_0 }
              ++#define NUM_VARS_0s	{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
              ++
              ++#define RIPOFF_0	{ 0,0 }
              ++#define RIPOFF_0s	{ RIPOFF_0 }
              ++
              ++NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
              ++    TRUE,			/* use_env */
              ++    FALSE,			/* filter_mode */
              ++    A_NORMAL,			/* previous_attr */
              ++    RIPOFF_0s,			/* ripoff */
              ++    NULL,			/* rsp */
              ++    {				/* tparm_state */
              ++#ifdef TRACE
              ++	NULL,			/* tname */
              ++#endif
              ++	NULL,			/* tparam_base */
              ++
              ++	STACK_FRAME_0s,		/* stack */
              ++	0,			/* stack_ptr */
              ++
              ++	NULL,			/* out_buff */
              ++	0,			/* out_size */
              ++	0,			/* out_used */
              ++
              ++	NULL,			/* fmt_buff */
              ++	0,			/* fmt_size */
              ++
              ++	NUM_VARS_0s,		/* dynamic_var */
              ++	NUM_VARS_0s,		/* static_vars */
              ++    },
              ++    NULL,			/* saved_tty */
              ++#if BROKEN_LINKER || USE_REENTRANT
              ++    NULL,			/* real_acs_map */
              ++    0,				/* LINES */
              ++    0,				/* COLS */
              ++#ifdef TRACE
              ++    0L,				/* _outchars */
              ++    NULL,			/* _tputs_trace */
              ++#endif
              ++#endif
              ++};
              ++/* *INDENT-ON* */
              +Index: ncurses/tinfo/lib_options.c
              +Prereq:  1.49 
              +--- ncurses-5.6/ncurses/tinfo/lib_options.c	2006-03-04 19:28:25.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_options.c	2006-12-30 16:03:27.000000000 +0000
              +@@ -43,7 +43,7 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_options.c,v 1.49 2006/03/04 19:28:25 tom Exp $")
              ++MODULE_ID("$Id: lib_options.c,v 1.50 2006/12/30 16:03:27 tom Exp $")
              + 
              + NCURSES_EXPORT(int)
              + idlok(WINDOW *win, bool flag)
              +@@ -220,7 +220,7 @@
              + 
              + #if NCURSES_EXT_FUNCS
              + static int
              +-has_key_internal(int keycode, struct tries *tp)
              ++has_key_internal(int keycode, TRIES *tp)
              + {
              +     if (tp == 0)
              + 	return (FALSE);
              +Index: ncurses/tinfo/lib_raw.c
              +Prereq:  1.13 
              +--- ncurses-5.6/ncurses/tinfo/lib_raw.c	2002-07-06 22:00:45.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_raw.c	2007-09-29 21:50:22.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2002,2007 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            *
              +@@ -49,7 +49,7 @@
              + #include 
              + #include 		/* cur_term */
              + 
              +-MODULE_ID("$Id: lib_raw.c,v 1.13 2002/07/06 22:00:45 tom Exp $")
              ++MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $")
              + 
              + #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
              + #define _POSIX_SOURCE
              +@@ -69,8 +69,8 @@
              + #define COOKED_INPUT	(IXON|BRKINT|PARMRK)
              + 
              + #ifdef TRACE
              +-#define BEFORE(N)	if (_nc_tracing&TRACE_BITS) _tracef("%s before bits: %s", N, _nc_tracebits())
              +-#define AFTER(N)	if (_nc_tracing&TRACE_BITS) _tracef("%s after bits: %s", N, _nc_tracebits())
              ++#define BEFORE(N)	if (USE_TRACEF(TRACE_BITS)) _nc_locked_tracef("%s before bits: %s", N, _nc_tracebits())
              ++#define AFTER(N)	if (USE_TRACEF(TRACE_BITS)) _nc_locked_tracef("%s after bits: %s", N, _nc_tracebits())
              + #else
              + #define BEFORE(s)
              + #define AFTER(s)
              +Index: ncurses/tinfo/lib_setup.c
              +Prereq:  1.95 
              +--- ncurses-5.6/ncurses/tinfo/lib_setup.c	2006-07-28 22:58:13.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_setup.c	2007-09-01 20:58:26.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -29,7 +29,7 @@
              + /****************************************************************************
              +  *  Author: Zeyd M. Ben-Halim  1992,1995               *
              +  *     and: Eric S. Raymond                          *
              +- *     and: Thomas E. Dickey 1996-2003                                      *
              ++ *     and: Thomas E. Dickey                        1996-on                 *
              +  ****************************************************************************/
              + 
              + /*
              +@@ -53,7 +53,7 @@
              + 
              + #include 		/* lines, columns, cur_term */
              + 
              +-MODULE_ID("$Id: lib_setup.c,v 1.95 2006/07/28 22:58:13 tom Exp $")
              ++MODULE_ID("$Id: lib_setup.c,v 1.100 2007/09/01 20:58:26 tom Exp $")
              + 
              + /****************************************************************************
              +  *
              +@@ -99,55 +99,57 @@
              + # endif
              + #endif
              + 
              ++#if USE_REENTRANT
              ++NCURSES_EXPORT(char *)
              ++NCURSES_PUBLIC_VAR(ttytype) (void)
              ++{
              ++    static char empty[] = "";
              ++    return cur_term ? cur_term->type.term_names : empty;
              ++}
              ++NCURSES_EXPORT(int)
              ++NCURSES_PUBLIC_VAR(LINES) (void)
              ++{
              ++    return (SP ? SP->_LINES : _nc_prescreen._LINES);
              ++}
              ++NCURSES_EXPORT(int)
              ++NCURSES_PUBLIC_VAR(COLS) (void)
              ++{
              ++    return SP ? SP->_COLS : _nc_prescreen._COLS;
              ++}
              ++NCURSES_EXPORT(int)
              ++NCURSES_PUBLIC_VAR(TABSIZE) (void)
              ++{
              ++    return SP ? SP->_TABSIZE : 8;
              ++}
              ++#else
              + NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
              + NCURSES_EXPORT_VAR(int) LINES = 0;
              + NCURSES_EXPORT_VAR(int) COLS = 0;
              + NCURSES_EXPORT_VAR(int) TABSIZE = 0;
              +-
              +-static int _use_env = TRUE;
              ++#endif
              + 
              + #if USE_SIGWINCH
              +-int
              +-_nc_handle_sigwinch(int enable)
              ++/*
              ++ * If we have a pending SIGWINCH, set the flag in each screen.
              ++ */
              ++NCURSES_EXPORT(int)
              ++_nc_handle_sigwinch(int update)
              + {
              +-    static int have_sigwinch = 0;	/* initially no SIGWINCH's */
              +-    static int can_resizeall = 1;	/* initially enabled */
              +     SCREEN *scan;
              +-    int result;
              + 
              +-    switch (enable) {
              +-    default:
              +-	/* record a SIGWINCH */
              +-	have_sigwinch = 1;
              +-	break;
              +-    case 0:
              +-	/* temporarily disable the next block */
              +-	--can_resizeall;
              +-	break;
              +-    case 1:
              +-	/* temporarily enable the next block */
              +-	++can_resizeall;
              +-	break;
              +-    }
              ++    (void) update;		/* no longer used */
              + 
              +-    /*
              +-     * If we have a pending SIGWINCH, set the flag in each screen.
              +-     * But do this only if the block is enabled.
              +-     */
              +-    if (can_resizeall-- >= 0) {	/* test and disable */
              +-	if (have_sigwinch) {
              +-	    scan = _nc_screen_chain;
              +-	    while (scan) {
              +-		scan->_sig_winch = TRUE;
              +-		scan = scan->_next_screen;
              +-	    }
              +-	    have_sigwinch = 0;
              ++    if (_nc_globals.have_sigwinch) {
              ++	_nc_globals.have_sigwinch = 0;
              ++
              ++	scan = _nc_screen_chain;
              ++	while (scan) {
              ++	    scan->_sig_winch = TRUE;
              ++	    scan = scan->_next_screen;
              + 	}
              +     }
              +-    result = can_resizeall + 1;	/* reenable (unless disables are nested) */
              +-    can_resizeall = result;
              + 
              +-    return result;
              ++    return (SP ? SP->_sig_winch : 0);
              + }
              + 
              + #endif
              +@@ -156,19 +158,20 @@
              + use_env(bool f)
              + {
              +     T((T_CALLED("use_env()")));
              +-    _use_env = f;
              ++    _nc_prescreen.use_env = f;
              +     returnVoid;
              + }
              + 
              +-static void
              ++NCURSES_EXPORT(void)
              + _nc_get_screensize(int *linep, int *colp)
              + /* Obtain lines/columns values from the environment and/or terminfo entry */
              + {
              ++    int my_tabsize;
              ++
              +     /* figure out the size of the screen */
              +     T(("screen size: terminfo lines = %d columns = %d", lines, columns));
              + 
              +-    _nc_handle_sigwinch(0);
              +-    if (!_use_env) {
              ++    if (!_nc_prescreen.use_env) {
              + 	*linep = (int) lines;
              + 	*colp = (int) columns;
              +     } else {			/* usually want to query LINES and COLUMNS from environment */
              +@@ -246,14 +249,20 @@
              + 	lines = (short) (*linep);
              + 	columns = (short) (*colp);
              +     }
              +-    _nc_handle_sigwinch(1);
              + 
              +     T(("screen size is %dx%d", *linep, *colp));
              + 
              +     if (VALID_NUMERIC(init_tabs))
              +-	TABSIZE = (int) init_tabs;
              ++	my_tabsize = (int) init_tabs;
              +     else
              +-	TABSIZE = 8;
              ++	my_tabsize = 8;
              ++
              ++#if USE_REENTRANT
              ++    if (SP != 0)
              ++	SP->_TABSIZE = my_tabsize;
              ++#else
              ++    TABSIZE = my_tabsize;
              ++#endif
              +     T(("TABSIZE = %d", TABSIZE));
              + }
              + 
              +@@ -536,8 +545,10 @@
              + 	if (command_character && getenv("CC"))
              + 	    do_prototype();
              + 
              ++#if !USE_REENTRANT
              + 	strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1);
              + 	ttytype[NAMESIZE - 1] = '\0';
              ++#endif
              + 
              + 	cur_term->Filedes = Filedes;
              + 	cur_term->_termname = strdup(tname);
              +@@ -557,13 +568,16 @@
              +     /*
              +      * We should always check the screensize, just in case.
              +      */
              ++#if USE_REENTRANT
              ++    _nc_get_screensize(SP ? &(SP->_LINES) : &(_nc_prescreen._LINES),
              ++		       SP ? &(SP->_COLS) : &(_nc_prescreen._COLS));
              ++#else
              +     _nc_get_screensize(&LINES, &COLS);
              ++#endif
              + 
              +     if (errret)
              + 	*errret = TGETENT_YES;
              + 
              +-    T((T_CREATE("screen %s %dx%d"), tname, LINES, COLS));
              +-
              +     if (generic_type) {
              + 	ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
              +     }
              +Index: ncurses/tinfo/lib_termcap.c
              +Prereq:  1.58 
              +--- ncurses-5.6/ncurses/tinfo/lib_termcap.c	2006-09-02 19:39:46.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_termcap.c	2007-06-02 19:36:03.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -45,26 +45,20 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_termcap.c,v 1.58 2006/09/02 19:39:46 Miroslav.Lichvar Exp $")
              ++MODULE_ID("$Id: lib_termcap.c,v 1.61 2007/06/02 19:36:03 tom Exp $")
              + 
              + NCURSES_EXPORT_VAR(char *) UP = 0;
              + NCURSES_EXPORT_VAR(char *) BC = 0;
              + 
              +-typedef struct {
              +-    long sequence;
              +-    char *fix_sgr0;		/* this holds the filtered sgr0 string */
              +-    char *last_bufp;		/* help with fix_sgr0 leak */
              +-    TERMINAL *last_term;
              +-} CACHE;
              +-
              +-#define MAX_CACHE 4
              +-static CACHE cache[MAX_CACHE];
              +-static int in_cache = 0;
              +-
              +-#define FIX_SGR0 cache[in_cache].fix_sgr0
              +-#define LAST_TRM cache[in_cache].last_term
              +-#define LAST_BUF cache[in_cache].last_bufp
              +-#define LAST_SEQ cache[in_cache].sequence
              ++#define MyCache  _nc_globals.tgetent_cache
              ++#define CacheInx _nc_globals.tgetent_index
              ++#define CacheSeq _nc_globals.tgetent_sequence
              ++
              ++#define FIX_SGR0 MyCache[CacheInx].fix_sgr0
              ++#define LAST_TRM MyCache[CacheInx].last_term
              ++#define LAST_BUF MyCache[CacheInx].last_bufp
              ++#define LAST_USE MyCache[CacheInx].last_used
              ++#define LAST_SEQ MyCache[CacheInx].sequence
              + 
              + /***************************************************************************
              +  *
              +@@ -84,8 +78,6 @@
              + NCURSES_EXPORT(int)
              + tgetent(char *bufp, const char *name)
              + {
              +-    static long sequence;
              +-
              +     int errcode;
              +     int n;
              +     bool found_cache = FALSE;
              +@@ -100,11 +92,17 @@
              +      * caller, but if tgetent() is called with the same buffer, that is
              +      * good enough, since the previous data would be invalidated by the
              +      * current call.
              ++     *
              ++     * bufp may be a null pointer, e.g., GNU termcap.  That allocates data,
              ++     * which is good until the next tgetent() call.  The conventional termcap
              ++     * is inconvenient because of the fixed buffer size, but because it uses
              ++     * caller-supplied buffers, can have multiple terminal descriptions in
              ++     * use at a given time.
              +      */
              +-    for (n = 0; n < MAX_CACHE; ++n) {
              +-	bool same_result = (bufp != 0 && cache[n].last_bufp == bufp);
              ++    for (n = 0; n < TGETENT_MAX; ++n) {
              ++	bool same_result = (MyCache[n].last_used && MyCache[n].last_bufp == bufp);
              + 	if (same_result) {
              +-	    in_cache = n;
              ++	    CacheInx = n;
              + 	    if (FIX_SGR0 != 0) {
              + 		FreeAndNull(FIX_SGR0);
              + 	    }
              +@@ -114,10 +112,10 @@
              + 	    if (LAST_TRM != 0 && LAST_TRM != cur_term) {
              + 		TERMINAL *trm = LAST_TRM;
              + 		del_curterm(LAST_TRM);
              +-		for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache)
              ++		for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
              + 		    if (LAST_TRM == trm)
              + 			LAST_TRM = 0;
              +-		in_cache = n;
              ++		CacheInx = n;
              + 	    }
              + 	    found_cache = TRUE;
              + 	    break;
              +@@ -126,15 +124,15 @@
              +     if (!found_cache) {
              + 	int best = 0;
              + 
              +-	for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) {
              +-	    if (LAST_SEQ < cache[best].sequence) {
              +-		best = in_cache;
              ++	for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) {
              ++	    if (LAST_SEQ < MyCache[best].sequence) {
              ++		best = CacheInx;
              + 	    }
              + 	}
              +-	in_cache = best;
              ++	CacheInx = best;
              +     }
              +     LAST_TRM = cur_term;
              +-    LAST_SEQ = ++sequence;
              ++    LAST_SEQ = ++CacheSeq;
              + 
              +     PC = 0;
              +     UP = 0;
              +@@ -164,6 +162,7 @@
              + 	    }
              + 	}
              + 	LAST_BUF = bufp;
              ++	LAST_USE = TRUE;
              + 
              + 	(void) baudrate();	/* sets ospeed as a side-effect */
              + 
              +@@ -282,9 +281,10 @@
              + NCURSES_EXPORT(void)
              + _nc_tgetent_leaks(void)
              + {
              +-    for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) {
              ++    for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) {
              + 	FreeIfNeeded(FIX_SGR0);
              +-	del_curterm(LAST_TRM);
              ++	if (LAST_TRM != 0)
              ++	    del_curterm(LAST_TRM);
              +     }
              + }
              + #endif
              +Index: ncurses/tinfo/lib_tparm.c
              +Prereq:  1.71 
              +--- ncurses-5.6/ncurses/tinfo/lib_tparm.c	2006-11-26 01:12:56.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_tparm.c	2007-09-29 20:37:13.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -43,7 +43,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_tparm.c,v 1.71 2006/11/26 01:12:56 tom Exp $")
              ++MODULE_ID("$Id: lib_tparm.c,v 1.74 2007/09/29 20:37:13 tom Exp $")
              + 
              + /*
              +  *	char *
              +@@ -105,43 +105,20 @@
              +  *	resulting in x mod y, not the reverse.
              +  */
              + 
              +-#define STACKSIZE	20
              +-
              +-typedef struct {
              +-    union {
              +-	int num;
              +-	char *str;
              +-    } data;
              +-    bool num_type;
              +-} stack_frame;
              +-
              + NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
              + 
              +-static stack_frame stack[STACKSIZE];
              +-static int stack_ptr;
              +-static const char *tparam_base = "";
              +-
              +-#ifdef TRACE
              +-static const char *tname;
              +-#endif /* TRACE */
              +-
              +-static char *out_buff;
              +-static size_t out_size;
              +-static size_t out_used;
              +-
              +-static char *fmt_buff;
              +-static size_t fmt_size;
              ++#define TPS(var) _nc_prescreen.tparm_state.var
              + 
              + #if NO_LEAKS
              + NCURSES_EXPORT(void)
              + _nc_free_tparm(void)
              + {
              +-    if (out_buff != 0) {
              +-	FreeAndNull(out_buff);
              +-	out_size = 0;
              +-	out_used = 0;
              +-	FreeAndNull(fmt_buff);
              +-	fmt_size = 0;
              ++    if (TPS(out_buff) != 0) {
              ++	FreeAndNull(TPS(out_buff));
              ++	TPS(out_size) = 0;
              ++	TPS(out_used) = 0;
              ++	FreeAndNull(TPS(fmt_buff));
              ++	TPS(fmt_size) = 0;
              +     }
              + }
              + #endif
              +@@ -149,11 +126,11 @@
              + static NCURSES_INLINE void
              + get_space(size_t need)
              + {
              +-    need += out_used;
              +-    if (need > out_size) {
              +-	out_size = need * 2;
              +-	out_buff = typeRealloc(char, out_size, out_buff);
              +-	if (out_buff == 0)
              ++    need += TPS(out_used);
              ++    if (need > TPS(out_size)) {
              ++	TPS(out_size) = need * 2;
              ++	TPS(out_buff) = typeRealloc(char, TPS(out_size), TPS(out_buff));
              ++	if (TPS(out_buff) == 0)
              + 	    _nc_err_abort(MSG_NO_MEMORY);
              +     }
              + }
              +@@ -167,8 +144,8 @@
              + 
              +     get_space(s_len + 1);
              + 
              +-    (void) sprintf(out_buff + out_used, fmt, s);
              +-    out_used += strlen(out_buff + out_used);
              ++    (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, s);
              ++    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
              + }
              + 
              + static NCURSES_INLINE void
              +@@ -179,8 +156,8 @@
              + 
              +     get_space((unsigned) len + 1);
              + 
              +-    (void) sprintf(out_buff + out_used, fmt, number);
              +-    out_used += strlen(out_buff + out_used);
              ++    (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, number);
              ++    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
              + }
              + 
              + static NCURSES_INLINE void
              +@@ -189,18 +166,18 @@
              +     if (c == 0)
              + 	c = 0200;
              +     get_space(1);
              +-    out_buff[out_used++] = c;
              ++    TPS(out_buff)[TPS(out_used)++] = c;
              + }
              + 
              + static NCURSES_INLINE void
              + npush(int x)
              + {
              +-    if (stack_ptr < STACKSIZE) {
              +-	stack[stack_ptr].num_type = TRUE;
              +-	stack[stack_ptr].data.num = x;
              +-	stack_ptr++;
              ++    if (TPS(stack_ptr) < STACKSIZE) {
              ++	TPS(stack)[TPS(stack_ptr)].num_type = TRUE;
              ++	TPS(stack)[TPS(stack_ptr)].data.num = x;
              ++	TPS(stack_ptr)++;
              +     } else {
              +-	DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(tparam_base)));
              ++	DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
              + 	_nc_tparm_err++;
              +     }
              + }
              +@@ -209,12 +186,12 @@
              + npop(void)
              + {
              +     int result = 0;
              +-    if (stack_ptr > 0) {
              +-	stack_ptr--;
              +-	if (stack[stack_ptr].num_type)
              +-	    result = stack[stack_ptr].data.num;
              ++    if (TPS(stack_ptr) > 0) {
              ++	TPS(stack_ptr)--;
              ++	if (TPS(stack)[TPS(stack_ptr)].num_type)
              ++	    result = TPS(stack)[TPS(stack_ptr)].data.num;
              +     } else {
              +-	DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(tparam_base)));
              ++	DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
              + 	_nc_tparm_err++;
              +     }
              +     return result;
              +@@ -223,12 +200,12 @@
              + static NCURSES_INLINE void
              + spush(char *x)
              + {
              +-    if (stack_ptr < STACKSIZE) {
              +-	stack[stack_ptr].num_type = FALSE;
              +-	stack[stack_ptr].data.str = x;
              +-	stack_ptr++;
              ++    if (TPS(stack_ptr) < STACKSIZE) {
              ++	TPS(stack)[TPS(stack_ptr)].num_type = FALSE;
              ++	TPS(stack)[TPS(stack_ptr)].data.str = x;
              ++	TPS(stack_ptr)++;
              +     } else {
              +-	DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(tparam_base)));
              ++	DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
              + 	_nc_tparm_err++;
              +     }
              + }
              +@@ -238,12 +215,13 @@
              + {
              +     static char dummy[] = "";	/* avoid const-cast */
              +     char *result = dummy;
              +-    if (stack_ptr > 0) {
              +-	stack_ptr--;
              +-	if (!stack[stack_ptr].num_type && stack[stack_ptr].data.str != 0)
              +-	    result = stack[stack_ptr].data.str;
              ++    if (TPS(stack_ptr) > 0) {
              ++	TPS(stack_ptr)--;
              ++	if (!TPS(stack)[TPS(stack_ptr)].num_type
              ++	    && TPS(stack)[TPS(stack_ptr)].data.str != 0)
              ++	    result = TPS(stack)[TPS(stack_ptr)].data.str;
              +     } else {
              +-	DEBUG(2, ("spop: stack underflow: %s", _nc_visbuf(tparam_base)));
              ++	DEBUG(2, ("spop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
              + 	_nc_tparm_err++;
              +     }
              +     return result;
              +@@ -369,10 +347,11 @@
              +     if (cp == 0)
              + 	return 0;
              + 
              +-    if ((len2 = strlen(cp)) > fmt_size) {
              +-	fmt_size = len2 + fmt_size + 2;
              +-	if ((fmt_buff = typeRealloc(char, fmt_size, fmt_buff)) == 0)
              +-	      return 0;
              ++    if ((len2 = strlen(cp)) > TPS(fmt_size)) {
              ++	TPS(fmt_size) = len2 + TPS(fmt_size) + 2;
              ++	TPS(fmt_buff) = typeRealloc(char, TPS(fmt_size), TPS(fmt_buff));
              ++	if (TPS(fmt_buff) == 0)
              ++	    return 0;
              +     }
              + 
              +     memset(p_is_s, 0, sizeof(p_is_s[0]) * NUM_PARM);
              +@@ -381,7 +360,7 @@
              +     while ((cp - string) < (int) len2) {
              + 	if (*cp == '%') {
              + 	    cp++;
              +-	    cp = parse_format(cp, fmt_buff, &len);
              ++	    cp = parse_format(cp, TPS(fmt_buff), &len);
              + 	    switch (*cp) {
              + 	    default:
              + 		break;
              +@@ -474,7 +453,6 @@
              + static NCURSES_INLINE char *
              + tparam_internal(const char *string, va_list ap)
              + {
              +-#define NUM_VARS 26
              +     char *p_is_s[NUM_PARM];
              +     TPARM_ARG param[NUM_PARM];
              +     int popcount;
              +@@ -485,13 +463,11 @@
              +     int i;
              +     const char *cp = string;
              +     size_t len2;
              +-    static int dynamic_var[NUM_VARS];
              +-    static int static_vars[NUM_VARS];
              + 
              +     if (cp == NULL)
              + 	return NULL;
              + 
              +-    out_used = 0;
              ++    TPS(out_used) = 0;
              +     len2 = strlen(cp);
              + 
              +     /*
              +@@ -500,7 +476,7 @@
              +      * variable-length argument list.
              +      */
              +     number = _nc_tparm_analyze(cp, p_is_s, &popcount);
              +-    if (fmt_buff == 0)
              ++    if (TPS(fmt_buff) == 0)
              + 	return NULL;
              + 
              +     for (i = 0; i < max(popcount, number); i++) {
              +@@ -525,22 +501,23 @@
              +      * the expansion of (for example) \E[%d;%dH work correctly in termcap
              +      * style, which means tparam() will expand termcap strings OK.
              +      */
              +-    stack_ptr = 0;
              ++    TPS(stack_ptr) = 0;
              +     if (popcount == 0) {
              + 	popcount = number;
              + 	for (i = number - 1; i >= 0; i--)
              + 	    npush(param[i]);
              +     }
              + #ifdef TRACE
              +-    if (_nc_tracing & TRACE_CALLS) {
              ++    if (USE_TRACEF(TRACE_CALLS)) {
              + 	for (i = 0; i < popcount; i++) {
              + 	    if (p_is_s[i] != 0)
              + 		save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
              + 	    else
              + 		save_number(", %d", param[i], 0);
              + 	}
              +-	_tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(cp), out_buff);
              +-	out_used = 0;
              ++	_tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff));
              ++	TPS(out_used) = 0;
              ++	_nc_unlock_global(tracef);
              +     }
              + #endif /* TRACE */
              + 
              +@@ -548,8 +525,8 @@
              + 	if (*cp != '%') {
              + 	    save_char(UChar(*cp));
              + 	} else {
              +-	    tparam_base = cp++;
              +-	    cp = parse_format(cp, fmt_buff, &len);
              ++	    TPS(tparam_base) = cp++;
              ++	    cp = parse_format(cp, TPS(fmt_buff), &len);
              + 	    switch (*cp) {
              + 	    default:
              + 		break;
              +@@ -561,7 +538,7 @@
              + 	    case 'o':		/* FALLTHRU */
              + 	    case 'x':		/* FALLTHRU */
              + 	    case 'X':		/* FALLTHRU */
              +-		save_number(fmt_buff, npop(), len);
              ++		save_number(TPS(fmt_buff), npop(), len);
              + 		break;
              + 
              + 	    case 'c':		/* FALLTHRU */
              +@@ -573,7 +550,7 @@
              + 		break;
              + 
              + 	    case 's':
              +-		save_text(fmt_buff, spop(), len);
              ++		save_text(TPS(fmt_buff), spop(), len);
              + 		break;
              + 
              + 	    case 'p':
              +@@ -591,10 +568,10 @@
              + 		cp++;
              + 		if (isUPPER(*cp)) {
              + 		    i = (UChar(*cp) - 'A');
              +-		    static_vars[i] = npop();
              ++		    TPS(static_vars)[i] = npop();
              + 		} else if (isLOWER(*cp)) {
              + 		    i = (UChar(*cp) - 'a');
              +-		    dynamic_var[i] = npop();
              ++		    TPS(dynamic_var)[i] = npop();
              + 		}
              + 		break;
              + 
              +@@ -602,10 +579,10 @@
              + 		cp++;
              + 		if (isUPPER(*cp)) {
              + 		    i = (UChar(*cp) - 'A');
              +-		    npush(static_vars[i]);
              ++		    npush(TPS(static_vars)[i]);
              + 		} else if (isLOWER(*cp)) {
              + 		    i = (UChar(*cp) - 'a');
              +-		    npush(dynamic_var[i]);
              ++		    npush(TPS(dynamic_var)[i]);
              + 		}
              + 		break;
              + 
              +@@ -768,10 +745,10 @@
              +     }				/* endwhile (*cp) */
              + 
              +     get_space(1);
              +-    out_buff[out_used] = '\0';
              ++    TPS(out_buff)[TPS(out_used)] = '\0';
              + 
              +-    T((T_RETURN("%s"), _nc_visbuf(out_buff)));
              +-    return (out_buff);
              ++    T((T_RETURN("%s"), _nc_visbuf(TPS(out_buff))));
              ++    return (TPS(out_buff));
              + }
              + 
              + #if NCURSES_TPARM_VARARGS
              +@@ -789,7 +766,7 @@
              +     _nc_tparm_err = 0;
              +     va_start(ap, string);
              + #ifdef TRACE
              +-    tname = "tparm";
              ++    TPS(tname) = "tparm";
              + #endif /* TRACE */
              +     result = tparam_internal(string, ap);
              +     va_end(ap);
              +Index: ncurses/tinfo/lib_tputs.c
              +Prereq:  1.62 
              +--- ncurses-5.6/ncurses/tinfo/lib_tputs.c	2003-08-23 21:39:20.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_tputs.c	2007-09-29 20:37:13.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2003,2007 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            *
              +@@ -45,12 +45,12 @@
              + #include 		/* ospeed */
              + #include 
              + 
              +-MODULE_ID("$Id: lib_tputs.c,v 1.62 2003/08/23 21:39:20 tom Exp $")
              ++MODULE_ID("$Id: lib_tputs.c,v 1.64 2007/09/29 20:37:13 tom Exp $")
              + 
              +-NCURSES_EXPORT_VAR(char) PC = 0;		/* used by termcap library */
              +-NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;	/* used by termcap library */
              ++NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
              ++NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
              + 
              +-NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0;	/* used by 'tack' program */
              ++NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0;   /* used by 'tack' program */
              + 
              + static int (*my_outch) (int c) = _nc_outch;
              + 
              +@@ -84,7 +84,7 @@
              + NCURSES_EXPORT(int)
              + _nc_outch(int ch)
              + {
              +-    TRACE_OUTCHARS(1);
              ++    COUNT_OUTCHARS(1);
              + 
              +     if (SP != 0
              + 	&& SP->_cleanup) {
              +@@ -119,7 +119,7 @@
              + #ifdef TRACE
              +     char addrbuf[32];
              + 
              +-    if (_nc_tracing & TRACE_TPUTS) {
              ++    if (USE_TRACEF(TRACE_TPUTS)) {
              + 	if (outc == _nc_outch)
              + 	    (void) strcpy(addrbuf, "_nc_outch");
              + 	else
              +@@ -130,7 +130,8 @@
              + 	} else {
              + 	    _tracef("tputs(%s, %d, %s) called", _nc_visbuf(string), affcnt, addrbuf);
              + 	}
              +-	_nc_tputs_trace = (char *) NULL;
              ++	TPUTS_TRACE(NULL);
              ++	_nc_unlock_global(tracef);
              +     }
              + #endif /* TRACE */
              + 
              +Index: ncurses/tinfo/lib_ttyflags.c
              +Prereq:  1.13 
              +--- ncurses-5.6/ncurses/tinfo/lib_ttyflags.c	2006-12-10 01:31:54.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/lib_ttyflags.c	2007-05-26 18:54:25.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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,31 +38,35 @@
              + #include 
              + #include 		/* cur_term */
              + 
              +-MODULE_ID("$Id: lib_ttyflags.c,v 1.13 2006/12/10 01:31:54 tom Exp $")
              ++MODULE_ID("$Id: lib_ttyflags.c,v 1.15 2007/05/26 18:54:25 tom Exp $")
              + 
              + NCURSES_EXPORT(int)
              + _nc_get_tty_mode(TTY * buf)
              + {
              +     int result = OK;
              + 
              +-    if (cur_term == 0) {
              ++    if (buf == 0) {
              + 	result = ERR;
              +     } else {
              +-	for (;;) {
              +-	    if (GET_TTY(cur_term->Filedes, buf) != 0) {
              +-		if (errno == EINTR)
              +-		    continue;
              +-		result = ERR;
              ++	if (cur_term == 0) {
              ++	    result = ERR;
              ++	} else {
              ++	    for (;;) {
              ++		if (GET_TTY(cur_term->Filedes, buf) != 0) {
              ++		    if (errno == EINTR)
              ++			continue;
              ++		    result = ERR;
              ++		}
              ++		break;
              + 	    }
              +-	    break;
              + 	}
              +-    }
              + 
              +-    if (result == ERR)
              +-	memset(buf, 0, sizeof(*buf));
              ++	if (result == ERR)
              ++	    memset(buf, 0, sizeof(*buf));
              + 
              +-    TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
              +-		    cur_term->Filedes, _nc_trace_ttymode(buf)));
              ++	TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
              ++			cur_term->Filedes, _nc_trace_ttymode(buf)));
              ++    }
              +     return (result);
              + }
              + 
              +@@ -71,22 +75,26 @@
              + {
              +     int result = OK;
              + 
              +-    if (cur_term == 0) {
              ++    if (buf == 0) {
              + 	result = ERR;
              +     } else {
              +-	for (;;) {
              +-	    if (SET_TTY(cur_term->Filedes, buf) != 0) {
              +-		if (errno == EINTR)
              +-		    continue;
              +-		if ((errno == ENOTTY) && (SP != 0))
              +-		    SP->_notty = TRUE;
              +-		result = ERR;
              ++	if (cur_term == 0) {
              ++	    result = ERR;
              ++	} else {
              ++	    for (;;) {
              ++		if (SET_TTY(cur_term->Filedes, buf) != 0) {
              ++		    if (errno == EINTR)
              ++			continue;
              ++		    if ((errno == ENOTTY) && (SP != 0))
              ++			SP->_notty = TRUE;
              ++		    result = ERR;
              ++		}
              ++		break;
              + 	    }
              +-	    break;
              + 	}
              ++	TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
              ++			cur_term->Filedes, _nc_trace_ttymode(buf)));
              +     }
              +-    TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
              +-		    cur_term->Filedes, _nc_trace_ttymode(buf)));
              +     return (result);
              + }
              + 
              +@@ -164,19 +172,33 @@
              +     returnCode(ERR);
              + }
              + 
              ++static TTY *
              ++saved_tty(void)
              ++{
              ++    TTY *result = 0;
              ++
              ++    if (SP != 0) {
              ++	result = &(SP->_saved_tty);
              ++    } else {
              ++	if (_nc_prescreen.saved_tty == 0) {
              ++	    _nc_prescreen.saved_tty = typeCalloc(TTY, 1);
              ++	}
              ++	result = _nc_prescreen.saved_tty;
              ++    }
              ++    return result;
              ++}
              ++
              + /*
              + **	savetty()  and  resetty()
              + **
              + */
              + 
              +-static TTY buf;
              +-
              + NCURSES_EXPORT(int)
              + savetty(void)
              + {
              +     T((T_CALLED("savetty()")));
              + 
              +-    returnCode(_nc_get_tty_mode(&buf));
              ++    returnCode(_nc_get_tty_mode(saved_tty()));
              + }
              + 
              + NCURSES_EXPORT(int)
              +@@ -184,5 +206,5 @@
              + {
              +     T((T_CALLED("resetty()")));
              + 
              +-    returnCode(_nc_set_tty_mode(&buf));
              ++    returnCode(_nc_set_tty_mode(saved_tty()));
              + }
              +Index: ncurses/tinfo/make_keys.c
              +Prereq:  1.12 
              +--- ncurses-5.6/ncurses/tinfo/make_keys.c	2005-08-20 19:58:18.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/make_keys.c	2007-01-07 00:00:14.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2005,2007 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            *
              +@@ -39,7 +39,7 @@
              + #define USE_TERMLIB 1
              + #include 
              + 
              +-MODULE_ID("$Id: make_keys.c,v 1.12 2005/08/20 19:58:18 tom Exp $")
              ++MODULE_ID("$Id: make_keys.c,v 1.13 2007/01/07 00:00:14 tom Exp $")
              + 
              + #include 
              + 
              +@@ -113,7 +113,7 @@
              + 	"#if BROKEN_LINKER",
              + 	"static",
              + 	"#endif",
              +-	"struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
              ++	"const struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
              + 	0
              +     };
              +     static const char *suffix[] =
              +Index: ncurses/tinfo/name_match.c
              +Prereq:  1.15 
              +--- ncurses-5.6/ncurses/tinfo/name_match.c	2005-01-22 21:47:25.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/name_match.c	2007-04-21 21:28:13.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1999-2004,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1999-2005,2007 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,38 +34,38 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: name_match.c,v 1.15 2005/01/22 21:47:25 tom Exp $")
              ++MODULE_ID("$Id: name_match.c,v 1.16 2007/04/21 21:28:13 tom Exp $")
              + 
              + /*
              +  *	_nc_first_name(char *names)
              +  *
              +  *	Extract the primary name from a compiled entry.
              +  */
              ++#define FirstName _nc_globals.first_name
              + 
              + NCURSES_EXPORT(char *)
              + _nc_first_name(const char *const sp)
              + /* get the first name from the given name list */
              + {
              +-    static char *buf;
              +-    register unsigned n;
              ++    unsigned n;
              + 
              + #if NO_LEAKS
              +     if (sp == 0) {
              +-	if (buf != 0)
              +-	    FreeAndNull(buf);	/* for leak-testing */
              ++	if (FirstName != 0)
              ++	    FreeAndNull(FirstName);
              + 	return 0;
              +     }
              + #endif
              + 
              +-    if (buf == 0)
              +-	buf = typeMalloc(char, MAX_NAME_SIZE + 1);
              ++    if (FirstName == 0)
              ++	FirstName = typeMalloc(char, MAX_NAME_SIZE + 1);
              +     for (n = 0; n < MAX_NAME_SIZE; n++) {
              +-	if ((buf[n] = sp[n]) == '\0'
              +-	    || (buf[n] == '|'))
              ++	if ((FirstName[n] = sp[n]) == '\0'
              ++	    || (FirstName[n] == '|'))
              + 	    break;
              +     }
              +-    buf[n] = '\0';
              +-    return (buf);
              ++    FirstName[n] = '\0';
              ++    return (FirstName);
              + }
              + 
              + /*
              +Index: ncurses/tinfo/parse_entry.c
              +Prereq:  1.63 
              +--- ncurses-5.6/ncurses/tinfo/parse_entry.c	2006-06-17 17:57:50.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/parse_entry.c	2007-08-11 16:19:02.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -48,7 +48,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: parse_entry.c,v 1.63 2006/06/17 17:57:50 tom Exp $")
              ++MODULE_ID("$Id: parse_entry.c,v 1.65 2007/08/11 16:19:02 tom Exp $")
              + 
              + #ifdef LINT
              + static short const parametrized[] =
              +@@ -283,7 +283,7 @@
              + 	} else {
              + 	    /* normal token lookup */
              + 	    entry_ptr = _nc_find_entry(_nc_curr_token.tk_name,
              +-				       _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table);
              ++				       _nc_get_hash_table(_nc_syntax));
              + 
              + 	    /*
              + 	     * Our kluge to handle aliasing.  The reason it's done
              +@@ -300,7 +300,7 @@
              + 		    if (entryp->nuses != 0) {
              + 			BAD_TC_USAGE
              + 		    }
              +-		    for (ap = _nc_capalias_table; ap->from; ap++)
              ++		    for (ap = _nc_get_alias_table(TRUE); ap->from; ap++)
              + 			if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
              + 			    if (ap->to == (char *) 0) {
              + 				_nc_warning("%s (%s termcap extension) ignored",
              +@@ -308,14 +308,15 @@
              + 				goto nexttok;
              + 			    }
              + 
              +-			    entry_ptr = _nc_find_entry(ap->to, _nc_cap_hash_table);
              ++			    entry_ptr = _nc_find_entry(ap->to,
              ++						       _nc_get_hash_table(TRUE));
              + 			    if (entry_ptr && !silent)
              + 				_nc_warning("%s (%s termcap extension) aliased to %s",
              + 					    ap->from, ap->source, ap->to);
              + 			    break;
              + 			}
              + 		} else {	/* if (_nc_syntax == SYN_TERMINFO) */
              +-		    for (ap = _nc_infoalias_table; ap->from; ap++)
              ++		    for (ap = _nc_get_alias_table(FALSE); ap->from; ap++)
              + 			if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
              + 			    if (ap->to == (char *) 0) {
              + 				_nc_warning("%s (%s terminfo extension) ignored",
              +@@ -323,7 +324,8 @@
              + 				goto nexttok;
              + 			    }
              + 
              +-			    entry_ptr = _nc_find_entry(ap->to, _nc_info_hash_table);
              ++			    entry_ptr = _nc_find_entry(ap->to,
              ++						       _nc_get_hash_table(FALSE));
              + 			    if (entry_ptr && !silent)
              + 				_nc_warning("%s (%s terminfo extension) aliased to %s",
              + 					    ap->from, ap->source, ap->to);
              +@@ -796,8 +798,8 @@
              + 
              + 	    /* now we know we found a match in ko_table, so... */
              + 
              +-	    from_ptr = _nc_find_entry(ap->from, _nc_cap_hash_table);
              +-	    to_ptr = _nc_find_entry(ap->to, _nc_info_hash_table);
              ++	    from_ptr = _nc_find_entry(ap->from, _nc_get_hash_table(TRUE));
              ++	    to_ptr = _nc_find_entry(ap->to, _nc_get_hash_table(FALSE));
              + 
              + 	    if (!from_ptr || !to_ptr)	/* should never happen! */
              + 		_nc_err_abort("ko translation table is invalid, I give up");
              +Index: ncurses/tinfo/read_entry.c
              +Prereq:  1.99 
              +--- ncurses-5.6/ncurses/tinfo/read_entry.c	2006-08-19 15:58:50.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/read_entry.c	2007-11-17 23:56:50.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -42,7 +42,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: read_entry.c,v 1.99 2006/08/19 15:58:50 tom Exp $")
              ++MODULE_ID("$Id: read_entry.c,v 1.100 2007/11/17 23:56:50 tom Exp $")
              + 
              + #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
              + 
              +@@ -409,7 +409,7 @@
              + 	unsigned need = 4 + strlen(path) + strlen(name);
              + 
              + 	if (need <= limit) {
              +-	    (void) sprintf(filename, "%s/%c/%s", path, *name, name);
              ++	    (void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
              + 	    result = _nc_read_file_entry(filename, tp);
              + 	}
              +     }
              +Index: ncurses/tinfo/setbuf.c
              +Prereq:  1.12 
              +--- ncurses-5.6/ncurses/tinfo/setbuf.c	2003-11-15 23:55:34.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/setbuf.c	2007-05-12 19:04:02.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2003,2007 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            *
              +@@ -40,7 +40,7 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: setbuf.c,v 1.12 2003/11/15 23:55:34 tom Exp $")
              ++MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $")
              + 
              + /*
              +  * If the output file descriptor is connected to a tty (the typical case) it
              +@@ -102,7 +102,7 @@
              + {
              +     /* optional optimization hack -- do before any output to ofp */
              + #if HAVE_SETVBUF || HAVE_SETBUFFER
              +-    if (SP->_buffered != (int)buffered) {
              ++    if (SP->_buffered != buffered) {
              + 	unsigned buf_len;
              + 	char *buf_ptr;
              + 
              +Index: ncurses/tinfo/strings.c
              +Prereq:  1.5 
              +--- ncurses-5.6/ncurses/tinfo/strings.c	2003-08-16 23:46:00.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/strings.c	2007-08-11 17:12:17.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2000,2003 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 2000-2003,2007 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,7 +36,7 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: strings.c,v 1.5 2003/08/16 23:46:00 tom Exp $")
              ++MODULE_ID("$Id: strings.c,v 1.6 2007/08/11 17:12:17 tom Exp $")
              + 
              + /****************************************************************************
              +  * Useful string functions (especially for mvcur)
              +@@ -52,7 +52,7 @@
              + 
              +     while ((len1 != 0) && (len1-- >= len2)) {
              + 	if (!strncmp(haystack, needle, len2)) {
              +-	    result = haystack;
              ++	    result = (char *) haystack;
              + 	    break;
              + 	}
              + 	haystack++;
              +Index: ncurses/tinfo/trim_sgr0.c
              +Prereq:  1.7 
              +--- ncurses-5.6/ncurses/tinfo/trim_sgr0.c	2006-12-02 19:37:57.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/trim_sgr0.c	2007-04-07 17:14:11.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2005 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2005-2006,2007 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,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: trim_sgr0.c,v 1.7 2006/12/02 19:37:57 tom Exp $")
              ++MODULE_ID("$Id: trim_sgr0.c,v 1.8 2007/04/07 17:14:11 tom Exp $")
              + 
              + #undef CUR
              + #define CUR tp->
              +@@ -247,9 +247,7 @@
              + 	if (!rewrite_sgr(on, enter_alt_charset_mode)
              + 	    || !rewrite_sgr(off, exit_alt_charset_mode)
              + 	    || !rewrite_sgr(end, exit_alt_charset_mode)) {
              +-	    FreeIfNeeded(on);
              + 	    FreeIfNeeded(off);
              +-	    FreeIfNeeded(end);
              + 	} else if (similar_sgr(off, end)
              + 		   && !similar_sgr(off, on)) {
              + 	    TR(TRACE_DATABASE, ("adjusting sgr(9:off) : %s", _nc_visbuf(off)));
              +@@ -315,8 +313,8 @@
              + 	     */
              + 	    free(off);
              + 	}
              +-	free(end);
              +-	free(on);
              ++	FreeIfNeeded(end);
              ++	FreeIfNeeded(on);
              +     } else {
              + 	/*
              + 	 * Possibly some applications are confused if sgr0 contains rmacs,
              +Index: ncurses/tinfo/use_screen.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/use_screen.c	2007-10-20 22:46:13.000000000 +0000
              +@@ -0,0 +1,60 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++
              ++/****************************************************************************
              ++ *     Author: Thomas E. Dickey                        2007                 *
              ++ ****************************************************************************/
              ++
              ++#include 
              ++
              ++MODULE_ID("$Id: use_screen.c,v 1.2 2007/09/08 21:46:48 tom Exp $")
              ++
              ++NCURSES_EXPORT(int)
              ++use_screen(SCREEN *screen, NCURSES_CALLBACK func, void *data)
              ++{
              ++    SCREEN *save_SP;
              ++    int code = OK;
              ++
              ++    T((T_CALLED("use_screen(%p,%p,%p)"), screen, func, data));
              ++
              ++    /*
              ++     * FIXME - add a flag so a given thread can check if _it_ has already
              ++     * recurred through this point, return an error if so.
              ++     */
              ++    _nc_lock_global(use_screen);
              ++    save_SP = SP;
              ++    set_term(screen);
              ++
              ++    code = func(screen->_stdscr, data);
              ++
              ++    set_term(save_SP);
              ++    _nc_unlock_global(use_screen);
              ++    returnCode(code);
              ++
              ++    return 0;
              ++}
              +Index: ncurses/tinfo/write_entry.c
              +Prereq:  1.68 
              +--- ncurses-5.6/ncurses/tinfo/write_entry.c	2006-10-14 20:45:16.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tinfo/write_entry.c	2007-11-17 23:38:28.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -54,7 +54,7 @@
              + #define TRACE_OUT(p)		/*nothing */
              + #endif
              + 
              +-MODULE_ID("$Id: write_entry.c,v 1.68 2006/10/14 20:45:16 tom Exp $")
              ++MODULE_ID("$Id: write_entry.c,v 1.70 2007/11/17 23:38:28 tom Exp $")
              + 
              + static int total_written;
              + 
              +@@ -97,17 +97,16 @@
              +     static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
              +     static bool verified[sizeof(dirnames)];
              + 
              +-    char dir[2];
              ++    char dir[sizeof(LEAF_FMT)];
              +     char *s = 0;
              + 
              +     if (code == 0 || (s = strchr(dirnames, code)) == 0)
              +-	_nc_err_abort("Illegal terminfo subdirectory \"%c\"", code);
              ++	_nc_err_abort("Illegal terminfo subdirectory \"" LEAF_FMT "\"", code);
              + 
              +     if (verified[s - dirnames])
              + 	return;
              + 
              +-    dir[0] = code;
              +-    dir[1] = '\0';
              ++    sprintf(dir, LEAF_FMT, code);
              +     if (make_db_root(dir) < 0) {
              + 	_nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir);
              +     }
              +@@ -358,7 +357,7 @@
              +     if (strlen(first_name) > sizeof(filename) - 3)
              + 	_nc_warning("terminal name too long.");
              + 
              +-    sprintf(filename, "%c/%s", first_name[0], first_name);
              ++    sprintf(filename, LEAF_FMT "/%s", first_name[0], first_name);
              + 
              +     /*
              +      * Has this primary name been written since the first call to
              +@@ -399,7 +398,7 @@
              + 	}
              + 
              + 	check_writeable(ptr[0]);
              +-	sprintf(linkname, "%c/%s", ptr[0], ptr);
              ++	sprintf(linkname, LEAF_FMT "/%s", ptr[0], ptr);
              + 
              + 	if (strcmp(filename, linkname) == 0) {
              + 	    _nc_warning("self-synonym ignored");
              +@@ -502,7 +501,8 @@
              + 	} else {
              + 	    offsets[i] = nextfree;
              + 	    nextfree += strlen(Strings[i]) + 1;
              +-	    TRACE_OUT(("put Strings[%d]=%s(%d)", i, _nc_visbuf(Strings[i]), nextfree));
              ++	    TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
              ++		       _nc_visbuf(Strings[i]), nextfree));
              + 	}
              +     }
              +     return nextfree;
              +@@ -740,7 +740,7 @@
              + 	 */
              + 	for (i = 0; i < tp->ext_Strings; i++) {
              + 	    if (VALID_STRING(tp->Strings[i + STRCOUNT])) {
              +-		TRACE_OUT(("WRITE ext_Strings[%d]=%s", i,
              ++		TRACE_OUT(("WRITE ext_Strings[%d]=%s", (int) i,
              + 			   _nc_visbuf(tp->Strings[i + STRCOUNT])));
              + 		if (!WRITE_STRING(tp->Strings[i + STRCOUNT]))
              + 		    return (ERR);
              +@@ -751,7 +751,7 @@
              + 	 * Write the extended names
              + 	 */
              + 	for (i = 0; i < extcnt; i++) {
              +-	    TRACE_OUT(("WRITE ext_Names[%d]=%s", i, tp->ext_Names[i]));
              ++	    TRACE_OUT(("WRITE ext_Names[%d]=%s", (int) i, tp->ext_Names[i]));
              + 	    if (!WRITE_STRING(tp->ext_Names[i]))
              + 		return (ERR);
              + 	}
              +Index: ncurses/trace/lib_trace.c
              +Prereq:  1.59 
              +--- ncurses-5.6/ncurses/trace/lib_trace.c	2006-08-19 12:05:25.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/lib_trace.c	2007-09-29 21:47:46.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -46,37 +46,69 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_trace.c,v 1.59 2006/08/19 12:05:25 tom Exp $")
              ++MODULE_ID("$Id: lib_trace.c,v 1.65 2007/09/29 21:47:46 tom Exp $")
              + 
              + NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
              + 
              + #ifdef TRACE
              ++
              ++#if USE_REENTRANT
              ++NCURSES_EXPORT(const char *)
              ++NCURSES_PUBLIC_VAR(_nc_tputs_trace) (void)
              ++{
              ++    return SP ? SP->_tputs_trace : _nc_prescreen._tputs_trace;
              ++}
              ++NCURSES_EXPORT(long)
              ++NCURSES_PUBLIC_VAR(_nc_outchars) (void)
              ++{
              ++    return SP ? SP->_outchars : _nc_prescreen._outchars;
              ++}
              ++NCURSES_EXPORT(void)
              ++_nc_set_tputs_trace(const char *s)
              ++{
              ++    if (SP)
              ++	SP->_tputs_trace = s;
              ++    else
              ++	_nc_prescreen._tputs_trace = s;
              ++}
              ++NCURSES_EXPORT(void)
              ++_nc_count_outchars(long increment)
              ++{
              ++    if (SP)
              ++	SP->_outchars += increment;
              ++    else
              ++	_nc_prescreen._outchars += increment;
              ++}
              ++#else
              + NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace = "";
              + NCURSES_EXPORT_VAR(long) _nc_outchars = 0;
              ++#endif
              + 
              +-static FILE *tracefp = 0;	/* default to writing to stderr */
              ++#define TraceFP		_nc_globals.trace_fp
              ++#define TracePath	_nc_globals.trace_fname
              ++#define TraceLevel	_nc_globals.trace_level
              + 
              + NCURSES_EXPORT(void)
              + trace(const unsigned int tracelevel)
              + {
              +-    static bool been_here = FALSE;
              +-    static char my_name[PATH_MAX];
              +-
              +-    if ((tracefp == 0) && tracelevel) {
              +-	const char *mode = been_here ? "ab" : "wb";
              ++    if ((TraceFP == 0) && tracelevel) {
              ++	const char *mode = _nc_globals.init_trace ? "ab" : "wb";
              + 
              +-	if (*my_name == '\0') {
              +-	    if (getcwd(my_name, sizeof(my_name) - 10) == 0) {
              ++	if (TracePath[0] == '\0') {
              ++	    if (getcwd(TracePath, sizeof(TracePath) - 12) == 0) {
              + 		perror("curses: Can't get working directory");
              + 		exit(EXIT_FAILURE);
              + 	    }
              +-	    strcat(my_name, "/trace");
              ++	    strcat(TracePath, "/trace");
              ++	    if (_nc_is_dir_path(TracePath)) {
              ++		strcat(TracePath, ".log");
              ++	    }
              + 	}
              + 
              +-	been_here = TRUE;
              ++	_nc_globals.init_trace = TRUE;
              + 	_nc_tracing = tracelevel;
              +-	if (_nc_access(my_name, W_OK) < 0
              +-	    || (tracefp = fopen(my_name, mode)) == 0) {
              ++	if (_nc_access(TracePath, W_OK) < 0
              ++	    || (TraceFP = fopen(TracePath, mode)) == 0) {
              + 	    perror("curses: Can't open 'trace' file");
              + 	    exit(EXIT_FAILURE);
              + 	}
              +@@ -85,18 +117,18 @@
              + 	 * end of each line.  This is useful in case the program dies. 
              + 	 */
              + #if HAVE_SETVBUF		/* ANSI */
              +-	(void) setvbuf(tracefp, (char *) 0, _IOLBF, 0);
              ++	(void) setvbuf(TraceFP, (char *) 0, _IOLBF, 0);
              + #elif HAVE_SETBUF		/* POSIX */
              +-	(void) setbuffer(tracefp, (char *) 0);
              ++	(void) setbuffer(TraceFP, (char *) 0);
              + #endif
              + 	_tracef("TRACING NCURSES version %s.%d (tracelevel=%#x)",
              + 		NCURSES_VERSION,
              + 		NCURSES_VERSION_PATCH,
              + 		tracelevel);
              +     } else if (tracelevel == 0) {
              +-	if (tracefp != 0) {
              +-	    fclose(tracefp);
              +-	    tracefp = 0;
              ++	if (TraceFP != 0) {
              ++	    fclose(TraceFP);
              ++	    TraceFP = 0;
              + 	}
              + 	_nc_tracing = tracelevel;
              +     } else if (_nc_tracing != tracelevel) {
              +@@ -105,13 +137,12 @@
              +     }
              + }
              + 
              +-NCURSES_EXPORT(void)
              +-_tracef(const char *fmt,...)
              ++static void
              ++_nc_va_tracef(const char *fmt, va_list ap)
              + {
              +     static const char Called[] = T_CALLED("");
              +     static const char Return[] = T_RETURN("");
              +-    static int level;
              +-    va_list ap;
              ++
              +     bool before = FALSE;
              +     bool after = FALSE;
              +     unsigned doit = _nc_tracing;
              +@@ -120,12 +151,12 @@
              +     if (strlen(fmt) >= sizeof(Called) - 1) {
              + 	if (!strncmp(fmt, Called, sizeof(Called) - 1)) {
              + 	    before = TRUE;
              +-	    level++;
              ++	    TraceLevel++;
              + 	} else if (!strncmp(fmt, Return, sizeof(Return) - 1)) {
              + 	    after = TRUE;
              + 	}
              + 	if (before || after) {
              +-	    if ((level <= 1)
              ++	    if ((TraceLevel <= 1)
              + 		|| (doit & TRACE_ICALLS) != 0)
              + 		doit &= (TRACE_CALLS | TRACE_CCALLS);
              + 	    else
              +@@ -134,25 +165,34 @@
              +     }
              + 
              +     if (doit != 0) {
              +-	if (tracefp == 0)
              +-	    tracefp = stderr;
              ++	if (TraceFP == 0)
              ++	    TraceFP = stderr;
              + 	if (before || after) {
              + 	    int n;
              +-	    for (n = 1; n < level; n++)
              +-		fputs("+ ", tracefp);
              ++	    for (n = 1; n < TraceLevel; n++)
              ++		fputs("+ ", TraceFP);
              + 	}
              +-	va_start(ap, fmt);
              +-	vfprintf(tracefp, fmt, ap);
              +-	fputc('\n', tracefp);
              +-	va_end(ap);
              +-	fflush(tracefp);
              ++	vfprintf(TraceFP, fmt, ap);
              ++	fputc('\n', TraceFP);
              ++	fflush(TraceFP);
              +     }
              + 
              +-    if (after && level)
              +-	level--;
              ++    if (after && TraceLevel)
              ++	TraceLevel--;
              ++
              +     errno = save_err;
              + }
              + 
              ++NCURSES_EXPORT(void)
              ++_tracef(const char *fmt,...)
              ++{
              ++    va_list ap;
              ++
              ++    va_start(ap, fmt);
              ++    _nc_va_tracef(fmt, ap);
              ++    va_end(ap);
              ++}
              ++
              + /* Trace 'bool' return-values */
              + NCURSES_EXPORT(NCURSES_BOOL)
              + _nc_retrace_bool(NCURSES_BOOL code)
              +@@ -224,4 +264,53 @@
              +     T((T_RETURN("%p"), code));
              +     return code;
              + }
              ++
              ++#if USE_REENTRANT
              ++/*
              ++ * Check if the given trace-mask is enabled.
              ++ *
              ++ * This function may be called from within one of the functions that fills
              ++ * in parameters for _tracef(), but in that case we do not want to lock the
              ++ * mutex, since it is already locked.
              ++ */
              ++NCURSES_EXPORT(int)
              ++_nc_use_tracef(unsigned mask)
              ++{
              ++    bool result = FALSE;
              ++
              ++    _nc_lock_global(tst_tracef);
              ++    if (!_nc_globals.nested_tracef++) {
              ++	if ((result = (_nc_tracing & (mask))) != 0) {
              ++	    /* we will call _nc_locked_tracef(), no nesting so far */
              ++	    _nc_lock_global(tracef);
              ++	} else {
              ++	    /* we will not call _nc_locked_tracef() */
              ++	    _nc_globals.nested_tracef = 0;
              ++	}
              ++    } else {
              ++	/* we may call _nc_locked_tracef(), but with nested_tracef > 0 */
              ++	result = (_nc_tracing & (mask));
              ++    }
              ++    _nc_unlock_global(tst_tracef);
              ++    return result;
              ++}
              ++
              ++/*
              ++ * We call this if _nc_use_tracef() returns true, which means we must unlock
              ++ * the tracef mutex.
              ++ */
              ++NCURSES_EXPORT(void)
              ++_nc_locked_tracef(const char *fmt,...)
              ++{
              ++    va_list ap;
              ++
              ++    va_start(ap, fmt);
              ++    _nc_va_tracef(fmt, ap);
              ++    va_end(ap);
              ++
              ++    if (--(_nc_globals.nested_tracef) == 0)
              ++	_nc_unlock_global(tracef);
              ++}
              ++#endif /* USE_REENTRANT */
              ++
              + #endif /* TRACE */
              +Index: ncurses/trace/lib_traceatr.c
              +Prereq:  1.56 
              +--- ncurses-5.6/ncurses/trace/lib_traceatr.c	2006-12-02 21:18:28.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/lib_traceatr.c	2007-06-09 17:22:10.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -39,33 +39,37 @@
              + #include 
              + #include 		/* acs_chars */
              + 
              +-MODULE_ID("$Id: lib_traceatr.c,v 1.56 2006/12/02 21:18:28 tom Exp $")
              ++MODULE_ID("$Id: lib_traceatr.c,v 1.59 2007/06/09 17:22:10 tom Exp $")
              + 
              + #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
              + 
              + #ifdef TRACE
              + 
              +-static const char l_brace[] = {L_BRACE, 0};
              +-static const char r_brace[] = {R_BRACE, 0};
              ++static const char l_brace[] = StringOf(L_BRACE);
              ++static const char r_brace[] = StringOf(R_BRACE);
              + 
              + #ifndef USE_TERMLIB
              ++
              ++#define my_buffer _nc_globals.traceatr_color_buf
              ++#define my_select _nc_globals.traceatr_color_sel
              ++#define my_cached _nc_globals.traceatr_color_last
              ++
              + static char *
              + color_of(int c)
              + {
              +-    static char buffer[2][80];
              +-    static int sel;
              +-    static int last = -1;
              +-
              +-    if (c != last) {
              +-	last = c;
              +-	sel = !sel;
              ++    if (c != my_cached) {
              ++	my_cached = c;
              ++	my_select = !my_select;
              + 	if (c == COLOR_DEFAULT)
              +-	    strcpy(buffer[sel], "default");
              ++	    strcpy(my_buffer[my_select], "default");
              + 	else
              +-	    sprintf(buffer[sel], "color%d", c);
              ++	    sprintf(my_buffer[my_select], "color%d", c);
              +     }
              +-    return buffer[sel];
              ++    return my_buffer[my_select];
              + }
              ++
              ++#undef my_buffer
              ++#undef my_select
              + #endif /* !USE_TERMLIB */
              + 
              + NCURSES_EXPORT(char *)
              +@@ -173,17 +177,19 @@
              + const char *
              + _nc_altcharset_name(attr_t attr, chtype ch)
              + {
              ++    typedef struct {
              ++	unsigned int val;
              ++	const char *name;
              ++    } ALT_NAMES;
              ++
              +     const char *result = 0;
              + 
              +     if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
              + 	char *cp;
              + 	char *found = 0;
              +-	static const struct {
              +-	    unsigned int val;
              +-	    const char *name;
              +-	} names[] =
              ++	/* *INDENT-OFF* */
              ++	static const ALT_NAMES names[] =
              + 	{
              +-	    /* *INDENT-OFF* */
              + 	    { 'l', "ACS_ULCORNER" },	/* upper left corner */
              + 	    { 'm', "ACS_LLCORNER" },	/* lower left corner */
              + 	    { 'k', "ACS_URCORNER" },	/* upper right corner */
              +@@ -217,9 +223,9 @@
              + 	    { '|', "ACS_NEQUAL" },	/* not equal */
              + 	    { '}', "ACS_STERLING" },	/* UK pound sign */
              + 	    { '\0', (char *) 0 }
              +-		/* *INDENT-OFF* */
              +-	},
              +-	    *sp;
              ++	};
              ++	/* *INDENT-OFF* */
              ++	const ALT_NAMES *sp;
              + 
              + 	for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
              + 	    if (ChCharOf(cp[1]) == ChCharOf(ch)) {
              +Index: ncurses/trace/lib_tracebits.c
              +Prereq:  1.13 
              +--- ncurses-5.6/ncurses/trace/lib_tracebits.c	2006-12-10 01:33:00.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/lib_tracebits.c	2007-06-30 16:14:20.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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 @@
              + #include 
              + #include 		/* cur_term */
              + 
              +-MODULE_ID("$Id: lib_tracebits.c,v 1.13 2006/12/10 01:33:00 tom Exp $")
              ++MODULE_ID("$Id: lib_tracebits.c,v 1.15 2007/06/30 16:14:20 tom Exp $")
              + 
              + #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
              + #define _POSIX_SOURCE
              +@@ -53,10 +53,27 @@
              + #ifndef TOSTOP
              + #define TOSTOP 0
              + #endif
              ++
              + #ifndef IEXTEN
              + #define IEXTEN 0
              + #endif
              + 
              ++#ifndef ONLCR
              ++#define ONLCR 0
              ++#endif
              ++
              ++#ifndef OCRNL
              ++#define OCRNL 0
              ++#endif
              ++
              ++#ifndef ONOCR
              ++#define ONOCR 0
              ++#endif
              ++
              ++#ifndef ONLRET
              ++#define ONLRET 0
              ++#endif
              ++
              + #ifdef TRACE
              + 
              + typedef struct {
              +@@ -108,8 +125,12 @@
              +     {
              + 	{OPOST, "OPOST"},
              + 	{OFLAGS_TABS, "XTABS"},
              ++	{ONLCR, "ONLCR"},
              ++	{OCRNL, "OCRNL"},
              ++	{ONOCR, "ONOCR"},
              ++	{ONLRET, "ONLRET"},
              + 	{0, NULL}
              +-#define ALLOUT	(OPOST)
              ++#define ALLOUT	(OPOST|OFLAGS_TABS|ONLCR|OCRNL|ONOCR|ONLRET)
              +     }, cflags[] =
              +     {
              + 	{CLOCAL, "CLOCAL"},
              +Index: ncurses/trace/lib_tracechr.c
              +Prereq:  1.12 
              +--- ncurses-5.6/ncurses/trace/lib_tracechr.c	2005-04-16 16:55:46.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/lib_tracechr.c	2007-04-21 23:16:37.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2005,2007 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            *
              +@@ -39,34 +39,35 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_tracechr.c,v 1.12 2005/04/16 16:55:46 tom Exp $")
              ++MODULE_ID("$Id: lib_tracechr.c,v 1.13 2007/04/21 23:16:37 tom Exp $")
              + 
              + #ifdef TRACE
              ++#define MyBuffer _nc_globals.tracechr_buf
              ++
              + NCURSES_EXPORT(char *)
              + _tracechar(int ch)
              + {
              +-    static char result[40];
              +     NCURSES_CONST char *name;
              + 
              +     if (ch > KEY_MIN || ch < 0) {
              + 	name = keyname(ch);
              + 	if (name == 0 || *name == '\0')
              + 	    name = "NULL";
              +-	(void) sprintf(result, "'%.30s' = %#03o", name, ch);
              ++	(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
              +     } else if (!is8bits(ch) || !isprint(UChar(ch))) {
              + 	/*
              + 	 * workaround for glibc bug:
              + 	 * sprintf changes the result from unctrl() to an empty string if it
              + 	 * does not correspond to a valid multibyte sequence.
              + 	 */
              +-	(void) sprintf(result, "%#03o", ch);
              ++	(void) sprintf(MyBuffer, "%#03o", ch);
              +     } else {
              + 	name = unctrl((chtype) ch);
              + 	if (name == 0 || *name == 0)
              + 	    name = "null";	/* shouldn't happen */
              +-	(void) sprintf(result, "'%.30s' = %#03o", name, ch);
              ++	(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
              +     }
              +-    return (result);
              ++    return (MyBuffer);
              + }
              + #else
              + empty_module(_nc_lib_tracechr)
              +Index: ncurses/trace/lib_tracedmp.c
              +Prereq:  1.27 
              +--- ncurses-5.6/ncurses/trace/lib_tracedmp.c	2006-10-14 20:43:31.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/lib_tracedmp.c	2007-06-30 23:01:19.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -39,15 +39,16 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_tracedmp.c,v 1.27 2006/10/14 20:43:31 tom Exp $")
              ++MODULE_ID("$Id: lib_tracedmp.c,v 1.29 2007/06/30 23:01:19 tom Exp $")
              + 
              + #ifdef TRACE
              ++
              ++#define my_buffer _nc_globals.tracedmp_buf
              ++#define my_length _nc_globals.tracedmp_used
              ++
              + NCURSES_EXPORT(void)
              + _tracedump(const char *name, WINDOW *win)
              + {
              +-    static char *buf = 0;
              +-    static size_t used = 0;
              +-
              +     int i, j, n, width;
              + 
              +     /* compute narrowest possible display width */
              +@@ -66,13 +67,13 @@
              +     }
              +     if (width < win->_maxx)
              + 	++width;
              +-    if (++width + 1 > (int) used) {
              +-	used = 2 * (width + 1);
              +-	buf = typeRealloc(char, used, buf);
              ++    if (++width + 1 > (int) my_length) {
              ++	my_length = 2 * (width + 1);
              ++	my_buffer = typeRealloc(char, my_length, my_buffer);
              +     }
              + 
              +     for (n = 0; n <= win->_maxy; ++n) {
              +-	char *ep = buf;
              ++	char *ep = my_buffer;
              + 	bool haveattrs, havecolors;
              + 
              + 	/*
              +@@ -99,6 +100,30 @@
              + 		(long) win->_line[n].lastchar,
              + 		ep);
              + 
              ++	/* if there are multi-column characters on the line, print them now */
              ++	if_WIDEC({
              ++	    bool multicolumn = FALSE;
              ++	    for (j = 0; j < width; ++j)
              ++		if (WidecExt(win->_line[n].text[j]) != 0) {
              ++		    multicolumn = TRUE;
              ++		    break;
              ++		}
              ++	    if (multicolumn) {
              ++		ep = my_buffer;
              ++		for (j = 0; j < width; ++j) {
              ++		    int test = WidecExt(win->_line[n].text[j]);
              ++		    if (test) {
              ++			ep[j] = test + '0';
              ++		    } else {
              ++			ep[j] = ' ';
              ++		    }
              ++		}
              ++		ep[j] = '\0';
              ++		_tracef("%*s[%2d]%*s='%s'", (int) strlen(name),
              ++			"widec", n, 8, " ", my_buffer);
              ++	    }
              ++	});
              ++
              + 	/* dump A_COLOR part, will screw up if there are more than 96 */
              + 	havecolors = FALSE;
              + 	for (j = 0; j < width; ++j)
              +@@ -107,7 +132,7 @@
              + 		break;
              + 	    }
              + 	if (havecolors) {
              +-	    ep = buf;
              ++	    ep = my_buffer;
              + 	    for (j = 0; j < width; ++j) {
              + 		int pair = GetPair(win->_line[n].text[j]);
              + 		if (pair >= 52)
              +@@ -123,7 +148,7 @@
              + 	    }
              + 	    ep[j] = '\0';
              + 	    _tracef("%*s[%2d]%*s='%s'", (int) strlen(name),
              +-		    "colors", n, 8, " ", buf);
              ++		    "colors", n, 8, " ", my_buffer);
              + 	}
              + 
              + 	for (i = 0; i < 4; ++i) {
              +@@ -137,20 +162,20 @@
              + 		    break;
              + 		}
              + 	    if (haveattrs) {
              +-		ep = buf;
              ++		ep = my_buffer;
              + 		for (j = 0; j < width; ++j)
              + 		    ep[j] = hex[(AttrOf(win->_line[n].text[j]) & mask) >>
              + 				((i + 4) * 4)];
              + 		ep[j] = '\0';
              + 		_tracef("%*s%d[%2d]%*s='%s'", (int) strlen(name) -
              +-			1, "attrs", i, n, 8, " ", buf);
              ++			1, "attrs", i, n, 8, " ", my_buffer);
              + 	    }
              + 	}
              +     }
              + #if NO_LEAKS
              +-    free(buf);
              +-    buf = 0;
              +-    used = 0;
              ++    free(my_buffer);
              ++    my_buffer = 0;
              ++    my_length = 0;
              + #endif
              + }
              + 
              +Index: ncurses/trace/lib_tracemse.c
              +Prereq:  1.12 
              +--- ncurses-5.6/ncurses/trace/lib_tracemse.c	2005-06-11 19:53:50.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/lib_tracemse.c	2007-04-21 21:23:00.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2005,2007 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,30 +38,23 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_tracemse.c,v 1.12 2005/06/11 19:53:50 tom Exp $")
              ++MODULE_ID("$Id: lib_tracemse.c,v 1.13 2007/04/21 21:23:00 tom Exp $")
              + 
              + #ifdef TRACE
              + 
              ++#define my_buffer _nc_globals.tracemse_buf
              ++
              + NCURSES_EXPORT(char *)
              + _tracemouse(MEVENT const *ep)
              + {
              +-    /*
              +-     * hmm - format is no longer than 80 columns, there are 5 numbers that
              +-     * could at most have 10 digits, and the mask contains no more than 32 bits
              +-     * with each bit representing less than 15 characters.  Usually the whole
              +-     * string is less than 80 columns, but this buffer size is an absolute
              +-     * limit.
              +-     */
              +-    static char buf[80 + (5 * 10) + (32 * 15)];
              +-
              +-    (void) sprintf(buf, "id %2d  at (%2d, %2d, %2d) state %4lx = {",
              ++    (void) sprintf(my_buffer, TRACEMSE_FMT,
              + 		   ep->id,
              + 		   ep->x,
              + 		   ep->y,
              + 		   ep->z,
              + 		   (unsigned long) ep->bstate);
              + 
              +-#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(buf, s), ", ")
              ++#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(my_buffer, s), ", ")
              + 
              +     SHOW(BUTTON1_RELEASED, "release-1");
              +     SHOW(BUTTON1_PRESSED, "press-1");
              +@@ -115,10 +108,10 @@
              + 
              + #undef SHOW
              + 
              +-    if (buf[strlen(buf) - 1] == ' ')
              +-	buf[strlen(buf) - 2] = '\0';
              +-    (void) strcat(buf, "}");
              +-    return (buf);
              ++    if (my_buffer[strlen(my_buffer) - 1] == ' ')
              ++	my_buffer[strlen(my_buffer) - 2] = '\0';
              ++    (void) strcat(my_buffer, "}");
              ++    return (my_buffer);
              + }
              + 
              + #else /* !TRACE */
              +Index: ncurses/trace/trace_buf.c
              +Prereq:  1.12 
              +--- ncurses-5.6/ncurses/trace/trace_buf.c	2003-03-15 21:21:36.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/trace_buf.c	2007-04-21 22:50:08.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2003,2007 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,46 +35,42 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: trace_buf.c,v 1.12 2003/03/15 21:21:36 tom Exp $")
              ++MODULE_ID("$Id: trace_buf.c,v 1.13 2007/04/21 22:50:08 tom Exp $")
              + 
              +-typedef struct {
              +-    char *text;
              +-    size_t size;
              +-} LIST;
              ++#define MyList _nc_globals.tracebuf_ptr
              ++#define MySize _nc_globals.tracebuf_used
              + 
              + static char *
              + _nc_trace_alloc(int bufnum, size_t want)
              + {
              +     char *result = 0;
              +-    static LIST *list;
              +-    static size_t have;
              + 
              +     if (bufnum >= 0) {
              +-	if ((size_t) (bufnum + 1) > have) {
              ++	if ((size_t) (bufnum + 1) > MySize) {
              + 	    size_t need = (bufnum + 1) * 2;
              +-	    if ((list = typeRealloc(LIST, need, list)) == 0)
              ++	    if ((MyList = typeRealloc(TRACEBUF, need, MyList)) == 0)
              + 		return (0);
              +-	    while (need > have)
              +-		list[have++].text = 0;
              ++	    while (need > MySize)
              ++		MyList[MySize++].text = 0;
              + 	}
              + 
              +-	if (list[bufnum].text == 0
              +-	    || want > list[bufnum].size) {
              +-	    if ((list[bufnum].text = typeRealloc(char, want, list[bufnum].text))
              +-		!= 0)
              +-		  list[bufnum].size = want;
              ++	if (MyList[bufnum].text == 0
              ++	    || want > MyList[bufnum].size) {
              ++	    MyList[bufnum].text = typeRealloc(char, want, MyList[bufnum].text);
              ++	    if (MyList[bufnum].text != 0)
              ++		MyList[bufnum].size = want;
              + 	}
              + 
              +-	result = list[bufnum].text;
              ++	result = MyList[bufnum].text;
              +     }
              + #if NO_LEAKS
              +     else {
              +-	if (have) {
              +-	    while (have--) {
              +-		if (list[have].text != 0)
              +-		    free(list[have].text);
              ++	if (MySize) {
              ++	    while (MySize--) {
              ++		if (MyList[MySize].text != 0)
              ++		    free(MyList[MySize].text);
              + 	    }
              +-	    free(list);
              ++	    free(MyList);
              + 	}
              +     }
              + #endif
              +Index: ncurses/trace/trace_tries.c
              +Prereq:  1.10 
              +--- ncurses-5.6/ncurses/trace/trace_tries.c	2001-10-20 22:42:51.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/trace_tries.c	2007-04-21 21:55:41.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1999,2000,2001 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1999-2006,2007 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,25 +35,27 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: trace_tries.c,v 1.10 2001/10/20 22:42:51 tom Exp $")
              ++MODULE_ID("$Id: trace_tries.c,v 1.12 2007/04/21 21:55:41 tom Exp $")
              + 
              + #ifdef TRACE
              +-static unsigned char *buffer;
              +-static unsigned len;
              ++#define my_buffer _nc_globals.tracetry_buf
              ++#define my_length _nc_globals.tracetry_used
              + 
              + static void
              +-recur_tries(struct tries *tree, unsigned level)
              ++recur_tries(TRIES * tree, unsigned level)
              + {
              +-    if (level > len)
              +-	buffer = (unsigned char *) realloc(buffer, len = (level + 1) * 4);
              ++    if (level > my_length) {
              ++	my_length = (level + 1) * 4;
              ++	my_buffer = (unsigned char *) realloc(my_buffer, my_length);
              ++    }
              + 
              +     while (tree != 0) {
              +-	if ((buffer[level] = tree->ch) == 0)
              +-	    buffer[level] = 128;
              +-	buffer[level + 1] = 0;
              ++	if ((my_buffer[level] = tree->ch) == 0)
              ++	    my_buffer[level] = 128;
              ++	my_buffer[level + 1] = 0;
              + 	if (tree->value != 0) {
              + 	    _tracef("%5d: %s (%s)", tree->value,
              +-		    _nc_visbuf((char *) buffer), keyname(tree->value));
              ++		    _nc_visbuf((char *) my_buffer), keyname(tree->value));
              + 	}
              + 	if (tree->child)
              + 	    recur_tries(tree->child, level + 1);
              +@@ -62,13 +64,13 @@
              + }
              + 
              + NCURSES_EXPORT(void)
              +-_nc_trace_tries(struct tries *tree)
              ++_nc_trace_tries(TRIES * tree)
              + {
              +-    buffer = typeMalloc(unsigned char, len = 80);
              ++    my_buffer = typeMalloc(unsigned char, my_length = 80);
              +     _tracef("BEGIN tries %p", tree);
              +     recur_tries(tree, 0);
              +     _tracef(". . . tries %p", tree);
              +-    free(buffer);
              ++    free(my_buffer);
              + }
              + 
              + #else
              +Index: ncurses/trace/varargs.c
              +Prereq:  1.4 
              +--- ncurses-5.6/ncurses/trace/varargs.c	2003-05-24 21:10:28.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/varargs.c	2007-07-14 15:51:27.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2001-2002,2003 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2001-2003,2007 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 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: varargs.c,v 1.4 2003/05/24 21:10:28 tom Exp $")
              ++MODULE_ID("$Id: varargs.c,v 1.6 2007/07/14 15:51:27 tom Exp $")
              + 
              + #ifdef TRACE
              + 
              +@@ -49,6 +49,9 @@
              + #define VA_PTR(type) pval = (char *)va_arg(ap, type)
              + #define VA_STR(type) sval = va_arg(ap, type)
              + 
              ++#define MyBuffer _nc_globals.tracearg_buf
              ++#define MyLength _nc_globals.tracearg_used
              ++
              + /*
              +  * Returns a string that represents the parameter list of a printf-style call.
              +  */
              +@@ -56,8 +59,6 @@
              + _nc_varargs(const char *fmt, va_list ap)
              + {
              +     static char dummy[] = "";
              +-    static char *result_buf;
              +-    static size_t result_len;
              + 
              +     char buffer[BUFSIZ];
              +     const char *param;
              +@@ -65,11 +66,11 @@
              + 
              +     if (fmt == 0 || *fmt == '\0')
              + 	return dummy;
              +-    if (result_len == 0)
              +-	result_buf = typeMalloc(char, result_len = BUFSIZ);
              +-    if (result_buf == 0)
              ++    if (MyLength == 0)
              ++	MyBuffer = typeMalloc(char, MyLength = BUFSIZ);
              ++    if (MyBuffer == 0)
              + 	return dummy;
              +-    *result_buf = '\0';
              ++    *MyBuffer = '\0';
              + 
              +     while (*fmt != '\0') {
              + 	if (*fmt == '%') {
              +@@ -159,13 +160,14 @@
              + 			case atString:
              + 			    param = _nc_visbuf2(1, sval);
              + 			    break;
              ++			case atUnknown:
              + 			default:
              + 			    strcpy(buffer, "?");
              + 			    break;
              + 			}
              +-			result_len += strlen(param) + 2;
              +-			result_buf = typeRealloc(char, result_len, result_buf);
              +-			sprintf(result_buf + strlen(result_buf), ", %s", param);
              ++			MyLength += strlen(param) + 2;
              ++			MyBuffer = typeRealloc(char, MyLength, MyBuffer);
              ++			sprintf(MyBuffer + strlen(MyBuffer), ", %s", param);
              + 		    }
              + 		}
              + 		used = atUnknown;
              +@@ -175,7 +177,7 @@
              + 	}
              +     }
              + 
              +-    return (result_buf);
              ++    return (MyBuffer);
              + }
              + #else
              + empty_module(_nc_varargs)
              +Index: ncurses/trace/visbuf.c
              +Prereq:  1.21 
              +--- ncurses-5.6/ncurses/trace/visbuf.c	2006-12-02 21:20:28.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/trace/visbuf.c	2007-06-09 17:21:53.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2001-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2001-2006,2007 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            *
              +@@ -42,11 +42,16 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: visbuf.c,v 1.21 2006/12/02 21:20:28 tom Exp $")
              ++MODULE_ID("$Id: visbuf.c,v 1.26 2007/06/09 17:21:53 tom Exp $")
              + 
              +-static const char d_quote[] = {D_QUOTE, 0};
              +-static const char l_brace[] = {L_BRACE, 0};
              +-static const char r_brace[] = {R_BRACE, 0};
              ++#define NormalLen(len) (unsigned) ((len + 1) * 4)
              ++#define WideLen(len)   (unsigned) ((len + 1) * 4 * MB_CUR_MAX)
              ++
              ++#ifdef TRACE
              ++static const char d_quote[] = StringOf(D_QUOTE);
              ++static const char l_brace[] = StringOf(L_BRACE);
              ++static const char r_brace[] = StringOf(R_BRACE);
              ++#endif
              + 
              + static char *
              + _nc_vischar(char *tp, unsigned c)
              +@@ -68,6 +73,10 @@
              +     } else if (c == '\033') {
              + 	*tp++ = '\\';
              + 	*tp++ = 'e';
              ++    } else if (UChar(c) == 0x7f) {
              ++	*tp++ = '\\';
              ++	*tp++ = '^';
              ++	*tp++ = '?';
              +     } else if (is7bits(c) && iscntrl(UChar(c))) {
              + 	*tp++ = '\\';
              + 	*tp++ = '^';
              +@@ -96,11 +105,11 @@
              + 	len = strlen(buf);
              + 
              + #ifdef TRACE
              +-    tp = vbuf = _nc_trace_buf(bufnum, (unsigned) (len * 4) + 5);
              ++    tp = vbuf = _nc_trace_buf(bufnum, NormalLen(len));
              + #else
              +     {
              +-	static char *mybuf[2];
              +-	mybuf[bufnum] = typeRealloc(char, (unsigned) (len * 4) + 5, mybuf[bufnum]);
              ++	static char *mybuf[4];
              ++	mybuf[bufnum] = typeRealloc(char, NormalLen(len), mybuf[bufnum]);
              + 	tp = vbuf = mybuf[bufnum];
              +     }
              + #endif
              +@@ -161,11 +170,11 @@
              + 	len = wcslen(buf);
              + 
              + #ifdef TRACE
              +-    tp = vbuf = _nc_trace_buf(bufnum, (unsigned) (len * 4) + 5);
              ++    tp = vbuf = _nc_trace_buf(bufnum, WideLen(len));
              + #else
              +     {
              + 	static char *mybuf[2];
              +-	mybuf[bufnum] = typeRealloc(char, (unsigned) (len * 4) + 5, mybuf[bufnum]);
              ++	mybuf[bufnum] = typeRealloc(char, WideLen(len), mybuf[bufnum]);
              + 	tp = vbuf = mybuf[bufnum];
              +     }
              + #endif
              +@@ -259,7 +268,8 @@
              + 	result = _nc_trace_bufcat(bufnum, l_brace);
              + 	result = _nc_trace_bufcat(bufnum, d_quote);
              + 	for (j = first; j <= last; ++j) {
              +-	    if ((found = _nc_altcharset_name(attr, (chtype) CharOf(buf[j]))) != 0) {
              ++	    found = _nc_altcharset_name(attr, (chtype) CharOf(buf[j]));
              ++	    if (found != 0) {
              + 		result = _nc_trace_bufcat(bufnum, found);
              + 		attr &= ~A_ALTCHARSET;
              + 	    } else
              +Index: ncurses/tty/hardscroll.c
              +Prereq:  1.36 
              +--- ncurses-5.6/ncurses/tty/hardscroll.c	2001-01-14 00:17:28.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/hardscroll.c	2007-09-29 21:48:36.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -145,7 +145,7 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: hardscroll.c,v 1.36 2001/01/14 00:17:28 tom Exp $")
              ++MODULE_ID("$Id: hardscroll.c,v 1.41 2007/09/29 21:48:36 tom Exp $")
              + 
              + #if defined(SCROLLDEBUG) || defined(HASHDEBUG)
              + 
              +@@ -158,22 +158,25 @@
              + # undef TR
              + # define TR(n, a)	if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
              + 
              ++extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
              ++
              + #else /* no debug */
              + 
              + /* OLDNUM(n) indicates which line will be shifted to the position n.
              +    if OLDNUM(n) == _NEWINDEX, then the line n in new, not shifted from
              +    somewhere. */
              + NCURSES_EXPORT_VAR(int *)
              +-_nc_oldnums = 0;
              ++_nc_oldnums = 0;		/* obsolete: keep for ABI compat */
              + 
              + # if USE_HASHMAP
              +-     static int oldnums_allocated = 0;
              +-#  define oldnums       _nc_oldnums
              ++#  define oldnums       SP->_oldnum_list
              + #  define OLDNUM(n)	oldnums[n]
              + # else				/* !USE_HASHMAP */
              + #  define OLDNUM(n)	newscr->_line[n].oldindex
              + # endif				/* !USE_HASHMAP */
              + 
              ++#define OLDNUM_SIZE     SP->_oldnum_size
              ++
              + #endif /* defined(SCROLLDEBUG) || defined(HASHDEBUG) */
              + 
              + NCURSES_EXPORT(void)
              +@@ -183,17 +186,17 @@
              +     int i;
              +     int start, end, shift;
              + 
              +-    TR(TRACE_ICALLS, ("_nc_scroll_optimize() begins"));
              ++    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize")));
              + 
              + #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
              + #if USE_HASHMAP
              +     /* get enough storage */
              +-    if (oldnums_allocated < screen_lines) {
              ++    if (OLDNUM_SIZE < screen_lines) {
              + 	int *new_oldnums = typeRealloc(int, screen_lines, oldnums);
              + 	if (!new_oldnums)
              + 	    return;
              + 	oldnums = new_oldnums;
              +-	oldnums_allocated = screen_lines;
              ++	OLDNUM_SIZE = screen_lines;
              +     }
              +     /* calculate the indices */
              +     _nc_hash_map();
              +@@ -201,8 +204,10 @@
              + #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
              + 
              + #ifdef TRACE
              +-    if (_nc_tracing & (TRACE_UPDATE | TRACE_MOVE))
              ++    if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) {
              + 	_nc_linedump();
              ++	_nc_unlock_global(tracef);
              ++    }
              + #endif /* TRACE */
              + 
              +     /* pass 1 - from top to bottom scrolling up */
              +@@ -253,6 +258,7 @@
              + 	}
              + #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
              +     }
              ++    TR(TRACE_ICALLS, (T_RETURN("")));
              + }
              + 
              + #if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
              +@@ -260,23 +266,17 @@
              + _nc_linedump(void)
              + /* dump the state of the real and virtual oldnum fields */
              + {
              +-    static size_t have;
              +-    static char *buf;
              +-
              +     int n;
              ++    char *buf = 0;
              +     size_t want = (screen_lines + 1) * 4;
              + 
              +-    if (have < want)
              +-	buf = typeMalloc(char, have = want);
              ++    buf = typeMalloc(char, want);
              + 
              +     (void) strcpy(buf, "virt");
              +     for (n = 0; n < screen_lines; n++)
              + 	(void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n));
              +     TR(TRACE_UPDATE | TRACE_MOVE, (buf));
              +-#if NO_LEAKS
              +     free(buf);
              +-    have = 0;
              +-#endif
              + }
              + #endif /* defined(TRACE) || defined(SCROLLDEBUG) */
              + 
              +Index: ncurses/tty/hashmap.c
              +Prereq:  1.49 
              +--- ncurses-5.6/ncurses/tty/hashmap.c	2006-03-11 19:33:49.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/hashmap.c	2007-10-13 18:47:25.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -70,7 +70,7 @@
              + #include 
              + #include 		/* for back_color_erase */
              + 
              +-MODULE_ID("$Id: hashmap.c,v 1.49 2006/03/11 19:33:49 tom Exp $")
              ++MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $")
              + 
              + #ifdef HASHDEBUG
              + 
              +@@ -81,7 +81,8 @@
              + # define screen_lines MAXLINES
              + # define TEXTWIDTH	1
              + int oldnums[MAXLINES], reallines[MAXLINES];
              +-static chtype oldtext[MAXLINES][TEXTWIDTH], newtext[MAXLINES][TEXTWIDTH];
              ++static NCURSES_CH_T oldtext[MAXLINES][TEXTWIDTH];
              ++static NCURSES_CH_T newtext[MAXLINES][TEXTWIDTH];
              + # define OLDNUM(n)	oldnums[n]
              + # define OLDTEXT(n)	oldtext[n]
              + # define NEWTEXT(m)	newtext[m]
              +@@ -89,7 +90,7 @@
              + 
              + #else /* !HASHDEBUG */
              + 
              +-# define OLDNUM(n)	_nc_oldnums[n]
              ++# define OLDNUM(n)	SP->_oldnum_list[n]
              + # define OLDTEXT(n)	curscr->_line[n].text
              + # define NEWTEXT(m)	newscr->_line[m].text
              + # define TEXTWIDTH	(curscr->_maxx+1)
              +@@ -130,8 +131,8 @@
              +     int cost = 0;
              +     int i;
              + 
              +-    for (i = TEXTWIDTH; i > 0; i--)
              +-	if (!(CharEq(*from++, *to++)))
              ++    for (i = TEXTWIDTH; i > 0; i--, from++, to++)
              ++	if (!(CharEq(*from, *to)))
              + 	    cost++;
              + 
              +     return cost;
              +@@ -147,8 +148,8 @@
              +     if (back_color_erase)
              + 	SetPair(blank, GetPair(stdscr->_nc_bkgd));
              + 
              +-    for (i = TEXTWIDTH; i > 0; i--)
              +-	if (!(CharEq(blank, *to++)))
              ++    for (i = TEXTWIDTH; i > 0; i--, to++)
              ++	if (!(CharEq(blank, *to)))
              + 	    cost++;
              + 
              +     return cost;
              +@@ -446,11 +447,14 @@
              +     char line[BUFSIZ], *st;
              +     int n;
              + 
              +-    SP = typeCalloc(SCREEN, 1);
              ++    if (setupterm(NULL, fileno(stdout), (int *) 0) == ERR)
              ++	return EXIT_FAILURE;
              ++    (void) _nc_alloc_screen();
              ++
              +     for (n = 0; n < screen_lines; n++) {
              + 	reallines[n] = n;
              + 	oldnums[n] = _NEWINDEX;
              +-	oldtext[n][0] = newtext[n][0] = '.';
              ++	CharOf(oldtext[n][0]) = CharOf(newtext[n][0]) = '.';
              +     }
              + 
              +     if (isatty(fileno(stdin)))
              +@@ -462,7 +466,7 @@
              +     for (;;) {
              + 	/* grab a test command */
              + 	if (fgets(line, sizeof(line), stdin) == (char *) NULL)
              +-	    exit(EXIT_SUCCESS);
              ++	    break;
              + 
              + 	switch (line[0]) {
              + 	case '#':		/* comment */
              +@@ -484,22 +488,22 @@
              + 
              + 	case 'n':		/* use following letters as text of new lines */
              + 	    for (n = 0; n < screen_lines; n++)
              +-		newtext[n][0] = '.';
              ++		CharOf(newtext[n][0]) = '.';
              + 	    for (n = 0; n < screen_lines; n++)
              + 		if (line[n + 1] == '\n')
              + 		    break;
              + 		else
              +-		    newtext[n][0] = line[n + 1];
              ++		    CharOf(newtext[n][0]) = line[n + 1];
              + 	    break;
              + 
              + 	case 'o':		/* use following letters as text of old lines */
              + 	    for (n = 0; n < screen_lines; n++)
              +-		oldtext[n][0] = '.';
              ++		CharOf(oldtext[n][0]) = '.';
              + 	    for (n = 0; n < screen_lines; n++)
              + 		if (line[n + 1] == '\n')
              + 		    break;
              + 		else
              +-		    oldtext[n][0] = line[n + 1];
              ++		    CharOf(oldtext[n][0]) = line[n + 1];
              + 	    break;
              + 
              + 	case 'd':		/* dump state of test arrays */
              +@@ -508,12 +512,12 @@
              + #endif
              + 	    (void) fputs("Old lines: [", stdout);
              + 	    for (n = 0; n < screen_lines; n++)
              +-		putchar(oldtext[n][0]);
              ++		putchar(CharOf(oldtext[n][0]));
              + 	    putchar(']');
              + 	    putchar('\n');
              + 	    (void) fputs("New lines: [", stdout);
              + 	    for (n = 0; n < screen_lines; n++)
              +-		putchar(newtext[n][0]);
              ++		putchar(CharOf(newtext[n][0]));
              + 	    putchar(']');
              + 	    putchar('\n');
              + 	    break;
              +@@ -527,12 +531,17 @@
              + 	    _nc_scroll_optimize();
              + 	    (void) fputs("Done.\n", stderr);
              + 	    break;
              ++	default:
              + 	case '?':
              + 	    usage();
              + 	    break;
              + 	}
              +     }
              ++#if NO_LEAKS
              ++    _nc_free_and_exit(EXIT_SUCCESS);
              ++#else
              +     return EXIT_SUCCESS;
              ++#endif
              + }
              + 
              + #endif /* HASHDEBUG */
              +Index: ncurses/tty/lib_mvcur.c
              +Prereq:  1.107 
              +--- ncurses-5.6/ncurses/tty/lib_mvcur.c	2006-11-25 22:31:59.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/lib_mvcur.c	2007-08-11 16:15:57.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -155,7 +155,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_mvcur.c,v 1.107 2006/11/25 22:31:59 tom Exp $")
              ++MODULE_ID("$Id: lib_mvcur.c,v 1.110 2007/08/11 16:15:57 tom Exp $")
              + 
              + #define WANT_CHAR(y, x)	SP->_newscr->_line[y].text[x]	/* desired state */
              + #define BAUDRATE	cur_term->_baudrate	/* bits per second */
              +@@ -959,6 +959,7 @@
              + 
              + #include 
              + #include 
              ++#include 
              + 
              + NCURSES_EXPORT_VAR(const char *) _nc_progname = "mvcur";
              + 
              +@@ -1017,7 +1018,7 @@
              + int
              + main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              + {
              +-    (void) strcpy(tname, termname());
              ++    strcpy(tname, getenv("TERM"));
              +     load_term();
              +     _nc_setupscreen(lines, columns, stdout, FALSE, 0);
              +     baudrate();
              +@@ -1088,7 +1089,7 @@
              + 	    load_term();
              + 	} else if (sscanf(buf, "d %s", capname) == 1) {
              + 	    struct name_table_entry const *np = _nc_find_entry(capname,
              +-							       _nc_info_hash_table);
              ++							       _nc_get_hash_table(FALSE));
              + 
              + 	    if (np == NULL)
              + 		(void) printf("No such capability as \"%s\"\n", capname);
              +@@ -1116,7 +1117,7 @@
              + 	    }
              + 	} else if (buf[0] == 'i') {
              + 	    dump_init((char *) NULL, F_TERMINFO, S_TERMINFO, 70, 0, FALSE);
              +-	    dump_entry(&cur_term->type, FALSE, TRUE, 0, 0, 0);
              ++	    dump_entry(&cur_term->type, FALSE, TRUE, 0, 0);
              + 	    putchar('\n');
              + 	} else if (buf[0] == 'o') {
              + 	    if (_nc_optimize_enable & OPTIMIZE_MVCUR) {
              +Index: ncurses/tty/lib_tstp.c
              +Prereq:  1.32 
              +--- ncurses-5.6/ncurses/tty/lib_tstp.c	2006-04-01 19:31:34.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/lib_tstp.c	2007-04-21 19:51:29.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -46,7 +46,7 @@
              + #define _POSIX_SOURCE
              + #endif
              + 
              +-MODULE_ID("$Id: lib_tstp.c,v 1.32 2006/04/01 19:31:34 tom Exp $")
              ++MODULE_ID("$Id: lib_tstp.c,v 1.36 2007/04/21 19:51:29 tom Exp $")
              + 
              + #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
              + #define USE_SIGTSTP 1
              +@@ -234,14 +234,12 @@
              + static void
              + cleanup(int sig)
              + {
              +-    static int nested;
              +-
              +     /*
              +      * Actually, doing any sort of I/O from within an signal handler is
              +      * "unsafe".  But we'll _try_ to clean up the screen and terminal
              +      * settings on the way out.
              +      */
              +-    if (!nested++
              ++    if (!_nc_globals.cleanup_nested++
              + 	&& (sig == SIGINT
              + 	    || sig == SIGQUIT)) {
              + #if HAVE_SIGACTION || HAVE_SIGVEC
              +@@ -277,7 +275,7 @@
              + static void
              + sigwinch(int sig GCC_UNUSED)
              + {
              +-    _nc_handle_sigwinch(-1);
              ++    _nc_globals.have_sigwinch = 1;
              + }
              + #endif /* USE_SIGWINCH */
              + 
              +@@ -351,29 +349,27 @@
              + NCURSES_EXPORT(void)
              + _nc_signal_handler(bool enable)
              + {
              +-    static bool initialized = FALSE;
              +-
              +     T((T_CALLED("_nc_signal_handler(%d)"), enable));
              + #if USE_SIGTSTP			/* Xenix 2.x doesn't have SIGTSTP, for example */
              +     {
              + 	static bool ignore_tstp = FALSE;
              + 
              + 	if (!ignore_tstp) {
              +-	    static sigaction_t act, oact;
              ++	    static sigaction_t new_sigaction, old_sigaction;
              + 
              + 	    if (!enable) {
              +-		act.sa_handler = SIG_IGN;
              +-		sigaction(SIGTSTP, &act, &oact);
              +-	    } else if (act.sa_handler != SIG_DFL) {
              +-		sigaction(SIGTSTP, &oact, NULL);
              +-	    } else if (sigaction(SIGTSTP, NULL, &oact) == 0
              +-		       && (oact.sa_handler == SIG_DFL)) {
              +-		sigemptyset(&act.sa_mask);
              ++		new_sigaction.sa_handler = SIG_IGN;
              ++		sigaction(SIGTSTP, &new_sigaction, &old_sigaction);
              ++	    } else if (new_sigaction.sa_handler != SIG_DFL) {
              ++		sigaction(SIGTSTP, &old_sigaction, NULL);
              ++	    } else if (sigaction(SIGTSTP, NULL, &old_sigaction) == 0
              ++		       && (old_sigaction.sa_handler == SIG_DFL)) {
              ++		sigemptyset(&new_sigaction.sa_mask);
              + #ifdef SA_RESTART
              +-		act.sa_flags |= SA_RESTART;
              ++		new_sigaction.sa_flags |= SA_RESTART;
              + #endif /* SA_RESTART */
              +-		act.sa_handler = tstp;
              +-		(void) sigaction(SIGTSTP, &act, NULL);
              ++		new_sigaction.sa_handler = tstp;
              ++		(void) sigaction(SIGTSTP, &new_sigaction, NULL);
              + 	    } else {
              + 		ignore_tstp = TRUE;
              + 	    }
              +@@ -381,14 +377,14 @@
              +     }
              + #endif /* !USE_SIGTSTP */
              + 
              +-    if (!initialized) {
              ++    if (!_nc_globals.init_signals) {
              + 	if (enable) {
              + 	    CatchIfDefault(SIGINT, cleanup);
              + 	    CatchIfDefault(SIGTERM, cleanup);
              + #if USE_SIGWINCH
              + 	    CatchIfDefault(SIGWINCH, sigwinch);
              + #endif
              +-	    initialized = TRUE;
              ++	    _nc_globals.init_signals = TRUE;
              + 	}
              +     }
              +     returnVoid;
              +Index: ncurses/tty/lib_twait.c
              +Prereq:  1.51 
              +--- ncurses-5.6/ncurses/tty/lib_twait.c	2006-05-27 21:57:43.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/lib_twait.c	2007-08-11 16:32:48.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -29,6 +29,7 @@
              + /****************************************************************************
              +  *  Author: Zeyd M. Ben-Halim  1992,1995               *
              +  *     and: Eric S. Raymond                          *
              ++ *     and: Thomas E. Dickey                        1996-on                 *
              +  ****************************************************************************/
              + 
              + /*
              +@@ -61,38 +62,42 @@
              + # endif
              + #endif
              + 
              +-MODULE_ID("$Id: lib_twait.c,v 1.51 2006/05/27 21:57:43 tom Exp $")
              ++MODULE_ID("$Id: lib_twait.c,v 1.54 2007/08/11 16:32:48 tom Exp $")
              ++
              ++#if HAVE_GETTIMEOFDAY
              ++# define PRECISE_GETTIME 1
              ++# define TimeType struct timeval
              ++#else
              ++# define PRECISE_GETTIME 0
              ++# define TimeType time_t
              ++#endif
              + 
              + static long
              +-_nc_gettime(bool first)
              ++_nc_gettime(TimeType * t0, bool first)
              + {
              +     long res;
              + 
              +-#if HAVE_GETTIMEOFDAY
              +-# define PRECISE_GETTIME 1
              +-    static struct timeval t0;
              +-    struct timeval t1;
              ++#if PRECISE_GETTIME
              ++    TimeType t1;
              +     gettimeofday(&t1, (struct timezone *) 0);
              +     if (first) {
              +-	t0 = t1;
              ++	*t0 = t1;
              + 	res = 0;
              +     } else {
              + 	/* .tv_sec and .tv_usec are unsigned, be careful when subtracting */
              +-	if (t0.tv_usec > t1.tv_usec) {	/* Convert 1s in 1e6 microsecs */
              +-	    t1.tv_usec += 1000000;
              ++	if (t0->tv_usec > t1.tv_usec) {
              ++	    t1.tv_usec += 1000000;	/* Convert 1s in 1e6 microsecs */
              + 	    t1.tv_sec--;
              + 	}
              +-	res = (t1.tv_sec - t0.tv_sec) * 1000
              +-	    + (t1.tv_usec - t0.tv_usec) / 1000;
              ++	res = (t1.tv_sec - t0->tv_sec) * 1000
              ++	    + (t1.tv_usec - t0->tv_usec) / 1000;
              +     }
              + #else
              +-# define PRECISE_GETTIME 0
              +-    static time_t t0;
              +     time_t t1 = time((time_t *) 0);
              +     if (first) {
              +-	t0 = t1;
              ++	*t0 = t1;
              +     }
              +-    res = (t1 - t0) * 1000;
              ++    res = (t1 - *t0) * 1000;
              + #endif
              +     TR(TRACE_IEVENT, ("%s time: %ld msec", first ? "get" : "elapsed", res));
              +     return res;
              +@@ -147,7 +152,8 @@
              + {
              +     int fd;
              +     int count;
              +-    int result;
              ++    int result = 0;
              ++    TimeType t0;
              + 
              + #ifdef NCURSES_WGETCH_EVENTS
              +     int timeout_is_event = 0;
              +@@ -160,7 +166,7 @@
              +     struct pollfd *fds = fd_list;
              + #elif defined(__BEOS__)
              + #elif HAVE_SELECT
              +-    static fd_set set;
              ++    fd_set set;
              + #endif
              + 
              +     long starttime, returntime;
              +@@ -180,10 +186,10 @@
              +     }
              + #endif
              + 
              +-#if PRECISE_GETTIME
              ++#if PRECISE_GETTIME && HAVE_NANOSLEEP
              +   retry:
              + #endif
              +-    starttime = _nc_gettime(TRUE);
              ++    starttime = _nc_gettime(&t0, TRUE);
              + 
              +     count = 0;
              + 
              +@@ -362,7 +368,7 @@
              + 
              + #endif /* USE_FUNC_POLL, etc */
              + 
              +-    returntime = _nc_gettime(FALSE);
              ++    returntime = _nc_gettime(&t0, FALSE);
              + 
              +     if (milliseconds >= 0)
              + 	milliseconds -= (returntime - starttime);
              +Index: ncurses/tty/lib_vidattr.c
              +Prereq:  1.46 
              +--- ncurses-5.6/ncurses/tty/lib_vidattr.c	2006-01-21 23:39:40.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/lib_vidattr.c	2007-06-30 21:58:04.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -65,7 +65,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_vidattr.c,v 1.46 2006/01/21 23:39:40 tom Exp $")
              ++MODULE_ID("$Id: lib_vidattr.c,v 1.49 2007/06/30 21:58:04 tom Exp $")
              + 
              + #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
              + 
              +@@ -87,10 +87,11 @@
              + 		} \
              + 	}
              + 
              ++#define PreviousAttr _nc_prescreen.previous_attr
              ++
              + NCURSES_EXPORT(int)
              + vidputs(chtype newmode, int (*outc) (int))
              + {
              +-    static attr_t previous_attr = A_NORMAL;
              +     attr_t turn_on, turn_off;
              +     int pair;
              +     bool reverse = FALSE;
              +@@ -101,18 +102,19 @@
              + #define fix_pair0 FALSE
              + #endif
              + 
              ++    newmode &= A_ATTRIBUTES;
              +     T((T_CALLED("vidputs(%s)"), _traceattr(newmode)));
              + 
              +     /* this allows us to go on whether or not newterm() has been called */
              +     if (SP)
              +-	previous_attr = AttrOf(SCREEN_ATTRS(SP));
              ++	PreviousAttr = AttrOf(SCREEN_ATTRS(SP));
              + 
              +-    TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(previous_attr)));
              ++    TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(PreviousAttr)));
              + 
              +     if ((SP != 0)
              + 	&& (magic_cookie_glitch > 0)) {
              + #if USE_XMC_SUPPORT
              +-	static chtype table[] =
              ++	static const chtype table[] =
              + 	{
              + 	    A_STANDOUT,
              + 	    A_UNDERLINE,
              +@@ -183,7 +185,7 @@
              + 	newmode &= ~mask;
              +     }
              + 
              +-    if (newmode == previous_attr)
              ++    if (newmode == PreviousAttr)
              + 	returnCode(OK);
              + 
              +     pair = PAIR_NUMBER(newmode);
              +@@ -192,17 +194,17 @@
              + 	newmode &= ~A_REVERSE;
              +     }
              + 
              +-    turn_off = (~newmode & previous_attr) & ALL_BUT_COLOR;
              +-    turn_on = (newmode & ~previous_attr) & ALL_BUT_COLOR;
              ++    turn_off = (~newmode & PreviousAttr) & ALL_BUT_COLOR;
              ++    turn_on = (newmode & ~PreviousAttr) & ALL_BUT_COLOR;
              + 
              +-    SetColorsIf(((pair == 0) && !fix_pair0), previous_attr);
              ++    SetColorsIf(((pair == 0) && !fix_pair0), PreviousAttr);
              + 
              +     if (newmode == A_NORMAL) {
              +-	if ((previous_attr & A_ALTCHARSET) && exit_alt_charset_mode) {
              ++	if ((PreviousAttr & A_ALTCHARSET) && exit_alt_charset_mode) {
              + 	    doPut(exit_alt_charset_mode);
              +-	    previous_attr &= ~A_ALTCHARSET;
              ++	    PreviousAttr &= ~A_ALTCHARSET;
              + 	}
              +-	if (previous_attr) {
              ++	if (PreviousAttr) {
              + 	    if (exit_attribute_mode) {
              + 		doPut(exit_attribute_mode);
              + 	    } else {
              +@@ -213,10 +215,10 @@
              + 		    TurnOff(A_STANDOUT, exit_standout_mode);
              + 		}
              + 	    }
              +-	    previous_attr &= ALL_BUT_COLOR;
              ++	    PreviousAttr &= ALL_BUT_COLOR;
              + 	}
              + 
              +-	SetColorsIf((pair != 0) || fix_pair0, previous_attr);
              ++	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
              +     } else if (set_attributes) {
              + 	if (turn_on || turn_off) {
              + 	    TPUTS_TRACE("set_attributes");
              +@@ -230,9 +232,9 @@
              + 			(newmode & A_INVIS) != 0,
              + 			(newmode & A_PROTECT) != 0,
              + 			(newmode & A_ALTCHARSET) != 0), 1, outc);
              +-	    previous_attr &= ALL_BUT_COLOR;
              ++	    PreviousAttr &= ALL_BUT_COLOR;
              + 	}
              +-	SetColorsIf((pair != 0) || fix_pair0, previous_attr);
              ++	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
              +     } else {
              + 
              + 	TR(TRACE_ATTRS, ("turning %s off", _traceattr(turn_off)));
              +@@ -250,9 +252,9 @@
              + 	if (turn_off && exit_attribute_mode) {
              + 	    doPut(exit_attribute_mode);
              + 	    turn_on |= (newmode & ALL_BUT_COLOR);
              +-	    previous_attr &= ALL_BUT_COLOR;
              ++	    PreviousAttr &= ALL_BUT_COLOR;
              + 	}
              +-	SetColorsIf((pair != 0) || fix_pair0, previous_attr);
              ++	SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
              + 
              + 	TR(TRACE_ATTRS, ("turning %s on", _traceattr(turn_on)));
              + 	/* *INDENT-OFF* */
              +@@ -283,7 +285,7 @@
              +     if (SP)
              + 	SetAttr(SCREEN_ATTRS(SP), newmode);
              +     else
              +-	previous_attr = newmode;
              ++	PreviousAttr = newmode;
              + 
              +     returnCode(OK);
              + }
              +Index: ncurses/tty/tty_update.c
              +Prereq:  1.238 
              +--- ncurses-5.6/ncurses/tty/tty_update.c	2006-11-25 22:33:21.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/tty/tty_update.c	2007-10-13 20:03:32.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -74,7 +74,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: tty_update.c,v 1.238 2006/11/25 22:33:21 tom Exp $")
              ++MODULE_ID("$Id: tty_update.c,v 1.243 2007/10/13 20:03:32 tom Exp $")
              + 
              + /*
              +  * This define controls the line-breakout optimization.  Every once in a
              +@@ -289,7 +289,7 @@
              + #endif
              +     {
              + 	PUTC(CHDEREF(ch), SP->_ofp);	/* macro's fastest... */
              +-	TRACE_OUTCHARS(1);
              ++	COUNT_OUTCHARS(1);
              +     }
              +     SP->_curscol += chlen;
              +     if (char_padding) {
              +@@ -624,13 +624,18 @@
              + 
              +     T((T_CALLED("doupdate()")));
              + 
              ++    if (curscr == 0
              ++	|| newscr == 0)
              ++	returnCode(ERR);
              ++
              + #ifdef TRACE
              +-    if (_nc_tracing & TRACE_UPDATE) {
              ++    if (USE_TRACEF(TRACE_UPDATE)) {
              + 	if (curscr->_clear)
              + 	    _tracef("curscr is clear");
              + 	else
              + 	    _tracedump("curscr", curscr);
              + 	_tracedump("newscr", newscr);
              ++	_nc_unlock_global(tracef);
              +     }
              + #endif /* TRACE */
              + 
              +@@ -640,7 +645,7 @@
              + 	SP->_fifohold--;
              + 
              + #if USE_SIZECHANGE
              +-    if (SP->_endwin || SP->_sig_winch) {
              ++    if (SP->_endwin || _nc_handle_sigwinch(FALSE)) {
              + 	/*
              + 	 * This is a transparent extension:  XSI does not address it,
              + 	 * and applications need not know that ncurses can do it.
              +@@ -666,7 +671,7 @@
              +     }
              + #if USE_TRACE_TIMES
              +     /* zero the metering machinery */
              +-    _nc_outchars = 0;
              ++    RESET_OUTCHARS();
              +     (void) times(&before);
              + #endif /* USE_TRACE_TIMES */
              + 
              +@@ -826,9 +831,10 @@
              + 
              + #ifdef TRACE
              + 	/* show altered highlights after magic-cookie check */
              +-	if (_nc_tracing & TRACE_UPDATE) {
              ++	if (USE_TRACEF(TRACE_UPDATE)) {
              + 	    _tracef("After magic-cookie check...");
              + 	    _tracedump("newscr", newscr);
              ++	    _nc_unlock_global(tracef);
              + 	}
              + #endif /* TRACE */
              +     }
              +@@ -836,7 +842,6 @@
              + 
              +     nonempty = 0;
              +     if (curscr->_clear || newscr->_clear) {	/* force refresh ? */
              +-	TR(TRACE_UPDATE, ("clearing and updating from scratch"));
              + 	ClrUpdate();
              + 	curscr->_clear = FALSE;	/* reset flag */
              + 	newscr->_clear = FALSE;	/* reset flag */
              +@@ -967,7 +972,7 @@
              +     NCURSES_CH_T blank = ClrBlank(stdscr);
              +     int nonempty = min(screen_lines, newscr->_maxy + 1);
              + 
              +-    TR(TRACE_UPDATE, ("ClrUpdate() called"));
              ++    TR(TRACE_UPDATE, (T_CALLED("ClrUpdate")));
              + 
              +     ClearScreen(blank);
              + 
              +@@ -977,6 +982,8 @@
              + 
              +     for (i = 0; i < nonempty; i++)
              + 	TransformLine(i);
              ++
              ++    TR(TRACE_UPDATE, (T_RETURN("")));
              + }
              + 
              + /*
              +Index: ncurses/widechar/lib_cchar.c
              +Prereq:  1.11 
              +--- ncurses-5.6/ncurses/widechar/lib_cchar.c	2005-01-29 21:29:16.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_cchar.c	2007-05-12 19:03:06.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2001-2004,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2001-2005,2007 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 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_cchar.c,v 1.11 2005/01/29 21:29:16 tom Exp $")
              ++MODULE_ID("$Id: lib_cchar.c,v 1.12 2007/05/12 19:03:06 tom Exp $")
              + 
              + /* 
              +  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
              +@@ -54,8 +54,9 @@
              +     int len;
              +     int code = OK;
              + 
              +-    TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%ld,%d,%p)"),
              +-		      wcval, _nc_viswbuf(wch), attrs, color_pair, opts));
              ++    TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
              ++		      wcval, _nc_viswbuf(wch),
              ++		      (unsigned long) attrs, color_pair, opts));
              + 
              +     len = wcslen(wch);
              +     if (opts != NULL
              +Index: ncurses/widechar/lib_get_wch.c
              +Prereq:  1.13 
              +--- ncurses-5.6/ncurses/widechar/lib_get_wch.c	2006-06-03 17:27:57.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_get_wch.c	2007-05-12 19:03:16.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2002-2006,2007 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            *
              +@@ -40,7 +40,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_get_wch.c,v 1.13 2006/06/03 17:27:57 tom Exp $")
              ++MODULE_ID("$Id: lib_get_wch.c,v 1.14 2007/05/12 19:03:16 tom Exp $")
              + 
              + #if HAVE_MBTOWC && HAVE_MBLEN
              + #define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
              +@@ -77,7 +77,7 @@
              +      * _nc_wgetch(), while we want to return a wide character or KEY_xxx code.
              +      */
              +     for (;;) {
              +-	T(("reading %d of %d", count + 1, sizeof(buffer)));
              ++	T(("reading %d of %d", (int) count + 1, (int) sizeof(buffer)));
              + 	code = _nc_wgetch(win, &value, TRUE EVENTLIST_2nd((_nc_eventlist *) 0));
              + 	if (code == ERR) {
              + 	    break;
              +Index: ncurses/widechar/lib_in_wchnstr.c
              +Prereq:  1.3 
              +--- ncurses-5.6/ncurses/widechar/lib_in_wchnstr.c	2004-05-16 00:12:30.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_in_wchnstr.c	2007-02-11 01:00:00.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2002,2004 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 2002-2004-2007 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 @@
              +  ****************************************************************************/
              + 
              + /****************************************************************************
              +- * Author: Thomas Dickey 2002,2004                                          *
              ++ * Author: Thomas Dickey                                                    *
              +  ****************************************************************************/
              + 
              + /*
              +@@ -39,27 +39,35 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_in_wchnstr.c,v 1.3 2004/05/16 00:12:30 tom Exp $")
              ++MODULE_ID("$Id: lib_in_wchnstr.c,v 1.7 2007/02/11 01:00:00 tom Exp $")
              + 
              + NCURSES_EXPORT(int)
              +-win_wchnstr(WINDOW *win, cchar_t * wchstr, int n)
              ++win_wchnstr(WINDOW *win, cchar_t *wchstr, int n)
              + {
              +     int code = OK;
              + 
              +-    TR(TRACE_CALLS, (T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
              ++    T((T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
              +     if (win != 0
              + 	&& wchstr != 0) {
              ++	NCURSES_CH_T *src;
              + 	int row, col;
              +-	int j;
              ++	int j, k, limit;
              + 
              + 	getyx(win, row, col);
              ++	limit = getmaxx(win) - col;
              ++	src = &(win->_line[row].text[col]);
              + 
              + 	if (n < 0) {
              +-	    n = getmaxx(win) + 1 - getcurx(win);
              ++	    n = limit;
              ++	} else if (n > limit) {
              ++	    n = limit;
              + 	}
              +-	for (j = 0; j < n; ++j) {
              +-	    wchstr[j] = win->_line[row].text[col + j];
              ++	for (j = k = 0; j < n; ++j) {
              ++	    if (j == 0 || !WidecExt(src[j]) || isWidecBase(src[j])) {
              ++		wchstr[k++] = src[j];
              ++	    }
              + 	}
              ++	memset(&(wchstr[k]), 0, sizeof(*wchstr));
              + 	T(("result = %s", _nc_viscbuf(wchstr, n)));
              +     } else {
              + 	code = ERR;
              +Index: ncurses/widechar/lib_key_name.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_key_name.c	2007-06-12 21:01:13.000000000 +0000
              +@@ -0,0 +1,62 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++
              ++/*
              ++**	lib_key_name.c
              ++**
              ++**	The routine key_name().
              ++**
              ++*/
              ++
              ++#include 
              ++
              ++MODULE_ID("$Id: lib_key_name.c,v 1.2 2007/06/12 21:01:13 tom Exp $")
              ++
              ++NCURSES_EXPORT(NCURSES_CONST char *)
              ++key_name(wchar_t c)
              ++{
              ++    cchar_t my_cchar;
              ++    wchar_t *my_wchars;
              ++    size_t len;
              ++
              ++    /* FIXME: move to _nc_globals */
              ++    static char result[MB_LEN_MAX + 1];
              ++
              ++    memset(&my_cchar, 0, sizeof(my_cchar));
              ++    my_cchar.chars[0] = c;
              ++    my_cchar.chars[1] = L'\0';
              ++
              ++    my_wchars = wunctrl(&my_cchar);
              ++    len = wcstombs(result, my_wchars, sizeof(result) - 1);
              ++    if (isEILSEQ(len) || (len == 0)) {
              ++	return "UNKNOWN KEY";
              ++    }
              ++
              ++    result[len] = '\0';
              ++    return result;
              ++}
              +Index: ncurses/widechar/lib_unget_wch.c
              +Prereq:  1.7 
              +--- ncurses-5.6/ncurses/widechar/lib_unget_wch.c	2004-12-05 01:21:31.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_unget_wch.c	2007-11-25 00:57:00.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2002-2003,2004 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2002-2004,2007 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            *
              +@@ -39,26 +39,30 @@
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_unget_wch.c,v 1.7 2004/12/05 01:21:31 tom Exp $")
              ++MODULE_ID("$Id: lib_unget_wch.c,v 1.9 2007/11/25 00:57:00 tom Exp $")
              + 
              +-#ifdef linux
              + /*
              +- * glibc's wcrtomb() function is broken - does not return the proper value
              +- * when target is null (noted for glibc 2.3.2).  This is a workaround.
              ++ * Wrapper for wcrtomb() which obtains the length needed for the given
              ++ * wide-character 'source'.
              +  */
              + NCURSES_EXPORT(size_t)
              + _nc_wcrtomb(char *target, wchar_t source, mbstate_t * state)
              + {
              ++    int result;
              ++
              +     if (target == 0) {
              + 	wchar_t temp[2];
              + 	const wchar_t *tempp = temp;
              + 	temp[0] = source;
              + 	temp[1] = 0;
              +-	return wcsrtombs(NULL, &tempp, 0, state);
              ++	result = wcsrtombs(NULL, &tempp, 0, state);
              ++    } else {
              ++	result = wcrtomb(target, source, state);
              +     }
              +-    return wcrtomb(target, source, state);
              ++    if (!isEILSEQ(result) && (result == 0))
              ++	result = 1;
              ++    return result;
              + }
              +-#endif
              + 
              + NCURSES_EXPORT(int)
              + unget_wch(const wchar_t wch)
              +Index: ncurses/widechar/lib_vid_attr.c
              +Prereq:  1.4 
              +--- ncurses-5.6/ncurses/widechar/lib_vid_attr.c	2006-11-26 00:26:00.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_vid_attr.c	2007-06-30 22:03:02.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2002-2006,2007 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            *
              +@@ -33,7 +33,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: lib_vid_attr.c,v 1.4 2006/11/26 00:26:00 tom Exp $")
              ++MODULE_ID("$Id: lib_vid_attr.c,v 1.5 2007/06/30 22:03:02 tom Exp $")
              + 
              + #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
              + 
              +@@ -72,6 +72,7 @@
              + #define fix_pair0 FALSE
              + #endif
              + 
              ++    newmode &= A_ATTRIBUTES;
              +     T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
              + 
              +     /* this allows us to go on whether or not newterm() has been called */
              +Index: ncurses/widechar/lib_wunctrl.c
              +Prereq:  1.8 
              +--- ncurses-5.6/ncurses/widechar/lib_wunctrl.c	2005-04-16 18:10:44.000000000 +0000
              ++++ ncurses-5.6-20071201/ncurses/widechar/lib_wunctrl.c	2007-06-12 20:22:32.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2001-2003,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2001-2005,2007 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,21 @@
              + 
              + #include 
              + 
              +-#if USE_WIDEC_SUPPORT
              +-
              +-MODULE_ID("$Id: lib_wunctrl.c,v 1.8 2005/04/16 18:10:44 tom Exp $")
              ++MODULE_ID("$Id: lib_wunctrl.c,v 1.12 2007/06/12 20:22:32 tom Exp $")
              + 
              + NCURSES_EXPORT(wchar_t *)
              + wunctrl(cchar_t *wc)
              + {
              +-    static wchar_t str[5], *sp;
              ++    static wchar_t str[CCHARW_MAX + 1], *sp;
              + 
              +     if (Charable(*wc)) {
              + 	const char *p = unctrl((unsigned) _nc_to_char((wint_t) CharOf(*wc)));
              + 
              +-	for (sp = str; *p;)
              +-	    *sp++ = _nc_to_widechar(*p++);
              ++	for (sp = str; *p; ++p) {
              ++	    *sp++ = _nc_to_widechar(*p);
              ++	}
              ++	*sp = 0;
              + 	return str;
              +     } else
              + 	return wc->chars;
              + }
              +-
              +-#endif
              +Index: panel/Makefile.in
              +Prereq:  1.47 
              +--- ncurses-5.6/panel/Makefile.in	2006-10-14 20:40:36.000000000 +0000
              ++++ ncurses-5.6-20071201/panel/Makefile.in	2007-04-28 14:56:11.000000000 +0000
              +@@ -1,6 +1,6 @@
              +-# $Id: Makefile.in,v 1.47 2006/10/14 20:40:36 tom Exp $
              ++# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 1998-2003,2006 Free Software Foundation, Inc.                #
              ++# Copyright (c) 1998-2006,2007 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"), #
              +@@ -27,7 +27,7 @@
              + # authorization.                                                             #
              + ##############################################################################
              + #
              +-# Author: Thomas E. Dickey 1996-2002
              ++# Author: Thomas E. Dickey 1996-on
              + #
              + # Makefile for panels source code.
              + #
              +@@ -92,7 +92,7 @@
              + 
              + CFLAGS_DEFAULT	= $(CFLAGS_@DFT_UPR_MODEL@)
              + 
              +-LINK		= $(LIBTOOL_LINK) $(CC)
              ++LINK		= $(LIBTOOL_LINK)
              + LDFLAGS		= @LDFLAGS@ @LD_MODEL@ @LIBS@
              + 
              + SHLIB_DIRS	= -L../lib
              +@@ -107,8 +107,6 @@
              + 
              + RANLIB		= @LIB_PREP@
              + 
              +-IMPORT_LIB	= @IMPORT_LIB@
              +-SHARED_LIB	= @SHARED_LIB@
              + LIBRARIES	= @LIBS_TO_MAKE@
              + 
              + LINT		= @LINT@
              +@@ -127,7 +125,7 @@
              + 
              + $(DESTDIR)$(bindir) \
              + $(DESTDIR)$(libdir) :
              +-	sh $(srcdir)/../mkinstalldirs $@
              ++	sh $(srcdir)/../mkdirs.sh $@
              + 
              + # make a copy to simplify include-paths while still keeping panel's include
              + # file in this directory.
              +Index: panel/headers
              +--- ncurses-5.6/panel/headers	1998-02-11 12:14:01.000000000 +0000
              ++++ ncurses-5.6-20071201/panel/headers	2006-12-24 16:25:45.000000000 +0000
              +@@ -1,5 +1,5 @@
              + ##############################################################################
              +-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
              ++# Copyright (c) 1998,2006 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"), #
              +@@ -29,3 +29,4 @@
              + # Author: Thomas E. Dickey  1996
              + #
              + $(srcdir)/panel.h
              ++# vile:makemode
              +Index: panel/modules
              +--- ncurses-5.6/panel/modules	1998-02-11 12:14:02.000000000 +0000
              ++++ ncurses-5.6-20071201/panel/modules	2006-12-24 00:53:17.000000000 +0000
              +@@ -1,5 +1,6 @@
              ++# $Id: modules,v 1.9 2006/12/24 00:53:17 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 1998 Free Software Foundation, Inc.                          #
              ++# Copyright (c) 1998,2006 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"), #
              +@@ -26,7 +27,7 @@
              + # authorization.                                                             #
              + ##############################################################################
              + #
              +-# Author: Thomas E. Dickey  1995,1997
              ++# Author: Thomas E. Dickey	1995-on
              + #
              + 
              + @ base
              +@@ -47,3 +48,4 @@
              + p_user		lib		$(srcdir)	$(PANEL_PRIV_H)
              + p_win		lib		$(srcdir)	$(PANEL_PRIV_H)
              + 
              ++# vile:makemode
              +Index: progs/Makefile.in
              +Prereq:  1.70 
              +--- ncurses-5.6/progs/Makefile.in	2006-12-17 15:55:48.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/Makefile.in	2007-10-13 22:25:53.000000000 +0000
              +@@ -1,6 +1,6 @@
              +-# $Id: Makefile.in,v 1.70 2006/12/17 15:55:48 tom Exp $
              ++# $Id: Makefile.in,v 1.77 2007/10/13 22:25:53 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
              ++# Copyright (c) 1998-2006,2007 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"), #
              +@@ -98,9 +98,8 @@
              + LOCAL_LIBDIR	= @top_builddir@/lib
              + 
              + LD		= @LD@
              +-LINK		= @LINK_PROGS@ $(LIBTOOL_LINK) $(CC)
              +-LDFLAGS		= @EXTRA_LDFLAGS@ \
              +-		@TINFO_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@
              ++LINK		= @LINK_PROGS@ $(LIBTOOL_LINK)
              ++LDFLAGS		= @EXTRA_LDFLAGS@ @LDFLAGS@
              + 
              + LDFLAGS_LIBTOOL	= $(LDFLAGS) $(CFLAGS_LIBTOOL)
              + LDFLAGS_NORMAL	= $(LDFLAGS) $(CFLAGS_NORMAL)
              +@@ -110,6 +109,12 @@
              + 
              + LDFLAGS_DEFAULT	= $(LDFLAGS_@DFT_UPR_MODEL@)
              + 
              ++LIBS_TIC	= @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
              ++LDFLAGS_TIC	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TIC)
              ++
              ++LIBS_TINFO	= @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
              ++LDFLAGS_TINFO	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
              ++
              + LINT		= @LINT@
              + LINT_OPTS	= @LINT_OPTS@
              + LINT_LIBS	= -lncurses @LIBS@
              +@@ -200,7 +205,7 @@
              + 	-@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
              + 
              + $(DESTDIR)$(bindir) :
              +-	sh $(srcdir)/../mkinstalldirs $@
              ++	sh $(srcdir)/../mkdirs.sh $@
              + 
              + #
              + # Utilities normally built by make all start here
              +@@ -211,40 +216,38 @@
              + 	$(MODEL)/dump_entry$o
              + 
              + tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
              +-	@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
              ++	@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@
              + 
              + DEPS_TOE = \
              +-	$(MODEL)/toe$o \
              +-	$(MODEL)/dump_entry$o
              ++	$(MODEL)/toe$o
              + 
              + toe$x: $(DEPS_TOE) $(DEPS_CURSES)
              +-	@ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
              ++	@ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_TIC) -o $@
              + 
              + DEPS_CLEAR = \
              + 	$(MODEL)/clear$o
              + 
              + clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
              +-	@ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
              ++	@ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@
              + 
              + DEPS_TPUT = \
              + 	$(MODEL)/tput$o
              + 
              + tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
              +-	@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
              ++	@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@
              + 
              + DEPS_INFOCMP = \
              + 	$(MODEL)/infocmp$o \
              + 	$(MODEL)/dump_entry$o
              + 
              + infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
              +-	@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
              ++	@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@
              + 
              + DEPS_TSET = \
              +-	$(MODEL)/tset$o \
              +-	$(MODEL)/dump_entry$o
              ++	$(MODEL)/tset$o
              + 
              + tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
              +-	@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
              ++	@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
              + 
              + termsort.c: $(srcdir)/MKtermsort.sh
              + 	sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
              +Index: progs/clear.c
              +Prereq:  1.10 
              +--- ncurses-5.6/progs/clear.c	2006-05-20 17:47:47.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/clear.c	2007-10-13 22:16:02.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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,9 +36,10 @@
              +  * clear.c --  clears the terminal's screen
              +  */
              + 
              ++#define USE_LIBTINFO
              + #include 
              + 
              +-MODULE_ID("$Id: clear.c,v 1.10 2006/05/20 17:47:47 tom Exp $")
              ++MODULE_ID("$Id: clear.c,v 1.11 2007/10/13 22:16:02 tom Exp $")
              + 
              + static int
              + putch(int c)
              +Index: progs/dump_entry.c
              +Prereq:  1.79 
              +--- ncurses-5.6/progs/dump_entry.c	2006-09-30 20:18:15.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/dump_entry.c	2007-08-25 20:05:35.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -39,7 +39,7 @@
              + #include "termsort.c"		/* this C file is generated */
              + #include 	/* so is this */
              + 
              +-MODULE_ID("$Id: dump_entry.c,v 1.79 2006/09/30 20:18:15 tom Exp $")
              ++MODULE_ID("$Id: dump_entry.c,v 1.81 2007/08/25 20:05:35 tom Exp $")
              + 
              + #define INDENT			8
              + #define DISCARD(string) string = ABSENT_STRING
              +@@ -352,14 +352,17 @@
              + 	}
              + 	break;
              + 
              ++#define is_termcap(type) (idx < (int) sizeof(type##_from_termcap) && \
              ++			  type##_from_termcap[idx])
              ++
              +     case V_BSD:		/* BSD */
              + 	switch (type) {
              + 	case BOOLEAN:
              +-	    return bool_from_termcap[idx];
              ++	    return is_termcap(bool);
              + 	case NUMBER:
              +-	    return num_from_termcap[idx];
              ++	    return is_termcap(num);
              + 	case STRING:
              +-	    return str_from_termcap[idx];
              ++	    return is_termcap(str);
              + 	}
              + 	break;
              +     }
              +@@ -788,11 +791,11 @@
              +      * Much more work should be done on this to support dumping termcaps.
              +      */
              +     if (tversion == V_HPUX) {
              +-	if (memory_lock) {
              ++	if (VALID_STRING(memory_lock)) {
              + 	    (void) sprintf(buffer, "meml=%s", memory_lock);
              + 	    WRAP_CONCAT;
              + 	}
              +-	if (memory_unlock) {
              ++	if (VALID_STRING(memory_unlock)) {
              + 	    (void) sprintf(buffer, "memu=%s", memory_unlock);
              + 	    WRAP_CONCAT;
              + 	}
              +@@ -1223,7 +1226,7 @@
              + 	bool fix_needed = FALSE;
              + 
              + 	for (n = 0, source = 0; acs_chars[n] != 0; n++) {
              +-	    target = acs_chars[n];
              ++	    target = UChar(acs_chars[n]);
              + 	    if (source >= target) {
              + 		fix_needed = TRUE;
              + 		break;
              +@@ -1235,7 +1238,7 @@
              + 	if (fix_needed) {
              + 	    memset(mapped, 0, sizeof(mapped));
              + 	    for (n = 0; acs_chars[n] != 0; n++) {
              +-		source = acs_chars[n];
              ++		source = UChar(acs_chars[n]);
              + 		if ((target = (unsigned char) acs_chars[n + 1]) != 0) {
              + 		    mapped[source] = target;
              + 		    n++;
              +Index: progs/infocmp.c
              +Prereq:  1.85 
              +--- ncurses-5.6/progs/infocmp.c	2006-08-19 21:20:37.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/infocmp.c	2007-11-17 23:34:26.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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,18 +35,18 @@
              + /*
              +  *	infocmp.c -- decompile an entry, or compare two entries
              +  *		written by Eric S. Raymond
              ++ *		and Thomas E Dickey
              +  */
              + 
              + #include 
              + 
              + #include 
              + 
              +-MODULE_ID("$Id: infocmp.c,v 1.85 2006/08/19 21:20:37 tom Exp $")
              ++MODULE_ID("$Id: infocmp.c,v 1.94 2007/11/17 23:34:26 tom Exp $")
              + 
              + #define L_CURL "{"
              + #define R_CURL "}"
              + 
              +-#define MAXTERMS	32	/* max # terminal arguments we can handle */
              + #define MAX_STRING	1024	/* maximum formatted string */
              + 
              + const char *_nc_progname = "infocmp";
              +@@ -60,8 +60,7 @@
              +  *
              +  ***************************************************************************/
              + 
              +-static char *tname[MAXTERMS];	/* terminal type names */
              +-static ENTRY entries[MAXTERMS];	/* terminfo entries */
              ++static ENTRY *entries;		/* terminfo entries */
              + static int termcount;		/* count of terminal entries */
              + 
              + static bool limited = TRUE;	/* "-r" option is not set */
              +@@ -96,7 +95,8 @@
              +     while (termcount-- > 0)
              + 	_nc_free_termtype(&entries[termcount].tterm);
              +     _nc_leaks_dump_entry();
              +-    _nc_free_and_exit(code);
              ++    free(entries);
              ++    _nc_free_tic(code);
              + }
              + #endif
              + 
              +@@ -932,7 +932,8 @@
              + 		case C_DIFFERENCE:
              + 		    if (itrace)
              + 			(void) fprintf(stderr,
              +-				       "infocmp: dumping differences\n");
              ++				       "%s: dumping differences\n",
              ++				       _nc_progname);
              + 		    (void) printf("comparing %s to %s.\n", name1, name2);
              + 		    compare_entry(compare_predicate, &entries->tterm, quiet);
              + 		    break;
              +@@ -940,7 +941,8 @@
              + 		case C_COMMON:
              + 		    if (itrace)
              + 			(void) fprintf(stderr,
              +-				       "infocmp: dumping common capabilities\n");
              ++				       "%s: dumping common capabilities\n",
              ++				       _nc_progname);
              + 		    (void) printf("comparing %s to %s.\n", name1, name2);
              + 		    compare_entry(compare_predicate, &entries->tterm, quiet);
              + 		    break;
              +@@ -948,7 +950,8 @@
              + 		case C_NAND:
              + 		    if (itrace)
              + 			(void) fprintf(stderr,
              +-				       "infocmp: dumping differences\n");
              ++				       "%s: dumping differences\n",
              ++				       _nc_progname);
              + 		    (void) printf("comparing %s to %s.\n", name1, name2);
              + 		    compare_entry(compare_predicate, &entries->tterm, quiet);
              + 		    break;
              +@@ -1083,7 +1086,6 @@
              + 	    }
              + 	    *tp++ = '"';
              + 	    *tp = '\0';
              +-	    size += (strlen(term->Strings[n]) + 1);
              + 	    (void) printf("static char %-20s[] = %s;\n",
              + 			  string_variable(ExtStrname(term, n, strnames)), buf);
              + 	}
              +@@ -1237,7 +1239,8 @@
              + 
              +     if ((terminal = getenv("TERM")) == 0) {
              + 	(void) fprintf(stderr,
              +-		       "infocmp: environment variable TERM not set\n");
              ++		       "%s: environment variable TERM not set\n",
              ++		       _nc_progname);
              + 	exit(EXIT_FAILURE);
              +     }
              +     return terminal;
              +@@ -1252,10 +1255,15 @@
              + int
              + main(int argc, char *argv[])
              + {
              +-    char *firstdir, *restdir;
              +     /* Avoid "local data >32k" error with mwcc */
              +     /* Also avoid overflowing smaller stacks on systems like AmigaOS */
              +-    path *tfile = (path *) malloc(sizeof(path) * MAXTERMS);
              ++    path *tfile = 0;
              ++    char **tname = 0;
              ++    int maxterms;
              ++
              ++    char **myargv;
              ++
              ++    char *firstdir, *restdir;
              +     int c, i, len;
              +     bool formatted = FALSE;
              +     bool filecompare = FALSE;
              +@@ -1270,9 +1278,16 @@
              +     use_extended_names(FALSE);
              + #endif
              + 
              ++    _nc_progname = _nc_rootname(argv[0]);
              ++
              ++    /* make sure we have enough space to add two terminal entries */
              ++    myargv = typeCalloc(char *, argc + 3);
              ++    memcpy(myargv, argv, sizeof(char *) * argc);
              ++    argv = myargv;
              ++
              +     while ((c = getopt(argc,
              + 		       argv,
              +-		       "1A:aB:CcdEeFfGgIiLlnpqR:rs:TtUuVv:w:x")) != EOF) {
              ++		       "1A:aB:CcdEeFfGgIiLlnpqR:rs:TtUuVv:w:x")) != -1) {
              + 	switch (c) {
              + 	case '1':
              + 	    mwidth = 0;
              +@@ -1373,7 +1388,6 @@
              + 
              + 	case 'r':
              + 	    tversion = 0;
              +-	    limited = FALSE;
              + 	    break;
              + 
              + 	case 's':
              +@@ -1387,7 +1401,8 @@
              + 		sortmode = S_TERMCAP;
              + 	    else {
              + 		(void) fprintf(stderr,
              +-			       "infocmp: unknown sort mode\n");
              ++			       "%s: unknown sort mode\n",
              ++			       _nc_progname);
              + 		ExitProgram(EXIT_FAILURE);
              + 	    }
              + 	    break;
              +@@ -1435,6 +1450,18 @@
              + 	}
              +     }
              + 
              ++    maxterms = (argc + 1 - optind);
              ++    tfile = typeMalloc(path, maxterms);
              ++    tname = typeCalloc(char *, maxterms);
              ++    entries = typeCalloc(ENTRY, maxterms);
              ++
              ++    if (tfile == 0
              ++	|| tname == 0
              ++	|| entries == 0) {
              ++	fprintf(stderr, "%s: not enough memory\n", _nc_progname);
              ++	ExitProgram(EXIT_FAILURE);
              ++    }
              ++
              +     /* by default, sort by terminfo name */
              +     if (sortmode == S_DEFAULT)
              + 	sortmode = S_TERMINFO;
              +@@ -1458,53 +1485,56 @@
              + 	/* grab the entries */
              + 	termcount = 0;
              + 	for (; optind < argc; optind++) {
              +-	    if (termcount >= MAXTERMS) {
              +-		(void) fprintf(stderr,
              +-			       "infocmp: too many terminal type arguments\n");
              +-		ExitProgram(EXIT_FAILURE);
              +-	    } else {
              +-		const char *directory = termcount ? restdir : firstdir;
              +-		int status;
              ++	    const char *directory = termcount ? restdir : firstdir;
              ++	    int status;
              + 
              +-		tname[termcount] = argv[optind];
              ++	    tname[termcount] = argv[optind];
              + 
              +-		if (directory) {
              ++	    if (directory) {
              + #if USE_DATABASE
              +-		    (void) sprintf(tfile[termcount], "%s/%c/%s",
              +-				   directory,
              +-				   *argv[optind], argv[optind]);
              +-		    if (itrace)
              +-			(void) fprintf(stderr,
              +-				       "infocmp: reading entry %s from file %s\n",
              +-				       argv[optind], tfile[termcount]);
              +-
              +-		    status = _nc_read_file_entry(tfile[termcount],
              +-						 &entries[termcount].tterm);
              ++#if MIXEDCASE_FILENAMES
              ++#define LEAF_FMT "%c"
              + #else
              +-		    (void) fprintf(stderr, "terminfo files not supported\n");
              +-		    ExitProgram(EXIT_FAILURE);
              ++#define LEAF_FMT "%02x"
              + #endif
              +-		} else {
              +-		    if (itrace)
              +-			(void) fprintf(stderr,
              +-				       "infocmp: reading entry %s from database\n",
              +-				       tname[termcount]);
              +-
              +-		    status = _nc_read_entry(tname[termcount],
              +-					    tfile[termcount],
              +-					    &entries[termcount].tterm);
              +-		    directory = TERMINFO;	/* for error message */
              +-		}
              ++		(void) sprintf(tfile[termcount], "%s/" LEAF_FMT "/%s",
              ++			       directory,
              ++			       UChar(*argv[optind]), argv[optind]);
              ++		if (itrace)
              ++		    (void) fprintf(stderr,
              ++				   "%s: reading entry %s from file %s\n",
              ++				   _nc_progname,
              ++				   argv[optind], tfile[termcount]);
              + 
              +-		if (status <= 0) {
              ++		status = _nc_read_file_entry(tfile[termcount],
              ++					     &entries[termcount].tterm);
              ++#else
              ++		(void) fprintf(stderr, "%s: terminfo files not supported\n",
              ++			       _nc_progname);
              ++		ExitProgram(EXIT_FAILURE);
              ++#endif
              ++	    } else {
              ++		if (itrace)
              + 		    (void) fprintf(stderr,
              +-				   "infocmp: couldn't open terminfo file %s.\n",
              +-				   tfile[termcount]);
              +-		    ExitProgram(EXIT_FAILURE);
              +-		}
              +-		repair_acsc(&entries[termcount].tterm);
              +-		termcount++;
              ++				   "%s: reading entry %s from database\n",
              ++				   _nc_progname,
              ++				   tname[termcount]);
              ++
              ++		status = _nc_read_entry(tname[termcount],
              ++					tfile[termcount],
              ++					&entries[termcount].tterm);
              ++		directory = TERMINFO;	/* for error message */
              ++	    }
              ++
              ++	    if (status <= 0) {
              ++		(void) fprintf(stderr,
              ++			       "%s: couldn't open terminfo file %s.\n",
              ++			       _nc_progname,
              ++			       tfile[termcount]);
              ++		ExitProgram(EXIT_FAILURE);
              + 	    }
              ++	    repair_acsc(&entries[termcount].tterm);
              ++	    termcount++;
              + 	}
              + 
              + #if NCURSES_XNAMES
              +@@ -1542,7 +1572,8 @@
              + 	    case C_DEFAULT:
              + 		if (itrace)
              + 		    (void) fprintf(stderr,
              +-				   "infocmp: about to dump %s\n",
              ++				   "%s: about to dump %s\n",
              ++				   _nc_progname,
              + 				   tname[0]);
              + 		(void) printf("#\tReconstructed via infocmp from file: %s\n",
              + 			      tfile[0]);
              +@@ -1553,12 +1584,12 @@
              + 			   NULL);
              + 		len = show_entry();
              + 		if (itrace)
              +-		    (void) fprintf(stderr, "infocmp: length %d\n", len);
              ++		    (void) fprintf(stderr, "%s: length %d\n", _nc_progname, len);
              + 		break;
              + 
              + 	    case C_DIFFERENCE:
              + 		if (itrace)
              +-		    (void) fprintf(stderr, "infocmp: dumping differences\n");
              ++		    (void) fprintf(stderr, "%s: dumping differences\n", _nc_progname);
              + 		(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
              + 		compare_entry(compare_predicate, &entries->tterm, quiet);
              + 		break;
              +@@ -1566,7 +1597,8 @@
              + 	    case C_COMMON:
              + 		if (itrace)
              + 		    (void) fprintf(stderr,
              +-				   "infocmp: dumping common capabilities\n");
              ++				   "%s: dumping common capabilities\n",
              ++				   _nc_progname);
              + 		(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
              + 		compare_entry(compare_predicate, &entries->tterm, quiet);
              + 		break;
              +@@ -1574,14 +1606,15 @@
              + 	    case C_NAND:
              + 		if (itrace)
              + 		    (void) fprintf(stderr,
              +-				   "infocmp: dumping differences\n");
              ++				   "%s: dumping differences\n",
              ++				   _nc_progname);
              + 		(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
              + 		compare_entry(compare_predicate, &entries->tterm, quiet);
              + 		break;
              + 
              + 	    case C_USEALL:
              + 		if (itrace)
              +-		    (void) fprintf(stderr, "infocmp: dumping use entry\n");
              ++		    (void) fprintf(stderr, "%s: dumping use entry\n", _nc_progname);
              + 		dump_entry(&entries[0].tterm,
              + 			   suppress_untranslatable,
              + 			   limited,
              +@@ -1592,7 +1625,7 @@
              + 					  || outform == F_TCONVERR));
              + 		len = show_entry();
              + 		if (itrace)
              +-		    (void) fprintf(stderr, "infocmp: length %d\n", len);
              ++		    (void) fprintf(stderr, "%s: length %d\n", _nc_progname, len);
              + 		break;
              + 	    }
              + 	}
              +@@ -1606,7 +1639,11 @@
              +     else
              + 	file_comparison(argc - optind, argv + optind);
              + 
              ++#if NO_LEAKS
              ++    free(myargv);
              +     free(tfile);
              ++    free(tname);
              ++#endif
              +     ExitProgram(EXIT_SUCCESS);
              + }
              + 
              +Index: progs/modules
              +Prereq:  1.12 
              +--- ncurses-5.6/progs/modules	2005-09-25 00:54:22.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/modules	2006-12-24 00:53:21.000000000 +0000
              +@@ -1,7 +1,7 @@
              +-# $Id: modules,v 1.12 2005/09/25 00:54:22 tom Exp $
              ++# $Id: modules,v 1.13 2006/12/24 00:53:21 tom Exp $
              + # Program modules (some are in ncurses lib!)
              + ##############################################################################
              +-# Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.                #
              ++# Copyright (c) 1998-2005,2006 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,7 +28,7 @@
              + # authorization.                                                             #
              + ##############################################################################
              + #
              +-# Author: Thomas E. Dickey  1995,1997
              ++# Author: Thomas E. Dickey	1995-on
              + #
              + 
              + @ base
              +@@ -39,3 +39,5 @@
              + infocmp		progs		$(srcdir)	$(HEADER_DEPS)             $(srcdir)/dump_entry.h
              + tput		progs		$(srcdir)	$(HEADER_DEPS) transform.h termsort.c
              + tset		progs		$(srcdir)	$(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h ../include/termcap.h
              ++
              ++# vile:makemode
              +Index: progs/progs.priv.h
              +Prereq:  1.30 
              +--- ncurses-5.6/progs/progs.priv.h	2006-11-26 00:28:01.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/progs.priv.h	2007-10-13 20:33:53.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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 @@
              +  *  Author: Thomas E. Dickey                    1997-on                     *
              +  ****************************************************************************/
              + /*
              +- * $Id: progs.priv.h,v 1.30 2006/11/26 00:28:01 tom Exp $
              ++ * $Id: progs.priv.h,v 1.33 2007/10/13 20:33:53 tom Exp $
              +  *
              +  *	progs.priv.h
              +  *
              +@@ -110,7 +110,16 @@
              + #include 
              + #include 
              + #include 
              ++
              + #include 
              ++#if HAVE_NC_FREEALL
              ++#undef ExitProgram
              ++#ifdef USE_LIBTINFO
              ++#define ExitProgram(code) _nc_free_tinfo(code)
              ++#else
              ++#define ExitProgram(code) _nc_free_tic(code)
              ++#endif
              ++#endif
              + 
              + /* usually in  */
              + #ifndef STDOUT_FILENO
              +Index: progs/tic.c
              +Prereq:  1.131 
              +--- ncurses-5.6/progs/tic.c	2006-12-02 22:13:17.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/tic.c	2007-07-21 17:45:59.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -44,7 +44,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: tic.c,v 1.131 2006/12/02 22:13:17 tom Exp $")
              ++MODULE_ID("$Id: tic.c,v 1.133 2007/07/21 17:45:59 tom Exp $")
              + 
              + const char *_nc_progname = "tic";
              + 
              +@@ -353,11 +353,24 @@
              +     return fp;
              + }
              + 
              ++#if NO_LEAKS
              ++static void
              ++free_namelist(char **src)
              ++{
              ++    if (src != 0) {
              ++	int n;
              ++	for (n = 0; src[n] != 0; ++n)
              ++	    free(src[n]);
              ++	free(src);
              ++    }
              ++}
              ++#endif
              ++
              + /* Parse the "-e" option-value into a list of names */
              +-static const char **
              ++static char **
              + make_namelist(char *src)
              + {
              +-    const char **dst = 0;
              ++    char **dst = 0;
              + 
              +     char *s, *base;
              +     unsigned pass, n, nn;
              +@@ -374,11 +387,13 @@
              + 		if ((s = stripped(buffer)) != 0) {
              + 		    if (dst != 0)
              + 			dst[nn] = s;
              ++		    else
              ++			free(s);
              + 		    nn++;
              + 		}
              + 	    }
              + 	    if (pass == 1) {
              +-		dst = typeCalloc(const char *, nn + 1);
              ++		dst = typeCalloc(char *, nn + 1);
              + 		rewind(fp);
              + 	    }
              + 	}
              +@@ -401,10 +416,10 @@
              + 		    break;
              + 	    }
              + 	    if (pass == 1)
              +-		dst = typeCalloc(const char *, nn + 1);
              ++		dst = typeCalloc(char *, nn + 1);
              + 	}
              +     }
              +-    if (showsummary) {
              ++    if (showsummary && (dst != 0)) {
              + 	fprintf(log_fp, "Entries that will be compiled:\n");
              + 	for (n = 0; dst[n] != 0; n++)
              + 	    fprintf(log_fp, "%u:%s\n", n + 1, dst[n]);
              +@@ -413,7 +428,7 @@
              + }
              + 
              + static bool
              +-matches(const char **needle, const char *haystack)
              ++matches(char **needle, const char *haystack)
              + /* does entry in needle list match |-separated field in haystack? */
              + {
              +     bool code = FALSE;
              +@@ -468,7 +483,7 @@
              +     bool limited = TRUE;
              +     char *tversion = (char *) NULL;
              +     const char *source_file = "terminfo";
              +-    const char **namelst = 0;
              ++    char **namelst = 0;
              +     char *outdir = (char *) NULL;
              +     bool check_only = FALSE;
              +     bool suppress_untranslatable = FALSE;
              +@@ -495,7 +510,7 @@
              +      * be optional.
              +      */
              +     while ((this_opt = getopt(argc, argv,
              +-			      "0123456789CILNR:TUVace:fGgo:rstvwx")) != EOF) {
              ++			      "0123456789CILNR:TUVace:fGgo:rstvwx")) != -1) {
              + 	if (isdigit(this_opt)) {
              + 	    switch (last_opt) {
              + 	    case 'v':
              +@@ -784,6 +799,9 @@
              + 	else
              + 	    fprintf(log_fp, "No entries written\n");
              +     }
              ++#if NO_LEAKS
              ++    free_namelist(namelst);
              ++#endif
              +     cleanup();
              +     ExitProgram(EXIT_SUCCESS);
              + }
              +Index: progs/toe.c
              +Prereq:  1.41 
              +--- ncurses-5.6/progs/toe.c	2006-08-19 18:18:09.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/toe.c	2007-10-13 22:26:38.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -40,13 +40,11 @@
              + 
              + #include 
              + 
              +-#include 
              +-
              + #if USE_HASHED_DB
              + #include 
              + #endif
              + 
              +-MODULE_ID("$Id: toe.c,v 1.41 2006/08/19 18:18:09 tom Exp $")
              ++MODULE_ID("$Id: toe.c,v 1.46 2007/10/13 22:26:38 tom Exp $")
              + 
              + #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
              + 
              +@@ -59,8 +57,7 @@
              + ExitProgram(int code)
              + {
              +     _nc_free_entries(_nc_head);
              +-    _nc_leaks_dump_entry();
              +-    _nc_free_and_exit(code);
              ++    _nc_free_tic(code);
              + }
              + #endif
              + 
              +@@ -326,7 +323,7 @@
              + 
              +     _nc_progname = _nc_rootname(argv[0]);
              + 
              +-    while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != EOF) {
              ++    while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != -1) {
              + 	/* handle optional parameter */
              + 	if (isdigit(this_opt)) {
              + 	    switch (last_opt) {
              +Index: progs/tput.c
              +Prereq:  1.38 
              +--- ncurses-5.6/progs/tput.c	2006-11-26 00:27:47.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/tput.c	2007-10-13 20:34:16.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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,6 +38,7 @@
              +  * Ross Ridge's mytinfo package.
              +  */
              + 
              ++#define USE_LIBTINFO
              + #include 
              + 
              + #if !PURE_TERMINFO
              +@@ -45,7 +46,7 @@
              + #endif
              + #include 
              + 
              +-MODULE_ID("$Id: tput.c,v 1.38 2006/11/26 00:27:47 tom Exp $")
              ++MODULE_ID("$Id: tput.c,v 1.41 2007/10/13 20:34:16 tom Exp $")
              + 
              + #define PUTS(s)		fputs(s, stdout)
              + #define PUTCHAR(c)	putchar(c)
              +@@ -325,6 +326,7 @@
              + 	    case Num_Str_Str:
              + 		s = TPARM_3(s, numbers[1], strings[2], strings[3]);
              + 		break;
              ++	    case Numbers:
              + 	    default:
              + 		(void) _nc_tparm_analyze(s, p_is_s, &popcount);
              + #define myParam(n) (p_is_s[n - 1] != 0 ? ((long) strings[n]) : numbers[n])
              +@@ -363,7 +365,7 @@
              + 
              +     term = getenv("TERM");
              + 
              +-    while ((c = getopt(argc, argv, "ST:V")) != EOF) {
              ++    while ((c = getopt(argc, argv, "ST:V")) != -1) {
              + 	switch (c) {
              + 	case 'S':
              + 	    cmdline = FALSE;
              +Index: progs/tset.c
              +Prereq:  1.67 
              +--- ncurses-5.6/progs/tset.c	2006-09-16 17:51:10.000000000 +0000
              ++++ ncurses-5.6-20071201/progs/tset.c	2007-10-13 22:22:04.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -73,6 +73,7 @@
              +  * SUCH DAMAGE.
              +  */
              + 
              ++#define USE_LIBTINFO
              + #define __INTERNAL_CAPS_VISIBLE	/* we need to see has_hardware_tabs */
              + #include 
              + 
              +@@ -103,7 +104,7 @@
              + #include 
              + #include 
              + 
              +-MODULE_ID("$Id: tset.c,v 1.67 2006/09/16 17:51:10 tom Exp $")
              ++MODULE_ID("$Id: tset.c,v 1.70 2007/10/13 22:22:04 tom Exp $")
              + 
              + extern char **environ;
              + 
              +@@ -777,7 +778,22 @@
              + 		      | OFDEL
              + #endif
              + #ifdef NLDLY
              +-		      | NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY
              ++		      | NLDLY
              ++#endif
              ++#ifdef CRDLY 
              ++		      | CRDLY
              ++#endif
              ++#ifdef TABDLY 
              ++		      | TABDLY
              ++#endif
              ++#ifdef BSDLY 
              ++		      | BSDLY
              ++#endif
              ++#ifdef VTDLY 
              ++		      | VTDLY
              ++#endif
              ++#ifdef FFDLY
              ++		      | FFDLY
              + #endif
              + 	);
              + 
              +@@ -1129,7 +1145,7 @@
              + 
              +     obsolete(argv);
              +     noinit = noset = quiet = Sflag = sflag = showterm = 0;
              +-    while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:np:qQSrsVw")) != EOF) {
              ++    while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:np:qQSrsVw")) != -1) {
              + 	switch (ch) {
              + 	case 'c':		/* set control-chars */
              + 	    opt_c = TRUE;
              +Index: test/Makefile.in
              +Prereq:  1.92 
              +--- ncurses-5.6/test/Makefile.in	2006-10-21 22:56:03.000000000 +0000
              ++++ ncurses-5.6-20071201/test/Makefile.in	2007-04-28 15:28:28.000000000 +0000
              +@@ -1,6 +1,6 @@
              +-# $Id: Makefile.in,v 1.92 2006/10/21 22:56:03 tom Exp $
              ++# $Id: Makefile.in,v 1.97 2007/04/28 15:28:28 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
              ++# Copyright (c) 1998-2006,2007 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"), #
              +@@ -77,7 +77,7 @@
              + MATH_LIB	= @MATH_LIB@
              + 
              + LD		= @LD@
              +-LINK		= @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS)
              ++LINK		= @LINK_TESTS@ $(LIBTOOL_LINK) $(CFLAGS)
              + 
              + LDFLAGS		= @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@
              + 
              +@@ -87,16 +87,18 @@
              + LDFLAGS_PROFILE	= $(LDFLAGS) $(CFLAGS_PROFILE)
              + LDFLAGS_SHARED	= $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
              + 
              ++TEST_ARGS	= @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
              ++
              + # use these for linking with all of the libraries
              +-LIBS_DEFAULT	= @TEST_ARGS@ @LIBS@ $(MATH_LIB)
              ++LIBS_DEFAULT	= $(TEST_ARGS) @LIBS@ $(MATH_LIB)
              + LDFLAGS_DEFAULT	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_DEFAULT)
              + 
              + # use these for linking with the (n)curses library
              +-LIBS_CURSES	= `echo "@TEST_ARGS@ @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(MATH_LIB)
              ++LIBS_CURSES	= `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(MATH_LIB)
              + LDFLAGS_CURSES	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES)
              + 
              + # use these for linking with the tinfo library if we have it, or curses library if not
              +-LIBS_TINFO	= @TINFO_ARGS@ @LIBS@ $(MATH_LIB)
              ++LIBS_TINFO	= @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LIBS@ $(MATH_LIB)
              + LDFLAGS_TINFO	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
              + 
              + LINT		= @LINT@
              +Index: test/README
              +Prereq:  1.28 
              +--- ncurses-5.6/test/README	2006-11-05 01:10:56.000000000 +0000
              ++++ ncurses-5.6-20071201/test/README	2007-08-18 23:12:24.000000000 +0000
              +@@ -1,5 +1,5 @@
              + -------------------------------------------------------------------------------
              +--- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.               --
              ++-- Copyright (c) 1998-2006,2007 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             --
              +@@ -25,7 +25,7 @@
              + -- sale, use or other dealings in this Software without prior written        --
              + -- authorization.                                                            --
              + -------------------------------------------------------------------------------
              +--- $Id: README,v 1.28 2006/11/05 01:10:56 tom Exp $
              ++-- $Id: README,v 1.35 2007/08/18 23:12:24 tom Exp $
              + -------------------------------------------------------------------------------
              + 
              + The programs in this directory are designed to test your newest toy :-)
              +@@ -210,27 +210,27 @@
              + libncurses:
              + ----------
              + BC				-
              +-COLORS				test: echochar ncurses xmas
              +-COLOR_PAIR			test: background blue bs cardfile demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
              +-COLOR_PAIRS			test: echochar ncurses newdemo
              +-COLS				test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field firework foldkeys hashtest ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm
              ++COLORS				test: echochar ncurses savescreen xmas
              ++COLOR_PAIR			test: background blue bs cardfile demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
              ++COLOR_PAIRS			test: echochar ncurses newdemo savescreen
              ++COLS				test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar edit_field firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
              + ESCDELAY			lib: ncurses
              +-LINES				test: cardfile demo_defkey demo_keyok demo_menus edit_field firework hanoi hashtest ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm xmas
              ++LINES				test: cardfile demo_defkey demo_keyok demo_menus demo_panels echochar edit_field firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
              + PAIR_NUMBER			test: ncurses
              + PC				lib: ncurses
              + SP				lib: ncurses
              + TABSIZE				lib: menu
              + UP				-
              + acs_map				test: gdc ins_wide inserts knight movewindow ncurses newdemo testcurs
              +-add_wch				test: ncurses
              ++add_wch				test: demo_panels ncurses
              + add_wchnstr			test: ncurses
              + add_wchstr			test: view
              +-addch				test: blue bs ditto echochar hashtest ncurses testaddch view worm
              ++addch				test: blue bs ditto echochar hashtest ncurses savescreen testaddch view worm
              + addchnstr			-
              + addchstr			-
              + addnstr				-
              + addnwstr			-
              +-addstr				test: blue bs cardfile gdc hanoi lrtest ncurses
              ++addstr				test: blue bs cardfile gdc hanoi lrtest ncurses savescreen
              + addwstr				test: ncurses
              + assume_default_colors		test: ncurses
              + attr_get			test: ncurses
              +@@ -241,20 +241,20 @@
              + attron				test: bs echochar filter gdc ncurses
              + attrset				test: bs firework gdc hanoi ncurses rain tclock testaddch testcurs
              + baudrate			lib: ncurses
              +-beep				test: blue bs cardfile chgat demo_forms demo_menus edit_field hanoi ins_wide inserts knight movewindow ncurses tclock testcurs view xmas
              +-bkgd				test: background cardfile demo_forms ncurses tclock view
              ++beep				test: blue bs cardfile chgat demo_forms demo_menus demo_panels edit_field hanoi inch_wide inchs ins_wide inserts knight movewindow ncurses savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
              ++bkgd				test: background cardfile demo_forms ncurses savescreen tclock view
              + bkgdset				test: background ncurses testaddch
              + bkgrnd				test: ncurses
              + bkgrndset			test: ncurses
              +-boolcodes			progs: dump_entry
              +-boolfnames			progs: dump_entry
              +-boolnames			progs: dump_entry infocmp
              ++boolcodes			test: test_arrays progs: dump_entry
              ++boolfnames			test: test_arrays progs: dump_entry
              ++boolnames			test: test_arrays progs: dump_entry infocmp
              + border				-
              + border_set			-
              +-box				test: cardfile chgat demo_forms demo_menus edit_field ins_wide inserts lrtest ncurses newdemo redraw testcurs
              ++box				test: cardfile chgat demo_forms demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts lrtest ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              + box_set				test: ncurses
              + can_change_color		test: ncurses
              +-cbreak				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto filter firework foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses newdemo tclock testcurs view worm xmas
              ++cbreak				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
              + chgat				test: chgat
              + clear				test: blue bs gdc ncurses testcurs xmas
              + clearok				test: bs knight
              +@@ -263,26 +263,26 @@
              + color_content			test: ncurses
              + color_set			test: color_set ncurses
              + copywin				test: ncurses testcurs
              +-cur_term			test: dots echochar lrtest progs: clear tic tput tset
              +-curs_set			test: echochar firework gdc hanoi lrtest ncurses newdemo rain tclock testcurs worm xmas
              +-curscr				test: edit_field knight lrtest ncurses tclock view
              ++cur_term			test: dots dots_mvcur lrtest progs: clear tput tset
              ++curs_set			test: echochar firework gdc hanoi lrtest ncurses newdemo rain savescreen tclock testcurs worm xmas
              ++curscr				test: demo_panels edit_field knight lrtest ncurses savescreen tclock view
              + curses_version			test: ncurses progs: infocmp tic toe tput tset
              + def_prog_mode			test: bs ncurses
              + def_shell_mode			lib: ncurses
              + define_key			test: demo_altkeys demo_defkey foldkeys
              + del_curterm			lib: ncurses
              +-delay_output			-
              ++delay_output			test: newdemo
              + delch				-
              + deleteln			-
              +-delscreen			-
              +-delwin				test: cardfile chgat demo_forms demo_menus edit_field ins_wide inserts movewindow ncurses newdemo redraw testcurs
              +-derwin				test: cardfile chgat demo_forms demo_menus ins_wide inserts movewindow ncurses
              +-doupdate			test: cardfile demo_menus edit_field ins_wide inserts knight movewindow ncurses redraw
              ++delscreen			test: dots_mvcur
              ++delwin				test: cardfile chgat demo_forms demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              ++derwin				test: cardfile chgat demo_forms demo_menus inch_wide inchs ins_wide inserts movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
              ++doupdate			test: cardfile demo_menus demo_panels edit_field ins_wide inserts knight movewindow ncurses redraw savescreen test_get_wstr test_getstr
              + dupwin				test: edit_field
              +-echo				test: bs hanoi ncurses testcurs testscanw
              ++echo				test: bs hanoi ncurses test_get_wstr test_getstr testcurs testscanw
              + echo_wchar			test: ncurses
              + echochar			test: echochar ncurses
              +-endwin				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto echochar filter firework firstlast foldkeys gdc hanoi hashtest ins_wide inserts keynames knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
              ++endwin				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto dots_mvcur echochar filter firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
              + erase				test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses tclock testcurs
              + erasechar			lib: ncurses
              + erasewchar			-
              +@@ -290,45 +290,46 @@
              + flash				test: cardfile lrtest ncurses tclock testcurs
              + flushinp			test: ncurses newdemo testcurs
              + get_wch				-
              +-get_wstr			-
              +-getbegx				test: chgat demo_menus movewindow ncurses newdemo redraw testcurs
              +-getbegy				test: chgat demo_menus movewindow ncurses newdemo redraw testcurs
              ++get_wstr			test: test_get_wstr
              ++getattrs			-
              ++getbegx				test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw testcurs
              ++getbegy				test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw testcurs
              + getbkgd				test: ncurses
              + getbkgrnd			test: ncurses
              + getcchar			test: ncurses view
              +-getch				test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest rain tclock testaddch testcurs view worm xmas
              +-getcurx				test: bs chgat demo_altkeys demo_defkey foldkeys movewindow ncurses redraw testcurs
              +-getcury				test: bs chgat demo_altkeys demo_defkey edit_field foldkeys movewindow ncurses redraw testcurs
              +-getmaxx				test: chgat movewindow ncurses newdemo redraw testcurs
              +-getmaxy				test: chgat demo_forms movewindow ncurses newdemo redraw testcurs
              ++getch				test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest rain savescreen tclock testaddch testcurs view worm xmas
              ++getcurx				test: bs chgat demo_altkeys demo_defkey demo_panels foldkeys movewindow ncurses redraw savescreen test_get_wstr test_getstr testcurs
              ++getcury				test: bs chgat demo_altkeys demo_defkey demo_panels edit_field foldkeys movewindow ncurses redraw savescreen testcurs
              ++getmaxx				test: chgat demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              ++getmaxy				test: chgat demo_forms demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              + getmouse			test: bs knight movewindow ncurses
              +-getn_wstr			-
              +-getnstr				test: filter ncurses
              ++getn_wstr			test: test_get_wstr
              ++getnstr				test: filter ncurses test_getstr
              + getparx				test: movewindow
              + getpary				test: movewindow
              +-getstr				-
              ++getstr				test: test_getstr
              + getwin				test: ncurses
              + halfdelay			test: view
              +-has_colors			test: background bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testcurs view worm xmas
              ++has_colors			test: background bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testcurs view worm xmas
              + has_ic				test: lrtest
              + has_il				lib: ncurses
              + has_key				lib: ncurses
              + hline				test: gdc ncurses
              + hline_set			-
              +-idcok				-
              +-idlok				test: ncurses testscanw view
              +-immedok				-
              +-in_wch				-
              +-in_wchnstr			-
              +-in_wchstr			-
              +-inch				-
              +-inchnstr			-
              +-inchstr				-
              ++idcok				test: test_opaque
              ++idlok				test: ncurses test_opaque testscanw view
              ++immedok				test: test_opaque
              ++in_wch				test: inch_wide
              ++in_wchnstr			test: inch_wide
              ++in_wchstr			test: inch_wide
              ++inch				test: inchs
              ++inchnstr			test: inchs
              ++inchstr				test: inchs
              + init_color			test: ncurses
              +-init_pair			test: background blue bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
              +-initscr				test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus echochar firework firstlast gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
              +-innstr				-
              +-innwstr				-
              ++init_pair			test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
              ++initscr				test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar firework firstlast gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
              ++innstr				test: test_instr
              ++innwstr				test: test_inwstr
              + ins_nwstr			test: ins_wide
              + ins_wch				test: ins_wide
              + ins_wstr			test: ins_wide
              +@@ -337,29 +338,39 @@
              + insertln			-
              + insnstr				test: inserts
              + insstr				test: inserts
              +-instr				-
              ++instr				test: test_instr
              + intrflush			test: demo_forms movewindow
              +-inwstr				-
              ++inwstr				test: test_inwstr
              ++is_cleared			test: test_opaque
              ++is_idcok			test: test_opaque
              ++is_idlok			test: test_opaque
              ++is_immedok			test: test_opaque
              ++is_keypad			test: ncurses test_opaque
              ++is_leaveok			test: test_opaque
              + is_linetouched			lib: form
              ++is_nodelay			test: test_opaque
              ++is_notimeout			test: test_opaque
              ++is_scrollok			test: ncurses test_opaque
              ++is_syncok			test: test_opaque
              + is_term_resized			-
              + is_wintouched			lib: ncurses
              + isendwin			-
              + key_defined			test: demo_defkey foldkeys
              +-key_name			test: ncurses
              ++key_name			test: key_names ncurses
              + keybound			test: demo_altkeys demo_defkey
              + keyname				test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw testcurs view progs: tic
              + keyok				test: demo_keyok foldkeys
              +-keypad				test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field filter firework foldkeys hashtest ins_wide inserts keynames knight lrtest movewindow ncurses redraw tclock testcurs testscanw view
              ++keypad				test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field filter firework foldkeys hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view
              + killchar			lib: ncurses
              + killwchar			-
              +-leaveok				test: hanoi
              ++leaveok				test: hanoi test_opaque
              + longname			test: testcurs progs: tput
              + mcprint				-
              + meta				test: ncurses
              + mouse_trafo			-
              + mouseinterval			-
              +-mousemask			test: bs demo_menus knight movewindow ncurses
              +-move				test: blue bs cardfile chgat demo_altkeys demo_menus echochar foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses testscanw view worm xmas
              ++mousemask			test: bs demo_forms demo_menus knight movewindow ncurses
              ++move				test: blue bs cardfile chgat demo_altkeys demo_menus echochar foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses savescreen test_get_wstr test_getstr test_instr test_inwstr testscanw view worm xmas
              + mvadd_wch			test: ncurses
              + mvadd_wchnstr			-
              + mvadd_wchstr			-
              +@@ -371,112 +382,112 @@
              + mvaddstr			test: bs demo_forms gdc hanoi knight ncurses rain tclock testcurs xmas
              + mvaddwstr			-
              + mvchgat				test: chgat
              +-mvcur				test: redraw
              ++mvcur				test: dots_mvcur redraw
              + mvdelch				-
              + mvderwin			test: movewindow
              + mvget_wch			-
              +-mvget_wstr			-
              ++mvget_wstr			test: test_get_wstr
              + mvgetch				-
              +-mvgetn_wstr			-
              +-mvgetnstr			-
              +-mvgetstr			-
              ++mvgetn_wstr			test: test_get_wstr
              ++mvgetnstr			test: test_getstr
              ++mvgetstr			test: test_getstr
              + mvhline				test: ncurses
              + mvhline_set			test: ncurses
              +-mvin_wch			-
              +-mvin_wchnstr			-
              +-mvin_wchstr			-
              +-mvinch				-
              +-mvinchnstr			test: gdc
              +-mvinchstr			-
              +-mvinnstr			-
              +-mvinnwstr			-
              ++mvin_wch			test: inch_wide
              ++mvin_wchnstr			test: inch_wide
              ++mvin_wchstr			test: inch_wide
              ++mvinch				test: inchs
              ++mvinchnstr			test: gdc inchs
              ++mvinchstr			test: inchs
              ++mvinnstr			test: test_instr
              ++mvinnwstr			test: test_inwstr
              + mvins_nwstr			test: ins_wide
              + mvins_wch			test: ins_wide
              + mvins_wstr			test: ins_wide
              + mvinsch				test: ins_wide inserts
              + mvinsnstr			test: inserts
              + mvinsstr			test: inserts
              +-mvinstr				-
              +-mvinwstr			-
              ++mvinstr				test: test_instr
              ++mvinwstr			test: test_inwstr
              + mvprintw			test: bs demo_menus firework hanoi ncurses tclock view
              + mvscanw				-
              + mvvline				test: ncurses
              + mvvline_set			test: ncurses
              + mvwadd_wch			-
              + mvwadd_wchnstr			lib: form
              +-mvwadd_wchstr			-
              ++mvwadd_wchstr			test: inch_wide
              + mvwaddch			test: movewindow newdemo testcurs xmas
              + mvwaddchnstr			-
              +-mvwaddchstr			-
              ++mvwaddchstr			test: inchs
              + mvwaddnstr			test: newdemo testcurs
              + mvwaddnwstr			-
              +-mvwaddstr			test: firstlast ins_wide inserts knight ncurses newdemo testcurs xmas
              +-mvwaddwstr			-
              ++mvwaddstr			test: firstlast ins_wide inserts knight ncurses newdemo test_instr testcurs xmas
              ++mvwaddwstr			test: test_inwstr
              + mvwchgat			test: chgat
              + mvwdelch			test: ncurses
              + mvwget_wch			-
              +-mvwget_wstr			-
              +-mvwgetch			-
              +-mvwgetn_wstr			-
              +-mvwgetnstr			-
              +-mvwgetstr			-
              ++mvwget_wstr			test: test_get_wstr
              ++mvwgetch			test: inch_wide inchs test_get_wstr test_getstr test_instr test_inwstr test_opaque
              ++mvwgetn_wstr			test: test_get_wstr
              ++mvwgetnstr			test: test_getstr
              ++mvwgetstr			test: test_getstr
              + mvwhline			test: movewindow
              + mvwhline_set			-
              + mvwin				test: cardfile demo_menus movewindow testcurs xmas
              +-mvwin_wch			-
              +-mvwin_wchnstr			lib: form
              +-mvwin_wchstr			-
              +-mvwinch				test: newdemo testcurs
              +-mvwinchnstr			-
              +-mvwinchstr			-
              +-mvwinnstr			test: testcurs
              +-mvwinnwstr			-
              ++mvwin_wch			test: inch_wide
              ++mvwin_wchnstr			test: inch_wide
              ++mvwin_wchstr			test: inch_wide
              ++mvwinch				test: inchs newdemo testcurs
              ++mvwinchnstr			test: inchs
              ++mvwinchstr			test: inchs
              ++mvwinnstr			test: test_instr testcurs
              ++mvwinnwstr			test: test_inwstr
              + mvwins_nwstr			test: ins_wide
              + mvwins_wch			test: ins_wide
              + mvwins_wstr			test: ins_wide
              + mvwinsch			test: ins_wide inserts
              + mvwinsnstr			test: inserts
              + mvwinsstr			test: inserts testcurs
              +-mvwinstr			-
              +-mvwinwstr			-
              +-mvwprintw			test: chgat ncurses testcurs
              ++mvwinstr			test: test_instr
              ++mvwinwstr			test: test_inwstr
              ++mvwprintw			test: chgat demo_panels inch_wide inchs ncurses test_instr test_inwstr testcurs
              + mvwscanw			test: testcurs
              + mvwvline			test: ins_wide inserts movewindow
              + mvwvline_set			-
              +-napms				test: dots echochar firework gdc hanoi lrtest ncurses newdemo railroad rain tclock testcurs view worm xmas progs: tset
              ++napms				test: demo_panels dots dots_mvcur echochar firework gdc hanoi lrtest ncurses railroad rain tclock test_opaque testcurs view worm xmas progs: tset
              + newpad				test: edit_field ncurses testcurs
              + newscr				lib: ncurses
              +-newterm				test: demo_altkeys ditto filter foldkeys gdc keynames
              +-newwin				test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus edit_field firstlast ins_wide inserts knight movewindow ncurses newdemo redraw testcurs xmas
              ++newterm				test: demo_altkeys ditto dots_mvcur filter foldkeys gdc keynames
              ++newwin				test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field firstlast inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs xmas
              + nl				test: demo_forms ncurses rain testcurs
              + nocbreak			test: testcurs
              +-nodelay				test: firework gdc lrtest ncurses newdemo rain tclock view xmas
              +-noecho				test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto firework firstlast foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses rain redraw tclock testcurs view worm xmas
              ++nodelay				test: firework gdc lrtest ncurses newdemo rain tclock test_opaque view xmas
              ++noecho				test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
              + nofilter			-
              + nonl				test: bs demo_forms hashtest movewindow ncurses view worm xmas
              + noqiflush			-
              + noraw				test: demo_forms demo_menus ncurses testcurs
              +-notimeout			-
              +-numcodes			progs: dump_entry
              +-numfnames			progs: dump_entry
              +-numnames			progs: dump_entry infocmp
              ++notimeout			test: test_opaque
              ++numcodes			test: test_arrays progs: dump_entry
              ++numfnames			test: test_arrays progs: dump_entry
              ++numnames			test: test_arrays progs: dump_entry infocmp
              + ospeed				progs: tset
              + overlay				test: ncurses testcurs xmas
              +-overwrite			test: ncurses
              ++overwrite			test: ncurses savescreen
              + pair_content			test: background color_set
              + pecho_wchar			-
              + pechochar			-
              + pnoutrefresh			test: edit_field ncurses
              + prefresh			test: testcurs
              +-printw				test: background blue bs color_set demo_altkeys demo_defkey demo_keyok demo_menus filter foldkeys ncurses testcurs testscanw view
              ++printw				test: background blue bs color_set demo_altkeys demo_defkey demo_keyok demo_menus filter foldkeys ncurses savescreen testcurs testscanw view
              + putp				progs: tput
              + putwin				test: ncurses
              + qiflush				-
              + raw				test: demo_forms ncurses redraw testcurs
              + redrawwin			test: redraw
              +-refresh				test: blue bs demo_defkey demo_forms demo_keyok demo_menus ditto echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses tclock testcurs view worm xmas
              ++refresh				test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view worm xmas
              + reset_prog_mode			test: filter ncurses
              +-reset_shell_mode		test: bs filter
              ++reset_shell_mode		test: bs filter savescreen
              + resetty				-
              + resize_term			test: view
              + resizeterm			lib: ncurses
              +@@ -484,16 +495,16 @@
              + ripoffline			test: demo_menus ncurses
              + savetty				-
              + scanw				test: testcurs testscanw
              +-scr_dump			-
              +-scr_init			-
              +-scr_restore			-
              +-scr_set				-
              +-scrl				-
              ++scr_dump			test: savescreen
              ++scr_init			test: savescreen
              ++scr_restore			test: savescreen
              ++scr_set				test: savescreen
              ++scrl				test: view
              + scroll				test: testcurs
              +-scrollok			test: demo_altkeys demo_defkey demo_keyok ditto foldkeys hashtest knight ncurses redraw testcurs testscanw view
              ++scrollok			test: demo_altkeys demo_defkey demo_keyok demo_panels ditto foldkeys hashtest knight ncurses redraw test_opaque testcurs testscanw view
              + set_curterm			lib: ncurses
              + set_term			test: ditto
              +-setcchar			test: ins_wide ncurses view
              ++setcchar			test: demo_panels ins_wide ncurses view
              + setscrreg			test: view
              + setupterm			test: dots progs: clear tput tset
              + slk_attr			-
              +@@ -515,14 +526,14 @@
              + slk_wset			test: ncurses
              + standend			test: blue gdc ncurses worm
              + standout			test: blue ncurses
              +-start_color			test: background blue bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
              +-stdscr				test: bs chgat demo_altkeys demo_forms demo_menus ditto filter firework foldkeys gdc hanoi hashtest ins_wide inserts keynames knight lrtest movewindow ncurses rain redraw tclock testcurs testscanw view xmas
              +-strcodes			progs: dump_entry
              +-strfnames			progs: dump_entry
              +-strnames			test: foldkeys progs: dump_entry infocmp tic
              ++start_color			test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
              ++stdscr				test: bs chgat demo_altkeys demo_forms demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view xmas
              ++strcodes			test: test_arrays progs: dump_entry
              ++strfnames			test: test_arrays progs: dump_entry
              ++strnames			test: foldkeys test_arrays progs: dump_entry infocmp tic
              + subpad				test: testcurs
              + subwin				test: movewindow ncurses newdemo testcurs
              +-syncok				-
              ++syncok				test: test_opaque
              + term_attrs			test: ncurses
              + termattrs			test: ncurses testcurs
              + termname			test: testcurs
              +@@ -534,11 +545,11 @@
              + tigetflag			progs: tput
              + tigetnum			test: ncurses progs: tput
              + tigetstr			test: blue demo_defkey foldkeys testcurs progs: tput
              +-timeout				test: rain
              ++timeout				test: rain savescreen
              + touchline			test: chgat
              +-touchwin			test: chgat demo_menus edit_field filter firstlast ins_wide inserts movewindow ncurses redraw xmas
              +-tparm				test: dots progs: tic tput
              +-tputs				test: dots railroad progs: clear tset
              ++touchwin			test: chgat demo_menus edit_field filter firstlast inch_wide inchs ins_wide inserts movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
              ++tparm				test: dots dots_mvcur progs: tic tput
              ++tputs				test: dots dots_mvcur railroad progs: clear tset
              + trace				test: demo_menus hanoi hashtest lrtest ncurses testcurs view worm
              + ttytype				lib: ncurses
              + typeahead			test: testcurs
              +@@ -561,58 +572,60 @@
              + vw_scanw			-
              + vwprintw			test: movewindow
              + vwscanw				lib: ncurses
              +-wadd_wch			lib: ncurses
              ++wadd_wch			test: inch_wide
              + wadd_wchnstr			lib: form
              + wadd_wchstr			-
              +-waddch				test: demo_forms firstlast knight ncurses
              ++waddch				test: demo_forms demo_panels firstlast inch_wide inchs knight ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
              + waddchnstr			lib: ncurses
              + waddchstr			-
              + waddnstr			lib: menu
              + waddnwstr			test: ncurses
              +-waddstr				test: chgat demo_forms edit_field firstlast ins_wide knight ncurses redraw testcurs
              +-waddwstr			test: ins_wide
              ++waddstr				test: chgat demo_forms demo_panels edit_field firstlast ins_wide knight ncurses redraw testcurs
              ++waddwstr			test: ins_wide test_get_wstr
              + wattr_get			-
              + wattr_off			lib: ncurses
              + wattr_on			lib: ncurses
              + wattr_set			-
              + wattroff			test: demo_forms ncurses testcurs xmas
              + wattron				test: testcurs xmas
              +-wattrset			test: demo_forms ncurses newdemo testcurs xmas
              ++wattrset			test: demo_forms ncurses newdemo test_get_wstr test_getstr testcurs xmas
              + wbkgd				test: cardfile demo_forms demo_menus ncurses newdemo testcurs
              +-wbkgdset			test: ins_wide inserts ncurses
              ++wbkgdset			test: demo_panels ins_wide inserts ncurses
              + wbkgrnd				lib: ncurses
              + wbkgrndset			lib: ncurses
              + wborder				lib: ncurses
              + wborder_set			lib: ncurses
              +-wchgat				test: chgat view
              +-wclear				test: ncurses testcurs
              +-wclrtobot			test: firstlast ncurses testcurs
              +-wclrtoeol			test: chgat demo_defkey demo_keyok firstlast ins_wide inserts knight ncurses testcurs
              ++wchgat				test: chgat test_get_wstr test_getstr view
              ++wclear				test: ncurses test_opaque testcurs
              ++wclrtobot			test: firstlast inch_wide inchs ncurses test_instr test_inwstr testcurs
              ++wclrtoeol			test: chgat demo_defkey demo_keyok demo_panels firstlast inch_wide inchs ins_wide inserts knight ncurses test_instr test_inwstr testcurs
              + wcolor_set			lib: ncurses
              + wcursyncup			lib: form
              + wdelch				test: ncurses testcurs
              + wdeleteln			test: testcurs
              + wecho_wchar			lib: ncurses
              + wechochar			lib: ncurses
              +-wenclose			lib: menu
              +-werase				test: cardfile demo_forms demo_menus edit_field firstlast knight ncurses newdemo testcurs xmas
              ++wenclose			lib: form
              ++werase				test: cardfile demo_forms demo_menus demo_panels edit_field firstlast knight ncurses newdemo test_get_wstr test_getstr test_opaque testcurs xmas
              + wget_wch			test: ins_wide ncurses
              +-wget_wstr			-
              ++wget_wstr			test: test_get_wstr
              + wgetbkgrnd			lib: ncurses
              +-wgetch				test: cardfile chgat demo_defkey demo_keyok demo_menus edit_field gdc inserts knight movewindow ncurses newdemo redraw testcurs
              +-wgetn_wstr			test: ncurses
              +-wgetnstr			test: ncurses
              +-wgetstr				-
              ++wgetch				test: cardfile chgat demo_defkey demo_keyok demo_menus demo_panels edit_field gdc inserts knight movewindow ncurses newdemo redraw test_opaque testcurs
              ++wgetn_wstr			test: ncurses test_get_wstr
              ++wgetnstr			test: ncurses test_getstr
              ++wgetparent			test: test_opaque
              ++wgetscrreg			test: test_opaque
              ++wgetstr				test: test_getstr
              + whline				test: testcurs
              + whline_set			lib: ncurses
              +-win_wch				lib: form
              +-win_wchnstr			lib: form
              +-win_wchstr			-
              +-winch				test: knight testcurs
              +-winchnstr			lib: ncurses
              +-winchstr			-
              +-winnstr				test: demo_altkeys demo_defkey foldkeys
              +-winnwstr			lib: ncurses
              ++win_wch				test: inch_wide
              ++win_wchnstr			test: inch_wide
              ++win_wchstr			test: inch_wide
              ++winch				test: inchs knight testcurs
              ++winchnstr			test: inchs
              ++winchstr			test: inchs
              ++winnstr				test: demo_altkeys demo_defkey foldkeys test_instr
              ++winnwstr			test: test_inwstr
              + wins_nwstr			test: ins_wide
              + wins_wch			test: ins_wide
              + wins_wstr			test: ins_wide
              +@@ -621,42 +634,42 @@
              + winsertln			test: testcurs
              + winsnstr			test: inserts
              + winsstr				test: inserts
              +-winstr				-
              +-winwstr				lib: ncurses
              +-wmouse_trafo			lib: menu
              +-wmove				test: chgat demo_altkeys demo_defkey demo_keyok demo_menus firstlast foldkeys ins_wide inserts knight movewindow ncurses newdemo redraw testcurs
              +-wnoutrefresh			test: demo_menus edit_field ins_wide inserts knight movewindow ncurses redraw
              +-wprintw				test: chgat demo_defkey demo_forms demo_keyok demo_menus edit_field ins_wide inserts knight movewindow ncurses testcurs
              ++winstr				test: test_instr
              ++winwstr				test: test_inwstr
              ++wmouse_trafo			lib: form
              ++wmove				test: chgat demo_altkeys demo_defkey demo_keyok demo_menus demo_panels firstlast foldkeys inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              ++wnoutrefresh			test: demo_menus edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque
              ++wprintw				test: chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              + wredrawln			test: redraw
              +-wrefresh			test: chgat demo_forms demo_keyok demo_menus edit_field firstlast knight lrtest movewindow ncurses newdemo redraw tclock testcurs view xmas
              ++wrefresh			test: chgat demo_forms demo_keyok demo_menus demo_panels edit_field firstlast knight lrtest movewindow ncurses newdemo redraw savescreen tclock testcurs view xmas
              + wresize				test: cardfile ncurses
              + wscanw				test: testcurs
              +-wscrl				test: ncurses testcurs view
              ++wscrl				test: ncurses testcurs
              + wsetscrreg			test: ncurses testcurs
              +-wstandend			test: xmas
              +-wstandout			test: xmas
              ++wstandend			test: test_opaque xmas
              ++wstandout			test: test_opaque xmas
              + wsyncdown			test: movewindow
              + wsyncup				lib: form
              + wtimeout			test: ncurses
              + wtouchln			lib: ncurses
              +-wunctrl				-
              ++wunctrl				lib: ncurses
              + wvline				test: testcurs
              + wvline_set			lib: ncurses
              + 
              + libpanel:
              + --------
              +-bottom_panel			test: ncurses
              +-del_panel			test: ncurses
              +-hide_panel			test: ncurses
              +-move_panel			test: ncurses
              +-new_panel			test: cardfile ncurses
              +-panel_above			-
              +-panel_below			-
              +-panel_hidden			-
              +-panel_userptr			test: ncurses
              +-panel_window			test: cardfile ncurses
              +-replace_panel			-
              +-set_panel_userptr		test: ncurses
              +-show_panel			test: ncurses
              +-top_panel			test: cardfile ncurses
              +-update_panels			test: cardfile ncurses
              ++bottom_panel			test: demo_panels ncurses
              ++del_panel			test: demo_panels ncurses
              ++hide_panel			test: demo_panels ncurses
              ++move_panel			test: demo_panels ncurses
              ++new_panel			test: cardfile demo_panels ncurses
              ++panel_above			test: demo_panels
              ++panel_below			test: demo_panels
              ++panel_hidden			test: demo_panels
              ++panel_userptr			test: demo_panels ncurses
              ++panel_window			test: cardfile demo_panels ncurses
              ++replace_panel			test: demo_panels
              ++set_panel_userptr		test: demo_panels ncurses
              ++show_panel			test: demo_panels ncurses
              ++top_panel			test: cardfile demo_panels ncurses
              ++update_panels			test: cardfile demo_panels ncurses
              +Index: test/aclocal.m4
              +Prereq:  1.17 
              +--- ncurses-5.6/test/aclocal.m4	2006-12-03 00:10:15.000000000 +0000
              ++++ ncurses-5.6-20071201/test/aclocal.m4	2007-06-09 20:01:31.000000000 +0000
              +@@ -26,7 +26,7 @@
              + dnl authorization.                                                           *
              + dnl***************************************************************************
              + dnl
              +-dnl $Id: aclocal.m4,v 1.17 2006/12/03 00:10:15 tom Exp $
              ++dnl $Id: aclocal.m4,v 1.19 2007/06/09 20:01:31 tom Exp $
              + dnl
              + dnl Author: Thomas E. Dickey
              + dnl
              +@@ -230,6 +230,12 @@
              + fi
              + ])dnl
              + dnl ---------------------------------------------------------------------------
              ++dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
              ++dnl --------------
              ++dnl Allow user to disable a normally-on option.
              ++AC_DEFUN([CF_ARG_DISABLE],
              ++[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
              ++dnl ---------------------------------------------------------------------------
              + dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
              + dnl -------------
              + dnl Allow user to enable a normally-off option.
              +@@ -537,6 +543,43 @@
              + dnl "dirname" is not portable, so we fake it with a shell script.
              + AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
              + dnl ---------------------------------------------------------------------------
              ++dnl CF_DISABLE_ECHO version: 10 updated: 2003/04/17 22:27:11
              ++dnl ---------------
              ++dnl You can always use "make -n" to see the actual options, but it's hard to
              ++dnl pick out/analyze warning messages when the compile-line is long.
              ++dnl
              ++dnl Sets:
              ++dnl	ECHO_LT - symbol to control if libtool is verbose
              ++dnl	ECHO_LD - symbol to prefix "cc -o" lines
              ++dnl	RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
              ++dnl	SHOW_CC - symbol to put before explicit "cc -c" lines
              ++dnl	ECHO_CC - symbol to put before any "cc" line
              ++dnl
              ++AC_DEFUN([CF_DISABLE_ECHO],[
              ++AC_MSG_CHECKING(if you want to see long compiling messages)
              ++CF_ARG_DISABLE(echo,
              ++	[  --disable-echo          display "compiling" commands],
              ++	[
              ++    ECHO_LT='--silent'
              ++    ECHO_LD='@echo linking [$]@;'
              ++    RULE_CC='	@echo compiling [$]<'
              ++    SHOW_CC='	@echo compiling [$]@'
              ++    ECHO_CC='@'
              ++],[
              ++    ECHO_LT=''
              ++    ECHO_LD=''
              ++    RULE_CC='# compiling'
              ++    SHOW_CC='# compiling'
              ++    ECHO_CC=''
              ++])
              ++AC_MSG_RESULT($enableval)
              ++AC_SUBST(ECHO_LT)
              ++AC_SUBST(ECHO_LD)
              ++AC_SUBST(RULE_CC)
              ++AC_SUBST(SHOW_CC)
              ++AC_SUBST(ECHO_CC)
              ++])dnl
              ++dnl ---------------------------------------------------------------------------
              + dnl CF_ENABLE_WARNINGS version: 3 updated: 2003/05/24 14:24:29
              + dnl ------------------
              + dnl Configure-option to enable gcc warnings
              +@@ -606,7 +649,7 @@
              + ])
              + ])dnl
              + dnl ---------------------------------------------------------------------------
              +-dnl CF_FUNC_CURSES_VERSION version: 3 updated: 2003/05/17 22:19:02
              ++dnl CF_FUNC_CURSES_VERSION version: 4 updated: 2007/04/28 09:15:55
              + dnl ----------------------
              + dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.
              + dnl It's a character string "SVR4", not documented.
              +@@ -619,7 +662,7 @@
              + {
              + 	char temp[1024];
              + 	sprintf(temp, "%s\n", curses_version());
              +-	exit(0);
              ++	${cf_cv_main_return-return}(0);
              + }]
              + ,[cf_cv_func_curses_version=yes]
              + ,[cf_cv_func_curses_version=no]
              +@@ -1155,7 +1198,7 @@
              + AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
              + ])dnl
              + dnl ---------------------------------------------------------------------------
              +-dnl CF_NCURSES_VERSION version: 11 updated: 2003/11/06 19:59:57
              ++dnl CF_NCURSES_VERSION version: 12 updated: 2007/04/28 09:15:55
              + dnl ------------------
              + dnl Check for the version of ncurses, to aid in reporting bugs, etc.
              + dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS.  We don't use
              +@@ -1186,7 +1229,7 @@
              + 	make an error
              + # endif
              + #endif
              +-	exit(0);
              ++	${cf_cv_main_return-return}(0);
              + }],[
              + 	cf_cv_ncurses_version=`cat $cf_tempfile`],,[
              + 
              +@@ -1442,6 +1485,41 @@
              + 		-e 's/-[[UD]]$3\(=[[^ 	]]*\)\?[$]//g'`
              + ])dnl
              + dnl ---------------------------------------------------------------------------
              ++dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12
              ++dnl ---------------
              ++dnl signal handler, but there are some gcc depedencies in that recommendation.
              ++dnl Try anyway.
              ++AC_DEFUN([CF_SIG_ATOMIC_T],
              ++[
              ++AC_MSG_CHECKING(for signal global datatype)
              ++AC_CACHE_VAL(cf_cv_sig_atomic_t,[
              ++	for cf_type in \
              ++		"volatile sig_atomic_t" \
              ++		"sig_atomic_t" \
              ++		"int"
              ++	do
              ++	AC_TRY_COMPILE([
              ++#include 
              ++#include 
              ++#include 
              ++
              ++extern $cf_type x;
              ++$cf_type x;
              ++static void handler(int sig)
              ++{
              ++	x = 5;
              ++}],
              ++		[signal(SIGINT, handler);
              ++		 x = 1],
              ++		[cf_cv_sig_atomic_t=$cf_type],
              ++		[cf_cv_sig_atomic_t=no])
              ++		test "$cf_cv_sig_atomic_t" != no && break
              ++	done
              ++	])
              ++AC_MSG_RESULT($cf_cv_sig_atomic_t)
              ++test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t)
              ++])dnl
              ++dnl ---------------------------------------------------------------------------
              + dnl CF_SUBDIR_PATH version: 4 updated: 2006/11/18 17:13:19
              + dnl --------------
              + dnl Construct a search-list for a nonstandard header/lib-file
              +@@ -1630,7 +1708,7 @@
              + 	[cf_cv_curses_dir=no])
              + ])dnl
              + dnl ---------------------------------------------------------------------------
              +-dnl CF_XOPEN_SOURCE version: 24 updated: 2006/04/02 16:41:09
              ++dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38
              + 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,
              +@@ -1664,7 +1742,7 @@
              + irix[[56]].*) #(vi
              + 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
              + 	;;
              +-linux*|gnu*) #(vi
              ++linux*|gnu*|k*bsd*-gnu) #(vi
              + 	CF_GNU_SOURCE
              + 	;;
              + mirbsd*) #(vi
              +Index: test/bs.c
              +Prereq:  1.44 
              +--- ncurses-5.6/test/bs.c	2006-05-20 15:38:52.000000000 +0000
              ++++ ncurses-5.6-20071201/test/bs.c	2007-04-07 17:13:11.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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 @@
              +  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
              +  * v2.1 with ncurses mouse support, September 1995
              +  *
              +- * $Id: bs.c,v 1.44 2006/05/20 15:38:52 tom Exp $
              ++ * $Id: bs.c,v 1.45 2007/04/07 17:13:11 tom Exp $
              +  */
              + 
              + #include 
              +@@ -459,7 +459,7 @@
              + 	do {
              + 	    c = getch();
              + 	} while
              +-	    (!strchr("hjklrR", c) || c == FF);
              ++	    (!(strchr("hjklrR", c) || c == FF));
              + 
              + 	if (c == FF) {
              + 	    (void) clearok(stdscr, TRUE);
              +Index: test/cardfile.c
              +Prereq:  1.28 
              +--- ncurses-5.6/test/cardfile.c	2006-12-10 00:30:09.000000000 +0000
              ++++ ncurses-5.6-20071201/test/cardfile.c	2007-08-11 16:34:27.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1999-2004,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1999-2006,2007 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            *
              +@@ -29,7 +29,7 @@
              + /*
              +  * Author: Thomas E. Dickey
              +  *
              +- * $Id: cardfile.c,v 1.28 2006/12/10 00:30:09 tom Exp $
              ++ * $Id: cardfile.c,v 1.32 2007/08/11 16:34:27 tom Exp $
              +  *
              +  * File format: text beginning in column 1 is a title; other text is content.
              +  */
              +@@ -71,7 +71,7 @@
              + #if !HAVE_STRDUP
              + #define strdup my_strdup
              + static char *
              +-strdup(char *s)
              ++strdup(const char *s)
              + {
              +     char *p = (char *) malloc(strlen(s) + 1);
              +     if (p)
              +@@ -136,13 +136,15 @@
              + 	if ((offset = strlen(card->content)) != 0) {
              + 	    total += 1 + offset;
              + 	    card->content = (char *) realloc(card->content, total + 1);
              +-	    strcpy(card->content + offset++, " ");
              ++	    if (card->content)
              ++		strcpy(card->content + offset++, " ");
              + 	} else {
              + 	    if (card->content != 0)
              + 		free(card->content);
              + 	    card->content = (char *) malloc(total + 1);
              + 	}
              +-	strcpy(card->content + offset, content);
              ++	if (card->content)
              ++	    strcpy(card->content + offset, content);
              +     }
              + }
              + 
              +@@ -306,8 +308,8 @@
              + 	return (MY_CTRL_N);
              +     case CTRL('P'):
              + 	return (MY_CTRL_P);
              +-    case CTRL('Q'):
              +-    case 033:
              ++    case QUIT:
              ++    case ESCAPE:
              + 	return (MY_CTRL_Q);
              + 
              +     case KEY_BACKSPACE:
              +@@ -568,7 +570,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((n = getopt(argc, argv, "c")) != EOF) {
              ++    while ((n = getopt(argc, argv, "c")) != -1) {
              + 	switch (n) {
              + 	case 'c':
              + 	    try_color = TRUE;
              +Index: test/chgat.c
              +Prereq:  1.5 
              +--- ncurses-5.6/test/chgat.c	2006-07-15 22:48:27.000000000 +0000
              ++++ ncurses-5.6-20071201/test/chgat.c	2007-06-30 17:52:17.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: chgat.c,v 1.5 2006/07/15 22:48:27 tom Exp $
              ++ * $Id: chgat.c,v 1.7 2007/06/30 17:52:17 tom Exp $
              +  *
              +  * test-driver for chgat/wchgat/mvchgat/mvwchgat
              +  */
              +@@ -47,25 +47,26 @@
              + typedef struct {
              +     unsigned c;
              +     unsigned v;
              +-    int pair, attr;
              ++    int pair;
              ++    unsigned attr;
              +     int count;
              +     int ch;
              +-    char *c_msg;
              +-    char *v_msg;
              ++    const char *c_msg;
              ++    const char *v_msg;
              +     int y_val;
              +     int x_val;
              +     int y_beg, x_beg;
              +     int y_max, x_max;
              + } STATUS;
              + 
              +-static char *
              ++static const char *
              + color_params(unsigned state, int *pair)
              + {
              +     /* *INDENT-OFF* */
              +     static struct {
              + 	int pair;
              + 	int fg, bg;
              +-	char *msg;
              ++	const char *msg;
              +     } table[] = {
              + 	{ 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
              + 	{ 1, COLOR_RED,     COLOR_BLACK,   "red/black" },
              +@@ -74,7 +75,7 @@
              +     /* *INDENT-ON* */
              + 
              +     static bool first = TRUE;
              +-    char *result = 0;
              ++    const char *result = 0;
              + 
              +     if (has_colors()) {
              + 	if (first) {
              +@@ -93,13 +94,13 @@
              +     return result;
              + }
              + 
              +-static char *
              +-video_params(unsigned state, int *attr)
              ++static const char *
              ++video_params(unsigned state, unsigned *attr)
              + {
              +     /* *INDENT-OFF* */
              +     static struct {
              +-	int attr;
              +-	char *msg;
              ++	unsigned attr;
              ++	const char *msg;
              +     } table[] = {
              + 	{ A_NORMAL,	"normal" },
              + 	{ A_BOLD,	"bold" },
              +@@ -109,7 +110,7 @@
              +     };
              +     /* *INDENT-ON* */
              + 
              +-    char *result = 0;
              ++    const char *result = 0;
              + 
              +     if (state < SIZEOF(table)) {
              + 	*attr = table[state].attr;
              +Index: test/configure
              +--- ncurses-5.6/test/configure	2006-12-03 00:10:59.000000000 +0000
              ++++ ncurses-5.6-20071201/test/configure	2007-06-09 20:03:09.000000000 +0000
              +@@ -183,6 +183,7 @@
              + EOF
              + cat <<\EOF
              + --enable and --with options recognized:
              ++  --disable-echo          display "compiling" commands
              +   --enable-warnings       test: turn on gcc compiler warnings
              +   --with-curses-dir=DIR   directory in which (n)curses is installed
              +   --with-5lib             use SunOS sysv-libraries
              +@@ -535,7 +536,7 @@
              + # Uses ac_ vars as temps to allow command line to override cache and checks.
              + # --without-x overrides everything else, but does not touch the cache.
              + echo $ac_n "checking for X""... $ac_c" 1>&6
              +-echo "configure:539: checking for X" >&5
              ++echo "configure:540: checking for X" >&5
              + 
              + 
              + # Check whether --with-x or --without-x was given.
              +@@ -598,12 +599,12 @@
              + 
              +   # First, try using that file with no special directory specified.
              + cat > conftest.$ac_ext <
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   rm -rf conftest*
              +@@ -672,14 +673,14 @@
              +   ac_save_LIBS="$LIBS"
              +   LIBS="-l$x_direct_test_library $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   LIBS="$ac_save_LIBS"
              + # We can link X programs with no special library path.
              +@@ -802,7 +803,7 @@
              + fi
              + 
              + echo $ac_n "checking host system type""... $ac_c" 1>&6
              +-echo "configure:806: checking host system type" >&5
              ++echo "configure:807: checking host system type" >&5
              + 
              + host_alias=$host
              + case "$host_alias" in
              +@@ -850,7 +851,7 @@
              + 
              + 
              + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
              +-echo "configure:854: checking whether ${MAKE-make} sets \${MAKE}" >&5
              ++echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
              + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -879,7 +880,7 @@
              + # Extract the first word of "gcc", so it can be a program name with args.
              + set dummy gcc; ac_word=$2
              + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              +-echo "configure:883: checking for $ac_word" >&5
              ++echo "configure:884: checking for $ac_word" >&5
              + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -909,7 +910,7 @@
              +   # Extract the first word of "cc", so it can be a program name with args.
              + set dummy cc; ac_word=$2
              + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              +-echo "configure:913: checking for $ac_word" >&5
              ++echo "configure:914: checking for $ac_word" >&5
              + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -960,7 +961,7 @@
              +       # Extract the first word of "cl", so it can be a program name with args.
              + set dummy cl; ac_word=$2
              + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              +-echo "configure:964: checking for $ac_word" >&5
              ++echo "configure:965: checking for $ac_word" >&5
              + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -992,7 +993,7 @@
              + fi
              + 
              + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
              +-echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
              ++echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
              + 
              + ac_ext=c
              + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
              +@@ -1003,12 +1004,12 @@
              + 
              + cat > conftest.$ac_ext << EOF
              + 
              +-#line 1007 "configure"
              ++#line 1008 "configure"
              + #include "confdefs.h"
              + 
              + main(){return(0);}
              + EOF
              +-if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   ac_cv_prog_cc_works=yes
              +   # If we can't run a trivial program, we are probably using a cross compiler.
              +   if (./conftest; exit) 2>/dev/null; then
              +@@ -1034,12 +1035,12 @@
              +   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
              + fi
              + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
              +-echo "configure:1038: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
              ++echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
              + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
              + cross_compiling=$ac_cv_prog_cc_cross
              + 
              + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
              +-echo "configure:1043: checking whether we are using GNU C" >&5
              ++echo "configure:1044: checking whether we are using GNU C" >&5
              + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -1048,7 +1049,7 @@
              +   yes;
              + #endif
              + EOF
              +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
              ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
              +   ac_cv_prog_gcc=yes
              + else
              +   ac_cv_prog_gcc=no
              +@@ -1067,7 +1068,7 @@
              + ac_save_CFLAGS="$CFLAGS"
              + CFLAGS=
              + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
              +-echo "configure:1071: checking whether ${CC-cc} accepts -g" >&5
              ++echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
              + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -1099,7 +1100,7 @@
              + fi
              + 
              + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
              +-echo "configure:1103: checking how to run the C preprocessor" >&5
              ++echo "configure:1104: checking how to run the C preprocessor" >&5
              + # On Suns, sometimes $CPP names a directory.
              + if test -n "$CPP" && test -d "$CPP"; then
              +   CPP=
              +@@ -1114,13 +1115,13 @@
              +   # On the NeXT, cc -E runs the code through the compiler's parser,
              +   # not just through cpp.
              +   cat > conftest.$ac_ext <
              + Syntax Error
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   :
              +@@ -1131,13 +1132,13 @@
              +   rm -rf conftest*
              +   CPP="${CC-cc} -E -traditional-cpp"
              +   cat > conftest.$ac_ext <
              + Syntax Error
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   :
              +@@ -1148,13 +1149,13 @@
              +   rm -rf conftest*
              +   CPP="${CC-cc} -nologo -E"
              +   cat > conftest.$ac_ext <
              + Syntax Error
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:1158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   :
              +@@ -1183,7 +1184,7 @@
              + # Extract the first word of "$ac_prog", so it can be a program name with args.
              + set dummy $ac_prog; ac_word=$2
              + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              +-echo "configure:1187: checking for $ac_word" >&5
              ++echo "configure:1188: checking for $ac_word" >&5
              + if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -1219,15 +1220,15 @@
              + DFT_DEP_SUFFIX=""			
              + DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`	
              + DFT_UPR_MODEL="NORMAL"			
              +-ECHO_LINK='@ echo linking $@ ... ;'	
              + LD="ld"					
              + LDFLAGS_SHARED=""			
              ++LDFLAGS_STATIC=""			
              + LD_MODEL=""				
              + LD_SHARED_OPTS=""			
              + LIBTOOL=""				
              + LIB_CLEAN=""				
              + LIB_COMPILE=""				
              +-LIB_LINK=""				
              ++LIB_LINK='${CC}'			
              + LINK_TESTS=""				
              + LINT=lint				
              + LINT_OPTS=""				
              +@@ -1243,12 +1244,12 @@
              + cf_cv_libtype=
              + 
              + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
              +-echo "configure:1247: checking for Cygwin environment" >&5
              ++echo "configure:1248: checking for Cygwin environment" >&5
              + if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   ac_cv_cygwin=yes
              + else
              +@@ -1276,19 +1277,19 @@
              + CYGWIN=
              + test "$ac_cv_cygwin" = yes && CYGWIN=yes
              + echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
              +-echo "configure:1280: checking for mingw32 environment" >&5
              ++echo "configure:1281: checking for mingw32 environment" >&5
              + if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   ac_cv_mingw32=yes
              + else
              +@@ -1307,7 +1308,7 @@
              + 
              + 
              + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
              +-echo "configure:1311: checking for executable suffix" >&5
              ++echo "configure:1312: checking for executable suffix" >&5
              + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -1317,7 +1318,7 @@
              +   rm -f conftest*
              +   echo 'int main () { return 0; }' > conftest.$ac_ext
              +   ac_cv_exeext=
              +-  if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
              ++  if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
              +     for file in conftest.*; do
              +       case $file in
              +       *.c | *.o | *.obj) ;;
              +@@ -1338,13 +1339,13 @@
              + ac_exeext=$EXEEXT
              + 
              + echo $ac_n "checking for object suffix""... $ac_c" 1>&6
              +-echo "configure:1342: checking for object suffix" >&5
              ++echo "configure:1343: checking for object suffix" >&5
              + if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   rm -f conftest*
              + echo 'int i = 1;' > conftest.$ac_ext
              +-if { (eval echo configure:1348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   for ac_file in conftest.*; do
              +     case $ac_file in
              +     *.c) ;;
              +@@ -1364,7 +1365,7 @@
              + 
              + 
              + echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
              +-echo "configure:1368: checking for ${CC-cc} option to accept ANSI C" >&5
              ++echo "configure:1369: checking for ${CC-cc} option to accept ANSI C" >&5
              + if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -1460,7 +1461,7 @@
              + 
              + 
              + 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_ansi_cc="$cf_arg"; break
              + else
              +@@ -1584,175 +1585,6 @@
              + fi
              + 
              + 
              +-
              +-GCC_VERSION=none
              +-if test "$GCC" = yes ; then
              +-	echo $ac_n "checking version of $CC""... $ac_c" 1>&6
              +-echo "configure:1592: checking version of $CC" >&5
              +-	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
              +-	test -z "$GCC_VERSION" && GCC_VERSION=unknown
              +-	echo "$ac_t""$GCC_VERSION" 1>&6
              +-fi
              +-
              +-
              +-if ( test "$GCC" = yes || test "$GXX" = yes )
              +-then
              +-echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
              +-echo "configure:1602: checking if you want to turn on gcc warnings" >&5
              +-
              +-# Check whether --enable-warnings or --disable-warnings was given.
              +-if test "${enable_warnings+set}" = set; then
              +-  enableval="$enable_warnings"
              +-  test "$enableval" != yes && enableval=no
              +-  if test "$enableval" != "no" ; then
              +-    with_warnings=yes 
              +-  else
              +-    with_warnings=no
              +-  fi
              +-else
              +-  enableval=no 
              +-  with_warnings=no
              +-  
              +-fi
              +-
              +-echo "$ac_t""$with_warnings" 1>&6
              +-if test "$with_warnings" = "yes"
              +-then
              +-	
              +-
              +-
              +-INTEL_COMPILER=no
              +-
              +-if test "$GCC" = yes ; then
              +-	case $host_os in
              +-	linux*|gnu*)
              +-		echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
              +-echo "configure:1631: checking if this is really Intel C compiler" >&5
              +-		cf_save_CFLAGS="$CFLAGS"
              +-		CFLAGS="$CFLAGS -no-gcc"
              +-		cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +-  rm -rf conftest*
              +-  INTEL_COMPILER=yes
              +-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
              +-
              +-else
              +-  echo "configure: failed program was:" >&5
              +-  cat conftest.$ac_ext >&5
              +-fi
              +-rm -f conftest*
              +-		CFLAGS="$cf_save_CFLAGS"
              +-		echo "$ac_t""$INTEL_COMPILER" 1>&6
              +-		;;
              +-	esac
              +-fi
              +-
              +-
              +-cat > conftest.$ac_ext <&6
              +-echo "configure:1684: checking for $CC warning options" >&5
              +-	cf_save_CFLAGS="$CFLAGS"
              +-	EXTRA_CFLAGS="-Wall"
              +-	for cf_opt in  \
              +-		wd1419 \
              +-		wd1682 \
              +-		wd1683 \
              +-		wd1684 \
              +-		wd193 \
              +-		wd279 \
              +-		wd593 \
              +-		wd810 \
              +-		wd869 \
              +-		wd981
              +-	do
              +-		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              +-		if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +-			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              +-			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              +-		fi
              +-	done
              +-	CFLAGS="$cf_save_CFLAGS"
              +-
              +-elif test "$GCC" = yes
              +-then
              +-	echo "checking for $CC warning options" 1>&6
              +-echo "configure:1710: checking for $CC warning options" >&5
              +-	cf_save_CFLAGS="$CFLAGS"
              +-	EXTRA_CFLAGS="-W -Wall"
              +-	cf_warn_CONST=""
              +-	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
              +-	for cf_opt in \
              +-		Wbad-function-cast \
              +-		Wcast-align \
              +-		Wcast-qual \
              +-		Winline \
              +-		Wmissing-declarations \
              +-		Wmissing-prototypes \
              +-		Wnested-externs \
              +-		Wpointer-arith \
              +-		Wshadow \
              +-		Wstrict-prototypes \
              +-		Wundef $cf_warn_CONST 
              +-	do
              +-		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              +-		if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +-			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              +-			case $cf_opt in #(vi
              +-			Wcast-qual) #(vi
              +-				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
              +-				;;
              +-			Winline) #(vi
              +-				case $GCC_VERSION in
              +-				3.3*)
              +-					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
              +-
              +-					continue;;
              +-				esac
              +-				;;
              +-			esac
              +-			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              +-		fi
              +-	done
              +-	CFLAGS="$cf_save_CFLAGS"
              +-fi
              +-rm -f conftest*
              +-
              +-
              +-
              +-fi
              +-fi
              +-
              +-
              + if test "$GCC" = yes
              + then
              + cat > conftest.i <&6
              +-echo "configure:1776: checking for $CC __attribute__ directives" >&5
              ++echo "configure:1608: checking for $CC __attribute__ directives" >&5
              + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++		if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              + 			test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
              + 			cat conftest.h >>confdefs.h
              + 		fi
              +@@ -1825,7 +1657,7 @@
              + 
              + 
              + echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
              +-echo "configure:1829: checking if $CC -U and -D options work together" >&5
              ++echo "configure:1661: checking if $CC -U and -D options work together" >&5
              + if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -1833,7 +1665,7 @@
              + 	cf_save_CPPFLAGS="$CPPFLAGS"
              + 	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
              + 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   
              + 	cf_cv_cc_u_d_options=yes
              +@@ -1890,16 +1722,16 @@
              + irix[56].*) #(vi
              + 	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
              + 	;;
              +-linux*|gnu*) #(vi
              ++linux*|gnu*|k*bsd*-gnu) #(vi
              + 	
              + echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
              +-echo "configure:1897: checking if we must define _GNU_SOURCE" >&5
              ++echo "configure:1729: checking if we must define _GNU_SOURCE" >&5
              + if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   
              + cat > conftest.$ac_ext <
              + int main() {
              +@@ -1909,7 +1741,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:1913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_gnu_source=no
              + else
              +@@ -1919,7 +1751,7 @@
              +   cf_save="$CPPFLAGS"
              + 	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
              + 	 cat > conftest.$ac_ext <
              + int main() {
              +@@ -1929,7 +1761,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_gnu_source=no
              + else
              +@@ -1973,13 +1805,13 @@
              + 	;;
              + *)
              + 	echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
              +-echo "configure:1977: checking if we should define _XOPEN_SOURCE" >&5
              ++echo "configure:1809: checking if we should define _XOPEN_SOURCE" >&5
              + if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   
              + 	cat > conftest.$ac_ext <
              + int main() {
              +@@ -1989,7 +1821,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_xopen_source=no
              + else
              +@@ -1999,7 +1831,7 @@
              +   cf_save="$CPPFLAGS"
              + 	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
              + 	 cat > conftest.$ac_ext <
              + int main() {
              +@@ -2009,7 +1841,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_xopen_source=no
              + else
              +@@ -2064,16 +1896,16 @@
              + 
              + 
              + echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
              +-echo "configure:2068: checking if we should define _POSIX_C_SOURCE" >&5
              ++echo "configure:1900: checking if we should define _POSIX_C_SOURCE" >&5
              + if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   
              + 	
              +-echo "(line 2074) testing if the symbol is already defined go no further ..." 1>&5
              ++echo "(line 1906) testing if the symbol is already defined go no further ..." 1>&5
              + 
              + 	cat > conftest.$ac_ext <
              + int main() {
              +@@ -2083,7 +1915,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_posix_c_source=no
              + else
              +@@ -2105,7 +1937,7 @@
              + 	 esac
              + 	 if test "$cf_want_posix_source" = yes ; then
              + 		cat > conftest.$ac_ext <
              + int main() {
              +@@ -2115,7 +1947,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -2126,15 +1958,15 @@
              + rm -f conftest*
              + 	 fi
              + 	 
              +-echo "(line 2130) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
              ++echo "(line 1962) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
              + 
              + 	 CFLAGS="$cf_trim_CFLAGS"
              + 	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
              + 	 
              +-echo "(line 2135) testing if the second compile does not leave our definition intact error ..." 1>&5
              ++echo "(line 1967) testing if the second compile does not leave our definition intact error ..." 1>&5
              + 
              + 	 cat > conftest.$ac_ext <
              + int main() {
              +@@ -2144,7 +1976,7 @@
              + #endif
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -2178,6 +2010,347 @@
              + 	;;
              + esac
              + 
              ++echo $ac_n "checking for working const""... $ac_c" 1>&6
              ++echo "configure:2015: checking for working const" >&5
              ++if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
              ++  echo $ac_n "(cached) $ac_c" 1>&6
              ++else
              ++  cat > conftest.$ac_ext <j = 5;
              ++}
              ++{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
              ++  const int foo = 10;
              ++}
              ++
              ++; return 0; }
              ++EOF
              ++if { (eval echo configure:2069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++  rm -rf conftest*
              ++  ac_cv_c_const=yes
              ++else
              ++  echo "configure: failed program was:" >&5
              ++  cat conftest.$ac_ext >&5
              ++  rm -rf conftest*
              ++  ac_cv_c_const=no
              ++fi
              ++rm -f conftest*
              ++fi
              ++
              ++echo "$ac_t""$ac_cv_c_const" 1>&6
              ++if test $ac_cv_c_const = no; then
              ++  cat >> confdefs.h <<\EOF
              ++#define const 
              ++EOF
              ++
              ++fi
              ++
              ++
              ++echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
              ++echo "configure:2091: checking for signal global datatype" >&5
              ++if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
              ++  echo $ac_n "(cached) $ac_c" 1>&6
              ++else
              ++  
              ++	for cf_type in \
              ++		"volatile sig_atomic_t" \
              ++		"sig_atomic_t" \
              ++		"int"
              ++	do
              ++	cat > conftest.$ac_ext <
              ++#include 
              ++#include 
              ++
              ++extern $cf_type x;
              ++$cf_type x;
              ++static void handler(int sig)
              ++{
              ++	x = 5;
              ++}
              ++int main() {
              ++signal(SIGINT, handler);
              ++		 x = 1
              ++; return 0; }
              ++EOF
              ++if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++  rm -rf conftest*
              ++  cf_cv_sig_atomic_t=$cf_type
              ++else
              ++  echo "configure: failed program was:" >&5
              ++  cat conftest.$ac_ext >&5
              ++  rm -rf conftest*
              ++  cf_cv_sig_atomic_t=no
              ++fi
              ++rm -f conftest*
              ++		test "$cf_cv_sig_atomic_t" != no && break
              ++	done
              ++	
              ++fi
              ++
              ++echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
              ++test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <&6
              ++echo "configure:2144: checking if you want to see long compiling messages" >&5
              ++
              ++# Check whether --enable-echo or --disable-echo was given.
              ++if test "${enable_echo+set}" = set; then
              ++  enableval="$enable_echo"
              ++  test "$enableval" != no && enableval=yes
              ++  if test "$enableval" != "yes" ; then
              ++    
              ++    ECHO_LT='--silent'
              ++    ECHO_LD='@echo linking $@;'
              ++    RULE_CC='	@echo compiling $<'
              ++    SHOW_CC='	@echo compiling $@'
              ++    ECHO_CC='@'
              ++ 
              ++  else
              ++    
              ++    ECHO_LT=''
              ++    ECHO_LD=''
              ++    RULE_CC='# compiling'
              ++    SHOW_CC='# compiling'
              ++    ECHO_CC=''
              ++
              ++  fi
              ++else
              ++  enableval=yes 
              ++  
              ++    ECHO_LT=''
              ++    ECHO_LD=''
              ++    RULE_CC='# compiling'
              ++    SHOW_CC='# compiling'
              ++    ECHO_CC=''
              ++
              ++  
              ++fi
              ++
              ++echo "$ac_t""$enableval" 1>&6
              ++
              ++
              ++
              ++
              ++
              ++
              ++
              ++
              ++GCC_VERSION=none
              ++if test "$GCC" = yes ; then
              ++	echo $ac_n "checking version of $CC""... $ac_c" 1>&6
              ++echo "configure:2191: checking version of $CC" >&5
              ++	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
              ++	test -z "$GCC_VERSION" && GCC_VERSION=unknown
              ++	echo "$ac_t""$GCC_VERSION" 1>&6
              ++fi
              ++
              ++
              ++if ( test "$GCC" = yes || test "$GXX" = yes )
              ++then
              ++echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
              ++echo "configure:2201: checking if you want to turn on gcc warnings" >&5
              ++
              ++# Check whether --enable-warnings or --disable-warnings was given.
              ++if test "${enable_warnings+set}" = set; then
              ++  enableval="$enable_warnings"
              ++  test "$enableval" != yes && enableval=no
              ++  if test "$enableval" != "no" ; then
              ++    with_warnings=yes 
              ++  else
              ++    with_warnings=no
              ++  fi
              ++else
              ++  enableval=no 
              ++  with_warnings=no
              ++  
              ++fi
              ++
              ++echo "$ac_t""$with_warnings" 1>&6
              ++if test "$with_warnings" = "yes"
              ++then
              ++	
              ++
              ++
              ++INTEL_COMPILER=no
              ++
              ++if test "$GCC" = yes ; then
              ++	case $host_os in
              ++	linux*|gnu*)
              ++		echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
              ++echo "configure:2230: checking if this is really Intel C compiler" >&5
              ++		cf_save_CFLAGS="$CFLAGS"
              ++		CFLAGS="$CFLAGS -no-gcc"
              ++		cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++  rm -rf conftest*
              ++  INTEL_COMPILER=yes
              ++cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
              ++
              ++else
              ++  echo "configure: failed program was:" >&5
              ++  cat conftest.$ac_ext >&5
              ++fi
              ++rm -f conftest*
              ++		CFLAGS="$cf_save_CFLAGS"
              ++		echo "$ac_t""$INTEL_COMPILER" 1>&6
              ++		;;
              ++	esac
              ++fi
              ++
              ++
              ++cat > conftest.$ac_ext <&6
              ++echo "configure:2283: checking for $CC warning options" >&5
              ++	cf_save_CFLAGS="$CFLAGS"
              ++	EXTRA_CFLAGS="-Wall"
              ++	for cf_opt in  \
              ++		wd1419 \
              ++		wd1682 \
              ++		wd1683 \
              ++		wd1684 \
              ++		wd193 \
              ++		wd279 \
              ++		wd593 \
              ++		wd810 \
              ++		wd869 \
              ++		wd981
              ++	do
              ++		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              ++		if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              ++			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              ++		fi
              ++	done
              ++	CFLAGS="$cf_save_CFLAGS"
              ++
              ++elif test "$GCC" = yes
              ++then
              ++	echo "checking for $CC warning options" 1>&6
              ++echo "configure:2309: checking for $CC warning options" >&5
              ++	cf_save_CFLAGS="$CFLAGS"
              ++	EXTRA_CFLAGS="-W -Wall"
              ++	cf_warn_CONST=""
              ++	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
              ++	for cf_opt in \
              ++		Wbad-function-cast \
              ++		Wcast-align \
              ++		Wcast-qual \
              ++		Winline \
              ++		Wmissing-declarations \
              ++		Wmissing-prototypes \
              ++		Wnested-externs \
              ++		Wpointer-arith \
              ++		Wshadow \
              ++		Wstrict-prototypes \
              ++		Wundef $cf_warn_CONST 
              ++	do
              ++		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              ++		if { (eval echo configure:2328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              ++			case $cf_opt in #(vi
              ++			Wcast-qual) #(vi
              ++				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
              ++				;;
              ++			Winline) #(vi
              ++				case $GCC_VERSION in
              ++				3.3*)
              ++					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
              ++
              ++					continue;;
              ++				esac
              ++				;;
              ++			esac
              ++			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              ++		fi
              ++	done
              ++	CFLAGS="$cf_save_CFLAGS"
              ++fi
              ++rm -f conftest*
              ++
              ++
              ++
              ++fi
              ++fi
              ++
              + 
              + 
              + 
              +@@ -2263,7 +2436,7 @@
              + 	
              + 
              + echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
              +-echo "configure:2267: checking for extra include directories" >&5
              ++echo "configure:2440: checking for extra include directories" >&5
              + if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -2288,7 +2461,7 @@
              + 
              + 
              + echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
              +-echo "configure:2292: checking if we have identified curses headers" >&5
              ++echo "configure:2465: checking if we have identified curses headers" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -2301,14 +2474,14 @@
              + 	ncurses/ncurses.h
              + do
              + cat > conftest.$ac_ext <
              + int main() {
              + initscr(); tgoto("?", 0,0)
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:2485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_ncurses_header=$cf_header; break
              + else
              +@@ -2331,17 +2504,17 @@
              + do
              + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
              + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
              +-echo "configure:2335: checking for $ac_hdr" >&5
              ++echo "configure:2508: checking for $ac_hdr" >&5
              + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   rm -rf conftest*
              +@@ -2370,7 +2543,7 @@
              + 
              + 
              + echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
              +-echo "configure:2374: checking for terminfo header" >&5
              ++echo "configure:2547: checking for terminfo header" >&5
              + if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -2387,7 +2560,7 @@
              + for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
              + do
              + cat > conftest.$ac_ext <
              + #include <${cf_cv_ncurses_header-curses.h}>
              +@@ -2397,7 +2570,7 @@
              + int x = auto_left_margin
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   
              + 	cf_cv_term_header="$cf_test"
              +@@ -2446,7 +2619,7 @@
              + 
              + 	
              + echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
              +-echo "configure:2450: checking for ncurses version" >&5
              ++echo "configure:2623: checking for ncurses version" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -2472,7 +2645,7 @@
              + #endif
              + EOF
              + 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
              +-	{ (eval echo configure:2476: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              ++	{ (eval echo configure:2649: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              + 	if test -f conftest.out ; then
              + 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
              + 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
              +@@ -2481,7 +2654,7 @@
              + 
              + else
              +   cat > conftest.$ac_ext <
              +@@ -2502,10 +2675,10 @@
              + 	make an error
              + # endif
              + #endif
              +-	exit(0);
              ++	${cf_cv_main_return-return}(0);
              + }
              + EOF
              +-if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              ++if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              + then
              +   
              + 	cf_cv_ncurses_version=`cat $cf_tempfile`
              +@@ -2529,16 +2702,16 @@
              + 	
              + 
              + echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
              +-echo "configure:2533: checking if we have identified curses libraries" >&5
              ++echo "configure:2706: checking if we have identified curses libraries" >&5
              + cat > conftest.$ac_ext <
              + int main() {
              + initscr(); tgoto("?", 0,0)
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -2554,7 +2727,7 @@
              + case $host_os in #(vi
              + freebsd*) #(vi
              + 	echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
              +-echo "configure:2558: checking for tgoto in -lmytinfo" >&5
              ++echo "configure:2731: checking for tgoto in -lmytinfo" >&5
              + ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -2562,7 +2735,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lmytinfo  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -2596,7 +2769,7 @@
              + 	;;
              + hpux10.*) #(vi
              + 	echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
              +-echo "configure:2600: checking for initscr in -lcur_colr" >&5
              ++echo "configure:2773: checking for initscr in -lcur_colr" >&5
              + ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -2604,7 +2777,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lcur_colr  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -2638,7 +2811,7 @@
              +   echo "$ac_t""no" 1>&6
              + 
              + 	echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
              +-echo "configure:2642: checking for initscr in -lHcurses" >&5
              ++echo "configure:2815: checking for initscr in -lHcurses" >&5
              + ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -2646,7 +2819,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lHcurses  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -2710,12 +2883,12 @@
              + 	# Check for library containing tgoto.  Do this before curses library
              + 	# because it may be needed to link the test-case for initscr.
              + 	echo $ac_n "checking for tgoto""... $ac_c" 1>&6
              +-echo "configure:2714: checking for tgoto" >&5
              ++echo "configure:2887: checking for tgoto" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_tgoto=yes"
              + else
              +@@ -2759,7 +2932,7 @@
              + 		for cf_term_lib in $cf_check_list termcap termlib unknown
              + 		do
              + 			echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
              +-echo "configure:2763: checking for tgoto in -l$cf_term_lib" >&5
              ++echo "configure:2936: checking for tgoto in -l$cf_term_lib" >&5
              + ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -2767,7 +2940,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-l$cf_term_lib  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -2808,7 +2981,7 @@
              + 	for cf_curs_lib in $cf_check_list xcurses jcurses unknown
              + 	do
              + 		echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
              +-echo "configure:2812: checking for initscr in -l$cf_curs_lib" >&5
              ++echo "configure:2985: checking for initscr in -l$cf_curs_lib" >&5
              + ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -2816,7 +2989,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-l$cf_curs_lib  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -2853,16 +3026,16 @@
              + 	LIBS="-l$cf_curs_lib $cf_save_LIBS"
              + 	if test "$cf_term_lib" = unknown ; then
              + 		echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
              +-echo "configure:2857: checking if we can link with $cf_curs_lib library" >&5
              ++echo "configure:3030: checking if we can link with $cf_curs_lib library" >&5
              + 		cat > conftest.$ac_ext <
              + int main() {
              + initscr()
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -2878,16 +3051,16 @@
              + 		:
              + 	elif test "$cf_term_lib" != predefined ; then
              + 		echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
              +-echo "configure:2882: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
              ++echo "configure:3055: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
              + 		cat > conftest.$ac_ext <
              + int main() {
              + initscr(); tgoto((char *)0, 0, 0);
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_result=no
              + else
              +@@ -2897,14 +3070,14 @@
              +   
              + 			LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
              + 			cat > conftest.$ac_ext <
              + int main() {
              + initscr()
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -2934,7 +3107,7 @@
              + CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
              + 
              + echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
              +-echo "configure:2938: checking for $cf_ncuhdr_root header in include-path" >&5
              ++echo "configure:3111: checking for $cf_ncuhdr_root header in include-path" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -2945,7 +3118,7 @@
              + 	do
              + 		
              + 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_ncurses_h=$cf_header
              + 	
              +@@ -2992,7 +3165,7 @@
              + else
              + 
              + echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
              +-echo "configure:2996: checking for $cf_ncuhdr_root include-path" >&5
              ++echo "configure:3169: checking for $cf_ncuhdr_root include-path" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -3087,14 +3260,14 @@
              + 				cf_save_CPPFLAGS="$CPPFLAGS"
              + 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
              + 				cat > conftest.$ac_ext <
              + int main() {
              + printf("Hello")
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -3121,7 +3294,7 @@
              + 		do
              + 			
              + 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_ncurses_h2=$cf_header
              + 	
              +@@ -3189,14 +3362,14 @@
              + 				cf_save_CPPFLAGS="$CPPFLAGS"
              + 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
              + 				cat > conftest.$ac_ext <
              + int main() {
              + printf("Hello")
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:3373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -3249,7 +3422,7 @@
              + 
              + 
              + echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
              +-echo "configure:3253: checking for terminfo header" >&5
              ++echo "configure:3426: checking for terminfo header" >&5
              + if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -3266,7 +3439,7 @@
              + for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
              + do
              + cat > conftest.$ac_ext <
              + #include <${cf_cv_ncurses_header-curses.h}>
              +@@ -3276,7 +3449,7 @@
              + int x = auto_left_margin
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:3453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   
              + 	cf_cv_term_header="$cf_test"
              +@@ -3331,7 +3504,7 @@
              + 
              + 
              + echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
              +-echo "configure:3335: checking for ncurses version" >&5
              ++echo "configure:3508: checking for ncurses version" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -3357,7 +3530,7 @@
              + #endif
              + EOF
              + 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
              +-	{ (eval echo configure:3361: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              ++	{ (eval echo configure:3534: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              + 	if test -f conftest.out ; then
              + 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
              + 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
              +@@ -3366,7 +3539,7 @@
              + 
              + else
              +   cat > conftest.$ac_ext <
              +@@ -3387,10 +3560,10 @@
              + 	make an error
              + # endif
              + #endif
              +-	exit(0);
              ++	${cf_cv_main_return-return}(0);
              + }
              + EOF
              +-if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              ++if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              + then
              +   
              + 	cf_cv_ncurses_version=`cat $cf_tempfile`
              +@@ -3421,7 +3594,7 @@
              + cf_ncurses_LIBS=""
              + cf_ncurses_SAVE="$LIBS"
              + echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
              +-echo "configure:3425: checking for Gpm_Open in -lgpm" >&5
              ++echo "configure:3598: checking for Gpm_Open in -lgpm" >&5
              + ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -3429,7 +3602,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lgpm  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -3456,7 +3629,7 @@
              + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
              +   echo "$ac_t""yes" 1>&6
              +   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
              +-echo "configure:3460: checking for initscr in -lgpm" >&5
              ++echo "configure:3633: checking for initscr in -lgpm" >&5
              + ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -3464,7 +3637,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lgpm  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -3507,7 +3680,7 @@
              + 	# version of ncurses (but it should do no harm, since it's static).
              + 	if test "$cf_nculib_root" = ncurses ; then
              + 		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
              +-echo "configure:3511: checking for tgoto in -lmytinfo" >&5
              ++echo "configure:3684: checking for tgoto in -lmytinfo" >&5
              + ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -3515,7 +3688,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lmytinfo  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -3560,12 +3733,12 @@
              + 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
              + 	cf_libdir=""
              + 	echo $ac_n "checking for initscr""... $ac_c" 1>&6
              +-echo "configure:3564: checking for initscr" >&5
              ++echo "configure:3737: checking for initscr" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_initscr=yes"
              + else
              +@@ -3608,17 +3781,17 @@
              + 
              + 		cf_save_LIBS="$LIBS"
              + 		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
              +-echo "configure:3612: checking for initscr in -l$cf_nculib_root" >&5
              ++echo "configure:3785: checking for initscr in -l$cf_nculib_root" >&5
              + 		LIBS="-l$cf_nculib_root $LIBS"
              + 		cat > conftest.$ac_ext <
              + int main() {
              + initscr()
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   echo "$ac_t""yes" 1>&6
              + 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              +@@ -3687,17 +3860,17 @@
              + 			for cf_libdir in $cf_search
              + 			do
              + 				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
              +-echo "configure:3691: checking for -l$cf_nculib_root in $cf_libdir" >&5
              ++echo "configure:3864: checking for -l$cf_nculib_root in $cf_libdir" >&5
              + 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
              + 				cat > conftest.$ac_ext <
              + int main() {
              + initscr()
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   echo "$ac_t""yes" 1>&6
              + 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              +@@ -3728,7 +3901,7 @@
              + 
              + if test -n "$cf_ncurses_LIBS" ; then
              + 	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
              +-echo "configure:3732: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
              ++echo "configure:3905: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
              + 	cf_ncurses_SAVE="$LIBS"
              + 	for p in $cf_ncurses_LIBS ; do
              + 		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
              +@@ -3737,14 +3910,14 @@
              + 		fi
              + 	done
              + 	cat > conftest.$ac_ext <
              + int main() {
              + initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   echo "$ac_t""yes" 1>&6
              + else
              +@@ -3770,14 +3943,14 @@
              + 	cf_cv_libtype=w
              + 	
              + echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
              +-echo "configure:3774: checking for multibyte character support" >&5
              ++echo "configure:3947: checking for multibyte character support" >&5
              + if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   
              + 	cf_save_LIBS="$LIBS"
              + 	cat > conftest.$ac_ext <
              +@@ -3785,7 +3958,7 @@
              + putwc(0,0);
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_cv_utf8_lib=yes
              + else
              +@@ -3794,7 +3967,7 @@
              +   rm -rf conftest*
              +   LIBS="-lutf8 $LIBS"
              + 	 cat > conftest.$ac_ext <
              +@@ -3802,7 +3975,7 @@
              + putwc(0,0);
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_cv_utf8_lib=add-on
              + else
              +@@ -3839,7 +4012,7 @@
              + CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
              + 
              + echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
              +-echo "configure:3843: checking for $cf_ncuhdr_root header in include-path" >&5
              ++echo "configure:4016: checking for $cf_ncuhdr_root header in include-path" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -3850,7 +4023,7 @@
              + 	do
              + 		
              + 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_ncurses_h=$cf_header
              + 	
              +@@ -3905,7 +4078,7 @@
              + else
              + 
              + echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
              +-echo "configure:3909: checking for $cf_ncuhdr_root include-path" >&5
              ++echo "configure:4082: checking for $cf_ncuhdr_root include-path" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -4000,14 +4173,14 @@
              + 				cf_save_CPPFLAGS="$CPPFLAGS"
              + 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
              + 				cat > conftest.$ac_ext <
              + int main() {
              + printf("Hello")
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -4034,7 +4207,7 @@
              + 		do
              + 			
              + 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_ncurses_h2=$cf_header
              + 	
              +@@ -4102,14 +4275,14 @@
              + 				cf_save_CPPFLAGS="$CPPFLAGS"
              + 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
              + 				cat > conftest.$ac_ext <
              + int main() {
              + printf("Hello")
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:4286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -4162,7 +4335,7 @@
              + 
              + 
              + echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
              +-echo "configure:4166: checking for terminfo header" >&5
              ++echo "configure:4339: checking for terminfo header" >&5
              + if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -4179,7 +4352,7 @@
              + for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
              + do
              + cat > conftest.$ac_ext <
              + #include <${cf_cv_ncurses_header-curses.h}>
              +@@ -4189,7 +4362,7 @@
              + int x = auto_left_margin
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:4366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   
              + 	cf_cv_term_header="$cf_test"
              +@@ -4244,7 +4417,7 @@
              + 
              + 
              + echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
              +-echo "configure:4248: checking for ncurses version" >&5
              ++echo "configure:4421: checking for ncurses version" >&5
              + if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -4270,7 +4443,7 @@
              + #endif
              + EOF
              + 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
              +-	{ (eval echo configure:4274: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              ++	{ (eval echo configure:4447: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              + 	if test -f conftest.out ; then
              + 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
              + 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
              +@@ -4279,7 +4452,7 @@
              + 
              + else
              +   cat > conftest.$ac_ext <
              +@@ -4300,10 +4473,10 @@
              + 	make an error
              + # endif
              + #endif
              +-	exit(0);
              ++	${cf_cv_main_return-return}(0);
              + }
              + EOF
              +-if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              ++if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              + then
              +   
              + 	cf_cv_ncurses_version=`cat $cf_tempfile`
              +@@ -4334,7 +4507,7 @@
              + cf_ncurses_LIBS=""
              + cf_ncurses_SAVE="$LIBS"
              + echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
              +-echo "configure:4338: checking for Gpm_Open in -lgpm" >&5
              ++echo "configure:4511: checking for Gpm_Open in -lgpm" >&5
              + ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -4342,7 +4515,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lgpm  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -4369,7 +4542,7 @@
              + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
              +   echo "$ac_t""yes" 1>&6
              +   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
              +-echo "configure:4373: checking for initscr in -lgpm" >&5
              ++echo "configure:4546: checking for initscr in -lgpm" >&5
              + ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -4377,7 +4550,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lgpm  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -4420,7 +4593,7 @@
              + 	# version of ncurses (but it should do no harm, since it's static).
              + 	if test "$cf_nculib_root" = ncurses ; then
              + 		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
              +-echo "configure:4424: checking for tgoto in -lmytinfo" >&5
              ++echo "configure:4597: checking for tgoto in -lmytinfo" >&5
              + ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -4428,7 +4601,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lmytinfo  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -4473,12 +4646,12 @@
              + 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
              + 	cf_libdir=""
              + 	echo $ac_n "checking for initscr""... $ac_c" 1>&6
              +-echo "configure:4477: checking for initscr" >&5
              ++echo "configure:4650: checking for initscr" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_initscr=yes"
              + else
              +@@ -4521,17 +4694,17 @@
              + 
              + 		cf_save_LIBS="$LIBS"
              + 		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
              +-echo "configure:4525: checking for initscr in -l$cf_nculib_root" >&5
              ++echo "configure:4698: checking for initscr in -l$cf_nculib_root" >&5
              + 		LIBS="-l$cf_nculib_root $LIBS"
              + 		cat > conftest.$ac_ext <
              + int main() {
              + initscr()
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   echo "$ac_t""yes" 1>&6
              + 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              +@@ -4600,17 +4773,17 @@
              + 			for cf_libdir in $cf_search
              + 			do
              + 				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
              +-echo "configure:4604: checking for -l$cf_nculib_root in $cf_libdir" >&5
              ++echo "configure:4777: checking for -l$cf_nculib_root in $cf_libdir" >&5
              + 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
              + 				cat > conftest.$ac_ext <
              + int main() {
              + initscr()
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   echo "$ac_t""yes" 1>&6
              + 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              +@@ -4641,7 +4814,7 @@
              + 
              + if test -n "$cf_ncurses_LIBS" ; then
              + 	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
              +-echo "configure:4645: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
              ++echo "configure:4818: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
              + 	cf_ncurses_SAVE="$LIBS"
              + 	for p in $cf_ncurses_LIBS ; do
              + 		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
              +@@ -4650,14 +4823,14 @@
              + 		fi
              + 	done
              + 	cat > conftest.$ac_ext <
              + int main() {
              + initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   echo "$ac_t""yes" 1>&6
              + else
              +@@ -4700,17 +4873,17 @@
              +     case "`(uname -sr) 2>/dev/null`" in
              +     "SunOS 5"*)
              +       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
              +-echo "configure:4704: checking whether -R must be followed by a space" >&5
              ++echo "configure:4877: checking whether -R must be followed by a space" >&5
              +       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
              +       cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   ac_R_nospace=yes
              + else
              +@@ -4726,14 +4899,14 @@
              +       else
              + 	LIBS="$ac_xsave_LIBS -R $x_libraries"
              + 	cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   ac_R_space=yes
              + else
              +@@ -4765,7 +4938,7 @@
              +     # libraries were built with DECnet support.  And karl@cs.umb.edu says
              +     # the Alpha needs dnet_stub (dnet does not exist).
              +     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
              +-echo "configure:4769: checking for dnet_ntoa in -ldnet" >&5
              ++echo "configure:4942: checking for dnet_ntoa in -ldnet" >&5
              + ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -4773,7 +4946,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-ldnet  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -4806,7 +4979,7 @@
              + 
              +     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
              +       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
              +-echo "configure:4810: checking for dnet_ntoa in -ldnet_stub" >&5
              ++echo "configure:4983: checking for dnet_ntoa in -ldnet_stub" >&5
              + ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -4814,7 +4987,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-ldnet_stub  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -4854,12 +5027,12 @@
              +     # The nsl library prevents programs from opening the X display
              +     # on Irix 5.2, according to dickey@clark.net.
              +     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
              +-echo "configure:4858: checking for gethostbyname" >&5
              ++echo "configure:5031: checking for gethostbyname" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_gethostbyname=yes"
              + else
              +@@ -4903,7 +5076,7 @@
              + 
              +     if test $ac_cv_func_gethostbyname = no; then
              +       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
              +-echo "configure:4907: checking for gethostbyname in -lnsl" >&5
              ++echo "configure:5080: checking for gethostbyname in -lnsl" >&5
              + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -4911,7 +5084,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lnsl  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -4952,12 +5125,12 @@
              +     # -lsocket must be given before -lnsl if both are needed.
              +     # We assume that if connect needs -lnsl, so does gethostbyname.
              +     echo $ac_n "checking for connect""... $ac_c" 1>&6
              +-echo "configure:4956: checking for connect" >&5
              ++echo "configure:5129: checking for connect" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_connect=yes"
              + else
              +@@ -5001,7 +5174,7 @@
              + 
              +     if test $ac_cv_func_connect = no; then
              +       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
              +-echo "configure:5005: checking for connect in -lsocket" >&5
              ++echo "configure:5178: checking for connect in -lsocket" >&5
              + ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5009,7 +5182,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5044,12 +5217,12 @@
              + 
              +     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
              +     echo $ac_n "checking for remove""... $ac_c" 1>&6
              +-echo "configure:5048: checking for remove" >&5
              ++echo "configure:5221: checking for remove" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_remove=yes"
              + else
              +@@ -5093,7 +5266,7 @@
              + 
              +     if test $ac_cv_func_remove = no; then
              +       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
              +-echo "configure:5097: checking for remove in -lposix" >&5
              ++echo "configure:5270: checking for remove in -lposix" >&5
              + ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5101,7 +5274,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lposix  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5136,12 +5309,12 @@
              + 
              +     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
              +     echo $ac_n "checking for shmat""... $ac_c" 1>&6
              +-echo "configure:5140: checking for shmat" >&5
              ++echo "configure:5313: checking for shmat" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_shmat=yes"
              + else
              +@@ -5185,7 +5358,7 @@
              + 
              +     if test $ac_cv_func_shmat = no; then
              +       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
              +-echo "configure:5189: checking for shmat in -lipc" >&5
              ++echo "configure:5362: checking for shmat in -lipc" >&5
              + ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5193,7 +5366,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lipc  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5237,7 +5410,7 @@
              +   # libraries we check for below, so use a different variable.
              +   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
              +   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
              +-echo "configure:5241: checking for IceConnectionNumber in -lICE" >&5
              ++echo "configure:5414: checking for IceConnectionNumber in -lICE" >&5
              + ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5245,7 +5418,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lICE $X_EXTRA_LIBS $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5371,14 +5544,14 @@
              + 
              + if test "$cf_check_cflags" != "$CFLAGS" ; then
              + cat > conftest.$ac_ext <
              + int main() {
              + printf("Hello world");
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -5397,12 +5570,12 @@
              + 
              + 
              + echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
              +-echo "configure:5401: checking for XOpenDisplay" >&5
              ++echo "configure:5574: checking for XOpenDisplay" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_XOpenDisplay=yes"
              + else
              +@@ -5444,7 +5617,7 @@
              +   echo "$ac_t""no" 1>&6
              + 
              + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
              +-echo "configure:5448: checking for XOpenDisplay in -lX11" >&5
              ++echo "configure:5621: checking for XOpenDisplay in -lX11" >&5
              + ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5452,7 +5625,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5487,12 +5660,12 @@
              + 
              + 
              + echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
              +-echo "configure:5491: checking for XtAppInitialize" >&5
              ++echo "configure:5664: checking for XtAppInitialize" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_XtAppInitialize=yes"
              + else
              +@@ -5534,7 +5707,7 @@
              +   echo "$ac_t""no" 1>&6
              + 
              + echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
              +-echo "configure:5538: checking for XtAppInitialize in -lXt" >&5
              ++echo "configure:5711: checking for XtAppInitialize in -lXt" >&5
              + ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5542,7 +5715,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5591,7 +5764,7 @@
              + cf_x_athena=${cf_x_athena-Xaw}
              + 
              + echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
              +-echo "configure:5595: checking if you want to link with Xaw 3d library" >&5
              ++echo "configure:5768: checking if you want to link with Xaw 3d library" >&5
              + withval=
              + 
              + # Check whether --with-Xaw3d or --without-Xaw3d was given.
              +@@ -5608,7 +5781,7 @@
              + fi
              + 
              + echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
              +-echo "configure:5612: checking if you want to link with neXT Athena library" >&5
              ++echo "configure:5785: checking if you want to link with neXT Athena library" >&5
              + withval=
              + 
              + # Check whether --with-neXtaw or --without-neXtaw was given.
              +@@ -5625,7 +5798,7 @@
              + fi
              + 
              + echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
              +-echo "configure:5629: checking if you want to link with Athena-Plus library" >&5
              ++echo "configure:5802: checking if you want to link with Athena-Plus library" >&5
              + withval=
              + 
              + # Check whether --with-XawPlus or --without-XawPlus was given.
              +@@ -5642,7 +5815,7 @@
              + fi
              + 
              + echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
              +-echo "configure:5646: checking for XextCreateExtension in -lXext" >&5
              ++echo "configure:5819: checking for XextCreateExtension in -lXext" >&5
              + ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5650,7 +5823,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lXext  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -5700,13 +5873,13 @@
              + 		if test $cf_path != default ; then
              + 			CPPFLAGS="-I$cf_path/include $cf_save"
              + 			echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
              +-echo "configure:5704: checking for $cf_test in $cf_path" >&5
              ++echo "configure:5877: checking for $cf_test in $cf_path" >&5
              + 		else
              + 			echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
              +-echo "configure:5707: checking for $cf_test" >&5
              ++echo "configure:5880: checking for $cf_test" >&5
              + 		fi
              + 		cat > conftest.$ac_ext <
              +@@ -5715,7 +5888,7 @@
              + 
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:5892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -5762,21 +5935,21 @@
              + 			if test $cf_path != default ; then
              + 				LIBS="-L$cf_path/lib $cf_lib $LIBS"
              + 				echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
              +-echo "configure:5766: checking for $cf_lib in $cf_path" >&5
              ++echo "configure:5939: checking for $cf_lib in $cf_path" >&5
              + 			else
              + 				LIBS="$cf_lib $LIBS"
              + 				echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
              +-echo "configure:5770: checking for $cf_test in $cf_lib" >&5
              ++echo "configure:5943: checking for $cf_test in $cf_lib" >&5
              + 			fi
              + 			cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -5817,7 +5990,7 @@
              + # Extract the first word of "$ac_prog", so it can be a program name with args.
              + set dummy $ac_prog; ac_word=$2
              + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              +-echo "configure:5821: checking for $ac_word" >&5
              ++echo "configure:5994: checking for $ac_word" >&5
              + if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -5946,14 +6119,14 @@
              + 
              + if test "$cf_check_cflags" != "$CFLAGS" ; then
              + cat > conftest.$ac_ext <
              + int main() {
              + printf("Hello world");
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   :
              + else
              +   echo "configure: failed program was:" >&5
              +@@ -5971,7 +6144,7 @@
              + fi
              + 
              + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
              +-echo "configure:5975: checking for XOpenDisplay in -lX11" >&5
              ++echo "configure:6148: checking for XOpenDisplay in -lX11" >&5
              + ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -5979,7 +6152,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -6011,14 +6184,14 @@
              + fi
              + 
              + echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
              +-echo "configure:6015: checking for XCurses library" >&5
              ++echo "configure:6188: checking for XCurses library" >&5
              + if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   
              + LIBS="-lXCurses $LIBS"
              + cat > conftest.$ac_ext <
              +@@ -6028,7 +6201,7 @@
              + XCursesExit();
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_cv_lib_XCurses=yes
              + else
              +@@ -6073,7 +6246,7 @@
              + *)
              + 	# look for curses-related libraries
              + 	echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
              +-echo "configure:6077: checking for new_panel in -lpanel$cf_cv_libtype" >&5
              ++echo "configure:6250: checking for new_panel in -lpanel$cf_cv_libtype" >&5
              + ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -6081,7 +6254,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lpanel$cf_cv_libtype  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -6120,7 +6293,7 @@
              + fi
              + 
              + 	echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
              +-echo "configure:6124: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
              ++echo "configure:6297: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
              + ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -6128,7 +6301,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lmenu$cf_cv_libtype  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -6167,7 +6340,7 @@
              + fi
              + 
              + 	echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
              +-echo "configure:6171: checking for form_driver in -lform$cf_cv_libtype" >&5
              ++echo "configure:6344: checking for form_driver in -lform$cf_cv_libtype" >&5
              + ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
              + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              +@@ -6175,7 +6348,7 @@
              +   ac_save_LIBS="$LIBS"
              + LIBS="-lform$cf_cv_libtype  $LIBS"
              + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_lib_$ac_lib_var=yes"
              + else
              +@@ -6225,17 +6398,17 @@
              + do
              + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
              + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
              +-echo "configure:6229: checking for $ac_hdr" >&5
              ++echo "configure:6402: checking for $ac_hdr" >&5
              + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:6239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:6412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   rm -rf conftest*
              +@@ -6265,12 +6438,12 @@
              + esac
              + 
              + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
              +-echo "configure:6269: checking return type of signal handlers" >&5
              ++echo "configure:6442: checking return type of signal handlers" >&5
              + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <
              + #include 
              +@@ -6287,7 +6460,7 @@
              + int i;
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:6291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:6464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   ac_cv_type_signal=void
              + else
              +@@ -6307,12 +6480,12 @@
              + 
              + 
              + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
              +-echo "configure:6311: checking for ANSI C header files" >&5
              ++echo "configure:6484: checking for ANSI C header files" >&5
              + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <
              + #include 
              +@@ -6320,7 +6493,7 @@
              + #include 
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:6324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:6497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   rm -rf conftest*
              +@@ -6337,7 +6510,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 <
              + EOF
              +@@ -6355,7 +6528,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 <
              + EOF
              +@@ -6376,7 +6549,7 @@
              +   :
              + else
              +   cat > conftest.$ac_ext <
              + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
              +@@ -6387,7 +6560,7 @@
              + exit (0); }
              + 
              + EOF
              +-if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              ++if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              + then
              +   :
              + else
              +@@ -6411,12 +6584,12 @@
              + fi
              + 
              + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
              +-echo "configure:6415: checking whether time.h and sys/time.h may both be included" >&5
              ++echo "configure:6588: checking whether time.h and sys/time.h may both be included" >&5
              + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <
              + #include 
              +@@ -6425,7 +6598,7 @@
              + struct tm *tp;
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:6429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:6602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   ac_cv_header_time=yes
              + else
              +@@ -6458,17 +6631,17 @@
              + do
              + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
              + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
              +-echo "configure:6462: checking for $ac_hdr" >&5
              ++echo "configure:6635: checking for $ac_hdr" >&5
              + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <
              + EOF
              + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              +-{ (eval echo configure:6472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              ++{ (eval echo configure:6645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
              + if test -z "$ac_err"; then
              +   rm -rf conftest*
              +@@ -6529,12 +6702,12 @@
              + 
              + do
              + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
              +-echo "configure:6533: checking for $ac_func" >&5
              ++echo "configure:6706: checking for $ac_func" >&5
              + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   eval "ac_cv_func_$ac_func=yes"
              + else
              +@@ -6582,8 +6755,14 @@
              + done
              + 
              + 
              ++echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
              ++echo "configure:6760: checking for ncurses extended functions" >&5
              ++if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
              ++  echo $ac_n "(cached) $ac_c" 1>&6
              ++else
              ++  
              + cat > conftest.$ac_ext <
              +@@ -6601,30 +6780,81 @@
              + 	(void) use_default_colors ();
              + 	(void) use_extended_names (0);
              + 	(void) wresize (0, 0, 0);
              +-	
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:6608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +-  cat >> confdefs.h <<\EOF
              ++  cf_cv_ncurses_ext_funcs=yes
              ++else
              ++  echo "configure: failed program was:" >&5
              ++  cat conftest.$ac_ext >&5
              ++  rm -rf conftest*
              ++  cf_cv_ncurses_ext_funcs=no
              ++fi
              ++rm -f conftest*
              ++
              ++fi
              ++
              ++echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
              ++test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
              + #define NCURSES_EXT_FUNCS 1
              + EOF
              + 
              ++
              ++echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
              ++echo "configure:6806: checking for wide-character functions" >&5
              ++if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
              ++  echo $ac_n "(cached) $ac_c" 1>&6
              ++else
              ++  
              ++cat > conftest.$ac_ext <
              ++int main() {
              ++
              ++	static wchar_t src_wchar[2];
              ++	static cchar_t dst_cchar;
              ++	setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
              ++	
              ++; return 0; }
              ++EOF
              ++if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++  rm -rf conftest*
              ++  cf_cv_widechar_funcs=yes
              + else
              +   echo "configure: failed program was:" >&5
              +   cat conftest.$ac_ext >&5
              ++  rm -rf conftest*
              ++  cf_cv_widechar_funcs=no
              + fi
              + rm -f conftest*
              + 
              ++fi
              ++
              ++echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
              ++if test "$cf_cv_widechar_funcs" != no ; then
              ++	cat >> confdefs.h <<\EOF
              ++#define USE_WIDEC_SUPPORT 1
              ++EOF
              ++
              ++else
              ++	cat >> confdefs.h <<\EOF
              ++#define USE_WIDEC_SUPPORT 0
              ++EOF
              ++
              ++fi
              ++
              + 
              + echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
              +-echo "configure:6622: checking if sys/time.h works with sys/select.h" >&5
              ++echo "configure:6852: checking if sys/time.h works with sys/select.h" >&5
              + if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +   
              + cat > conftest.$ac_ext <
              +@@ -6639,7 +6869,7 @@
              + 
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:6643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_cv_sys_time_select=yes
              + else
              +@@ -6660,7 +6890,7 @@
              + 
              + 
              + echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
              +-echo "configure:6664: checking for function curses_version" >&5
              ++echo "configure:6894: checking for function curses_version" >&5
              + if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -6669,7 +6899,7 @@
              +   cf_cv_func_curses_version=unknown
              + else
              +   cat > conftest.$ac_ext <
              +@@ -6677,11 +6907,11 @@
              + {
              + 	char temp[1024];
              + 	sprintf(temp, "%s\n", curses_version());
              +-	exit(0);
              ++	${cf_cv_main_return-return}(0);
              + }
              + 
              + EOF
              +-if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              ++if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              + then
              +   cf_cv_func_curses_version=yes
              + 
              +@@ -6706,7 +6936,7 @@
              + 
              + 
              + echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
              +-echo "configure:6710: checking for alternate character set array" >&5
              ++echo "configure:6940: checking for alternate character set array" >&5
              + if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -6715,7 +6945,7 @@
              + for name in acs_map _acs_map __acs_map _nc_acs_map
              + do
              + cat > conftest.$ac_ext <
              +@@ -6726,7 +6956,7 @@
              + 
              + ; return 0; }
              + EOF
              +-if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_cv_curses_acs_map=$name; break
              + else
              +@@ -6747,7 +6977,7 @@
              + 
              + 
              + echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
              +-echo "configure:6751: checking for wide alternate character set array" >&5
              ++echo "configure:6981: checking for wide alternate character set array" >&5
              + if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
              +   echo $ac_n "(cached) $ac_c" 1>&6
              + else
              +@@ -6756,7 +6986,7 @@
              + 	for name in wacs_map _wacs_map __wacs_map _nc_wacs
              + 	do
              + 	cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ++if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +   rm -rf conftest*
              +   cf_cv_curses_wacs_map=$name
              + 	 break
              +@@ -6783,9 +7013,9 @@
              + 
              + 
              + echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
              +-echo "configure:6787: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
              ++echo "configure:7017: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
              + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:7032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -6826,9 +7056,9 @@
              + 
              + 
              + echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
              +-echo "configure:6830: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
              ++echo "configure:7060: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
              + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              ++if { (eval echo configure:7075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +   rm -rf conftest*
              +   cf_result=yes
              + else
              +@@ -7018,9 +7248,9 @@
              + s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
              + s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
              + s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
              +-s%@ECHO_LINK@%$ECHO_LINK%g
              + s%@LD@%$LD%g
              + s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
              ++s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
              + s%@LD_MODEL@%$LD_MODEL%g
              + s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
              + s%@LIBTOOL@%$LIBTOOL%g
              +@@ -7040,6 +7270,11 @@
              + s%@EXEEXT@%$EXEEXT%g
              + s%@OBJEXT@%$OBJEXT%g
              + s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
              ++s%@ECHO_LT@%$ECHO_LT%g
              ++s%@ECHO_LD@%$ECHO_LD%g
              ++s%@RULE_CC@%$RULE_CC%g
              ++s%@SHOW_CC@%$SHOW_CC%g
              ++s%@ECHO_CC@%$ECHO_CC%g
              + s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
              + s%@X_CFLAGS@%$X_CFLAGS%g
              + s%@X_PRE_LIBS@%$X_PRE_LIBS%g
              +@@ -7247,6 +7482,7 @@
              + # Extra initialization commands, if any
              + 
              + AWK="$AWK"
              ++ECHO_LD="$ECHO_LD"
              + 
              + EOF
              + cat >> $CONFIG_STATUS <<\EOF
              +@@ -7258,7 +7494,7 @@
              + 	if test ! -d $srcdir/$cf_dir; then
              + 		continue
              + 	elif test -f $srcdir/$cf_dir/programs; then
              +-		$AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
              ++		$AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
              + 	fi
              + done
              + 
              +Index: test/configure.in
              +Prereq:  1.58 
              +--- ncurses-5.6/test/configure.in	2006-07-15 18:54:07.000000000 +0000
              ++++ ncurses-5.6-20071201/test/configure.in	2007-06-09 20:02:57.000000000 +0000
              +@@ -1,5 +1,5 @@
              + dnl***************************************************************************
              +-dnl Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
              ++dnl Copyright (c) 1998-2006,2007 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,7 +28,7 @@
              + dnl
              + dnl Author: Thomas E. Dickey 1996, etc.
              + dnl
              +-dnl $Id: configure.in,v 1.58 2006/07/15 18:54:07 tom Exp $
              ++dnl $Id: configure.in,v 1.63 2007/06/09 20:02:57 tom Exp $
              + dnl This is a simple configuration-script for the ncurses test programs that
              + dnl allows the test-directory to be separately configured against a reference
              + dnl system (i.e., sysvr4 curses)
              +@@ -58,15 +58,15 @@
              + DFT_DEP_SUFFIX=""			AC_SUBST(DFT_DEP_SUFFIX)
              + DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`	AC_SUBST(DFT_OBJ_SUBDIR)
              + DFT_UPR_MODEL="NORMAL"			AC_SUBST(DFT_UPR_MODEL)
              +-ECHO_LINK='@ echo linking $@ ... ;'	AC_SUBST(ECHO_LINK)
              + LD="ld"					AC_SUBST(LD)
              + LDFLAGS_SHARED=""			AC_SUBST(LDFLAGS_SHARED)
              ++LDFLAGS_STATIC=""			AC_SUBST(LDFLAGS_STATIC)
              + LD_MODEL=""				AC_SUBST(LD_MODEL)
              + LD_SHARED_OPTS=""			AC_SUBST(LD_SHARED_OPTS)
              + LIBTOOL=""				AC_SUBST(LIBTOOL)
              + LIB_CLEAN=""				AC_SUBST(LIB_CLEAN)
              + LIB_COMPILE=""				AC_SUBST(LIB_COMPILE)
              +-LIB_LINK=""				AC_SUBST(LIB_LINK)
              ++LIB_LINK='${CC}'			AC_SUBST(LIB_LINK)
              + LINK_TESTS=""				AC_SUBST(LINK_TESTS)
              + LINT=lint				AC_SUBST(LINT)
              + LINT_OPTS=""				AC_SUBST(LINT_OPTS)
              +@@ -85,9 +85,13 @@
              + AC_OBJEXT
              + 
              + CF_ANSI_CC_REQD
              +-CF_ENABLE_WARNINGS
              + CF_GCC_ATTRIBUTES
              + CF_XOPEN_SOURCE
              ++AC_C_CONST
              ++CF_SIG_ATOMIC_T
              ++
              ++CF_DISABLE_ECHO
              ++CF_ENABLE_WARNINGS
              + 
              + CF_WITH_CURSES_DIR
              + 
              +@@ -206,6 +210,7 @@
              + wresize \
              + )
              + 
              ++AC_CACHE_CHECK(for ncurses extended functions,cf_cv_ncurses_ext_funcs,[
              + AC_TRY_LINK([
              + #include <${cf_cv_ncurses_header-curses.h}>],
              + [
              +@@ -220,8 +225,28 @@
              + 	(void) resizeterm (0, 0);
              + 	(void) use_default_colors ();
              + 	(void) use_extended_names (0);
              +-	(void) wresize (0, 0, 0);
              +-	],[AC_DEFINE(NCURSES_EXT_FUNCS)])
              ++	(void) wresize (0, 0, 0);],
              ++	[cf_cv_ncurses_ext_funcs=yes],
              ++	[cf_cv_ncurses_ext_funcs=no])
              ++])
              ++test "$cf_cv_ncurses_ext_funcs" != no && AC_DEFINE(NCURSES_EXT_FUNCS)
              ++
              ++AC_CACHE_CHECK(for wide-character functions,cf_cv_widechar_funcs,[
              ++AC_TRY_LINK([
              ++#include <${cf_cv_ncurses_header-curses.h}>],
              ++[
              ++	static wchar_t src_wchar[2];
              ++	static cchar_t dst_cchar;
              ++	setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
              ++	],
              ++	[cf_cv_widechar_funcs=yes],
              ++	[cf_cv_widechar_funcs=no])
              ++])
              ++if test "$cf_cv_widechar_funcs" != no ; then
              ++	AC_DEFINE(USE_WIDEC_SUPPORT,1)
              ++else
              ++	AC_DEFINE(USE_WIDEC_SUPPORT,0)
              ++fi
              + 
              + CF_SYS_TIME_SELECT
              + CF_FUNC_CURSES_VERSION
              +@@ -236,7 +261,7 @@
              + dnl ---------------------------------------------------------------------------
              + 
              + AC_OUTPUT(Makefile,[
              +-CF_PRG_RULES([$srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK"], .)
              ++CF_PRG_RULES([$srcdir/mk-test.awk ECHO_LINK="$ECHO_LD"], .)
              + 	cat >>Makefile < 0) {
              + 	wprintw(win, "%s was bound to %s\n", vis_string, keyname(rc));
              +Index: test/demo_forms.c
              +Prereq:  1.22 
              +--- ncurses-5.6/test/demo_forms.c	2006-12-10 00:30:24.000000000 +0000
              ++++ ncurses-5.6-20071201/test/demo_forms.c	2007-07-21 17:45:09.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2003-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2003-2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: demo_forms.c,v 1.22 2006/12/10 00:30:24 tom Exp $
              ++ * $Id: demo_forms.c,v 1.24 2007/07/21 17:45:09 tom Exp $
              +  *
              +  * Demonstrate a variety of functions from the form library.
              +  * Thomas Dickey - 2003/4/26
              +@@ -322,6 +322,10 @@
              +     int pg;
              +     WINDOW *also;
              + 
              ++#ifdef NCURSES_MOUSE_VERSION
              ++    mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
              ++#endif
              ++
              +     help_edit_field();
              + 
              +     mvaddstr(4, 57, "Forms Entry Test");
              +@@ -423,6 +427,10 @@
              + 	free_field(f[c]);
              +     noraw();
              +     nl();
              ++
              ++#ifdef NCURSES_MOUSE_VERSION
              ++    mousemask(0, (mmask_t *) 0);
              ++#endif
              + }
              + 
              + static void
              +@@ -451,7 +459,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((ch = getopt(argc, argv, "dj:m:o:t:")) != EOF) {
              ++    while ((ch = getopt(argc, argv, "dj:m:o:t:")) != -1) {
              + 	switch (ch) {
              + 	case 'd':
              + 	    d_option = TRUE;
              +Index: test/demo_menus.c
              +Prereq:  1.20 
              +--- ncurses-5.6/test/demo_menus.c	2006-06-17 17:39:37.000000000 +0000
              ++++ ncurses-5.6-20071201/test/demo_menus.c	2007-07-21 17:45:09.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2005,2006 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 2005-2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: demo_menus.c,v 1.20 2006/06/17 17:39:37 tom Exp $
              ++ * $Id: demo_menus.c,v 1.21 2007/07/21 17:45:09 tom Exp $
              +  *
              +  * Demonstrate a variety of functions from the menu library.
              +  * Thomas Dickey - 2005/4/9
              +@@ -834,7 +834,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != EOF) {
              ++    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != -1) {
              + 	switch (c) {
              + #if HAVE_RIPOFFLINE
              + 	case 'f':
              +Index: test/demo_panels.c
              +Prereq:  1.2 
              +--- ncurses-5.6/test/demo_panels.c	2006-04-01 19:08:03.000000000 +0000
              ++++ ncurses-5.6-20071201/test/demo_panels.c	2007-08-11 16:34:49.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2003,2006 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 2007 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            *
              +@@ -26,17 +26,10 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: demo_panels.c,v 1.2 2006/04/01 19:08:03 tom Exp $
              ++ * $Id: demo_panels.c,v 1.28 2007/08/11 16:34:49 tom Exp $
              +  *
              +  * Demonstrate a variety of functions from the panel library.
              +- * Thomas Dickey - 2003/4/26
              +  */
              +-/*
              +-panel_above			-
              +-panel_below			-
              +-panel_hidden			-
              +-replace_panel			-
              +-*/
              + 
              + #include 
              + 
              +@@ -44,11 +37,771 @@
              + 
              + #include 
              + 
              ++#define LAST_POS '@'
              ++#define TEMP_POS '>'
              ++
              ++typedef void (*InitPanel) (void);
              ++typedef void (*FillPanel) (PANEL *);
              ++
              ++static bool use_colors = FALSE;
              ++static bool unboxed = FALSE;
              ++static FILE *log_in;
              ++static FILE *log_out;
              ++
              ++static void
              ++close_input(void)
              ++{
              ++    if (log_in != 0) {
              ++	fclose(log_in);
              ++	log_in = 0;
              ++    }
              ++}
              ++
              ++static void
              ++close_output(void)
              ++{
              ++    if (log_out != 0) {
              ++	fclose(log_out);
              ++	log_out = 0;
              ++    }
              ++}
              ++
              ++static WINDOW *
              ++statusline(void)
              ++{
              ++    WINDOW *result = stdscr;
              ++
              ++    wmove(result, LINES - 1, 0);
              ++    wclrtoeol(result);
              ++    return result;
              ++}
              ++
              ++static void
              ++pflush(void)
              ++{
              ++    update_panels();
              ++    doupdate();
              ++}
              ++
              ++static void
              ++saywhat(NCURSES_CONST char *text)
              ++{
              ++    WINDOW *win = statusline();
              ++    if (text != 0 && *text != '\0') {
              ++	waddstr(win, text);
              ++	waddstr(win, "; ");
              ++    }
              ++    waddstr(win, "press any key to continue");
              ++}
              ++
              ++static void
              ++show_position(NCURSES_CONST char *text,
              ++	      NCURSES_CONST char *also,
              ++	      int which,
              ++	      int ypos,
              ++	      int xpos)
              ++{
              ++    WINDOW *win = statusline();
              ++
              ++    wprintw(win, "%s for panel %d now %d,%d%s", text, which, ypos, xpos, also);
              ++    wmove(stdscr, ypos, xpos);
              ++}
              ++
              ++static int
              ++get_position(NCURSES_CONST char *text,
              ++	     NCURSES_CONST char *also,
              ++	     int which,
              ++	     int *xpos,
              ++	     int *ypos)
              ++{
              ++    int result = 0;
              ++    int x1, y1;
              ++    char cmd;
              ++    WINDOW *win;
              ++
              ++    getyx(stdscr, y1, x1);
              ++    win = statusline();
              ++
              ++    show_position(text, also, which, y1, x1);
              ++
              ++    if (log_in != 0) {
              ++	if (fscanf(log_in, "%c%d,%d\n", &cmd, &y1, &x1) == 3) {
              ++	    switch (cmd) {
              ++	    case LAST_POS:
              ++		result = 1;
              ++		(void) wgetch(stdscr);
              ++		break;
              ++	    case TEMP_POS:
              ++		result = 0;
              ++		wrefresh(stdscr);
              ++		napms(100);
              ++		break;
              ++	    default:
              ++		result = -1;
              ++		break;
              ++	    }
              ++	} else {
              ++	    result = -1;
              ++	}
              ++    } else {
              ++
              ++	switch (wgetch(stdscr)) {
              ++	case QUIT:
              ++	case ESCAPE:
              ++	case ERR:
              ++	    result = -1;
              ++	    break;
              ++	case ' ':
              ++	    result = 1;
              ++	    break;
              ++	case KEY_UP:
              ++	    if (y1 > 0) {
              ++		--y1;
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_DOWN:
              ++	    if (y1 < getmaxy(stdscr)) {
              ++		++y1;
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_LEFT:
              ++	    if (x1 > 0) {
              ++		--x1;
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_RIGHT:
              ++	    if (x1 < getmaxx(stdscr)) {
              ++		++x1;
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	}
              ++    }
              ++
              ++    wmove(stdscr, y1, x1);
              ++    *ypos = y1;
              ++    *xpos = x1;
              ++
              ++    if (result >= 0) {
              ++	if (log_out)
              ++	    fprintf(log_out, "%c%d,%d\n",
              ++		    ((result > 0)
              ++		     ? LAST_POS
              ++		     : TEMP_POS),
              ++		    y1, x1);
              ++    }
              ++    return result;
              ++}
              ++
              ++static PANEL *
              ++mkpanel(short color, int rows, int cols, int tly, int tlx)
              ++{
              ++    WINDOW *win;
              ++    PANEL *pan = 0;
              ++    char *userdata = malloc(3);
              ++
              ++    if ((win = newwin(rows, cols, tly, tlx)) != 0) {
              ++	keypad(win, TRUE);
              ++	if ((pan = new_panel(win)) == 0) {
              ++	    delwin(win);
              ++	} else if (use_colors) {
              ++	    short fg = ((color == COLOR_BLUE)
              ++			? COLOR_WHITE
              ++			: COLOR_BLACK);
              ++	    short bg = color;
              ++
              ++	    init_pair(color, fg, bg);
              ++	    wbkgdset(win, (chtype) (COLOR_PAIR(color) | ' '));
              ++	} else if (!unboxed) {
              ++	    wbkgdset(win, A_BOLD | ' ');
              ++	}
              ++    }
              ++    sprintf(userdata, "p%d", color % 8);
              ++    set_panel_userptr(pan, (NCURSES_CONST void *) userdata);
              ++    return pan;
              ++}
              ++
              ++static void
              ++my_remove_panel(PANEL ** pans, int which)
              ++{
              ++    if (pans[which] != 0) {
              ++	PANEL *pan = pans[which];
              ++	WINDOW *win = panel_window(pan);
              ++	char *user = (char *) panel_userptr(pan);
              ++
              ++	free(user);
              ++	del_panel(pan);
              ++	delwin(win);
              ++
              ++	pans[which] = 0;
              ++    }
              ++}
              ++
              ++#define MIN(a,b) ((a) < (b) ? (a) : (b))
              ++#define ABS(a)   ((a) < 0 ? -(a) : (a))
              ++
              ++static void
              ++my_create_panel(PANEL ** pans, int which, FillPanel myFill)
              ++{
              ++    PANEL *pan = 0;
              ++    int code;
              ++    int pair = which;
              ++    short fg = (pair == COLOR_BLUE) ? COLOR_WHITE : COLOR_BLACK;
              ++    short bg = pair;
              ++    int x0, y0, x1, y1;
              ++
              ++    init_pair(pair, fg, bg);
              ++
              ++    /* remove the old panel, if any */
              ++    my_remove_panel(pans, which);
              ++
              ++    /* get the position of one corner */
              ++    wmove(stdscr, getmaxy(stdscr) / 2, getmaxx(stdscr) / 2);
              ++    getyx(stdscr, y0, x0);
              ++    while ((code = get_position("First corner", "", which, &x0, &y0)) == 0) {
              ++	;
              ++    }
              ++
              ++    if (code > 0) {
              ++	char also[80];
              ++	sprintf(also, " (first %d,%d)", y0, x0);
              ++	/* get the position of the opposite corner */
              ++	while ((code = get_position("Opposite corner",
              ++				    also, which, &x1, &y1)) == 0) {
              ++	    ;
              ++	}
              ++
              ++	if (code > 0) {
              ++	    int tly = MIN(y0, y1);
              ++	    int tlx = MIN(x0, x1);
              ++	    pan = mkpanel(pair, ABS(y1 - y0) + 1, ABS(x1 - x0) + 1, tly, tlx);
              ++	    /* finish */
              ++	    myFill(pan);
              ++	    pans[which] = pan;
              ++	    pflush();
              ++	    wmove(stdscr, y1, x1);
              ++	}
              ++    }
              ++}
              ++
              ++static void
              ++my_move_panel(PANEL ** pans, int which, bool continuous)
              ++{
              ++    if (pans[which] != 0) {
              ++	int code;
              ++	int y0, x0;
              ++	int y1, x1;
              ++	WINDOW *win = panel_window(pans[which]);
              ++	char also[80];
              ++
              ++	getbegyx(win, y0, x0);
              ++	sprintf(also, " (start %d,%d)", y0, x0);
              ++	wmove(stdscr, y0, x0);
              ++	while ((code = get_position("Move panel", also, which, &x1, &y1)) == 0) {
              ++	    if (continuous) {
              ++		move_panel(pans[which], y1, x1);
              ++		pflush();
              ++	    }
              ++	}
              ++	if (code > 0) {
              ++	    move_panel(pans[which], y1, x1);
              ++	}
              ++    }
              ++}
              ++
              ++static void
              ++my_resize_panel(PANEL ** pans, int which, FillPanel myFill)
              ++{
              ++    if (pans[which] != 0) {
              ++	int code;
              ++	int y0, x0;
              ++	int y1, x1;
              ++	WINDOW *win = panel_window(pans[which]);
              ++	char also[80];
              ++
              ++	getbegyx(win, y0, x0);
              ++	sprintf(also, " (start %d,%d)", y0, x0);
              ++	wmove(stdscr, y0, x0);
              ++	while ((code = get_position("Resize panel",
              ++				    also, which, &x1, &y1)) == 0) {
              ++	    ;
              ++	}
              ++	if (code > 0) {
              ++	    WINDOW *next = newwin(ABS(y1 - y0) + 1,
              ++				  ABS(x1 - x0) + 1,
              ++				  MIN(y0, y1),
              ++				  MIN(x0, x1));
              ++	    if (next != 0) {
              ++		keypad(next, TRUE);
              ++		if (use_colors) {
              ++		    wbkgdset(next, (chtype) (COLOR_PAIR(which) | ' '));
              ++		} else if (!unboxed) {
              ++		    wbkgdset(next, A_BOLD | ' ');
              ++		}
              ++		replace_panel(pans[which], next);
              ++		myFill(pans[which]);
              ++		delwin(win);
              ++	    }
              ++	}
              ++    }
              ++}
              ++
              ++static void
              ++init_panel(void)
              ++{
              ++    register int y, x;
              ++
              ++    for (y = 0; y < LINES - 1; y++) {
              ++	for (x = 0; x < COLS; x++)
              ++	    wprintw(stdscr, "%d", (y + x) % 10);
              ++    }
              ++}
              ++
              ++static void
              ++fill_panel(PANEL * pan)
              ++{
              ++    WINDOW *win = panel_window(pan);
              ++    int num = ((const char *) panel_userptr(pan))[1];
              ++    int y, x;
              ++
              ++    wmove(win, 1, 1);
              ++    wprintw(win, "-pan%c-", num);
              ++    wclrtoeol(win);
              ++    box(win, 0, 0);
              ++    for (y = 2; y < getmaxy(win) - 1; y++) {
              ++	for (x = 1; x < getmaxx(win) - 1; x++) {
              ++	    wmove(win, y, x);
              ++	    waddch(win, UChar(num));
              ++	}
              ++    }
              ++}
              ++
              ++static void
              ++fill_unboxed(PANEL * pan)
              ++{
              ++    WINDOW *win = panel_window(pan);
              ++    int num = ((const char *) panel_userptr(pan))[1];
              ++    int y, x;
              ++
              ++    for (y = 0; y < getmaxy(win); y++) {
              ++	for (x = 0; x < getmaxx(win); x++) {
              ++	    wmove(win, y, x);
              ++	    waddch(win, UChar(num));
              ++	}
              ++    }
              ++}
              ++
              ++#if USE_WIDEC_SUPPORT
              ++static void
              ++make_fullwidth_digit(cchar_t *target, int digit)
              ++{
              ++    wchar_t source[2];
              ++
              ++    source[0] = digit + 0xff10;
              ++    source[1] = 0;
              ++    setcchar(target, source, A_NORMAL, 0, 0);
              ++}
              ++
              ++static void
              ++init_wide_panel(void)
              ++{
              ++    int digit;
              ++    cchar_t temp[10];
              ++
              ++    for (digit = 0; digit < 10; ++digit)
              ++	make_fullwidth_digit(&temp[digit], digit);
              ++
              ++    do {
              ++	int y, x;
              ++	getyx(stdscr, y, x);
              ++	digit = (y + x / 2) % 10;
              ++    } while (add_wch(&temp[digit]) != ERR);
              ++}
              ++
              ++static void
              ++fill_wide_panel(PANEL * pan)
              ++{
              ++    WINDOW *win = panel_window(pan);
              ++    int num = ((const char *) panel_userptr(pan))[1];
              ++    int y, x;
              ++
              ++    wmove(win, 1, 1);
              ++    wprintw(win, "-pan%c-", num);
              ++    wclrtoeol(win);
              ++    box(win, 0, 0);
              ++    for (y = 2; y < getmaxy(win) - 1; y++) {
              ++	for (x = 1; x < getmaxx(win) - 1; x++) {
              ++	    wmove(win, y, x);
              ++	    waddch(win, UChar(num));
              ++	}
              ++    }
              ++}
              ++#endif
              ++
              ++#define MAX_PANELS 5
              ++
              ++static int
              ++which_panel(PANEL * px[MAX_PANELS + 1], PANEL * pan)
              ++{
              ++    int result = 0;
              ++    int j;
              ++
              ++    for (j = 1; j <= MAX_PANELS; ++j) {
              ++	if (px[j] == pan) {
              ++	    result = j;
              ++	    break;
              ++	}
              ++    }
              ++    return result;
              ++}
              ++
              ++static void
              ++show_panels(PANEL * px[MAX_PANELS + 1])
              ++{
              ++    static const char *help[] =
              ++    {
              ++	"",
              ++	"Commands are letter/digit pairs.  Digits are the panel number.",
              ++	"",
              ++	"  b - put the panel on the bottom of the stack",
              ++	"  c - create the panel",
              ++	"  d - delete the panel",
              ++	"  h - hide the panel",
              ++	"  m - move the panel (M for continuous move)",
              ++	"  r - resize the panel",
              ++	"  s - show the panel",
              ++	"  b - put the panel on the top of the stack"
              ++    };
              ++
              ++    struct {
              ++	bool valid;
              ++	bool hidden;
              ++	PANEL *above;
              ++	PANEL *below;
              ++    } table[MAX_PANELS + 1];
              ++
              ++    WINDOW *win;
              ++    PANEL *pan;
              ++    int j;
              ++
              ++    for (j = 1; j <= MAX_PANELS; ++j) {
              ++	table[j].valid = (px[j] != 0);
              ++	if (table[j].valid) {
              ++	    table[j].hidden = panel_hidden(px[j]);
              ++	    table[j].above = panel_above(px[j]);
              ++	    table[j].below = panel_below(px[j]);
              ++	}
              ++    }
              ++
              ++    if ((win = newwin(LINES - 1, COLS, 0, 0)) != 0) {
              ++	keypad(win, TRUE);
              ++	if ((pan = new_panel(win)) != 0) {
              ++	    werase(win);
              ++	    mvwprintw(win, 0, 0, "Panels:\n");
              ++	    for (j = 1; j <= MAX_PANELS; ++j) {
              ++		if (table[j].valid) {
              ++		    wprintw(win, " %d:", j);
              ++		    if (table[j].hidden) {
              ++			waddstr(win, " hidden");
              ++		    } else {
              ++			if (table[j].above) {
              ++			    wprintw(win, " above %d",
              ++				    which_panel(px, table[j].above));
              ++			}
              ++			if (table[j].below) {
              ++			    wprintw(win, "%s below %d",
              ++				    table[j].above ? "," : "",
              ++				    which_panel(px, table[j].below));
              ++			}
              ++		    }
              ++		    waddch(win, '\n');
              ++		}
              ++	    }
              ++	    for (j = 0; j < (int) SIZEOF(help); ++j) {
              ++		if (wprintw(win, "%s\n", help[j]) == ERR)
              ++		    break;
              ++	    }
              ++	    wgetch(win);
              ++	    del_panel(pan);
              ++	    pflush();
              ++	}
              ++	delwin(win);
              ++    }
              ++}
              ++
              ++#define wrapper(func) \
              ++static int my_##func(PANEL *pan) \
              ++{ \
              ++    int code = ERR; \
              ++    if (pan != 0) { \
              ++	code = func(pan); \
              ++    } \
              ++    return code; \
              ++}
              ++/* *INDENT-OFF* */
              ++wrapper(bottom_panel)
              ++wrapper(hide_panel)
              ++wrapper(show_panel)
              ++wrapper(top_panel)
              ++/* *INDENT-ON* */
              ++
              ++static void
              ++do_panel(PANEL * px[MAX_PANELS + 1],
              ++	 NCURSES_CONST char *cmd,
              ++	 FillPanel myFill)
              ++{
              ++    int which = cmd[1] - '0';
              ++
              ++    if (which < 1 || which > MAX_PANELS) {
              ++	beep();
              ++	return;
              ++    }
              ++
              ++    if (log_in != 0) {
              ++	pflush();
              ++    }
              ++
              ++    saywhat(cmd);
              ++    switch (*cmd) {
              ++    case 'b':
              ++	my_bottom_panel(px[which]);
              ++	break;
              ++    case 'c':
              ++	my_create_panel(px, which, myFill);
              ++	break;
              ++    case 'd':
              ++	my_remove_panel(px, which);
              ++	break;
              ++    case 'h':
              ++	my_hide_panel(px[which]);
              ++	break;
              ++    case 'm':
              ++	my_move_panel(px, which, FALSE);
              ++	break;
              ++    case 'M':
              ++	my_move_panel(px, which, TRUE);
              ++	break;
              ++    case 'r':
              ++	my_resize_panel(px, which, myFill);
              ++	break;
              ++    case 's':
              ++	my_show_panel(px[which]);
              ++	break;
              ++    case 't':
              ++	my_top_panel(px[which]);
              ++	break;
              ++    }
              ++}
              ++
              ++static bool
              ++ok_letter(int ch)
              ++{
              ++    return isalpha(UChar(ch)) && strchr("bcdhmMrst", ch) != 0;
              ++}
              ++
              ++static bool
              ++ok_digit(int ch)
              ++{
              ++    return isdigit(UChar(ch)) && (ch >= '1') && (ch - '0' <= MAX_PANELS);
              ++}
              ++
              ++/*
              ++ * A command consists of one or more letter/digit pairs separated by a space.
              ++ * Digits are limited to 1..MAX_PANELS.
              ++ *
              ++ * End the command with a newline.  Reject other characters.
              ++ */
              ++static bool
              ++get_command(PANEL * px[MAX_PANELS + 1], char *buffer, int limit)
              ++{
              ++    int length = 0;
              ++    int y0, x0;
              ++    int c0, ch;
              ++    WINDOW *win;
              ++
              ++    getyx(stdscr, y0, x0);
              ++    win = statusline();
              ++    waddstr(win, "Command:");
              ++    buffer[length = 0] = '\0';
              ++
              ++    if (log_in != 0) {
              ++	if (fgets(buffer, limit - 3, log_in) != 0) {
              ++	    length = strlen(buffer);
              ++	    while (length > 0 && isspace(buffer[length - 1]))
              ++		buffer[--length] = '\0';
              ++	    waddstr(win, buffer);
              ++	} else {
              ++	    close_input();
              ++	}
              ++	(void) wgetch(win);
              ++    } else {
              ++	c0 = 0;
              ++	for (;;) {
              ++	    ch = wgetch(win);
              ++	    if (ch == ERR || ch == QUIT || ch == ESCAPE) {
              ++		buffer[0] = '\0';
              ++		break;
              ++	    } else if (ch == CTRL('L')) {
              ++		wrefresh(curscr);
              ++	    } else if (ch == '\n' || ch == KEY_ENTER) {
              ++		break;
              ++	    } else if (ch == '?') {
              ++		show_panels(px);
              ++	    } else if (length + 3 < limit) {
              ++		if (ch >= KEY_MIN) {
              ++		    beep();
              ++		} else if (ok_letter(UChar(ch))) {
              ++		    if (isalpha(UChar(c0))) {
              ++			beep();
              ++		    } else if (isdigit(UChar(c0))) {
              ++			wprintw(win, " %c", ch);
              ++			buffer[length++] = ' ';
              ++			buffer[length++] = c0 = ch;
              ++		    } else {
              ++			wprintw(win, "%c", ch);
              ++			buffer[length++] = c0 = ch;
              ++		    }
              ++		} else if (ok_digit(ch)) {
              ++		    if (isalpha(UChar(c0))) {
              ++			wprintw(win, "%c", ch);
              ++			buffer[length++] = c0 = ch;
              ++		    } else {
              ++			beep();
              ++		    }
              ++		} else if (ch == ' ') {
              ++		    if (isdigit(UChar(c0))) {
              ++			wprintw(win, "%c", ch);
              ++			buffer[length++] = c0 = ch;
              ++		    } else {
              ++			beep();
              ++		    }
              ++		} else {
              ++		    beep();
              ++		}
              ++	    } else {
              ++		beep();
              ++	    }
              ++	}
              ++    }
              ++
              ++    wmove(stdscr, y0, x0);
              ++
              ++    buffer[length] = '\0';
              ++    if (log_out && length) {
              ++	fprintf(log_out, "%s\n", buffer);
              ++    }
              ++    return (length != 0);
              ++}
              ++
              ++static void
              ++demo_panels(InitPanel myInit, FillPanel myFill)
              ++{
              ++    int itmp;
              ++    PANEL *px[MAX_PANELS + 1];
              ++    char buffer[BUFSIZ];
              ++
              ++    scrollok(stdscr, FALSE);	/* we don't want stdscr to scroll! */
              ++    refresh();
              ++
              ++    myInit();
              ++    memset(px, 0, sizeof(px));
              ++
              ++    while (get_command(px, buffer, sizeof(buffer))) {
              ++	int limit = strlen(buffer);
              ++	for (itmp = 0; itmp < limit; itmp += 3) {
              ++	    do_panel(px, buffer + itmp, myFill);
              ++	}
              ++	pflush();
              ++    }
              ++#if NO_LEAKS
              ++    for (itmp = 1; itmp <= MAX_PANELS; ++itmp) {
              ++	my_remove_panel(px, itmp);
              ++    }
              ++#endif
              ++}
              ++
              ++static void
              ++usage(void)
              ++{
              ++    static const char *const tbl[] =
              ++    {
              ++	"Usage: demo_panels [options]"
              ++	,""
              ++	,"Options:"
              ++	,"  -i file  read commands from file"
              ++	,"  -o file  record commands in file"
              ++	,"  -m       do not use colors"
              ++#if USE_WIDEC_SUPPORT
              ++	,"  -w       use wide-characters in panels and background"
              ++#endif
              ++	,"  -x       do not enclose panels in boxes"
              ++    };
              ++    size_t n;
              ++    for (n = 0; n < SIZEOF(tbl); n++)
              ++	fprintf(stderr, "%s\n", tbl[n]);
              ++    ExitProgram(EXIT_FAILURE);
              ++}
              ++
              + int
              +-main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              ++main(int argc, char *argv[])
              + {
              +-    printf("Not implemented - demo for panel library\n");
              +-    return EXIT_SUCCESS;
              ++    int c;
              ++    bool monochrome = FALSE;
              ++    InitPanel myInit = init_panel;
              ++    FillPanel myFill = fill_panel;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    while ((c = getopt(argc, argv, "i:o:mwx")) != -1) {
              ++	switch (c) {
              ++	case 'i':
              ++	    log_in = fopen(optarg, "r");
              ++	    break;
              ++	case 'o':
              ++	    log_out = fopen(optarg, "w");
              ++	    break;
              ++	case 'm':
              ++	    monochrome = TRUE;
              ++	    break;
              ++#if USE_WIDEC_SUPPORT
              ++	case 'w':
              ++	    myInit = init_wide_panel;
              ++	    myFill = fill_wide_panel;
              ++	    break;
              ++#endif
              ++	case 'x':
              ++	    unboxed = TRUE;
              ++	    break;
              ++	default:
              ++	    usage();
              ++	}
              ++    }
              ++    if (unboxed)
              ++	myFill = fill_unboxed;
              ++
              ++    initscr();
              ++    cbreak();
              ++    noecho();
              ++    keypad(stdscr, TRUE);
              ++
              ++    use_colors = monochrome ? FALSE : has_colors();
              ++    if (use_colors)
              ++	start_color();
              ++
              ++    demo_panels(myInit, myFill);
              ++    endwin();
              ++
              ++    close_input();
              ++    close_output();
              ++
              ++    ExitProgram(EXIT_SUCCESS);
              + }
              + #else
              + int
              +Index: test/demo_termcap.c
              +Prereq:  1.5 
              +--- ncurses-5.6/test/demo_termcap.c	2006-05-06 19:06:36.000000000 +0000
              ++++ ncurses-5.6-20071201/test/demo_termcap.c	2007-02-03 18:51:23.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2005,2006 Free Software Foundation, Inc.                   *
              ++ * Copyright (c) 2005-2006,2007 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            *
              +@@ -29,10 +29,11 @@
              + /*
              +  * Author: Thomas E. Dickey
              +  *
              +- * $Id: demo_termcap.c,v 1.5 2006/05/06 19:06:36 tom Exp $
              ++ * $Id: demo_termcap.c,v 1.6 2007/02/03 18:51:23 tom Exp $
              +  *
              +  * A simple demo of the termcap interface.
              +  */
              ++#define USE_TINFO
              + #include 
              + 
              + #if HAVE_TGETENT
              +Index: test/ditto.c
              +Prereq:  1.5 
              +--- ncurses-5.6/test/ditto.c	2005-04-16 16:35:49.000000000 +0000
              ++++ ncurses-5.6-20071201/test/ditto.c	2007-09-01 21:10:38.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2001,2005 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2005,2007 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            *
              +@@ -29,7 +29,7 @@
              + /*
              +  * Author: Thomas E. Dickey  1998
              +  *
              +- * $Id: ditto.c,v 1.5 2005/04/16 16:35:49 tom Exp $
              ++ * $Id: ditto.c,v 1.8 2007/09/01 21:10:38 tom Exp $
              +  *
              +  * The program illustrates how to set up multiple screens from a single
              +  * program.  Invoke the program by specifying another terminal on the same
              +@@ -72,19 +72,32 @@
              + 	errno = ENOTTY;
              + 	failed(path);
              +     }
              +-    fp = fopen(path, "a+");
              ++    fp = fopen(path, "r+");
              +     if (fp == 0)
              + 	failed(path);
              +     printf("opened %s\n", path);
              +     return fp;
              + }
              + 
              ++static void
              ++show_ditto(DITTO * data, int count, int which, int ch)
              ++{
              ++    int n;
              ++
              ++    for (n = 0; n < count; n++) {
              ++	set_term(data[n].screen);
              ++	addch(UChar(ch));
              ++	refresh();
              ++    }
              ++    set_term(data[which].screen);
              ++}
              ++
              + int
              + main(int argc GCC_UNUSED,
              +      char *argv[]GCC_UNUSED)
              + {
              +     int j;
              +-    int active_tty = 0;
              ++    int count;
              +     DITTO *data;
              + 
              +     if (argc <= 1)
              +@@ -105,7 +118,6 @@
              +      * Set up the screens.
              +      */
              +     for (j = 0; j < argc; j++) {
              +-	active_tty++;
              + 	data[j].screen = newterm((char *) 0,	/* assume $TERM is the same */
              + 				 data[j].output,
              + 				 data[j].input);
              +@@ -114,25 +126,27 @@
              + 	cbreak();
              + 	noecho();
              + 	scrollok(stdscr, TRUE);
              ++	nodelay(stdscr, TRUE);
              +     }
              + 
              +     /*
              +      * Loop, reading characters from any of the inputs and writing to all
              +      * of the screens.
              +      */
              +-    for (;;) {
              ++    for (count = 0;; ++count) {
              + 	int ch;
              +-	set_term(data[0].screen);
              ++	int which = (count % argc);
              ++
              ++	set_term(data[which].screen);
              ++	napms(20);
              + 	ch = getch();
              +-	if (ch == ERR)
              ++	if (ch == ERR) {
              ++	    /* echochar('.'); */
              + 	    continue;
              +-	if (ch == 4)
              +-	    break;
              +-	for (j = 0; j < argc; j++) {
              +-	    set_term(data[j].screen);
              +-	    addch(UChar(ch));
              +-	    refresh();
              + 	}
              ++	if (ch == CTRL('D'))
              ++	    break;
              ++	show_ditto(data, argc, which, ch);
              +     }
              + 
              +     /*
              +Index: test/dots.c
              +Prereq:  1.15 
              +--- ncurses-5.6/test/dots.c	2006-11-04 19:54:42.000000000 +0000
              ++++ ncurses-5.6-20071201/test/dots.c	2007-02-03 18:51:23.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1999-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1999-2006,2007 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            *
              +@@ -29,10 +29,11 @@
              + /*
              +  * Author: Thomas E. Dickey  1999
              +  *
              +- * $Id: dots.c,v 1.15 2006/11/04 19:54:42 tom Exp $
              ++ * $Id: dots.c,v 1.16 2007/02/03 18:51:23 tom Exp $
              +  *
              +  * A simple demo of the terminfo interface.
              +  */
              ++#define USE_TINFO
              + #include 
              + 
              + #if HAVE_SETUPTERM
              +Index: test/dots_mvcur.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/dots_mvcur.c	2007-06-02 20:01:32.000000000 +0000
              +@@ -0,0 +1,171 @@
              ++/****************************************************************************
              ++ * Copyright (c) 1999-2006,2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++
              ++/*
              ++ * Author: Thomas E. Dickey - 2007
              ++ *
              ++ * $Id: dots_mvcur.c,v 1.1 2007/06/02 20:01:32 tom Exp $
              ++ *
              ++ * A simple demo of the terminfo interface, and mvcur.
              ++ */
              ++#define USE_TINFO
              ++#include 
              ++
              ++#if HAVE_SETUPTERM
              ++
              ++#include 
              ++
              ++#define valid(s) ((s != 0) && s != (char *)-1)
              ++
              ++static bool interrupted = FALSE;
              ++static long total_chars = 0;
              ++static time_t started;
              ++
              ++static int
              ++outc(int c)
              ++{
              ++    if (interrupted) {
              ++	char tmp = c;
              ++	write(STDOUT_FILENO, &tmp, 1);
              ++    } else {
              ++	putc(c, stdout);
              ++    }
              ++    return 0;
              ++}
              ++
              ++static bool
              ++outs(char *s)
              ++{
              ++    if (valid(s)) {
              ++	tputs(s, 1, outc);
              ++	return TRUE;
              ++    }
              ++    return FALSE;
              ++}
              ++
              ++static void
              ++cleanup(void)
              ++{
              ++    outs(exit_attribute_mode);
              ++    if (!outs(orig_colors))
              ++	outs(orig_pair);
              ++    outs(clear_screen);
              ++    outs(cursor_normal);
              ++
              ++    printf("\n\n%ld total chars, rate %.2f/sec\n",
              ++	   total_chars,
              ++	   ((double) (total_chars) / (time((time_t *) 0) - started)));
              ++}
              ++
              ++static void
              ++onsig(int n GCC_UNUSED)
              ++{
              ++    interrupted = TRUE;
              ++}
              ++
              ++static float
              ++ranf(void)
              ++{
              ++    long r = (rand() & 077777);
              ++    return ((float) r / 32768.);
              ++}
              ++
              ++int
              ++main(
              ++	int argc GCC_UNUSED,
              ++	char *argv[]GCC_UNUSED)
              ++{
              ++    int x0 = 1, y0 = 1;
              ++    int x, y, z, p;
              ++    float r;
              ++    float c;
              ++    SCREEN *sp;
              ++
              ++    CATCHALL(onsig);
              ++
              ++    srand((unsigned) time(0));
              ++    sp = newterm((char *) 0, stdout, stdin);
              ++    outs(clear_screen);
              ++    outs(cursor_home);
              ++    outs(cursor_invisible);
              ++    if (max_colors > 1) {
              ++	if (!valid(set_a_foreground)
              ++	    || !valid(set_a_background)
              ++	    || (!valid(orig_colors) && !valid(orig_pair)))
              ++	    max_colors = -1;
              ++    }
              ++
              ++    r = (float) (lines - 4);
              ++    c = (float) (columns - 4);
              ++    started = time((time_t *) 0);
              ++
              ++    while (!interrupted) {
              ++	x = (int) (c * ranf()) + 2;
              ++	y = (int) (r * ranf()) + 2;
              ++	p = (ranf() > 0.9) ? '*' : ' ';
              ++
              ++	if (mvcur(y0, x0, y, x) != ERR) {
              ++	    x0 = x;
              ++	    y0 = y;
              ++	}
              ++
              ++	if (max_colors > 0) {
              ++	    z = (int) (ranf() * max_colors);
              ++	    if (ranf() > 0.01) {
              ++		tputs(tparm2(set_a_foreground, z), 1, outc);
              ++	    } else {
              ++		tputs(tparm2(set_a_background, z), 1, outc);
              ++		napms(1);
              ++	    }
              ++	} else if (valid(exit_attribute_mode)
              ++		   && valid(enter_reverse_mode)) {
              ++	    if (ranf() <= 0.01) {
              ++		outs((ranf() > 0.6)
              ++		     ? enter_reverse_mode
              ++		     : exit_attribute_mode);
              ++		napms(1);
              ++	    }
              ++	}
              ++	outc(p);
              ++	fflush(stdout);
              ++	++total_chars;
              ++    }
              ++    cleanup();
              ++    endwin();
              ++    delscreen(sp);
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              ++#else
              ++int
              ++main(int argc GCC_UNUSED,
              ++     char *argv[]GCC_UNUSED)
              ++{
              ++    fprintf(stderr, "This program requires terminfo\n");
              ++    exit(EXIT_FAILURE);
              ++}
              ++#endif
              +Index: test/echochar.c
              +Prereq:  1.3 
              +--- ncurses-5.6/test/echochar.c	2006-12-03 00:14:29.000000000 +0000
              ++++ ncurses-5.6-20071201/test/echochar.c	2007-07-21 17:41:55.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: echochar.c,v 1.3 2006/12/03 00:14:29 tom Exp $
              ++ * $Id: echochar.c,v 1.5 2007/07/21 17:41:55 tom Exp $
              +  *
              +  * Demonstrate the echochar function (compare to dots.c).
              +  * Thomas Dickey - 2006/11/4
              +@@ -89,7 +89,7 @@
              +     int last_fg = 0;
              +     int last_bg = 0;
              + 
              +-    while ((ch = getopt(argc, argv, "r")) != EOF) {
              ++    while ((ch = getopt(argc, argv, "r")) != -1) {
              + 	switch (ch) {
              + 	case 'r':
              + 	    opt_r = TRUE;
              +@@ -107,7 +107,7 @@
              +     if (use_colors) {
              + 	start_color();
              + 	if (COLOR_PAIRS > 0) {
              +-	    my_pairs = calloc(COLOR_PAIRS, sizeof(*my_pairs));
              ++	    my_pairs = calloc((unsigned) COLOR_PAIRS, sizeof(*my_pairs));
              + 	}
              + 	use_colors = (my_pairs != 0);
              +     }
              +@@ -146,10 +146,10 @@
              + 	    }
              + 	}
              + 	if (opt_r) {
              +-	    addch(p);
              ++	    addch(UChar(p));
              + 	    refresh();
              + 	} else {
              +-	    echochar(p);
              ++	    echochar(UChar(p));
              + 	}
              + 	++total_chars;
              +     }
              +Index: test/gdc.c
              +Prereq:  1.28 
              +--- ncurses-5.6/test/gdc.c	2006-05-20 15:37:44.000000000 +0000
              ++++ ncurses-5.6-20071201/test/gdc.c	2007-07-21 17:45:09.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -33,7 +33,7 @@
              +  * modified 10-18-89 for curses (jrl)
              +  * 10-18-89 added signal handling
              +  *
              +- * $Id: gdc.c,v 1.28 2006/05/20 15:37:44 tom Exp $
              ++ * $Id: gdc.c,v 1.29 2007/07/21 17:45:09 tom Exp $
              +  */
              + 
              + #include 
              +@@ -171,7 +171,7 @@
              + 
              +     CATCHALL(sighndl);
              + 
              +-    while ((k = getopt(argc, argv, "sn")) != EOF) {
              ++    while ((k = getopt(argc, argv, "sn")) != -1) {
              + 	switch (k) {
              + 	case 's':
              + 	    scrol = TRUE;
              +Index: test/hashtest.c
              +Prereq:  1.26 
              +--- ncurses-5.6/test/hashtest.c	2006-05-20 16:02:16.000000000 +0000
              ++++ ncurses-5.6-20071201/test/hashtest.c	2007-07-21 17:45:09.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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 @@
              +  *
              +  * Generate timing statistics for vertical-motion optimization.
              +  *
              +- * $Id: hashtest.c,v 1.26 2006/05/20 16:02:16 tom Exp $
              ++ * $Id: hashtest.c,v 1.27 2007/07/21 17:45:09 tom Exp $
              +  */
              + 
              + #ifdef TRACE
              +@@ -190,7 +190,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((c = getopt(argc, argv, "cf:h:l:norsx")) != EOF) {
              ++    while ((c = getopt(argc, argv, "cf:h:l:norsx")) != -1) {
              + 	switch (c) {
              + 	case 'c':
              + 	    continuous = TRUE;
              +Index: test/inch_wide.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/inch_wide.c	2007-07-21 18:37:38.000000000 +0000
              +@@ -0,0 +1,279 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: inch_wide.c,v 1.6 2007/07/21 18:37:38 tom Exp $
              ++ */
              ++/*
              ++       int in_wch(cchar_t *wcval);
              ++       int mvin_wch(int y, int x, cchar_t *wcval);
              ++       int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval);
              ++       int win_wch(WINDOW *win, cchar_t *wcval);
              ++       int in_wchstr(cchar_t *wchstr);
              ++       int in_wchnstr(cchar_t *wchstr, int n);
              ++       int win_wchstr(WINDOW *win, cchar_t *wchstr);
              ++       int win_wchnstr(WINDOW *win, cchar_t *wchstr, int n);
              ++       int mvin_wchstr(int y, int x, cchar_t *wchstr);
              ++       int mvin_wchnstr(int y, int x, cchar_t *wchstr, int n);
              ++       int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wchstr);
              ++       int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wchstr, int n);
              ++*/
              ++
              ++#include 
              ++
              ++#if USE_WIDEC_SUPPORT
              ++
              ++#define BASE_Y 7
              ++#define MAX_COLS 1024
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++static int
              ++test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int j;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    int limit;
              ++    cchar_t ch;
              ++    cchar_t text[MAX_COLS];
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((j = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(j)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    while (!Quit(j = mvwgetch(txtwin, txt_y, txt_x))) {
              ++	switch (j) {
              ++	case KEY_DOWN:
              ++	case 'j':
              ++	    if (txt_y < getmaxy(txtwin) - 1)
              ++		txt_y++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_UP:
              ++	case 'k':
              ++	    if (txt_y > base_y)
              ++		txt_y--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_LEFT:
              ++	case 'h':
              ++	    if (txt_x > 0)
              ++		txt_x--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_RIGHT:
              ++	case 'l':
              ++	    if (txt_x < getmaxx(txtwin) - 1)
              ++		txt_x++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case 'w':
              ++	    test_inchs(level + 1, argv, chrwin, strwin);
              ++	    if (txtbox != 0) {
              ++		touchwin(txtbox);
              ++		wnoutrefresh(txtbox);
              ++	    } else {
              ++		touchwin(txtwin);
              ++		wnoutrefresh(txtwin);
              ++	    }
              ++	    break;
              ++	default:
              ++	    beep();
              ++	    break;
              ++	}
              ++
              ++	mvwprintw(chrwin, 0, 0, "char:");
              ++	wclrtoeol(chrwin);
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (win_wch(txtwin, &ch) != ERR) {
              ++		if (wadd_wch(chrwin, &ch) != ERR) {
              ++		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              ++			if (mvwin_wch(txtwin, txt_y, j, &ch) != ERR) {
              ++			    if (wadd_wch(chrwin, &ch) == ERR) {
              ++				break;
              ++			    }
              ++			} else {
              ++			    break;
              ++			}
              ++		    }
              ++		}
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++	    if (in_wch(&ch) != ERR) {
              ++		if (wadd_wch(chrwin, &ch) != ERR) {
              ++		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              ++			if (mvin_wch(txt_y, j, &ch) != ERR) {
              ++			    if (wadd_wch(chrwin, &ch) == ERR) {
              ++				break;
              ++			    }
              ++			} else {
              ++			    break;
              ++			}
              ++		    }
              ++		}
              ++	    }
              ++	}
              ++	wnoutrefresh(chrwin);
              ++
              ++	mvwprintw(strwin, 0, 0, "text:");
              ++	wclrtobot(strwin);
              ++
              ++	limit = getmaxx(strwin) - 5;
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (win_wchstr(txtwin, text) != ERR) {
              ++		mvwadd_wchstr(strwin, 0, 5, text);
              ++	    }
              ++
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (win_wchnstr(txtwin, text, limit) != ERR) {
              ++		mvwadd_wchstr(strwin, 1, 5, text);
              ++	    }
              ++
              ++	    if (mvwin_wchstr(txtwin, txt_y, txt_x, text) != ERR) {
              ++		mvwadd_wchstr(strwin, 2, 5, text);
              ++	    }
              ++
              ++	    if (mvwin_wchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) {
              ++		mvwadd_wchstr(strwin, 3, 5, text);
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++	    if (in_wchstr(text) != ERR) {
              ++		mvwadd_wchstr(strwin, 0, 5, text);
              ++	    }
              ++
              ++	    move(txt_y, txt_x);
              ++	    if (in_wchnstr(text, limit) != ERR) {
              ++		mvwadd_wchstr(strwin, 1, 5, text);
              ++	    }
              ++
              ++	    if (mvin_wchstr(txt_y, txt_x, text) != ERR) {
              ++		mvwadd_wchstr(strwin, 2, 5, text);
              ++	    }
              ++
              ++	    if (mvin_wchnstr(txt_y, txt_x, text, limit) != ERR) {
              ++		mvwadd_wchstr(strwin, 3, 5, text);
              ++	    }
              ++	}
              ++
              ++	wnoutrefresh(strwin);
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *chrbox;
              ++    WINDOW *chrwin;
              ++    WINDOW *strwin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(chrbox, 0, 0);
              ++    wnoutrefresh(chrbox);
              ++
              ++    chrwin = derwin(chrbox, 1, COLS - 2, 1, 1);
              ++    strwin = derwin(chrbox, 4, COLS - 2, 2, 1);
              ++
              ++    test_inchs(1, argv, chrwin, strwin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              ++#else
              ++int
              ++main(void)
              ++{
              ++    printf("This program requires the wide-ncurses library\n");
              ++    ExitProgram(EXIT_FAILURE);
              ++}
              ++#endif
              +Index: test/inchs.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/inchs.c	2007-07-21 19:01:43.000000000 +0000
              +@@ -0,0 +1,272 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: inchs.c,v 1.9 2007/07/21 19:01:43 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ */
              ++/*
              ++       chtype inch(void);
              ++       chtype winch(WINDOW *win);
              ++       chtype mvinch(int y, int x);
              ++       chtype mvwinch(WINDOW *win, int y, int x);
              ++       int inchstr(chtype *chstr);
              ++       int inchnstr(chtype *chstr, int n);
              ++       int winchstr(WINDOW *win, chtype *chstr);
              ++       int winchnstr(WINDOW *win, chtype *chstr, int n);
              ++       int mvinchstr(int y, int x, chtype *chstr);
              ++       int mvinchnstr(int y, int x, chtype *chstr, int n);
              ++       int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
              ++       int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
              ++*/
              ++
              ++#include 
              ++
              ++#define BASE_Y 7
              ++#define MAX_COLS 1024
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++static int
              ++test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int ch, j;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    int limit;
              ++    chtype text[MAX_COLS];
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((j = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(j)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    while (!Quit(j = mvwgetch(txtwin, txt_y, txt_x))) {
              ++	switch (j) {
              ++	case KEY_DOWN:
              ++	case 'j':
              ++	    if (txt_y < getmaxy(txtwin) - 1)
              ++		txt_y++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_UP:
              ++	case 'k':
              ++	    if (txt_y > base_y)
              ++		txt_y--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_LEFT:
              ++	case 'h':
              ++	    if (txt_x > 0)
              ++		txt_x--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_RIGHT:
              ++	case 'l':
              ++	    if (txt_x < getmaxx(txtwin) - 1)
              ++		txt_x++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case 'w':
              ++	    test_inchs(level + 1, argv, chrwin, strwin);
              ++	    if (txtbox != 0) {
              ++		touchwin(txtbox);
              ++		wnoutrefresh(txtbox);
              ++	    } else {
              ++		touchwin(txtwin);
              ++		wnoutrefresh(txtwin);
              ++	    }
              ++	    break;
              ++	default:
              ++	    beep();
              ++	    break;
              ++	}
              ++
              ++	mvwprintw(chrwin, 0, 0, "char:");
              ++	wclrtoeol(chrwin);
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++
              ++	    if ((ch = winch(txtwin)) != ERR) {
              ++		if (waddch(chrwin, (chtype) ch) != ERR) {
              ++		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              ++			if ((ch = mvwinch(txtwin, txt_y, j)) != ERR) {
              ++			    if (waddch(chrwin, (chtype) ch) == ERR) {
              ++				break;
              ++			    }
              ++			} else {
              ++			    break;
              ++			}
              ++		    }
              ++		}
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++
              ++	    if ((ch = inch()) != ERR) {
              ++		if (waddch(chrwin, (chtype) ch) != ERR) {
              ++		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              ++			if ((ch = mvinch(txt_y, j)) != ERR) {
              ++			    if (waddch(chrwin, (chtype) ch) == ERR) {
              ++				break;
              ++			    }
              ++			} else {
              ++			    break;
              ++			}
              ++		    }
              ++		}
              ++	    }
              ++	}
              ++	wnoutrefresh(chrwin);
              ++
              ++	mvwprintw(strwin, 0, 0, "text:");
              ++	wclrtobot(strwin);
              ++
              ++	limit = getmaxx(strwin) - 5;
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (winchstr(txtwin, text) != ERR) {
              ++		mvwaddchstr(strwin, 0, 5, text);
              ++	    }
              ++
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (winchnstr(txtwin, text, limit) != ERR) {
              ++		mvwaddchstr(strwin, 1, 5, text);
              ++	    }
              ++
              ++	    if (mvwinchstr(txtwin, txt_y, txt_x, text) != ERR) {
              ++		mvwaddchstr(strwin, 2, 5, text);
              ++	    }
              ++
              ++	    if (mvwinchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) {
              ++		mvwaddchstr(strwin, 3, 5, text);
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++	    if (inchstr(text) != ERR) {
              ++		mvwaddchstr(strwin, 0, 5, text);
              ++	    }
              ++
              ++	    move(txt_y, txt_x);
              ++	    if (inchnstr(text, limit) != ERR) {
              ++		mvwaddchstr(strwin, 1, 5, text);
              ++	    }
              ++
              ++	    if (mvinchstr(txt_y, txt_x, text) != ERR) {
              ++		mvwaddchstr(strwin, 2, 5, text);
              ++	    }
              ++
              ++	    if (mvinchnstr(txt_y, txt_x, text, limit) != ERR) {
              ++		mvwaddchstr(strwin, 3, 5, text);
              ++	    }
              ++	}
              ++
              ++	wnoutrefresh(strwin);
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *chrbox;
              ++    WINDOW *chrwin;
              ++    WINDOW *strwin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(chrbox, 0, 0);
              ++    wnoutrefresh(chrbox);
              ++
              ++    chrwin = derwin(chrbox, 1, COLS - 2, 1, 1);
              ++    strwin = derwin(chrbox, 4, COLS - 2, 2, 1);
              ++
              ++    test_inchs(1, argv, chrwin, strwin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              +Index: test/ins_wide.c
              +Prereq:  1.7 
              +--- ncurses-5.6/test/ins_wide.c	2006-04-01 19:08:03.000000000 +0000
              ++++ ncurses-5.6-20071201/test/ins_wide.c	2007-07-21 17:41:55.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2002-2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: ins_wide.c,v 1.7 2006/04/01 19:08:03 tom Exp $
              ++ * $Id: ins_wide.c,v 1.9 2007/07/21 17:41:55 tom Exp $
              +  *
              +  * Demonstrate the wins_wstr() and wins_wch functions.
              +  * Thomas Dickey - 2002/11/23
              +@@ -55,7 +55,7 @@
              + #define WInsNStr   wins_nwstr
              + #define WInsStr    wins_wstr
              + 
              +-#define TABSIZE 8
              ++#define MY_TABSIZE 8
              + 
              + typedef enum {
              +     oDefault = 0,
              +@@ -123,7 +123,7 @@
              + 		--result;
              + 	    break;
              + 	case '\t':
              +-	    result += (TABSIZE - (result % TABSIZE));
              ++	    result += (MY_TABSIZE - (result % MY_TABSIZE));
              + 	    break;
              + 	case '\177':
              + 	    result += 2;
              +@@ -225,7 +225,7 @@
              +     WINDOW *look = 0;
              +     WINDOW *work = 0;
              +     WINDOW *show = 0;
              +-    int margin = (2 * TABSIZE) - 1;
              ++    int margin = (2 * MY_TABSIZE) - 1;
              +     Options option = ((m_opt ? oMove : oDefault)
              + 		      | ((w_opt || (level > 0)) ? oWindow : oDefault));
              + 
              +@@ -255,7 +255,7 @@
              +     }
              +     keypad(work, TRUE);
              + 
              +-    for (col = margin + 1; col < COLS; col += TABSIZE)
              ++    for (col = margin + 1; col < COLS; col += MY_TABSIZE)
              + 	mvwvline(work, row, col, '.', limit - 2);
              + 
              +     mvwvline(work, row, margin, ACS_VLINE, limit - 2);
              +@@ -490,7 +490,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((ch = getopt(argc, argv, "mn:w")) != EOF) {
              ++    while ((ch = getopt(argc, argv, "mn:w")) != -1) {
              + 	switch (ch) {
              + 	case 'm':
              + 	    m_opt = TRUE;
              +Index: test/inserts.c
              +Prereq:  1.15 
              +--- ncurses-5.6/test/inserts.c	2006-10-14 20:43:46.000000000 +0000
              ++++ ncurses-5.6-20071201/test/inserts.c	2007-07-21 17:41:55.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2002-2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: inserts.c,v 1.15 2006/10/14 20:43:46 tom Exp $
              ++ * $Id: inserts.c,v 1.18 2007/07/21 17:41:55 tom Exp $
              +  *
              +  * Demonstrate the winsstr() and winsch functions.
              +  * Thomas Dickey - 2002/10/19
              +@@ -50,7 +50,7 @@
              + #define MvWInsCh   mvwinsch
              + #define WInsCh     winsch
              + 
              +-#define TABSIZE 8
              ++#define MY_TABSIZE 8
              + 
              + typedef enum {
              +     oDefault = 0,
              +@@ -116,7 +116,7 @@
              + 		--result;
              + 	    break;
              + 	case '\t':
              +-	    result += (TABSIZE - (result % TABSIZE));
              ++	    result += (MY_TABSIZE - (result % MY_TABSIZE));
              + 	    break;
              + 	case '\177':
              + 	    result += 2;
              +@@ -147,7 +147,7 @@
              +     WINDOW *look = 0;
              +     WINDOW *work = 0;
              +     WINDOW *show = 0;
              +-    int margin = (2 * TABSIZE) - 1;
              ++    int margin = (2 * MY_TABSIZE) - 1;
              +     Options option = (Options) ((unsigned) (m_opt
              + 					    ? oMove
              + 					    : oDefault)
              +@@ -181,7 +181,7 @@
              +     }
              +     keypad(work, TRUE);
              + 
              +-    for (col = margin + 1; col < COLS; col += TABSIZE)
              ++    for (col = margin + 1; col < COLS; col += MY_TABSIZE)
              + 	mvwvline(work, row, col, '.', limit - 2);
              + 
              +     mvwvline(work, row, margin, ACS_VLINE, limit - 2);
              +@@ -405,7 +405,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((ch = getopt(argc, argv, "mn:w")) != EOF) {
              ++    while ((ch = getopt(argc, argv, "mn:w")) != -1) {
              + 	switch (ch) {
              + 	case 'm':
              + 	    m_opt = TRUE;
              +Index: test/key_names.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/key_names.c	2007-06-09 22:32:34.000000000 +0000
              +@@ -0,0 +1,56 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: key_names.c,v 1.2 2007/06/09 22:32:34 tom Exp $
              ++ */
              ++
              ++#include 
              ++
              ++#if USE_WIDEC_SUPPORT
              ++
              ++int
              ++main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              ++{
              ++    int n;
              ++
              ++    setlocale(LC_ALL, "");
              ++    for (n = -1; n < KEY_MAX + 512; n++) {
              ++	const char *result = key_name(n);
              ++	if (result != 0)
              ++	    printf("%d(%5o):%s\n", n, n, result);
              ++    }
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              ++#else
              ++int
              ++main(void)
              ++{
              ++    printf("This program requires the wide-ncurses library\n");
              ++    ExitProgram(EXIT_FAILURE);
              ++}
              ++#endif
              +Index: test/mk-test.awk
              +Prereq:  1.4 
              +--- ncurses-5.6/test/mk-test.awk	2006-10-21 22:56:50.000000000 +0000
              ++++ ncurses-5.6-20071201/test/mk-test.awk	2007-01-20 21:28:47.000000000 +0000
              +@@ -1,6 +1,6 @@
              +-# $Id: mk-test.awk,v 1.4 2006/10/21 22:56:50 tom Exp $
              ++# $Id: mk-test.awk,v 1.5 2007/01/20 21:28:47 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 2006 Free Software Foundation, Inc.                          #
              ++# Copyright (c) 2006,2007 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"), #
              +@@ -34,7 +34,13 @@
              + 		first = 1;
              + 		count = 0;
              + 	}
              +-!/^#/	{
              ++/^#/	{
              ++		next;
              ++	}
              ++/^$/	{
              ++		next;
              ++	}
              ++	{
              + 		if (first) {
              + 			print "# generated by mk-test.awk\n";
              + 			first = 0;
              +Index: test/modules
              +Prereq:  1.28 
              +--- ncurses-5.6/test/modules	2006-11-04 18:56:08.000000000 +0000
              ++++ ncurses-5.6-20071201/test/modules	2007-08-18 17:57:08.000000000 +0000
              +@@ -1,7 +1,6 @@
              +-# Test-Program modules
              +-# $Id: modules,v 1.28 2006/11/04 18:56:08 tom Exp $
              ++# $Id: modules,v 1.36 2007/08/18 17:57:08 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
              ++# Copyright (c) 1998-2006,2007 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 +27,9 @@
              + # authorization.                                                             #
              + ##############################################################################
              + #
              +-# Author: Thomas E. Dickey 1997-on
              ++# Author: Thomas E. Dickey	1997-on
              + #
              ++# Test-Program modules
              + 
              + @ base
              + background	progs		$(srcdir)	$(HEADER_DEPS)
              +@@ -40,13 +40,14 @@
              + color_set	progs		$(srcdir)	$(HEADER_DEPS)
              + demo_altkeys	progs		$(srcdir)	$(HEADER_DEPS)
              + demo_defkey	progs		$(srcdir)	$(HEADER_DEPS)
              +-demo_keyok	progs		$(srcdir)	$(HEADER_DEPS)
              + demo_forms	progs		$(srcdir)	$(HEADER_DEPS)	../include/form.h $(srcdir)/edit_field.h
              ++demo_keyok	progs		$(srcdir)	$(HEADER_DEPS)
              + demo_menus	progs		$(srcdir)	$(HEADER_DEPS)	../include/menu.h
              + demo_panels	progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h
              + demo_termcap	progs		$(srcdir)	$(HEADER_DEPS)
              + ditto		progs		$(srcdir)	$(HEADER_DEPS)
              + dots		progs		$(srcdir)	$(HEADER_DEPS)
              ++dots_mvcur	progs		$(srcdir)	$(HEADER_DEPS)
              + echochar	progs		$(srcdir)	$(HEADER_DEPS)
              + edit_field	progs		$(srcdir)	$(HEADER_DEPS)	$(srcdir)/edit_field.h
              + filter		progs		$(srcdir)	$(HEADER_DEPS)	../include/form.h
              +@@ -56,22 +57,33 @@
              + gdc		progs		$(srcdir)	$(HEADER_DEPS)
              + hanoi		progs		$(srcdir)	$(HEADER_DEPS)
              + hashtest	progs		$(srcdir)	$(HEADER_DEPS)
              ++inch_wide	progs		$(srcdir)	$(HEADER_DEPS)
              ++inchs		progs		$(srcdir)	$(HEADER_DEPS)
              + ins_wide	progs		$(srcdir)	$(HEADER_DEPS)
              + inserts		progs		$(srcdir)	$(HEADER_DEPS)
              ++key_names	progs		$(srcdir)	$(HEADER_DEPS)
              + keynames	progs		$(srcdir)	$(HEADER_DEPS)
              + knight		progs		$(srcdir)	$(HEADER_DEPS)
              + lrtest		progs		$(srcdir)	$(HEADER_DEPS)
              +-ncurses		progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h ../include/menu.h ../include/form.h
              + movewindow	progs		$(srcdir)	$(HEADER_DEPS)
              ++ncurses		progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h ../include/menu.h ../include/form.h
              + newdemo		progs		$(srcdir)	$(HEADER_DEPS)
              + railroad	progs		$(srcdir)	$(HEADER_DEPS)
              + rain		progs		$(srcdir)	$(HEADER_DEPS)
              + redraw		progs		$(srcdir)	$(HEADER_DEPS)
              + savescreen	progs		$(srcdir)	$(HEADER_DEPS)
              + tclock		progs		$(srcdir)	$(HEADER_DEPS)
              ++test_arrays	progs		$(srcdir)	$(HEADER_DEPS)
              ++test_get_wstr	progs		$(srcdir)	$(HEADER_DEPS)
              ++test_getstr	progs		$(srcdir)	$(HEADER_DEPS)
              ++test_instr	progs		$(srcdir)	$(HEADER_DEPS)
              ++test_inwstr	progs		$(srcdir)	$(HEADER_DEPS)
              ++test_opaque	progs		$(srcdir)	$(HEADER_DEPS)
              + testaddch	progs		$(srcdir)	$(HEADER_DEPS)
              + testcurs	progs		$(srcdir)	$(HEADER_DEPS)
              + testscanw	progs		$(srcdir)	$(HEADER_DEPS)
              + view		progs		$(srcdir)	$(HEADER_DEPS)
              + worm		progs		$(srcdir)	$(HEADER_DEPS)
              + xmas		progs		$(srcdir)	$(HEADER_DEPS)
              ++
              ++# vile:makemode
              +Index: test/movewindow.c
              +Prereq:  1.19 
              +--- ncurses-5.6/test/movewindow.c	2006-06-17 17:43:22.000000000 +0000
              ++++ ncurses-5.6-20071201/test/movewindow.c	2007-01-06 23:28:53.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: movewindow.c,v 1.19 2006/06/17 17:43:22 tom Exp $
              ++ * $Id: movewindow.c,v 1.20 2007/01/06 23:28:53 tom Exp $
              +  *
              +  * Demonstrate move functions for windows and derived windows from the curses
              +  * library.
              +@@ -63,14 +63,14 @@
              +     WINDOW *child;		/* the actual value */
              + } FRAME;
              + 
              +-static void head_line(char *fmt,...) GCC_PRINTFLIKE(1, 2);
              +-static void tail_line(char *fmt,...) GCC_PRINTFLIKE(1, 2);
              ++static void head_line(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
              ++static void tail_line(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
              + 
              + static unsigned num_windows;
              + static FRAME *all_windows;
              + 
              + static void
              +-message(int lineno, char *fmt, va_list argp)
              ++message(int lineno, const char *fmt, va_list argp)
              + {
              +     int y, x;
              + 
              +@@ -93,7 +93,7 @@
              + }
              + 
              + static void
              +-head_line(char *fmt,...)
              ++head_line(const char *fmt,...)
              + {
              +     va_list argp;
              + 
              +@@ -103,7 +103,7 @@
              + }
              + 
              + static void
              +-tail_line(char *fmt,...)
              ++tail_line(const char *fmt,...)
              + {
              +     va_list argp;
              + 
              +@@ -511,7 +511,7 @@
              +     /* *INDENT-OFF* */
              +     static struct {
              + 	int	key;
              +-	char *	msg;
              ++	const char * msg;
              +     } help[] = {
              + 	{ '?',		"Show this screen" },
              + 	{ 'b',		"Draw a box inside the current window" },
              +Index: test/ncurses.c
              +Prereq:  1.280 
              +--- ncurses-5.6/test/ncurses.c	2006-12-10 00:13:15.000000000 +0000
              ++++ ncurses-5.6-20071201/test/ncurses.c	2007-07-21 17:41:55.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -40,7 +40,7 @@
              +    Author: Eric S. Raymond  1993
              +            Thomas E. Dickey (beginning revision 1.27 in 1996).
              + 
              +-$Id: ncurses.c,v 1.280 2006/12/10 00:13:15 tom Exp $
              ++$Id: ncurses.c,v 1.292 2007/07/21 17:41:55 tom Exp $
              + 
              + ***************************************************************************/
              + 
              +@@ -955,11 +955,11 @@
              + 		for (n = 0; (wchar_buf[n] = wint_buf[n]) != 0; ++n) ;
              + 		if ((temp = wcstos(wchar_buf)) != 0) {
              + 		    wprintw(win, "I saw %d characters:\n\t`%s'.",
              +-			    wcslen(wchar_buf), temp);
              ++			    (int) wcslen(wchar_buf), temp);
              + 		    free(temp);
              + 		} else {
              + 		    wprintw(win, "I saw %d characters (cannot convert).",
              +-			    wcslen(wchar_buf));
              ++			    (int) wcslen(wchar_buf));
              + 		}
              + 	    }
              + 	    wclrtoeol(win);
              +@@ -3124,7 +3124,7 @@
              + /* *INDENT-OFF* */
              + static struct {
              +     attr_t attr;
              +-    char *name;
              ++    const char *name;
              + } attrs_to_cycle[] = {
              +     { A_NORMAL,		"normal" },
              +     { A_BOLD,		"bold" },
              +@@ -3379,12 +3379,14 @@
              +     WINDOW *wind;
              + };
              + 
              +-#ifdef NCURSES_VERSION
              +-#define keypad_active(win) (win)->_use_keypad
              +-#define scroll_active(win) (win)->_scroll
              ++#if defined(NCURSES_VERSION)
              ++#if NCURSES_VERSION_PATCH < 20070331
              ++#define is_keypad(win)   (win)->_use_keypad
              ++#define is_scrollok(win) (win)->_scroll
              ++#endif
              + #else
              +-#define keypad_active(win) FALSE
              +-#define scroll_active(win) FALSE
              ++#define is_keypad(win)   FALSE
              ++#define is_scrollok(win) FALSE
              + #endif
              + 
              + /* We need to know if these flags are actually set, so don't look in FRAME.
              +@@ -3395,14 +3397,16 @@
              + HaveKeypad(FRAME * curp)
              + {
              +     WINDOW *win = (curp ? curp->wind : stdscr);
              +-    return keypad_active(win);
              ++    (void) win;
              ++    return is_keypad(win);
              + }
              + 
              + static bool
              + HaveScroll(FRAME * curp)
              + {
              +     WINDOW *win = (curp ? curp->wind : stdscr);
              +-    return scroll_active(win);
              ++    (void) win;
              ++    return is_scrollok(win);
              + }
              + 
              + static void
              +@@ -3945,7 +3949,11 @@
              + {
              +     wmove(stdscr, LINES - 1, 0);
              +     wclrtoeol(stdscr);
              +-    waddstr(stdscr, text);
              ++    if (text != 0 && *text != '\0') {
              ++	waddstr(stdscr, text);
              ++	waddstr(stdscr, "; ");
              ++    }
              ++    waddstr(stdscr, "press any key to continue");
              + }				/* end of saywhat */
              + 
              + /*+-------------------------------------------------------------------------
              +@@ -3998,6 +4006,17 @@
              + 	fill_panel(win)
              + --------------------------------------------------------------------------*/
              + static void
              ++init_panel(void)
              ++{
              ++    register int y, x;
              ++
              ++    for (y = 0; y < LINES - 1; y++) {
              ++	for (x = 0; x < COLS; x++)
              ++	    wprintw(stdscr, "%d", (y + x) % 10);
              ++    }
              ++}
              ++
              ++static void
              + fill_panel(PANEL * pan)
              + {
              +     WINDOW *win = panel_window(pan);
              +@@ -4014,217 +4033,214 @@
              + 	    waddch(win, UChar(num));
              + 	}
              +     }
              +-}				/* end of fill_panel */
              ++}
              + 
              ++#if USE_WIDEC_SUPPORT
              + static void
              +-demo_panels(void)
              ++make_fullwidth_digit(cchar_t *target, int digit)
              + {
              +-    int itmp;
              +-    register int y, x;
              ++    wchar_t source[2];
              + 
              +-    refresh();
              ++    source[0] = digit + 0xff10;
              ++    source[1] = 0;
              ++    setcchar(target, source, A_NORMAL, 0, 0);
              ++}
              + 
              +-    for (y = 0; y < LINES - 1; y++) {
              +-	for (x = 0; x < COLS; x++)
              +-	    wprintw(stdscr, "%d", (y + x) % 10);
              +-    }
              +-    for (y = 0; y < 5; y++) {
              +-	PANEL *p1;
              +-	PANEL *p2;
              +-	PANEL *p3;
              +-	PANEL *p4;
              +-	PANEL *p5;
              +-
              +-	p1 = mkpanel(COLOR_RED,
              +-		     LINES / 2 - 2,
              +-		     COLS / 8 + 1,
              +-		     0,
              +-		     0);
              +-	set_panel_userptr(p1, (NCURSES_CONST void *) "p1");
              +-
              +-	p2 = mkpanel(COLOR_GREEN,
              +-		     LINES / 2 + 1,
              +-		     COLS / 7,
              +-		     LINES / 4,
              +-		     COLS / 10);
              +-	set_panel_userptr(p2, (NCURSES_CONST void *) "p2");
              +-
              +-	p3 = mkpanel(COLOR_YELLOW,
              +-		     LINES / 4,
              +-		     COLS / 10,
              +-		     LINES / 2,
              +-		     COLS / 9);
              +-	set_panel_userptr(p3, (NCURSES_CONST void *) "p3");
              +-
              +-	p4 = mkpanel(COLOR_BLUE,
              +-		     LINES / 2 - 2,
              +-		     COLS / 8,
              +-		     LINES / 2 - 2,
              +-		     COLS / 3);
              +-	set_panel_userptr(p4, (NCURSES_CONST void *) "p4");
              +-
              +-	p5 = mkpanel(COLOR_MAGENTA,
              +-		     LINES / 2 - 2,
              +-		     COLS / 8,
              +-		     LINES / 2,
              +-		     COLS / 2 - 2);
              +-	set_panel_userptr(p5, (NCURSES_CONST void *) "p5");
              +-
              +-	fill_panel(p1);
              +-	fill_panel(p2);
              +-	fill_panel(p3);
              +-	fill_panel(p4);
              +-	fill_panel(p5);
              +-	hide_panel(p4);
              +-	hide_panel(p5);
              +-	pflush();
              +-	saywhat("press any key to continue");
              +-	wait_a_while(nap_msec);
              ++static void
              ++init_wide_panel(void)
              ++{
              ++    int digit;
              ++    cchar_t temp[10];
              + 
              +-	saywhat("h3 s1 s2 s4 s5; press any key to continue");
              +-	move_panel(p1, 0, 0);
              +-	hide_panel(p3);
              +-	show_panel(p1);
              +-	show_panel(p2);
              +-	show_panel(p4);
              +-	show_panel(p5);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++    for (digit = 0; digit < 10; ++digit)
              ++	make_fullwidth_digit(&temp[digit], digit);
              + 
              +-	saywhat("s1; press any key to continue");
              +-	show_panel(p1);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++    do {
              ++	int y, x;
              ++	getyx(stdscr, y, x);
              ++	digit = (y + x / 2) % 10;
              ++    } while (add_wch(&temp[digit]) != ERR);
              ++}
              + 
              +-	saywhat("s2; press any key to continue");
              +-	show_panel(p2);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++static void
              ++fill_wide_panel(PANEL * pan)
              ++{
              ++    WINDOW *win = panel_window(pan);
              ++    int num = ((const char *) panel_userptr(pan))[1];
              ++    int y, x;
              + 
              +-	saywhat("m2; press any key to continue");
              +-	move_panel(p2, LINES / 3 + 1, COLS / 8);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++    wmove(win, 1, 1);
              ++    wprintw(win, "-pan%c-", num);
              ++    wclrtoeol(win);
              ++    box(win, 0, 0);
              ++    for (y = 2; y < getmaxy(win) - 1; y++) {
              ++	for (x = 1; x < getmaxx(win) - 1; x++) {
              ++	    wmove(win, y, x);
              ++	    waddch(win, UChar(num));
              ++	}
              ++    }
              ++}
              ++#endif
              + 
              +-	saywhat("s3;");
              +-	show_panel(p3);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++#define MAX_PANELS 5
              + 
              +-	saywhat("m3; press any key to continue");
              +-	move_panel(p3, LINES / 4 + 1, COLS / 15);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++static void
              ++canned_panel(PANEL * px[MAX_PANELS + 1], NCURSES_CONST char *cmd)
              ++{
              ++    int which = cmd[1] - '0';
              + 
              +-	saywhat("b3; press any key to continue");
              +-	bottom_panel(p3);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++    saywhat(cmd);
              ++    switch (*cmd) {
              ++    case 'h':
              ++	hide_panel(px[which]);
              ++	break;
              ++    case 's':
              ++	show_panel(px[which]);
              ++	break;
              ++    case 't':
              ++	top_panel(px[which]);
              ++	break;
              ++    case 'b':
              ++	bottom_panel(px[which]);
              ++	break;
              ++    case 'd':
              ++	rmpanel(px[which]);
              ++	break;
              ++    }
              ++    pflush();
              ++    wait_a_while(nap_msec);
              ++}
              + 
              +-	saywhat("s4; press any key to continue");
              +-	show_panel(p4);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++static void
              ++demo_panels(void (*InitPanel) (void), void (*FillPanel) (PANEL *))
              ++{
              ++    int count;
              ++    int itmp;
              ++    PANEL *px[MAX_PANELS + 1];
              + 
              +-	saywhat("s5; press any key to continue");
              +-	show_panel(p5);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++    scrollok(stdscr, FALSE);	/* we don't want stdscr to scroll! */
              ++    refresh();
              + 
              +-	saywhat("t3; press any key to continue");
              +-	top_panel(p3);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              ++    InitPanel();
              ++    for (count = 0; count < 5; count++) {
              ++	px[1] = mkpanel(COLOR_RED,
              ++			LINES / 2 - 2,
              ++			COLS / 8 + 1,
              ++			0,
              ++			0);
              ++	set_panel_userptr(px[1], (NCURSES_CONST void *) "p1");
              ++
              ++	px[2] = mkpanel(COLOR_GREEN,
              ++			LINES / 2 + 1,
              ++			COLS / 7,
              ++			LINES / 4,
              ++			COLS / 10);
              ++	set_panel_userptr(px[2], (NCURSES_CONST void *) "p2");
              ++
              ++	px[3] = mkpanel(COLOR_YELLOW,
              ++			LINES / 4,
              ++			COLS / 10,
              ++			LINES / 2,
              ++			COLS / 9);
              ++	set_panel_userptr(px[3], (NCURSES_CONST void *) "p3");
              ++
              ++	px[4] = mkpanel(COLOR_BLUE,
              ++			LINES / 2 - 2,
              ++			COLS / 8,
              ++			LINES / 2 - 2,
              ++			COLS / 3);
              ++	set_panel_userptr(px[4], (NCURSES_CONST void *) "p4");
              ++
              ++	px[5] = mkpanel(COLOR_MAGENTA,
              ++			LINES / 2 - 2,
              ++			COLS / 8,
              ++			LINES / 2,
              ++			COLS / 2 - 2);
              ++	set_panel_userptr(px[5], (NCURSES_CONST void *) "p5");
              ++
              ++	FillPanel(px[1]);
              ++	FillPanel(px[2]);
              ++	FillPanel(px[3]);
              ++	FillPanel(px[4]);
              ++	FillPanel(px[5]);
              + 
              +-	saywhat("t1; press any key to continue");
              +-	top_panel(p1);
              ++	hide_panel(px[4]);
              ++	hide_panel(px[5]);
              + 	pflush();
              ++	saywhat("");
              + 	wait_a_while(nap_msec);
              + 
              +-	saywhat("t2; press any key to continue");
              +-	top_panel(p2);
              ++	saywhat("h3 s1 s2 s4 s5");
              ++	move_panel(px[1], 0, 0);
              ++	hide_panel(px[3]);
              ++	show_panel(px[1]);
              ++	show_panel(px[2]);
              ++	show_panel(px[4]);
              ++	show_panel(px[5]);
              + 	pflush();
              + 	wait_a_while(nap_msec);
              + 
              +-	saywhat("t3; press any key to continue");
              +-	top_panel(p3);
              ++	canned_panel(px, "s1");
              ++	canned_panel(px, "s2");
              ++
              ++	saywhat("m2");
              ++	move_panel(px[2], LINES / 3 + 1, COLS / 8);
              + 	pflush();
              + 	wait_a_while(nap_msec);
              + 
              +-	saywhat("t4; press any key to continue");
              +-	top_panel(p4);
              ++	canned_panel(px, "s3");
              ++
              ++	saywhat("m3");
              ++	move_panel(px[3], LINES / 4 + 1, COLS / 15);
              + 	pflush();
              + 	wait_a_while(nap_msec);
              + 
              ++	canned_panel(px, "b3");
              ++	canned_panel(px, "s4");
              ++	canned_panel(px, "s5");
              ++	canned_panel(px, "t3");
              ++	canned_panel(px, "t1");
              ++	canned_panel(px, "t2");
              ++	canned_panel(px, "t3");
              ++	canned_panel(px, "t4");
              ++
              + 	for (itmp = 0; itmp < 6; itmp++) {
              +-	    WINDOW *w4 = panel_window(p4);
              +-	    WINDOW *w5 = panel_window(p5);
              ++	    WINDOW *w4 = panel_window(px[4]);
              ++	    WINDOW *w5 = panel_window(px[5]);
              + 
              +-	    saywhat("m4; press any key to continue");
              ++	    saywhat("m4");
              + 	    wmove(w4, LINES / 8, 1);
              + 	    waddstr(w4, mod[itmp]);
              +-	    move_panel(p4, LINES / 6, itmp * (COLS / 8));
              ++	    move_panel(px[4], LINES / 6, itmp * (COLS / 8));
              + 	    wmove(w5, LINES / 6, 1);
              + 	    waddstr(w5, mod[itmp]);
              + 	    pflush();
              + 	    wait_a_while(nap_msec);
              + 
              +-	    saywhat("m5; press any key to continue");
              ++	    saywhat("m5");
              + 	    wmove(w4, LINES / 6, 1);
              + 	    waddstr(w4, mod[itmp]);
              +-	    move_panel(p5, LINES / 3 - 1, (itmp * 10) + 6);
              ++	    move_panel(px[5], LINES / 3 - 1, (itmp * 10) + 6);
              + 	    wmove(w5, LINES / 8, 1);
              + 	    waddstr(w5, mod[itmp]);
              + 	    pflush();
              + 	    wait_a_while(nap_msec);
              + 	}
              + 
              +-	saywhat("m4; press any key to continue");
              +-	move_panel(p4, LINES / 6, itmp * (COLS / 8));
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("t5; press any key to continue");
              +-	top_panel(p5);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("t2; press any key to continue");
              +-	top_panel(p2);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("t1; press any key to continue");
              +-	top_panel(p1);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("d2; press any key to continue");
              +-	rmpanel(p2);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("h3; press any key to continue");
              +-	hide_panel(p3);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("d1; press any key to continue");
              +-	rmpanel(p1);
              +-	pflush();
              +-	wait_a_while(nap_msec);
              +-
              +-	saywhat("d4; press any key to continue");
              +-	rmpanel(p4);
              ++	saywhat("m4");
              ++	move_panel(px[4], LINES / 6, itmp * (COLS / 8));
              + 	pflush();
              + 	wait_a_while(nap_msec);
              + 
              +-	saywhat("d5; press any key to continue");
              +-	rmpanel(p5);
              +-	pflush();
              +-
              +-	rmpanel(p3);
              +-	pflush();
              ++	canned_panel(px, "t5");
              ++	canned_panel(px, "t2");
              ++	canned_panel(px, "t1");
              ++	canned_panel(px, "d2");
              ++	canned_panel(px, "h3");
              ++	canned_panel(px, "d1");
              ++	canned_panel(px, "d4");
              ++	canned_panel(px, "d5");
              ++	canned_panel(px, "d3");
              + 
              + 	wait_a_while(nap_msec);
              + 	if (nap_msec == 1)
              +@@ -5389,6 +5405,10 @@
              +     int finished = 0, c;
              +     unsigned n = 0;
              + 
              ++#ifdef NCURSES_MOUSE_VERSION
              ++    mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
              ++#endif
              ++
              +     move(18, 0);
              +     addstr("Defined edit/traversal keys:   ^Q/ESC- exit form\n");
              +     addstr("^N   -- go to next field       ^P  -- go to previous field\n");
              +@@ -5462,6 +5482,10 @@
              +     free_fieldtype(fty_passwd);
              +     noraw();
              +     nl();
              ++
              ++#ifdef NCURSES_MOUSE_VERSION
              ++    mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
              ++#endif
              + }
              + #endif /* USE_LIBFORM */
              + 
              +@@ -5884,7 +5908,13 @@
              + 
              + #if USE_LIBPANEL
              +     case 'o':
              +-	demo_panels();
              ++	demo_panels(init_panel, fill_panel);
              ++	break;
              ++#endif
              ++
              ++#if USE_WIDEC_SUPPORT
              ++    case 'O':
              ++	demo_panels(init_wide_panel, fill_wide_panel);
              + 	break;
              + #endif
              + 
              +@@ -6052,9 +6082,12 @@
              + #endif
              + #if USE_LIBPANEL
              + 	(void) puts("o = exercise panels library");
              ++#if USE_WIDEC_SUPPORT
              ++	(void) puts("O = exercise panels with wide-characters");
              ++#endif
              ++#endif
              + 	(void) puts("p = exercise pad features");
              + 	(void) puts("q = quit");
              +-#endif
              + #if USE_LIBFORM
              + 	(void) puts("r = exercise forms code");
              + #endif
              +@@ -6143,7 +6176,7 @@
              + 
              +     setlocale(LC_ALL, "");
              + 
              +-    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != EOF) {
              ++    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != -1) {
              + 	switch (c) {
              + #ifdef NCURSES_VERSION
              + 	case 'a':
              +Index: test/programs
              +Prereq:  1.5 
              +--- ncurses-5.6/test/programs	2006-11-04 18:56:49.000000000 +0000
              ++++ ncurses-5.6-20071201/test/programs	2007-08-18 17:57:00.000000000 +0000
              +@@ -1,6 +1,6 @@
              +-# $Id: programs,v 1.5 2006/11/04 18:56:49 tom Exp $
              ++# $Id: programs,v 1.13 2007/08/18 17:57:00 tom Exp $
              + ##############################################################################
              +-# Copyright (c) 2006 Free Software Foundation, Inc.                          #
              ++# Copyright (c) 2006,2007 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"), #
              +@@ -45,6 +45,7 @@
              + demo_termcap	$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	demo_termcap
              + ditto		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	ditto
              + dots		$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	dots
              ++dots_mvcur	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	dots_mvcur
              + echochar	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	echochar
              + filter		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	filter
              + firework	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	firework
              +@@ -53,8 +54,11 @@
              + gdc		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	gdc
              + hanoi		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	hanoi
              + hashtest	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	hashtest
              ++inch_wide	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inch_wide
              ++inchs		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inchs
              + ins_wide	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	ins_wide
              + inserts		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inserts
              ++key_names	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	key_names
              + keynames	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	keynames
              + knight		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	knight
              + lrtest		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	lrtest
              +@@ -66,9 +70,17 @@
              + redraw		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	redraw
              + savescreen	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	savescreen
              + tclock		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	tclock
              ++test_arrays	$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	test_arrays
              ++test_get_wstr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_get_wstr
              ++test_getstr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_getstr
              ++test_instr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_instr
              ++test_inwstr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_inwstr
              ++test_opaque	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_opaque
              + testaddch	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	testaddch
              + testcurs	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	testcurs
              + testscanw	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	testscanw
              + view		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	view
              + worm		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	worm
              + xmas		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	xmas
              ++
              ++# vile:makemode
              +Index: test/railroad.c
              +Prereq:  1.14 
              +--- ncurses-5.6/test/railroad.c	2006-05-20 16:02:04.000000000 +0000
              ++++ ncurses-5.6-20071201/test/railroad.c	2007-02-03 18:51:23.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2000-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 2000-2006,2007 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            *
              +@@ -29,10 +29,11 @@
              + /*
              +  * Author: Thomas E. Dickey - 2000
              +  *
              +- * $Id: railroad.c,v 1.14 2006/05/20 16:02:04 tom Exp $
              ++ * $Id: railroad.c,v 1.15 2007/02/03 18:51:23 tom Exp $
              +  *
              +  * A simple demo of the termcap interface.
              +  */
              ++#define USE_TINFO
              + #include 
              + 
              + #if HAVE_TGETENT
              +Index: test/redraw.c
              +Prereq:  1.3 
              +--- ncurses-5.6/test/redraw.c	2006-11-04 23:20:27.000000000 +0000
              ++++ ncurses-5.6-20071201/test/redraw.c	2007-06-30 17:55:06.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2006,2007 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            *
              +@@ -26,7 +26,7 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: redraw.c,v 1.3 2006/11/04 23:20:27 tom Exp $
              ++ * $Id: redraw.c,v 1.4 2007/06/30 17:55:06 tom Exp $
              +  *
              +  * Demonstrate the redrawwin() and wredrawln() functions.
              +  * Thomas Dickey - 2006/11/4
              +@@ -148,7 +148,7 @@
              + 	    if (ch > KEY_MIN) {
              + 		waddstr(win, keyname(ch));
              + 	    } else {
              +-		waddstr(win, unctrl(ch));
              ++		waddstr(win, unctrl(UChar(ch)));
              + 	    }
              + 	    break;
              + 	}
              +Index: test/savescreen.c
              +Prereq:  1.2 
              +--- ncurses-5.6/test/savescreen.c	2006-04-01 19:08:03.000000000 +0000
              ++++ ncurses-5.6-20071201/test/savescreen.c	2007-07-21 17:57:37.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              ++ * Copyright (c) 2007 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            *
              +@@ -26,23 +26,291 @@
              +  * authorization.                                                           *
              +  ****************************************************************************/
              + /*
              +- * $Id: savescreen.c,v 1.2 2006/04/01 19:08:03 tom Exp $
              ++ * $Id: savescreen.c,v 1.10 2007/07/21 17:57:37 tom Exp $
              +  *
              +  * Demonstrate save/restore functions from the curses library.
              +- * Thomas Dickey - 2006/2/11
              ++ * Thomas Dickey - 2007/7/14
              +  */
              +-/*
              +-scr_dump			-
              +-scr_init			-
              +-scr_restore			-
              +-scr_set				-
              +-*/
              + 
              + #include 
              + 
              ++#if TIME_WITH_SYS_TIME
              ++# include 
              ++# include 
              ++#else
              ++# if HAVE_SYS_TIME_H
              ++#  include 
              ++# else
              ++#  include 
              ++# endif
              ++#endif
              ++
              ++static bool use_init = FALSE;
              ++
              ++static void
              ++setup_next(void)
              ++{
              ++    curs_set(1);
              ++    reset_shell_mode();
              ++}
              ++
              ++static void
              ++cleanup(char *files[])
              ++{
              ++    int n;
              ++
              ++    for (n = 0; files[n] != 0; ++n) {
              ++	unlink(files[n]);
              ++    }
              ++}
              ++
              ++static int
              ++load_screen(char *filename)
              ++{
              ++    int result;
              ++
              ++    if (use_init) {
              ++	if ((result = scr_init(filename)) != ERR)
              ++	    result = scr_restore(filename);
              ++    } else {
              ++	result = scr_set(filename);
              ++    }
              ++    return result;
              ++}
              ++
              ++/*
              ++ * scr_restore() or scr_set() operates on curscr.  If we read a character using
              ++ * getch() that will refresh stdscr, wiping out the result.  To avoid that,
              ++ * copy the data back from curscr to stdscr.
              ++ */
              ++static void
              ++after_load(void)
              ++{
              ++    overwrite(curscr, stdscr);
              ++    doupdate();
              ++}
              ++
              ++static void
              ++show_what(int which, int last)
              ++{
              ++    int y, x;
              ++    time_t now = time((time_t *) 0);
              ++
              ++    getyx(stdscr, y, x);
              ++
              ++    move(0, 0);
              ++    printw("Saved %d of %d - %s", which, last + 1, ctime(&now));
              ++
              ++    move(y, x);
              ++
              ++    refresh();
              ++}
              ++
              ++static int
              ++get_command(int which, int last)
              ++{
              ++    int ch;
              ++
              ++    timeout(100);
              ++
              ++    do {
              ++	show_what(which, last);
              ++	ch = getch();
              ++    } while (ch == ERR);
              ++
              ++    return ch;
              ++}
              ++
              ++static void
              ++usage(void)
              ++{
              ++    static const char *msg[] =
              ++    {
              ++	"Usage: savescreen [-r] files",
              ++	"",
              ++	"Options:",
              ++	" -i  use scr_init/scr_restore rather than scr_set",
              ++	" -r  replay the screen-dump files"
              ++    };
              ++    unsigned n;
              ++    for (n = 0; n < SIZEOF(msg); ++n) {
              ++	fprintf(stderr, "%s\n", msg[n]);
              ++    }
              ++    ExitProgram(EXIT_FAILURE);
              ++}
              ++
              + int
              +-main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              ++main(int argc, char *argv[])
              + {
              +-    printf("Not implemented - demo for screen save/restore\n");
              +-    return EXIT_SUCCESS;
              ++    int ch;
              ++    int which = 0;
              ++    int last;
              ++    bool replaying = FALSE;
              ++    bool done = FALSE;
              ++    char **files;
              ++
              ++    while ((ch = getopt(argc, argv, "ir")) != -1) {
              ++	switch (ch) {
              ++	case 'i':
              ++	    use_init = TRUE;
              ++	    break;
              ++	case 'r':
              ++	    replaying = TRUE;
              ++	    break;
              ++	default:
              ++	    usage();
              ++	    break;
              ++	}
              ++    }
              ++
              ++    initscr();
              ++    cbreak();
              ++    noecho();
              ++    keypad(stdscr, TRUE);
              ++    curs_set(0);
              ++    if (has_colors()) {
              ++	start_color();
              ++	for (ch = 0; ch < COLOR_PAIRS; ++ch) {
              ++	    short pair = ch % COLOR_PAIRS;
              ++	    init_pair(pair, COLOR_WHITE, ch % COLORS);
              ++	}
              ++    }
              ++
              ++    files = argv + optind;
              ++    last = argc - optind - 1;
              ++    if (replaying) {
              ++
              ++	/*
              ++	 * Use the last file as the initial/current screen.
              ++	 */
              ++	if (last < 0) {
              ++	    endwin();
              ++	    printf("No screen-dumps given\n");
              ++	    ExitProgram(EXIT_FAILURE);
              ++	}
              ++
              ++	which = last;
              ++	if (load_screen(files[which]) == ERR) {
              ++	    endwin();
              ++	    printf("Cannot load screen-dump %s\n", files[which]);
              ++	    ExitProgram(EXIT_FAILURE);
              ++	}
              ++	after_load();
              ++
              ++	while (!done && (ch = getch()) != ERR) {
              ++	    switch (ch) {
              ++	    case 'n':
              ++		/*
              ++		 * If we got a "next" here, skip to the final screen before
              ++		 * moving to the next process.
              ++		 */
              ++		setup_next();
              ++		which = last;
              ++		done = TRUE;
              ++		break;
              ++	    case 'q':
              ++		endwin();
              ++		cleanup(files);
              ++		done = TRUE;
              ++		break;
              ++	    case KEY_BACKSPACE:
              ++	    case '\b':
              ++		if (--which < 0)
              ++		    which = last;
              ++		break;
              ++	    case ' ':
              ++		if (++which > last)
              ++		    which = 0;
              ++		break;
              ++	    default:
              ++		beep();
              ++		continue;
              ++	    }
              ++
              ++	    if (ch == 'q') {
              ++		;
              ++	    } else if (scr_restore(files[which]) == ERR) {
              ++		endwin();
              ++		printf("Cannot load screen-dump %s\n", files[which]);
              ++		cleanup(files);
              ++		ExitProgram(EXIT_FAILURE);
              ++	    } else {
              ++		wrefresh(curscr);
              ++	    }
              ++	}
              ++    } else {
              ++	int y;
              ++	int x;
              ++
              ++	move(2, 0);
              ++	printw("Use h,j,k,l or arrows to move around the screen\n");
              ++	printw("Press 'q' to quit, ' ' to dump a screen\n");
              ++	printw("When the last screen has been dumped, press 'n' to run the\n");
              ++	printw("screen-loader.  That allows only 'q', backspace and ' ' for\n");
              ++	printw("stepping through the dumped/restored screens.\n");
              ++	getyx(stdscr, y, x);
              ++
              ++	while (!done) {
              ++	    switch (ch = get_command(which, last)) {
              ++	    case 'n':
              ++		setup_next();
              ++		done = TRUE;
              ++		break;
              ++	    case 'q':
              ++		endwin();
              ++		cleanup(files);
              ++		done = TRUE;
              ++		break;
              ++	    case ' ':
              ++		if (files[which] != 0) {
              ++		    show_what(which + 1, last);
              ++		    if (scr_dump(files[which]) == ERR) {
              ++			endwin();
              ++			printf("Cannot write screen-dump %s\n", files[which]);
              ++			cleanup(files);
              ++			done = TRUE;
              ++			break;
              ++		    }
              ++		    ++which;
              ++		    if (has_colors()) {
              ++			short pair = which % COLOR_PAIRS;
              ++			bkgd(COLOR_PAIR(pair));
              ++		    }
              ++		} else {
              ++		    beep();
              ++		}
              ++		break;
              ++	    case KEY_LEFT:
              ++	    case 'h':
              ++		if (--x < 0)
              ++		    x = COLS - 1;
              ++		break;
              ++	    case KEY_DOWN:
              ++	    case 'j':
              ++		if (++y >= LINES)
              ++		    y = 1;
              ++		break;
              ++	    case KEY_UP:
              ++	    case 'k':
              ++		if (--y < 1)
              ++		    y = LINES - 1;
              ++		break;
              ++	    case KEY_RIGHT:
              ++	    case 'l':
              ++		if (++x >= COLS)
              ++		    x = 0;
              ++		break;
              ++	    }
              ++	    if (!done) {
              ++		time_t now = time((time_t *) 0);
              ++
              ++		move(0, 0);
              ++		addstr(ctime(&now));
              ++		move(y, x);
              ++		addch('#' | A_REVERSE);
              ++		move(y, x);
              ++	    }
              ++	}
              ++    }
              ++    ExitProgram(EXIT_SUCCESS);
              + }
              +Index: test/savescreen.sh
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/savescreen.sh	2007-07-14 21:50:26.000000000 +0000
              +@@ -0,0 +1,55 @@
              ++#!/bin/sh
              ++##############################################################################
              ++# Copyright (c) 2007 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"), #
              ++# to deal in the Software without restriction, including without limitation  #
              ++# the rights to use, copy, modify, merge, publish, distribute, distribute    #
              ++# with modifications, sublicense, and/or sell copies of the Software, and to #
              ++# permit persons to whom the Software is furnished to do so, subject to the  #
              ++# following conditions:                                                      #
              ++#                                                                            #
              ++# The above copyright notice and this permission notice shall be included in #
              ++# all copies or substantial portions of the Software.                        #
              ++#                                                                            #
              ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
              ++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
              ++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
              ++# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
              ++# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
              ++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
              ++# DEALINGS IN THE SOFTWARE.                                                  #
              ++#                                                                            #
              ++# Except as contained in this notice, the name(s) of the above copyright     #
              ++# holders shall not be used in advertising or otherwise to promote the sale, #
              ++# use or other dealings in this Software without prior written               #
              ++# authorization.                                                             #
              ++##############################################################################
              ++# $Id: savescreen.sh,v 1.3 2007/07/14 21:50:26 tom Exp $
              ++#
              ++# Use this script to exercise "savescreen".
              ++# It starts by generating a series of temporary-filenames, which are passed
              ++# to the test-program.  Loop as long as the first file named exists.
              ++PARAMS=
              ++NFILES=4
              ++PREFIX=savescreen-$$
              ++n=0
              ++BEGINS=$PREFIX-$n.tmp
              ++while test $n != $NFILES
              ++do
              ++	LATEST=$PREFIX-$n.tmp
              ++	PARAMS="$PARAMS $LATEST"
              ++	n=`expr $n + 1`
              ++done
              ++
              ++./savescreen $PARAMS
              ++if test -f $BEGINS
              ++then
              ++	while test -f $BEGINS
              ++	do
              ++		./savescreen -r $PARAMS
              ++	done
              ++else
              ++	echo "No screens were saved"
              ++fi
              +Index: test/test.priv.h
              +Prereq:  1.63 
              +--- ncurses-5.6/test/test.priv.h	2006-07-15 18:27:24.000000000 +0000
              ++++ ncurses-5.6-20071201/test/test.priv.h	2007-06-30 17:53:09.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -29,7 +29,7 @@
              + /****************************************************************************
              +  *  Author: Thomas E. Dickey                    1996-on                     *
              +  ****************************************************************************/
              +-/* $Id: test.priv.h,v 1.63 2006/07/15 18:27:24 tom Exp $ */
              ++/* $Id: test.priv.h,v 1.68 2007/06/30 17:53:09 tom Exp $ */
              + 
              + #ifndef __TEST_PRIV_H
              + #define __TEST_PRIV_H 1
              +@@ -309,7 +309,7 @@
              + 
              + #ifndef HAVE_TYPE_ATTR_T
              + #if !USE_WIDEC_SUPPORT
              +-#define attr_t long
              ++#define attr_t chtype
              + #endif
              + #endif
              + 
              +@@ -320,6 +320,10 @@
              + #define NCURSES_CH_T cchar_t
              + #endif
              + 
              ++#ifndef NCURSES_OPAQUE
              ++#define NCURSES_OPAQUE 0
              ++#endif
              ++
              + #ifndef CCHARW_MAX
              + #define CCHARW_MAX 5
              + #endif
              +@@ -404,6 +408,10 @@
              + 
              + #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H
              + #include 
              ++#if HAVE_NC_FREEALL && defined(USE_TINFO)
              ++#undef ExitProgram
              ++#define ExitProgram(code) _nc_free_tinfo(code)
              ++#endif
              + #else
              + #define typeMalloc(type,n) (type *) malloc((n) * sizeof(type))
              + #define typeRealloc(type,n,p) (type *) realloc(p, (n) * sizeof(type))
              +Index: test/test_arrays.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/test_arrays.c	2007-09-01 20:11:57.000000000 +0000
              +@@ -0,0 +1,79 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: test_arrays.c,v 1.2 2007/09/01 20:11:57 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ *
              ++ * Demonstrate the public arrays from the terminfo library.
              ++
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
              ++extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
              ++
              ++ */
              ++
              ++#define USE_TINFO
              ++#include 
              ++
              ++#define DUMP(name) dump_array(#name, name)
              ++
              ++static void
              ++dump_array(const char *name, NCURSES_CONST char *const *list)
              ++{
              ++    int n;
              ++
              ++    printf("%s:\n", name);
              ++    for (n = 0; list[n] != 0; ++n) {
              ++	printf("%5d:%s\n", n, list[n]);
              ++    }
              ++}
              ++
              ++int
              ++main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              ++{
              ++    DUMP(boolnames);
              ++    DUMP(boolcodes);
              ++    DUMP(boolfnames);
              ++
              ++    DUMP(numnames);
              ++    DUMP(numcodes);
              ++    DUMP(numfnames);
              ++
              ++    DUMP(strnames);
              ++    DUMP(strcodes);
              ++    DUMP(strfnames);
              ++
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              +Index: test/test_get_wstr.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/test_get_wstr.c	2007-08-11 17:01:43.000000000 +0000
              +@@ -0,0 +1,361 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: test_get_wstr.c,v 1.5 2007/08/11 17:01:43 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ *
              ++ * Demonstrate the get_wstr functions from the curses library.
              ++
              ++       int get_wstr(wint_t *wstr);
              ++       int getn_wstr(wint_t *wstr, int n);
              ++       int wget_wstr(WINDOW *win, wint_t *wstr);
              ++       int wgetn_wstr(WINDOW *win, wint_t *wstr, int n);
              ++       int mvget_wstr(int y, int x, wint_t *wstr);
              ++       int mvgetn_wstr(int y, int x, wint_t *wstr, int n);
              ++       int mvwget_wstr(WINDOW *win, int y, int x, wint_t *wstr);
              ++       int mvwgetn_wstr(WINDOW *win, int y, int x, wint_t *wstr, int n);
              ++ */
              ++
              ++#include 
              ++
              ++#if USE_WIDEC_SUPPORT
              ++
              ++#define BASE_Y 6
              ++#define MAX_COLS 1024
              ++
              ++typedef enum {
              ++    eGetStr = 0,
              ++    eGetNStr,
              ++    eMvGetStr,
              ++    eMvGetNStr,
              ++    eMaxFlavor
              ++} Flavors;
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++static int
              ++Remainder(WINDOW *txtwin)
              ++{
              ++    int result = getmaxx(txtwin) - getcurx(txtwin);
              ++    return (result > 0) ? result : 0;
              ++}
              ++
              ++/*
              ++ * Show a highlighted line in the place where input will happen.
              ++ */
              ++static void
              ++ShowPrompt(WINDOW *txtwin, int limit)
              ++{
              ++    wchgat(txtwin, limit, A_REVERSE, 0, NULL);
              ++    wnoutrefresh(txtwin);
              ++}
              ++
              ++static void
              ++MovePrompt(WINDOW *txtwin, int limit, int y, int x)
              ++{
              ++    wchgat(txtwin, Remainder(txtwin), A_NORMAL, 0, NULL);
              ++    wmove(txtwin, y, x);
              ++    ShowPrompt(txtwin, limit);
              ++}
              ++
              ++static int
              ++ShowFlavor(WINDOW *strwin, WINDOW *txtwin, int flavor, int limit)
              ++{
              ++    const char *name = "?";
              ++    bool limited = FALSE;
              ++    bool wins = (txtwin != stdscr);
              ++    int result;
              ++
              ++    switch (flavor) {
              ++    case eGetStr:
              ++	name = wins ? "wget_wstr" : "get_wstr";
              ++	break;
              ++    case eGetNStr:
              ++	limited = TRUE;
              ++	name = wins ? "wgetn_wstr" : "getn_wstr";
              ++	break;
              ++    case eMvGetStr:
              ++	name = wins ? "mvwget_wstr" : "mvget_wstr";
              ++	break;
              ++    case eMvGetNStr:
              ++	limited = TRUE;
              ++	name = wins ? "mvwgetn_wstr" : "mvgetn_wstr";
              ++	break;
              ++    case eMaxFlavor:
              ++	break;
              ++    }
              ++
              ++    wmove(strwin, 0, 0);
              ++    werase(strwin);
              ++
              ++    if (limited) {
              ++	wprintw(strwin, "%s(%d):", name, limit);
              ++    } else {
              ++	wprintw(strwin, "%s:", name);
              ++    }
              ++    result = limited ? limit : Remainder(txtwin);
              ++    ShowPrompt(txtwin, result);
              ++
              ++    wnoutrefresh(strwin);
              ++    return result;
              ++}
              ++
              ++static int
              ++test_get_wstr(int level, char **argv, WINDOW *strwin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int ch;
              ++    int rc;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    int flavor = 0;
              ++    int limit = getmaxx(strwin) - 5;
              ++    int actual;
              ++    wint_t buffer[MAX_COLS];
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((ch = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(ch)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    wmove(txtwin, txt_y, txt_x);
              ++    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              ++    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              ++	switch (ch) {
              ++	case KEY_DOWN:
              ++	case 'j':
              ++	    if (txt_y < getmaxy(txtwin) - 1) {
              ++		MovePrompt(txtwin, actual, ++txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_UP:
              ++	case 'k':
              ++	    if (txt_y > base_y) {
              ++		MovePrompt(txtwin, actual, --txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_LEFT:
              ++	case 'h':
              ++	    if (txt_x > 0) {
              ++		MovePrompt(txtwin, actual, txt_y, --txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_RIGHT:
              ++	case 'l':
              ++	    if (txt_x < getmaxx(txtwin) - 1) {
              ++		MovePrompt(txtwin, actual, txt_y, ++txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case 'w':
              ++	    test_get_wstr(level + 1, argv, strwin);
              ++	    if (txtbox != 0) {
              ++		touchwin(txtbox);
              ++		wnoutrefresh(txtbox);
              ++	    } else {
              ++		touchwin(txtwin);
              ++		wnoutrefresh(txtwin);
              ++	    }
              ++	    break;
              ++
              ++	case '-':
              ++	    if (limit > 0) {
              ++		actual = ShowFlavor(strwin, txtwin, flavor, --limit);
              ++		MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case '+':
              ++	    actual = ShowFlavor(strwin, txtwin, flavor, ++limit);
              ++	    MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    break;
              ++
              ++	case '<':
              ++	    if (flavor > 0) {
              ++		actual = ShowFlavor(strwin, txtwin, --flavor, limit);
              ++		MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case '>':
              ++	    if (flavor + 1 < eMaxFlavor) {
              ++		actual = ShowFlavor(strwin, txtwin, ++flavor, limit);
              ++		MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case ':':
              ++	    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              ++	    *buffer = '\0';
              ++	    rc = ERR;
              ++	    echo();
              ++	    wattrset(txtwin, A_REVERSE);
              ++	    switch (flavor) {
              ++	    case eGetStr:
              ++		if (txtwin != stdscr) {
              ++		    wmove(txtwin, txt_y, txt_x);
              ++		    rc = wget_wstr(txtwin, buffer);
              ++		} else {
              ++		    move(txt_y, txt_x);
              ++		    rc = get_wstr(buffer);
              ++		}
              ++		break;
              ++	    case eGetNStr:
              ++		if (txtwin != stdscr) {
              ++		    wmove(txtwin, txt_y, txt_x);
              ++		    rc = wgetn_wstr(txtwin, buffer, limit);
              ++		} else {
              ++		    move(txt_y, txt_x);
              ++		    rc = getn_wstr(buffer, limit);
              ++		}
              ++		break;
              ++	    case eMvGetStr:
              ++		if (txtwin != stdscr) {
              ++		    rc = mvwget_wstr(txtwin, txt_y, txt_x, buffer);
              ++		} else {
              ++		    rc = mvget_wstr(txt_y, txt_x, buffer);
              ++		}
              ++		break;
              ++	    case eMvGetNStr:
              ++		if (txtwin != stdscr) {
              ++		    rc = mvwgetn_wstr(txtwin, txt_y, txt_x, buffer, limit);
              ++		} else {
              ++		    rc = mvgetn_wstr(txt_y, txt_x, buffer, limit);
              ++		}
              ++		break;
              ++	    case eMaxFlavor:
              ++		break;
              ++	    }
              ++	    noecho();
              ++	    wattrset(txtwin, A_NORMAL);
              ++	    wprintw(strwin, "%d", rc);
              ++	    waddwstr(strwin, (wchar_t *) buffer);
              ++	    wnoutrefresh(strwin);
              ++	    break;
              ++	default:
              ++	    beep();
              ++	    break;
              ++	}
              ++	doupdate();
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *chrbox;
              ++    WINDOW *strwin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(chrbox, 0, 0);
              ++    wnoutrefresh(chrbox);
              ++
              ++    strwin = derwin(chrbox, 4, COLS - 2, 1, 1);
              ++
              ++    test_get_wstr(1, argv, strwin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              ++#else
              ++int
              ++main(void)
              ++{
              ++    printf("This program requires the wide-ncurses library\n");
              ++    ExitProgram(EXIT_FAILURE);
              ++}
              ++#endif
              +Index: test/test_getstr.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/test_getstr.c	2007-08-11 16:56:25.000000000 +0000
              +@@ -0,0 +1,351 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: test_getstr.c,v 1.7 2007/08/11 16:56:25 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ *
              ++ * Demonstrate the getstr functions from the curses library.
              ++
              ++       int getstr(char *str);
              ++       int getnstr(char *str, int n);
              ++       int wgetstr(WINDOW *win, char *str);
              ++       int wgetnstr(WINDOW *win, char *str, int n);
              ++       int mvgetstr(int y, int x, char *str);
              ++       int mvwgetstr(WINDOW *win, int y, int x, char *str);
              ++       int mvgetnstr(int y, int x, char *str, int n);
              ++       int mvwgetnstr(WINDOW *, int y, int x, char *str, int n);
              ++ */
              ++
              ++#include 
              ++
              ++#define BASE_Y 6
              ++#define MAX_COLS 1024
              ++
              ++typedef enum {
              ++    eGetStr = 0,
              ++    eGetNStr,
              ++    eMvGetStr,
              ++    eMvGetNStr,
              ++    eMaxFlavor
              ++} Flavors;
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++static int
              ++Remainder(WINDOW *txtwin)
              ++{
              ++    int result = getmaxx(txtwin) - getcurx(txtwin);
              ++    return (result > 0) ? result : 0;
              ++}
              ++
              ++/*
              ++ * Show a highlighted line in the place where input will happen.
              ++ */
              ++static void
              ++ShowPrompt(WINDOW *txtwin, int limit)
              ++{
              ++    wchgat(txtwin, limit, A_REVERSE, 0, NULL);
              ++    wnoutrefresh(txtwin);
              ++}
              ++
              ++static void
              ++MovePrompt(WINDOW *txtwin, int limit, int y, int x)
              ++{
              ++    wchgat(txtwin, Remainder(txtwin), A_NORMAL, 0, NULL);
              ++    wmove(txtwin, y, x);
              ++    ShowPrompt(txtwin, limit);
              ++}
              ++
              ++static int
              ++ShowFlavor(WINDOW *strwin, WINDOW *txtwin, int flavor, int limit)
              ++{
              ++    const char *name = "?";
              ++    bool limited = FALSE;
              ++    bool wins = (txtwin != stdscr);
              ++    int result;
              ++
              ++    switch (flavor) {
              ++    case eGetStr:
              ++	name = wins ? "wgetstr" : "getstr";
              ++	break;
              ++    case eGetNStr:
              ++	limited = TRUE;
              ++	name = wins ? "wgetnstr" : "getnstr";
              ++	break;
              ++    case eMvGetStr:
              ++	name = wins ? "mvwgetstr" : "mvgetstr";
              ++	break;
              ++    case eMvGetNStr:
              ++	limited = TRUE;
              ++	name = wins ? "mvwgetnstr" : "mvgetnstr";
              ++	break;
              ++    case eMaxFlavor:
              ++	break;
              ++    }
              ++
              ++    wmove(strwin, 0, 0);
              ++    werase(strwin);
              ++
              ++    if (limited) {
              ++	wprintw(strwin, "%s(%d):", name, limit);
              ++    } else {
              ++	wprintw(strwin, "%s:", name);
              ++    }
              ++    result = limited ? limit : Remainder(txtwin);
              ++    ShowPrompt(txtwin, result);
              ++
              ++    wnoutrefresh(strwin);
              ++    return result;
              ++}
              ++
              ++static int
              ++test_getstr(int level, char **argv, WINDOW *strwin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int ch;
              ++    int rc;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    int flavor = 0;
              ++    int limit = getmaxx(strwin) - 5;
              ++    int actual;
              ++
              ++    char buffer[MAX_COLS];
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((ch = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(ch)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    wmove(txtwin, txt_y, txt_x);
              ++    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              ++    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              ++	switch (ch) {
              ++	case KEY_DOWN:
              ++	case 'j':
              ++	    if (txt_y < getmaxy(txtwin) - 1) {
              ++		MovePrompt(txtwin, actual, ++txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_UP:
              ++	case 'k':
              ++	    if (txt_y > base_y) {
              ++		MovePrompt(txtwin, actual, --txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_LEFT:
              ++	case 'h':
              ++	    if (txt_x > 0) {
              ++		MovePrompt(txtwin, actual, txt_y, --txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case KEY_RIGHT:
              ++	case 'l':
              ++	    if (txt_x < getmaxx(txtwin) - 1) {
              ++		MovePrompt(txtwin, actual, txt_y, ++txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case 'w':
              ++	    test_getstr(level + 1, argv, strwin);
              ++	    if (txtbox != 0) {
              ++		touchwin(txtbox);
              ++		wnoutrefresh(txtbox);
              ++	    } else {
              ++		touchwin(txtwin);
              ++		wnoutrefresh(txtwin);
              ++	    }
              ++	    break;
              ++
              ++	case '-':
              ++	    if (limit > 0) {
              ++		actual = ShowFlavor(strwin, txtwin, flavor, --limit);
              ++		MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case '+':
              ++	    actual = ShowFlavor(strwin, txtwin, flavor, ++limit);
              ++	    MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    break;
              ++
              ++	case '<':
              ++	    if (flavor > 0) {
              ++		actual = ShowFlavor(strwin, txtwin, --flavor, limit);
              ++		MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case '>':
              ++	    if (flavor + 1 < eMaxFlavor) {
              ++		actual = ShowFlavor(strwin, txtwin, ++flavor, limit);
              ++		MovePrompt(txtwin, actual, txt_y, txt_x);
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++
              ++	case ':':
              ++	    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              ++	    *buffer = '\0';
              ++	    rc = ERR;
              ++	    echo();
              ++	    wattrset(txtwin, A_REVERSE);
              ++	    switch (flavor) {
              ++	    case eGetStr:
              ++		if (txtwin != stdscr) {
              ++		    wmove(txtwin, txt_y, txt_x);
              ++		    rc = wgetstr(txtwin, buffer);
              ++		} else {
              ++		    move(txt_y, txt_x);
              ++		    rc = getstr(buffer);
              ++		}
              ++		break;
              ++	    case eGetNStr:
              ++		if (txtwin != stdscr) {
              ++		    wmove(txtwin, txt_y, txt_x);
              ++		    rc = wgetnstr(txtwin, buffer, limit);
              ++		} else {
              ++		    move(txt_y, txt_x);
              ++		    rc = getnstr(buffer, limit);
              ++		}
              ++		break;
              ++	    case eMvGetStr:
              ++		if (txtwin != stdscr) {
              ++		    rc = mvwgetstr(txtwin, txt_y, txt_x, buffer);
              ++		} else {
              ++		    rc = mvgetstr(txt_y, txt_x, buffer);
              ++		}
              ++		break;
              ++	    case eMvGetNStr:
              ++		if (txtwin != stdscr) {
              ++		    rc = mvwgetnstr(txtwin, txt_y, txt_x, buffer, limit);
              ++		} else {
              ++		    rc = mvgetnstr(txt_y, txt_x, buffer, limit);
              ++		}
              ++		break;
              ++	    case eMaxFlavor:
              ++		break;
              ++	    }
              ++	    noecho();
              ++	    wattrset(txtwin, A_NORMAL);
              ++	    wprintw(strwin, "%d:%s", rc, buffer);
              ++	    wnoutrefresh(strwin);
              ++	    break;
              ++	default:
              ++	    beep();
              ++	    break;
              ++	}
              ++	doupdate();
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *chrbox;
              ++    WINDOW *strwin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(chrbox, 0, 0);
              ++    wnoutrefresh(chrbox);
              ++
              ++    strwin = derwin(chrbox, 4, COLS - 2, 1, 1);
              ++
              ++    test_getstr(1, argv, strwin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              +Index: test/test_instr.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/test_instr.c	2007-07-21 19:38:04.000000000 +0000
              +@@ -0,0 +1,260 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: test_instr.c,v 1.4 2007/07/21 19:38:04 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ *
              ++ * Demonstrate the instr functions from the curses library.
              ++
              ++       int instr(char *str);
              ++       int innstr(char *str, int n);
              ++       int winstr(WINDOW *win, char *str);
              ++       int winnstr(WINDOW *win, char *str, int n);
              ++       int mvinstr(int y, int x, char *str);
              ++       int mvinnstr(int y, int x, char *str, int n);
              ++       int mvwinstr(WINDOW *win, int y, int x, char *str);
              ++       int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);
              ++ */
              ++
              ++#include 
              ++
              ++#define BASE_Y 6
              ++#define MAX_COLS 1024
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++static void
              ++show_1st(WINDOW *win, int line, char *buffer)
              ++{
              ++    mvwaddstr(win, line, 5, buffer);
              ++}
              ++
              ++static void
              ++showmore(WINDOW *win, int line, char *buffer)
              ++{
              ++    wmove(win, line, 0);
              ++    wclrtoeol(win);
              ++    show_1st(win, line, buffer);
              ++}
              ++
              ++static int
              ++test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int ch;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    int limit = getmaxx(strwin) - 5;
              ++
              ++    char buffer[MAX_COLS];
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((ch = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(ch)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              ++	switch (ch) {
              ++	case KEY_DOWN:
              ++	case 'j':
              ++	    if (txt_y < getmaxy(txtwin) - 1)
              ++		txt_y++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_UP:
              ++	case 'k':
              ++	    if (txt_y > base_y)
              ++		txt_y--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_LEFT:
              ++	case 'h':
              ++	    if (txt_x > 0)
              ++		txt_x--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_RIGHT:
              ++	case 'l':
              ++	    if (txt_x < getmaxx(txtwin) - 1)
              ++		txt_x++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case 'w':
              ++	    test_inchs(level + 1, argv, chrwin, strwin);
              ++	    if (txtbox != 0) {
              ++		touchwin(txtbox);
              ++		wnoutrefresh(txtbox);
              ++	    } else {
              ++		touchwin(txtwin);
              ++		wnoutrefresh(txtwin);
              ++	    }
              ++	    break;
              ++	case '-':
              ++	    if (limit > 0) {
              ++		--limit;
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case '+':
              ++	    ++limit;
              ++	    break;
              ++	default:
              ++	    beep();
              ++	    break;
              ++	}
              ++
              ++	mvwprintw(chrwin, 0, 0, "line:");
              ++	wclrtoeol(chrwin);
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++
              ++	    if (winstr(txtwin, buffer) != ERR) {
              ++		show_1st(chrwin, 0, buffer);
              ++	    }
              ++	    if (mvwinstr(txtwin, txt_y, txt_x, buffer) != ERR) {
              ++		showmore(chrwin, 1, buffer);
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++
              ++	    if (instr(buffer) != ERR) {
              ++		show_1st(chrwin, 0, buffer);
              ++	    }
              ++	    if (mvinstr(txt_y, txt_x, buffer) != ERR) {
              ++		showmore(chrwin, 1, buffer);
              ++	    }
              ++	}
              ++	wnoutrefresh(chrwin);
              ++
              ++	mvwprintw(strwin, 0, 0, "%4d:", limit);
              ++	wclrtobot(strwin);
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (winnstr(txtwin, buffer, limit) != ERR) {
              ++		show_1st(strwin, 0, buffer);
              ++	    }
              ++
              ++	    if (mvwinnstr(txtwin, txt_y, txt_x, buffer, limit) != ERR) {
              ++		showmore(strwin, 1, buffer);
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++	    if (innstr(buffer, limit) != ERR) {
              ++		show_1st(strwin, 0, buffer);
              ++	    }
              ++
              ++	    if (mvinnstr(txt_y, txt_x, buffer, limit) != ERR) {
              ++		showmore(strwin, 1, buffer);
              ++	    }
              ++	}
              ++
              ++	wnoutrefresh(strwin);
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *chrbox;
              ++    WINDOW *chrwin;
              ++    WINDOW *strwin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(chrbox, 0, 0);
              ++    wnoutrefresh(chrbox);
              ++
              ++    chrwin = derwin(chrbox, 2, COLS - 2, 1, 1);
              ++    strwin = derwin(chrbox, 2, COLS - 2, 3, 1);
              ++
              ++    test_inchs(1, argv, chrwin, strwin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              +Index: test/test_inwstr.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/test_inwstr.c	2007-07-21 22:47:42.000000000 +0000
              +@@ -0,0 +1,269 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: test_inwstr.c,v 1.3 2007/07/21 22:47:42 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ *
              ++ * Demonstrate the inwstr functions from the curses library.
              ++
              ++       int inwstr(wchar_t *str);
              ++       int innwstr(wchar_t *str, int n);
              ++       int winwstr(WINDOW *win, wchar_t *str);
              ++       int winnwstr(WINDOW *win, wchar_t *str, int n);
              ++       int mvinwstr(int y, int x, wchar_t *str);
              ++       int mvinnwstr(int y, int x, wchar_t *str, int n);
              ++       int mvwinwstr(WINDOW *win, int y, int x, wchar_t *str);
              ++       int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *str, int n);
              ++ */
              ++
              ++#include 
              ++
              ++#if USE_WIDEC_SUPPORT
              ++
              ++#define BASE_Y 6
              ++#define MAX_COLS 1024
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++static void
              ++show_1st(WINDOW *win, int line, wchar_t *buffer)
              ++{
              ++    mvwaddwstr(win, line, 5, buffer);
              ++}
              ++
              ++static void
              ++showmore(WINDOW *win, int line, wchar_t *buffer)
              ++{
              ++    wmove(win, line, 0);
              ++    wclrtoeol(win);
              ++    show_1st(win, line, buffer);
              ++}
              ++
              ++static int
              ++test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int ch;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    int limit = getmaxx(strwin) - 5;
              ++    wchar_t buffer[MAX_COLS];
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((ch = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(ch)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              ++	switch (ch) {
              ++	case KEY_DOWN:
              ++	case 'j':
              ++	    if (txt_y < getmaxy(txtwin) - 1)
              ++		txt_y++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_UP:
              ++	case 'k':
              ++	    if (txt_y > base_y)
              ++		txt_y--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_LEFT:
              ++	case 'h':
              ++	    if (txt_x > 0)
              ++		txt_x--;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case KEY_RIGHT:
              ++	case 'l':
              ++	    if (txt_x < getmaxx(txtwin) - 1)
              ++		txt_x++;
              ++	    else
              ++		beep();
              ++	    break;
              ++	case 'w':
              ++	    test_inchs(level + 1, argv, chrwin, strwin);
              ++	    if (txtbox != 0) {
              ++		touchwin(txtbox);
              ++		wnoutrefresh(txtbox);
              ++	    } else {
              ++		touchwin(txtwin);
              ++		wnoutrefresh(txtwin);
              ++	    }
              ++	    break;
              ++	case '-':
              ++	    if (limit > 0) {
              ++		--limit;
              ++	    } else {
              ++		beep();
              ++	    }
              ++	    break;
              ++	case '+':
              ++	    ++limit;
              ++	    break;
              ++	default:
              ++	    beep();
              ++	    break;
              ++	}
              ++
              ++	mvwprintw(chrwin, 0, 0, "line:");
              ++	wclrtoeol(chrwin);
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++
              ++	    if (winwstr(txtwin, buffer) != ERR) {
              ++		show_1st(chrwin, 0, buffer);
              ++	    }
              ++	    if (mvwinwstr(txtwin, txt_y, txt_x, buffer) != ERR) {
              ++		showmore(chrwin, 1, buffer);
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++
              ++	    if (inwstr(buffer) != ERR) {
              ++		show_1st(chrwin, 0, buffer);
              ++	    }
              ++	    if (mvinwstr(txt_y, txt_x, buffer) != ERR) {
              ++		showmore(chrwin, 1, buffer);
              ++	    }
              ++	}
              ++	wnoutrefresh(chrwin);
              ++
              ++	mvwprintw(strwin, 0, 0, "%4d:", limit);
              ++	wclrtobot(strwin);
              ++
              ++	if (txtwin != stdscr) {
              ++	    wmove(txtwin, txt_y, txt_x);
              ++	    if (winnwstr(txtwin, buffer, limit) != ERR) {
              ++		show_1st(strwin, 0, buffer);
              ++	    }
              ++
              ++	    if (mvwinnwstr(txtwin, txt_y, txt_x, buffer, limit) != ERR) {
              ++		showmore(strwin, 1, buffer);
              ++	    }
              ++	} else {
              ++	    move(txt_y, txt_x);
              ++	    if (innwstr(buffer, limit) != ERR) {
              ++		show_1st(strwin, 0, buffer);
              ++	    }
              ++
              ++	    if (mvinnwstr(txt_y, txt_x, buffer, limit) != ERR) {
              ++		showmore(strwin, 1, buffer);
              ++	    }
              ++	}
              ++
              ++	wnoutrefresh(strwin);
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *chrbox;
              ++    WINDOW *chrwin;
              ++    WINDOW *strwin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(chrbox, 0, 0);
              ++    wnoutrefresh(chrbox);
              ++
              ++    chrwin = derwin(chrbox, 2, COLS - 2, 1, 1);
              ++    strwin = derwin(chrbox, 2, COLS - 2, 3, 1);
              ++
              ++    test_inchs(1, argv, chrwin, strwin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              ++#else
              ++int
              ++main(void)
              ++{
              ++    printf("This program requires the wide-ncurses library\n");
              ++    ExitProgram(EXIT_FAILURE);
              ++}
              ++#endif
              +Index: test/test_opaque.c
              +--- /dev/null	2007-12-08 19:14:25.328509000 +0000
              ++++ ncurses-5.6-20071201/test/test_opaque.c	2007-08-18 17:51:51.000000000 +0000
              +@@ -0,0 +1,421 @@
              ++/****************************************************************************
              ++ * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              ++ * without limitation the rights to use, copy, modify, merge, publish,      *
              ++ * distribute, distribute with modifications, sublicense, and/or sell       *
              ++ * copies of the Software, and to permit persons to whom the Software is    *
              ++ * furnished to do so, subject to the following conditions:                 *
              ++ *                                                                          *
              ++ * The above copyright notice and this permission notice shall be included  *
              ++ * in all copies or substantial portions of the Software.                   *
              ++ *                                                                          *
              ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              ++ *                                                                          *
              ++ * Except as contained in this notice, the name(s) of the above copyright   *
              ++ * holders shall not be used in advertising or otherwise to promote the     *
              ++ * sale, use or other dealings in this Software without prior written       *
              ++ * authorization.                                                           *
              ++ ****************************************************************************/
              ++/*
              ++ * $Id: test_opaque.c,v 1.4 2007/08/18 17:51:51 tom Exp $
              ++ *
              ++ * Author: Thomas E Dickey
              ++ *
              ++ * Demonstrate the opaque functions from the curses library.
              ++
              ++       WINDOW * wgetparent (const WINDOW *);
              ++       bool is_cleared(const WINDOW *win);
              ++       bool is_idcok(const WINDOW *win);
              ++       bool is_idlok(const WINDOW *win);
              ++       bool is_immedok(const WINDOW *win);
              ++       bool is_keypad(const WINDOW *win);
              ++       bool is_leaveok(const WINDOW *win);
              ++       bool is_nodelay(const WINDOW *win);
              ++       bool is_notimeout(const WINDOW *win);
              ++       bool is_scrollok(const WINDOW *win);
              ++       bool is_syncok(const WINDOW *win);
              ++       int wgetscrreg (const WINDOW *, int *, int *);
              ++ */
              ++
              ++#include 
              ++
              ++#define BASE_Y 6
              ++#define MAX_COLS 1024
              ++
              ++static bool
              ++Quit(int ch)
              ++{
              ++    return (ch == 'q' || ch == QUIT || ch == ESCAPE);
              ++}
              ++
              ++typedef bool(*BoolOpaque) (WINDOW *, int);
              ++
              ++static bool
              ++test_opaque_cleared(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	if (mode)
              ++	    wclear(win);
              ++    }
              ++    return is_cleared(win);
              ++}
              ++
              ++static bool
              ++test_opaque_idcok(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	idcok(win, mode);
              ++    }
              ++    return is_idcok(win);
              ++}
              ++
              ++static bool
              ++test_opaque_idlok(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	idlok(win, mode);
              ++    }
              ++    return is_idlok(win);
              ++}
              ++
              ++static bool
              ++test_opaque_immedok(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	immedok(win, mode);
              ++    }
              ++    return is_immedok(win);
              ++}
              ++
              ++static bool
              ++test_opaque_keypad(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	keypad(win, mode);
              ++    }
              ++    return is_keypad(win);
              ++}
              ++
              ++static bool
              ++test_opaque_leaveok(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	leaveok(win, mode);
              ++    }
              ++    return is_leaveok(win);
              ++}
              ++
              ++static bool
              ++test_opaque_nodelay(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	nodelay(win, mode);
              ++    }
              ++    return is_nodelay(win);
              ++}
              ++
              ++static bool
              ++test_opaque_notimeout(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	notimeout(win, mode);
              ++    }
              ++    return is_notimeout(win);
              ++}
              ++
              ++static bool
              ++test_opaque_scrollok(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	scrollok(win, mode);
              ++    }
              ++    return is_scrollok(win);
              ++}
              ++
              ++static bool
              ++test_opaque_syncok(WINDOW *win, int mode)
              ++{
              ++    if (mode >= 0) {
              ++	syncok(win, mode);
              ++    }
              ++    return is_syncok(win);
              ++}
              ++
              ++static int
              ++status_y(WINDOW *stswin, int cell)
              ++{
              ++    return (cell % getmaxy(stswin));
              ++}
              ++
              ++static int
              ++status_x(WINDOW *stswin, int cell)
              ++{
              ++    return (15 * (cell / getmaxy(stswin)));
              ++}
              ++
              ++static void
              ++to_keyword(WINDOW *stswin, int cell)
              ++{
              ++    wmove(stswin, status_y(stswin, cell), status_x(stswin, cell));
              ++}
              ++
              ++static void
              ++to_result(WINDOW *stswin, int cell, bool before)
              ++{
              ++    int y = status_y(stswin, cell);
              ++    int x = status_x(stswin, cell) + 11;
              ++    if (!before)
              ++	++x;
              ++    wmove(stswin, y, x);
              ++}
              ++
              ++static void
              ++show_keyword(WINDOW *stswin, int cell, int active, const char *name)
              ++{
              ++    to_keyword(stswin, cell);
              ++    if (active == cell)
              ++	wstandout(stswin);
              ++    wprintw(stswin, "%s:", name);
              ++    if (active == cell)
              ++	wstandend(stswin);
              ++}
              ++/* *INDENT-OFF* */
              ++static struct {
              ++    const char *name;
              ++    BoolOpaque func;
              ++} bool_funcs[] = {
              ++    { "cleared",   test_opaque_cleared },
              ++    { "idcok",     test_opaque_idcok },
              ++    { "idlok",     test_opaque_idlok },
              ++    { "immedok",   test_opaque_immedok },
              ++    { "keypad",    test_opaque_keypad },
              ++    { "leaveok",   test_opaque_leaveok },
              ++    { "nodelay",   test_opaque_nodelay },
              ++    { "notimeout", test_opaque_notimeout },
              ++    { "scrollok",  test_opaque_scrollok },
              ++    { "syncok",    test_opaque_syncok }
              ++};
              ++/* *INDENT-ON* */
              ++
              ++/*
              ++ * Display and/or allow update for the properties accessed in the opaque
              ++ * window.  Some may change state after refreshing the window, so we
              ++ * distinguish between them using the 'before' parameter.
              ++ */
              ++static int
              ++show_opaque(WINDOW *stswin, WINDOW *txtwin, bool before, int active)
              ++{
              ++    int n;
              ++    int top, bottom;
              ++
              ++    if (before) {
              ++	werase(stswin);
              ++    }
              ++    for (n = 0; n < (int) SIZEOF(bool_funcs); ++n) {
              ++	show_keyword(stswin, n, active, bool_funcs[n].name);
              ++
              ++	to_result(stswin, n, before);
              ++	wprintw(stswin, "%c", bool_funcs[n].func(txtwin, -1) ? 'T' : 'F');
              ++    }
              ++
              ++    show_keyword(stswin, n, active, "wgetparent");
              ++    to_result(stswin, n, TRUE);
              ++    wprintw(stswin, "%p", wgetparent(txtwin));
              ++
              ++    ++n;
              ++    show_keyword(stswin, n, active, "wgetscrreg");
              ++    to_result(stswin, n, TRUE);
              ++    if (wgetscrreg(txtwin, &top, &bottom) == OK)
              ++	wprintw(stswin, "%d,%d", top, bottom);
              ++
              ++    wnoutrefresh(stswin);
              ++    return active;
              ++}
              ++
              ++static int
              ++test_opaque(int level, char **argv, WINDOW *stswin)
              ++{
              ++    WINDOW *txtbox = 0;
              ++    WINDOW *txtwin = 0;
              ++    FILE *fp;
              ++    int ch;
              ++    int txt_x = 0, txt_y = 0;
              ++    int base_y;
              ++    bool in_status = FALSE;
              ++    int active = 0;
              ++
              ++    if (argv[level] == 0) {
              ++	beep();
              ++	return FALSE;
              ++    }
              ++
              ++    if (level > 1) {
              ++	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              ++	box(txtbox, 0, 0);
              ++	wnoutrefresh(txtbox);
              ++
              ++	txtwin = derwin(txtbox,
              ++			getmaxy(txtbox) - 2,
              ++			getmaxx(txtbox) - 2,
              ++			1, 1);
              ++	base_y = 0;
              ++    } else {
              ++	txtwin = stdscr;
              ++	base_y = BASE_Y;
              ++    }
              ++
              ++    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              ++    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              ++    (void) noecho();		/* don't echo input */
              ++
              ++    txt_y = base_y;
              ++    txt_x = 0;
              ++    wmove(txtwin, txt_y, txt_x);
              ++
              ++    if ((fp = fopen(argv[level], "r")) != 0) {
              ++	while ((ch = fgetc(fp)) != EOF) {
              ++	    if (waddch(txtwin, UChar(ch)) != OK) {
              ++		break;
              ++	    }
              ++	}
              ++	fclose(fp);
              ++    } else {
              ++	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              ++    }
              ++
              ++    for (;;) {
              ++	if (in_status) {
              ++	    to_keyword(stswin, active);
              ++
              ++	    ch = wgetch(stswin);
              ++	    show_opaque(stswin, txtwin, TRUE, active);
              ++	    if (Quit(ch))
              ++		break;
              ++
              ++	    switch (ch) {
              ++	    case '\t':
              ++		in_status = FALSE;
              ++		break;
              ++	    case KEY_DOWN:
              ++	    case 'j':
              ++		if (active < (int) SIZEOF(bool_funcs) - 1)
              ++		    active++;
              ++		else
              ++		    beep();
              ++		break;
              ++	    case KEY_UP:
              ++	    case 'k':
              ++		if (active > 0)
              ++		    active--;
              ++		else
              ++		    beep();
              ++		break;
              ++	    case ' ':
              ++		bool_funcs[active].func(txtwin,
              ++									 !bool_funcs[active].func(txtwin, -1));
              ++		break;
              ++	    default:
              ++		beep();
              ++		break;
              ++	    }
              ++	    show_opaque(stswin, txtwin, FALSE, in_status ? active : -1);
              ++	} else {
              ++	    ch = mvwgetch(txtwin, txt_y, txt_x);
              ++	    show_opaque(stswin, txtwin, TRUE, -1);
              ++	    if (Quit(ch))
              ++		break;
              ++
              ++	    switch (ch) {
              ++	    case '\t':
              ++		in_status = TRUE;
              ++		break;
              ++	    case KEY_DOWN:
              ++	    case 'j':
              ++		if (txt_y < getmaxy(txtwin) - 1)
              ++		    txt_y++;
              ++		else
              ++		    beep();
              ++		break;
              ++	    case KEY_UP:
              ++	    case 'k':
              ++		if (txt_y > base_y)
              ++		    txt_y--;
              ++		else
              ++		    beep();
              ++		break;
              ++	    case KEY_LEFT:
              ++	    case 'h':
              ++		if (txt_x > 0)
              ++		    txt_x--;
              ++		else
              ++		    beep();
              ++		break;
              ++	    case KEY_RIGHT:
              ++	    case 'l':
              ++		if (txt_x < getmaxx(txtwin) - 1)
              ++		    txt_x++;
              ++		else
              ++		    beep();
              ++		break;
              ++	    case 'w':
              ++		test_opaque(level + 1, argv, stswin);
              ++		if (txtbox != 0) {
              ++		    touchwin(txtbox);
              ++		    wnoutrefresh(txtbox);
              ++		} else {
              ++		    touchwin(txtwin);
              ++		    wnoutrefresh(txtwin);
              ++		}
              ++		break;
              ++	    default:
              ++		beep();
              ++		napms(100);
              ++		break;
              ++	    }
              ++
              ++	    show_opaque(stswin, txtwin, FALSE, -1);
              ++	}
              ++    }
              ++    if (level > 1) {
              ++	delwin(txtwin);
              ++	delwin(txtbox);
              ++    }
              ++    return TRUE;
              ++}
              ++
              ++int
              ++main(int argc, char *argv[])
              ++{
              ++    WINDOW *stsbox;
              ++    WINDOW *stswin;
              ++
              ++    setlocale(LC_ALL, "");
              ++
              ++    if (argc < 2) {
              ++	fprintf(stderr, "usage: %s file\n", argv[0]);
              ++	return EXIT_FAILURE;
              ++    }
              ++
              ++    initscr();
              ++
              ++    stsbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              ++    box(stsbox, 0, 0);
              ++    wnoutrefresh(stsbox);
              ++
              ++    stswin = derwin(stsbox, BASE_Y - 2, COLS - 2, 1, 1);
              ++    keypad(stswin, TRUE);
              ++
              ++    test_opaque(1, argv, stswin);
              ++
              ++    endwin();
              ++    ExitProgram(EXIT_SUCCESS);
              ++}
              +Index: test/view.c
              +Prereq:  1.64 
              +--- ncurses-5.6/test/view.c	2006-05-20 15:37:03.000000000 +0000
              ++++ ncurses-5.6-20071201/test/view.c	2007-07-21 17:41:55.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -50,7 +50,7 @@
              +  * scroll operation worked, and the refresh() code only had to do a
              +  * partial repaint.
              +  *
              +- * $Id: view.c,v 1.64 2006/05/20 15:37:03 tom Exp $
              ++ * $Id: view.c,v 1.66 2007/07/21 17:41:55 tom Exp $
              +  */
              + 
              + #include 
              +@@ -229,7 +229,7 @@
              +     (void) signal(SIGINT, finish);	/* arrange interrupts to terminate */
              + #endif
              + 
              +-    while ((i = getopt(argc, argv, "cin:rtT:")) != EOF) {
              ++    while ((i = getopt(argc, argv, "cin:rtT:")) != -1) {
              + 	switch (i) {
              + 	case 'c':
              + 	    try_color = TRUE;
              +@@ -374,7 +374,7 @@
              + 		    lptr++;
              + 		else
              + 		    break;
              +-	    wscrl(stdscr, lptr - olptr);
              ++	    scrl(lptr - olptr);
              + 	    break;
              + 
              + 	case KEY_UP:
              +@@ -385,7 +385,7 @@
              + 		    lptr--;
              + 		else
              + 		    break;
              +-	    wscrl(stdscr, lptr - olptr);
              ++	    scrl(lptr - olptr);
              + 	    break;
              + 
              + 	case 'h':
              +Index: test/worm.c
              +Prereq:  1.41 
              +--- ncurses-5.6/test/worm.c	2006-07-01 22:57:24.000000000 +0000
              ++++ ncurses-5.6-20071201/test/worm.c	2007-09-29 17:35:57.000000000 +0000
              +@@ -1,5 +1,5 @@
              + /****************************************************************************
              +- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              ++ * Copyright (c) 1998-2006,2007 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            *
              +@@ -61,11 +61,15 @@
              +   traces will be dumped.  The program stops and waits for one character of
              +   input at the beginning and end of the interval.
              + 
              +-  $Id: worm.c,v 1.41 2006/07/01 22:57:24 tom Exp $
              ++  $Id: worm.c,v 1.49 2007/09/29 17:35:57 tom Exp $
              + */
              + 
              + #include 
              + 
              ++#ifdef USE_PTHREADS
              ++#include 
              ++#endif
              ++
              + static chtype flavor[] =
              + {
              +     'O', '*', '#', '$', '%', '0', '@',
              +@@ -77,17 +81,27 @@
              + {
              +     -1, 0, 1, 1, 1, 0, -1, -1
              + };
              +-static struct worm {
              +-    int orientation, head;
              +-    short *xpos, *ypos;
              +-} worm[40];
              ++
              ++typedef struct worm {
              ++    int orientation;
              ++    int head;
              ++    short *xpos;
              ++    short *ypos;
              ++    chtype attrs;
              ++#ifdef USE_PTHREADS
              ++    pthread_t thread;
              ++#endif
              ++} WORM;
              ++
              ++static WORM worm[40];
              ++static short **refs;
              + 
              + static const char *field;
              + static int length = 16, number = 3;
              + static chtype trail = ' ';
              + 
              + #ifdef TRACE
              +-static int generation, trace_start, trace_end, singlestep;
              ++static int generation, trace_start, trace_end;
              + #endif /* TRACE */
              + /* *INDENT-OFF* */
              + static const struct options {
              +@@ -200,15 +214,147 @@
              +     return ((float) r / 32768.);
              + }
              + 
              ++static int
              ++draw_worm(WINDOW *win, void *data)
              ++{
              ++    WORM *w = (WORM *) data;
              ++    const struct options *op;
              ++
              ++    int x;
              ++    int y;
              ++    int h;
              ++
              ++    int bottom = LINES - 1;
              ++    int last = COLS - 1;
              ++
              ++    bool done = FALSE;
              ++
              ++    if ((x = w->xpos[h = w->head]) < 0) {
              ++	wmove(win, y = w->ypos[h] = bottom, x = w->xpos[h] = 0);
              ++	waddch(win, w->attrs);
              ++	refs[y][x]++;
              ++    } else {
              ++	y = w->ypos[h];
              ++    }
              ++
              ++    if (x > last)
              ++	x = last;
              ++    if (y > bottom)
              ++	y = bottom;
              ++
              ++    if (++h == length)
              ++	h = 0;
              ++
              ++    if (w->xpos[w->head = h] >= 0) {
              ++	int x1, y1;
              ++	x1 = w->xpos[h];
              ++	y1 = w->ypos[h];
              ++	if (y1 < LINES
              ++	    && x1 < COLS
              ++	    && --refs[y1][x1] == 0) {
              ++	    wmove(win, y1, x1);
              ++	    waddch(win, trail);
              ++	}
              ++    }
              ++
              ++    op = &(x == 0
              ++	   ? (y == 0
              ++	      ? upleft
              ++	      : (y == bottom
              ++		 ? lowleft
              ++		 : left))
              ++	   : (x == last
              ++	      ? (y == 0
              ++		 ? upright
              ++		 : (y == bottom
              ++		    ? lowright
              ++		    : right))
              ++	      : (y == 0
              ++		 ? upper
              ++		 : (y == bottom
              ++		    ? lower
              ++		    : normal))))[w->orientation];
              ++
              ++    switch (op->nopts) {
              ++    case 0:
              ++	done = TRUE;
              ++	break;
              ++    case 1:
              ++	w->orientation = op->opts[0];
              ++	break;
              ++    default:
              ++	w->orientation = op->opts[(int) (ranf() * (float) op->nopts)];
              ++	break;
              ++    }
              ++
              ++    if (!done) {
              ++	x += xinc[w->orientation];
              ++	y += yinc[w->orientation];
              ++	wmove(win, y, x);
              ++
              ++	if (y < 0)
              ++	    y = 0;
              ++	waddch(win, w->attrs);
              ++
              ++	w->ypos[h] = y;
              ++	w->xpos[h] = x;
              ++	refs[y][x]++;
              ++    }
              ++
              ++    return done;
              ++}
              ++
              ++#if !defined(NCURSES_VERSION_PATCH) || (NCURSES_VERSION_PATCH < 20070915)
              ++static int
              ++use_window(WINDOW *win, int (*func) (WINDOW *, void *), void *data)
              ++{
              ++    return func(win, data);
              ++}
              ++#endif
              ++
              ++#ifdef USE_PTHREADS
              ++static void *
              ++start_worm(void *arg)
              ++{
              ++    for (;;) {
              ++	napms(20);
              ++	use_window(stdscr, draw_worm, arg);
              ++    }
              ++    return NULL;
              ++}
              ++#endif
              ++
              ++static bool
              ++draw_all_worms(void)
              ++{
              ++    bool done = FALSE;
              ++    int n;
              ++    struct worm *w;
              ++
              ++#ifdef USE_PTHREADS
              ++    static bool first = TRUE;
              ++    if (first) {
              ++	first = FALSE;
              ++	for (n = 0, w = &worm[0]; n < number; n++, w++) {
              ++	    int rc;
              ++	    rc = pthread_create(&(w->thread), NULL, start_worm, w);
              ++	}
              ++    }
              ++#else
              ++    for (n = 0, w = &worm[0]; n < number; n++, w++) {
              ++	if (use_window(stdscr, draw_worm, w))
              ++	    done = TRUE;
              ++    }
              ++#endif
              ++    return done;
              ++}
              ++
              + int
              + main(int argc, char *argv[])
              + {
              +-    short **ref;
              +     int x, y;
              +     int n;
              +     struct worm *w;
              +-    const struct options *op;
              +-    int h;
              +     short *ip;
              +     int last, bottom;
              +     bool done = FALSE;
              +@@ -244,9 +390,6 @@
              + 	    trail = '.';
              + 	    break;
              + #ifdef TRACE
              +-	case 'S':
              +-	    singlestep = TRUE;
              +-	    break;
              + 	case 'T':
              + 	    trace_start = atoi(argv[++x]);
              + 	    trace_end = atoi(argv[++x]);
              +@@ -297,21 +440,24 @@
              +     }
              + #endif /* A_COLOR */
              + 
              +-    ref = typeMalloc(short *, LINES);
              ++    refs = typeMalloc(short *, LINES);
              +     for (y = 0; y < LINES; y++) {
              +-	ref[y] = typeMalloc(short, COLS);
              ++	refs[y] = typeMalloc(short, COLS);
              + 	for (x = 0; x < COLS; x++) {
              +-	    ref[y][x] = 0;
              ++	    refs[y][x] = 0;
              + 	}
              +     }
              + 
              + #ifdef BADCORNER
              +     /* if addressing the lower right corner doesn't work in your curses */
              +-    ref[bottom][last] = 1;
              ++    refs[bottom][last] = 1;
              + #endif /* BADCORNER */
              + 
              +     for (n = number, w = &worm[0]; --n >= 0; w++) {
              +-	w->orientation = w->head = 0;
              ++	w->attrs = flavor[n % SIZEOF(flavor)];
              ++	w->orientation = 0;
              ++	w->head = 0;
              ++
              + 	if (!(ip = typeMalloc(short, (length + 1)))) {
              + 	    fprintf(stderr, "%s: out of memory\n", *argv);
              + 	    ExitProgram(EXIT_FAILURE);
              +@@ -340,48 +486,43 @@
              +     }
              +     napms(10);
              +     refresh();
              +-#ifndef TRACE
              +     nodelay(stdscr, TRUE);
              +-#endif
              + 
              +     while (!done) {
              +-#ifdef TRACE
              +-	if (trace_start || trace_end) {
              +-	    if (generation == trace_start) {
              +-		trace(TRACE_CALLS);
              +-		getch();
              +-	    } else if (generation == trace_end) {
              +-		trace(0);
              +-		getch();
              +-	    }
              +-
              +-	    if (singlestep && generation > trace_start && generation < trace_end)
              +-		getch();
              +-
              +-	    generation++;
              +-	}
              +-#else
              + 	int ch;
              + 
              + 	if ((ch = getch()) > 0) {
              ++#ifdef TRACE
              ++	    if (trace_start || trace_end) {
              ++		if (generation == trace_start) {
              ++		    trace(TRACE_CALLS);
              ++		    getch();
              ++		} else if (generation == trace_end) {
              ++		    trace(0);
              ++		    getch();
              ++		}
              ++
              ++		generation++;
              ++	    }
              ++#endif
              + #ifdef KEY_RESIZE
              + 	    if (ch == KEY_RESIZE) {
              + 		if (last != COLS - 1) {
              + 		    for (y = 0; y <= bottom; y++) {
              +-			ref[y] = typeRealloc(short, COLS, ref[y]);
              ++			refs[y] = typeRealloc(short, COLS, refs[y]);
              + 			for (x = last + 1; x < COLS; x++)
              +-			    ref[y][x] = 0;
              ++			    refs[y][x] = 0;
              + 		    }
              + 		    last = COLS - 1;
              + 		}
              + 		if (bottom != LINES - 1) {
              + 		    for (y = LINES; y <= bottom; y++)
              +-			free(ref[y]);
              +-		    ref = typeRealloc(short *, LINES, ref);
              ++			free(refs[y]);
              ++		    refs = typeRealloc(short *, LINES, refs);
              + 		    for (y = bottom + 1; y < LINES; y++) {
              +-			ref[y] = typeMalloc(short, COLS);
              ++			refs[y] = typeMalloc(short, COLS);
              + 			for (x = 0; x < COLS; x++)
              +-			    ref[y][x] = 0;
              ++			    refs[y][x] = 0;
              + 		    }
              + 		    bottom = LINES - 1;
              + 		}
              +@@ -400,55 +541,8 @@
              + 		nodelay(stdscr, TRUE);
              + 	    }
              + 	}
              +-#endif /* TRACE */
              + 
              +-	for (n = 0, w = &worm[0]; n < number; n++, w++) {
              +-	    if ((x = w->xpos[h = w->head]) < 0) {
              +-		move(y = w->ypos[h] = bottom, x = w->xpos[h] = 0);
              +-		addch(flavor[n % SIZEOF(flavor)]);
              +-		ref[y][x]++;
              +-	    } else {
              +-		y = w->ypos[h];
              +-	    }
              +-	    if (x > last)
              +-		x = last;
              +-	    if (y > bottom)
              +-		y = bottom;
              +-	    if (++h == length)
              +-		h = 0;
              +-	    if (w->xpos[w->head = h] >= 0) {
              +-		int x1, y1;
              +-		x1 = w->xpos[h];
              +-		y1 = w->ypos[h];
              +-		if (y1 < LINES
              +-		    && x1 < COLS
              +-		    && --ref[y1][x1] == 0) {
              +-		    move(y1, x1);
              +-		    addch(trail);
              +-		}
              +-	    }
              +-	    op = &(x == 0 ? (y == 0 ? upleft : (y == bottom ? lowleft :
              +-						left)) :
              +-		   (x == last ? (y == 0 ? upright : (y == bottom ? lowright :
              +-						     right)) :
              +-		    (y == 0 ? upper : (y == bottom ? lower : normal))))[w->orientation];
              +-	    switch (op->nopts) {
              +-	    case 0:
              +-		done = TRUE;
              +-		continue;
              +-	    case 1:
              +-		w->orientation = op->opts[0];
              +-		break;
              +-	    default:
              +-		w->orientation = op->opts[(int) (ranf() * (float) op->nopts)];
              +-	    }
              +-	    move(y += yinc[w->orientation], x += xinc[w->orientation]);
              +-
              +-	    if (y < 0)
              +-		y = 0;
              +-	    addch(flavor[n % SIZEOF(flavor)]);
              +-	    ref[w->ypos[h] = y][w->xpos[h] = x]++;
              +-	}
              ++	done = draw_all_worms();
              + 	napms(10);
              + 	refresh();
              +     }
              +@@ -456,9 +550,9 @@
              +     cleanup();
              + #ifdef NO_LEAKS
              +     for (y = 0; y < LINES; y++) {
              +-	free(ref[y]);
              ++	free(refs[y]);
              +     }
              +-    free(ref);
              ++    free(refs);
              +     for (n = number, w = &worm[0]; --n >= 0; w++) {
              + 	free(w->xpos);
              + 	free(w->ypos);
              diff -Naur ncurses-5.6.orig/panel/Makefile.in ncurses-5.6/panel/Makefile.in
              --- ncurses-5.6.orig/panel/Makefile.in	2006-10-14 16:40:36.000000000 -0400
              +++ ncurses-5.6/panel/Makefile.in	2007-12-21 00:02:36.000000000 -0500
              @@ -1,6 +1,6 @@
              -# $Id: Makefile.in,v 1.47 2006/10/14 20:40:36 tom Exp $
              +# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $
               ##############################################################################
              -# Copyright (c) 1998-2003,2006 Free Software Foundation, Inc.                #
              +# Copyright (c) 1998-2006,2007 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"), #
              @@ -27,7 +27,7 @@
               # authorization.                                                             #
               ##############################################################################
               #
              -# Author: Thomas E. Dickey 1996-2002
              +# Author: Thomas E. Dickey 1996-on
               #
               # Makefile for panels source code.
               #
              @@ -92,7 +92,7 @@
               
               CFLAGS_DEFAULT	= $(CFLAGS_@DFT_UPR_MODEL@)
               
              -LINK		= $(LIBTOOL_LINK) $(CC)
              +LINK		= $(LIBTOOL_LINK)
               LDFLAGS		= @LDFLAGS@ @LD_MODEL@ @LIBS@
               
               SHLIB_DIRS	= -L../lib
              @@ -107,8 +107,6 @@
               
               RANLIB		= @LIB_PREP@
               
              -IMPORT_LIB	= @IMPORT_LIB@
              -SHARED_LIB	= @SHARED_LIB@
               LIBRARIES	= @LIBS_TO_MAKE@
               
               LINT		= @LINT@
              @@ -127,7 +125,7 @@
               
               $(DESTDIR)$(bindir) \
               $(DESTDIR)$(libdir) :
              -	sh $(srcdir)/../mkinstalldirs $@
              +	sh $(srcdir)/../mkdirs.sh $@
               
               # make a copy to simplify include-paths while still keeping panel's include
               # file in this directory.
              diff -Naur ncurses-5.6.orig/panel/headers ncurses-5.6/panel/headers
              --- ncurses-5.6.orig/panel/headers	1998-02-11 07:14:01.000000000 -0500
              +++ ncurses-5.6/panel/headers	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               ##############################################################################
              -# Copyright (c) 1998 Free Software Foundation, Inc.                          #
              +# Copyright (c) 1998,2006 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"), #
              @@ -29,3 +29,4 @@
               # Author: Thomas E. Dickey  1996
               #
               $(srcdir)/panel.h
              +# vile:makemode
              diff -Naur ncurses-5.6.orig/panel/modules ncurses-5.6/panel/modules
              --- ncurses-5.6.orig/panel/modules	1998-02-11 07:14:02.000000000 -0500
              +++ ncurses-5.6/panel/modules	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,6 @@
              +# $Id: modules,v 1.9 2006/12/24 00:53:17 tom Exp $
               ##############################################################################
              -# Copyright (c) 1998 Free Software Foundation, Inc.                          #
              +# Copyright (c) 1998,2006 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"), #
              @@ -26,7 +27,7 @@
               # authorization.                                                             #
               ##############################################################################
               #
              -# Author: Thomas E. Dickey  1995,1997
              +# Author: Thomas E. Dickey	1995-on
               #
               
               @ base
              @@ -47,3 +48,4 @@
               p_user		lib		$(srcdir)	$(PANEL_PRIV_H)
               p_win		lib		$(srcdir)	$(PANEL_PRIV_H)
               
              +# vile:makemode
              diff -Naur ncurses-5.6.orig/progs/Makefile.in ncurses-5.6/progs/Makefile.in
              --- ncurses-5.6.orig/progs/Makefile.in	2006-12-17 10:55:48.000000000 -0500
              +++ ncurses-5.6/progs/Makefile.in	2007-12-21 00:02:36.000000000 -0500
              @@ -1,6 +1,6 @@
              -# $Id: Makefile.in,v 1.70 2006/12/17 15:55:48 tom Exp $
              +# $Id: Makefile.in,v 1.77 2007/10/13 22:25:53 tom Exp $
               ##############################################################################
              -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
              +# Copyright (c) 1998-2006,2007 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"), #
              @@ -98,9 +98,8 @@
               LOCAL_LIBDIR	= @top_builddir@/lib
               
               LD		= @LD@
              -LINK		= @LINK_PROGS@ $(LIBTOOL_LINK) $(CC)
              -LDFLAGS		= @EXTRA_LDFLAGS@ \
              -		@TINFO_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@
              +LINK		= @LINK_PROGS@ $(LIBTOOL_LINK)
              +LDFLAGS		= @EXTRA_LDFLAGS@ @LDFLAGS@
               
               LDFLAGS_LIBTOOL	= $(LDFLAGS) $(CFLAGS_LIBTOOL)
               LDFLAGS_NORMAL	= $(LDFLAGS) $(CFLAGS_NORMAL)
              @@ -110,6 +109,12 @@
               
               LDFLAGS_DEFAULT	= $(LDFLAGS_@DFT_UPR_MODEL@)
               
              +LIBS_TIC	= @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
              +LDFLAGS_TIC	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TIC)
              +
              +LIBS_TINFO	= @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
              +LDFLAGS_TINFO	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
              +
               LINT		= @LINT@
               LINT_OPTS	= @LINT_OPTS@
               LINT_LIBS	= -lncurses @LIBS@
              @@ -200,7 +205,7 @@
               	-@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
               
               $(DESTDIR)$(bindir) :
              -	sh $(srcdir)/../mkinstalldirs $@
              +	sh $(srcdir)/../mkdirs.sh $@
               
               #
               # Utilities normally built by make all start here
              @@ -211,40 +216,38 @@
               	$(MODEL)/dump_entry$o
               
               tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
              -	@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
              +	@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@
               
               DEPS_TOE = \
              -	$(MODEL)/toe$o \
              -	$(MODEL)/dump_entry$o
              +	$(MODEL)/toe$o
               
               toe$x: $(DEPS_TOE) $(DEPS_CURSES)
              -	@ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
              +	@ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_TIC) -o $@
               
               DEPS_CLEAR = \
               	$(MODEL)/clear$o
               
               clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
              -	@ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
              +	@ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@
               
               DEPS_TPUT = \
               	$(MODEL)/tput$o
               
               tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
              -	@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
              +	@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@
               
               DEPS_INFOCMP = \
               	$(MODEL)/infocmp$o \
               	$(MODEL)/dump_entry$o
               
               infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
              -	@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
              +	@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@
               
               DEPS_TSET = \
              -	$(MODEL)/tset$o \
              -	$(MODEL)/dump_entry$o
              +	$(MODEL)/tset$o
               
               tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
              -	@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
              +	@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
               
               termsort.c: $(srcdir)/MKtermsort.sh
               	sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
              diff -Naur ncurses-5.6.orig/progs/clear.c ncurses-5.6/progs/clear.c
              --- ncurses-5.6.orig/progs/clear.c	2006-05-20 13:47:47.000000000 -0400
              +++ ncurses-5.6/progs/clear.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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,9 +36,10 @@
                * clear.c --  clears the terminal's screen
                */
               
              +#define USE_LIBTINFO
               #include 
               
              -MODULE_ID("$Id: clear.c,v 1.10 2006/05/20 17:47:47 tom Exp $")
              +MODULE_ID("$Id: clear.c,v 1.11 2007/10/13 22:16:02 tom Exp $")
               
               static int
               putch(int c)
              diff -Naur ncurses-5.6.orig/progs/dump_entry.c ncurses-5.6/progs/dump_entry.c
              --- ncurses-5.6.orig/progs/dump_entry.c	2006-09-30 16:18:15.000000000 -0400
              +++ ncurses-5.6/progs/dump_entry.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -39,7 +39,7 @@
               #include "termsort.c"		/* this C file is generated */
               #include 	/* so is this */
               
              -MODULE_ID("$Id: dump_entry.c,v 1.79 2006/09/30 20:18:15 tom Exp $")
              +MODULE_ID("$Id: dump_entry.c,v 1.81 2007/08/25 20:05:35 tom Exp $")
               
               #define INDENT			8
               #define DISCARD(string) string = ABSENT_STRING
              @@ -352,14 +352,17 @@
               	}
               	break;
               
              +#define is_termcap(type) (idx < (int) sizeof(type##_from_termcap) && \
              +			  type##_from_termcap[idx])
              +
                   case V_BSD:		/* BSD */
               	switch (type) {
               	case BOOLEAN:
              -	    return bool_from_termcap[idx];
              +	    return is_termcap(bool);
               	case NUMBER:
              -	    return num_from_termcap[idx];
              +	    return is_termcap(num);
               	case STRING:
              -	    return str_from_termcap[idx];
              +	    return is_termcap(str);
               	}
               	break;
                   }
              @@ -788,11 +791,11 @@
                    * Much more work should be done on this to support dumping termcaps.
                    */
                   if (tversion == V_HPUX) {
              -	if (memory_lock) {
              +	if (VALID_STRING(memory_lock)) {
               	    (void) sprintf(buffer, "meml=%s", memory_lock);
               	    WRAP_CONCAT;
               	}
              -	if (memory_unlock) {
              +	if (VALID_STRING(memory_unlock)) {
               	    (void) sprintf(buffer, "memu=%s", memory_unlock);
               	    WRAP_CONCAT;
               	}
              @@ -1223,7 +1226,7 @@
               	bool fix_needed = FALSE;
               
               	for (n = 0, source = 0; acs_chars[n] != 0; n++) {
              -	    target = acs_chars[n];
              +	    target = UChar(acs_chars[n]);
               	    if (source >= target) {
               		fix_needed = TRUE;
               		break;
              @@ -1235,7 +1238,7 @@
               	if (fix_needed) {
               	    memset(mapped, 0, sizeof(mapped));
               	    for (n = 0; acs_chars[n] != 0; n++) {
              -		source = acs_chars[n];
              +		source = UChar(acs_chars[n]);
               		if ((target = (unsigned char) acs_chars[n + 1]) != 0) {
               		    mapped[source] = target;
               		    n++;
              diff -Naur ncurses-5.6.orig/progs/infocmp.c ncurses-5.6/progs/infocmp.c
              --- ncurses-5.6.orig/progs/infocmp.c	2006-08-19 17:20:37.000000000 -0400
              +++ ncurses-5.6/progs/infocmp.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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,18 +35,18 @@
               /*
                *	infocmp.c -- decompile an entry, or compare two entries
                *		written by Eric S. Raymond
              + *		and Thomas E Dickey
                */
               
               #include 
               
               #include 
               
              -MODULE_ID("$Id: infocmp.c,v 1.85 2006/08/19 21:20:37 tom Exp $")
              +MODULE_ID("$Id: infocmp.c,v 1.94 2007/11/17 23:34:26 tom Exp $")
               
               #define L_CURL "{"
               #define R_CURL "}"
               
              -#define MAXTERMS	32	/* max # terminal arguments we can handle */
               #define MAX_STRING	1024	/* maximum formatted string */
               
               const char *_nc_progname = "infocmp";
              @@ -60,8 +60,7 @@
                *
                ***************************************************************************/
               
              -static char *tname[MAXTERMS];	/* terminal type names */
              -static ENTRY entries[MAXTERMS];	/* terminfo entries */
              +static ENTRY *entries;		/* terminfo entries */
               static int termcount;		/* count of terminal entries */
               
               static bool limited = TRUE;	/* "-r" option is not set */
              @@ -96,7 +95,8 @@
                   while (termcount-- > 0)
               	_nc_free_termtype(&entries[termcount].tterm);
                   _nc_leaks_dump_entry();
              -    _nc_free_and_exit(code);
              +    free(entries);
              +    _nc_free_tic(code);
               }
               #endif
               
              @@ -932,7 +932,8 @@
               		case C_DIFFERENCE:
               		    if (itrace)
               			(void) fprintf(stderr,
              -				       "infocmp: dumping differences\n");
              +				       "%s: dumping differences\n",
              +				       _nc_progname);
               		    (void) printf("comparing %s to %s.\n", name1, name2);
               		    compare_entry(compare_predicate, &entries->tterm, quiet);
               		    break;
              @@ -940,7 +941,8 @@
               		case C_COMMON:
               		    if (itrace)
               			(void) fprintf(stderr,
              -				       "infocmp: dumping common capabilities\n");
              +				       "%s: dumping common capabilities\n",
              +				       _nc_progname);
               		    (void) printf("comparing %s to %s.\n", name1, name2);
               		    compare_entry(compare_predicate, &entries->tterm, quiet);
               		    break;
              @@ -948,7 +950,8 @@
               		case C_NAND:
               		    if (itrace)
               			(void) fprintf(stderr,
              -				       "infocmp: dumping differences\n");
              +				       "%s: dumping differences\n",
              +				       _nc_progname);
               		    (void) printf("comparing %s to %s.\n", name1, name2);
               		    compare_entry(compare_predicate, &entries->tterm, quiet);
               		    break;
              @@ -1083,7 +1086,6 @@
               	    }
               	    *tp++ = '"';
               	    *tp = '\0';
              -	    size += (strlen(term->Strings[n]) + 1);
               	    (void) printf("static char %-20s[] = %s;\n",
               			  string_variable(ExtStrname(term, n, strnames)), buf);
               	}
              @@ -1237,7 +1239,8 @@
               
                   if ((terminal = getenv("TERM")) == 0) {
               	(void) fprintf(stderr,
              -		       "infocmp: environment variable TERM not set\n");
              +		       "%s: environment variable TERM not set\n",
              +		       _nc_progname);
               	exit(EXIT_FAILURE);
                   }
                   return terminal;
              @@ -1252,10 +1255,15 @@
               int
               main(int argc, char *argv[])
               {
              -    char *firstdir, *restdir;
                   /* Avoid "local data >32k" error with mwcc */
                   /* Also avoid overflowing smaller stacks on systems like AmigaOS */
              -    path *tfile = (path *) malloc(sizeof(path) * MAXTERMS);
              +    path *tfile = 0;
              +    char **tname = 0;
              +    int maxterms;
              +
              +    char **myargv;
              +
              +    char *firstdir, *restdir;
                   int c, i, len;
                   bool formatted = FALSE;
                   bool filecompare = FALSE;
              @@ -1270,9 +1278,16 @@
                   use_extended_names(FALSE);
               #endif
               
              +    _nc_progname = _nc_rootname(argv[0]);
              +
              +    /* make sure we have enough space to add two terminal entries */
              +    myargv = typeCalloc(char *, argc + 3);
              +    memcpy(myargv, argv, sizeof(char *) * argc);
              +    argv = myargv;
              +
                   while ((c = getopt(argc,
               		       argv,
              -		       "1A:aB:CcdEeFfGgIiLlnpqR:rs:TtUuVv:w:x")) != EOF) {
              +		       "1A:aB:CcdEeFfGgIiLlnpqR:rs:TtUuVv:w:x")) != -1) {
               	switch (c) {
               	case '1':
               	    mwidth = 0;
              @@ -1373,7 +1388,6 @@
               
               	case 'r':
               	    tversion = 0;
              -	    limited = FALSE;
               	    break;
               
               	case 's':
              @@ -1387,7 +1401,8 @@
               		sortmode = S_TERMCAP;
               	    else {
               		(void) fprintf(stderr,
              -			       "infocmp: unknown sort mode\n");
              +			       "%s: unknown sort mode\n",
              +			       _nc_progname);
               		ExitProgram(EXIT_FAILURE);
               	    }
               	    break;
              @@ -1435,6 +1450,18 @@
               	}
                   }
               
              +    maxterms = (argc + 1 - optind);
              +    tfile = typeMalloc(path, maxterms);
              +    tname = typeCalloc(char *, maxterms);
              +    entries = typeCalloc(ENTRY, maxterms);
              +
              +    if (tfile == 0
              +	|| tname == 0
              +	|| entries == 0) {
              +	fprintf(stderr, "%s: not enough memory\n", _nc_progname);
              +	ExitProgram(EXIT_FAILURE);
              +    }
              +
                   /* by default, sort by terminfo name */
                   if (sortmode == S_DEFAULT)
               	sortmode = S_TERMINFO;
              @@ -1458,53 +1485,56 @@
               	/* grab the entries */
               	termcount = 0;
               	for (; optind < argc; optind++) {
              -	    if (termcount >= MAXTERMS) {
              -		(void) fprintf(stderr,
              -			       "infocmp: too many terminal type arguments\n");
              -		ExitProgram(EXIT_FAILURE);
              -	    } else {
              -		const char *directory = termcount ? restdir : firstdir;
              -		int status;
              +	    const char *directory = termcount ? restdir : firstdir;
              +	    int status;
               
              -		tname[termcount] = argv[optind];
              +	    tname[termcount] = argv[optind];
               
              -		if (directory) {
              +	    if (directory) {
               #if USE_DATABASE
              -		    (void) sprintf(tfile[termcount], "%s/%c/%s",
              -				   directory,
              -				   *argv[optind], argv[optind]);
              -		    if (itrace)
              -			(void) fprintf(stderr,
              -				       "infocmp: reading entry %s from file %s\n",
              -				       argv[optind], tfile[termcount]);
              -
              -		    status = _nc_read_file_entry(tfile[termcount],
              -						 &entries[termcount].tterm);
              +#if MIXEDCASE_FILENAMES
              +#define LEAF_FMT "%c"
               #else
              -		    (void) fprintf(stderr, "terminfo files not supported\n");
              -		    ExitProgram(EXIT_FAILURE);
              +#define LEAF_FMT "%02x"
               #endif
              -		} else {
              -		    if (itrace)
              -			(void) fprintf(stderr,
              -				       "infocmp: reading entry %s from database\n",
              -				       tname[termcount]);
              -
              -		    status = _nc_read_entry(tname[termcount],
              -					    tfile[termcount],
              -					    &entries[termcount].tterm);
              -		    directory = TERMINFO;	/* for error message */
              -		}
              +		(void) sprintf(tfile[termcount], "%s/" LEAF_FMT "/%s",
              +			       directory,
              +			       UChar(*argv[optind]), argv[optind]);
              +		if (itrace)
              +		    (void) fprintf(stderr,
              +				   "%s: reading entry %s from file %s\n",
              +				   _nc_progname,
              +				   argv[optind], tfile[termcount]);
               
              -		if (status <= 0) {
              +		status = _nc_read_file_entry(tfile[termcount],
              +					     &entries[termcount].tterm);
              +#else
              +		(void) fprintf(stderr, "%s: terminfo files not supported\n",
              +			       _nc_progname);
              +		ExitProgram(EXIT_FAILURE);
              +#endif
              +	    } else {
              +		if (itrace)
               		    (void) fprintf(stderr,
              -				   "infocmp: couldn't open terminfo file %s.\n",
              -				   tfile[termcount]);
              -		    ExitProgram(EXIT_FAILURE);
              -		}
              -		repair_acsc(&entries[termcount].tterm);
              -		termcount++;
              +				   "%s: reading entry %s from database\n",
              +				   _nc_progname,
              +				   tname[termcount]);
              +
              +		status = _nc_read_entry(tname[termcount],
              +					tfile[termcount],
              +					&entries[termcount].tterm);
              +		directory = TERMINFO;	/* for error message */
              +	    }
              +
              +	    if (status <= 0) {
              +		(void) fprintf(stderr,
              +			       "%s: couldn't open terminfo file %s.\n",
              +			       _nc_progname,
              +			       tfile[termcount]);
              +		ExitProgram(EXIT_FAILURE);
               	    }
              +	    repair_acsc(&entries[termcount].tterm);
              +	    termcount++;
               	}
               
               #if NCURSES_XNAMES
              @@ -1542,7 +1572,8 @@
               	    case C_DEFAULT:
               		if (itrace)
               		    (void) fprintf(stderr,
              -				   "infocmp: about to dump %s\n",
              +				   "%s: about to dump %s\n",
              +				   _nc_progname,
               				   tname[0]);
               		(void) printf("#\tReconstructed via infocmp from file: %s\n",
               			      tfile[0]);
              @@ -1553,12 +1584,12 @@
               			   NULL);
               		len = show_entry();
               		if (itrace)
              -		    (void) fprintf(stderr, "infocmp: length %d\n", len);
              +		    (void) fprintf(stderr, "%s: length %d\n", _nc_progname, len);
               		break;
               
               	    case C_DIFFERENCE:
               		if (itrace)
              -		    (void) fprintf(stderr, "infocmp: dumping differences\n");
              +		    (void) fprintf(stderr, "%s: dumping differences\n", _nc_progname);
               		(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
               		compare_entry(compare_predicate, &entries->tterm, quiet);
               		break;
              @@ -1566,7 +1597,8 @@
               	    case C_COMMON:
               		if (itrace)
               		    (void) fprintf(stderr,
              -				   "infocmp: dumping common capabilities\n");
              +				   "%s: dumping common capabilities\n",
              +				   _nc_progname);
               		(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
               		compare_entry(compare_predicate, &entries->tterm, quiet);
               		break;
              @@ -1574,14 +1606,15 @@
               	    case C_NAND:
               		if (itrace)
               		    (void) fprintf(stderr,
              -				   "infocmp: dumping differences\n");
              +				   "%s: dumping differences\n",
              +				   _nc_progname);
               		(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
               		compare_entry(compare_predicate, &entries->tterm, quiet);
               		break;
               
               	    case C_USEALL:
               		if (itrace)
              -		    (void) fprintf(stderr, "infocmp: dumping use entry\n");
              +		    (void) fprintf(stderr, "%s: dumping use entry\n", _nc_progname);
               		dump_entry(&entries[0].tterm,
               			   suppress_untranslatable,
               			   limited,
              @@ -1592,7 +1625,7 @@
               					  || outform == F_TCONVERR));
               		len = show_entry();
               		if (itrace)
              -		    (void) fprintf(stderr, "infocmp: length %d\n", len);
              +		    (void) fprintf(stderr, "%s: length %d\n", _nc_progname, len);
               		break;
               	    }
               	}
              @@ -1606,7 +1639,11 @@
                   else
               	file_comparison(argc - optind, argv + optind);
               
              +#if NO_LEAKS
              +    free(myargv);
                   free(tfile);
              +    free(tname);
              +#endif
                   ExitProgram(EXIT_SUCCESS);
               }
               
              diff -Naur ncurses-5.6.orig/progs/modules ncurses-5.6/progs/modules
              --- ncurses-5.6.orig/progs/modules	2005-09-24 20:54:22.000000000 -0400
              +++ ncurses-5.6/progs/modules	2007-12-21 00:02:36.000000000 -0500
              @@ -1,7 +1,7 @@
              -# $Id: modules,v 1.12 2005/09/25 00:54:22 tom Exp $
              +# $Id: modules,v 1.13 2006/12/24 00:53:21 tom Exp $
               # Program modules (some are in ncurses lib!)
               ##############################################################################
              -# Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.                #
              +# Copyright (c) 1998-2005,2006 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,7 +28,7 @@
               # authorization.                                                             #
               ##############################################################################
               #
              -# Author: Thomas E. Dickey  1995,1997
              +# Author: Thomas E. Dickey	1995-on
               #
               
               @ base
              @@ -39,3 +39,5 @@
               infocmp		progs		$(srcdir)	$(HEADER_DEPS)             $(srcdir)/dump_entry.h
               tput		progs		$(srcdir)	$(HEADER_DEPS) transform.h termsort.c
               tset		progs		$(srcdir)	$(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h ../include/termcap.h
              +
              +# vile:makemode
              diff -Naur ncurses-5.6.orig/progs/progs.priv.h ncurses-5.6/progs/progs.priv.h
              --- ncurses-5.6.orig/progs/progs.priv.h	2006-11-25 19:28:01.000000000 -0500
              +++ ncurses-5.6/progs/progs.priv.h	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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 @@
                *  Author: Thomas E. Dickey                    1997-on                     *
                ****************************************************************************/
               /*
              - * $Id: progs.priv.h,v 1.30 2006/11/26 00:28:01 tom Exp $
              + * $Id: progs.priv.h,v 1.33 2007/10/13 20:33:53 tom Exp $
                *
                *	progs.priv.h
                *
              @@ -110,7 +110,16 @@
               #include 
               #include 
               #include 
              +
               #include 
              +#if HAVE_NC_FREEALL
              +#undef ExitProgram
              +#ifdef USE_LIBTINFO
              +#define ExitProgram(code) _nc_free_tinfo(code)
              +#else
              +#define ExitProgram(code) _nc_free_tic(code)
              +#endif
              +#endif
               
               /* usually in  */
               #ifndef STDOUT_FILENO
              diff -Naur ncurses-5.6.orig/progs/tic.c ncurses-5.6/progs/tic.c
              --- ncurses-5.6.orig/progs/tic.c	2006-12-02 17:13:17.000000000 -0500
              +++ ncurses-5.6/progs/tic.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -44,7 +44,7 @@
               #include 
               #include 
               
              -MODULE_ID("$Id: tic.c,v 1.131 2006/12/02 22:13:17 tom Exp $")
              +MODULE_ID("$Id: tic.c,v 1.133 2007/07/21 17:45:59 tom Exp $")
               
               const char *_nc_progname = "tic";
               
              @@ -353,11 +353,24 @@
                   return fp;
               }
               
              +#if NO_LEAKS
              +static void
              +free_namelist(char **src)
              +{
              +    if (src != 0) {
              +	int n;
              +	for (n = 0; src[n] != 0; ++n)
              +	    free(src[n]);
              +	free(src);
              +    }
              +}
              +#endif
              +
               /* Parse the "-e" option-value into a list of names */
              -static const char **
              +static char **
               make_namelist(char *src)
               {
              -    const char **dst = 0;
              +    char **dst = 0;
               
                   char *s, *base;
                   unsigned pass, n, nn;
              @@ -374,11 +387,13 @@
               		if ((s = stripped(buffer)) != 0) {
               		    if (dst != 0)
               			dst[nn] = s;
              +		    else
              +			free(s);
               		    nn++;
               		}
               	    }
               	    if (pass == 1) {
              -		dst = typeCalloc(const char *, nn + 1);
              +		dst = typeCalloc(char *, nn + 1);
               		rewind(fp);
               	    }
               	}
              @@ -401,10 +416,10 @@
               		    break;
               	    }
               	    if (pass == 1)
              -		dst = typeCalloc(const char *, nn + 1);
              +		dst = typeCalloc(char *, nn + 1);
               	}
                   }
              -    if (showsummary) {
              +    if (showsummary && (dst != 0)) {
               	fprintf(log_fp, "Entries that will be compiled:\n");
               	for (n = 0; dst[n] != 0; n++)
               	    fprintf(log_fp, "%u:%s\n", n + 1, dst[n]);
              @@ -413,7 +428,7 @@
               }
               
               static bool
              -matches(const char **needle, const char *haystack)
              +matches(char **needle, const char *haystack)
               /* does entry in needle list match |-separated field in haystack? */
               {
                   bool code = FALSE;
              @@ -468,7 +483,7 @@
                   bool limited = TRUE;
                   char *tversion = (char *) NULL;
                   const char *source_file = "terminfo";
              -    const char **namelst = 0;
              +    char **namelst = 0;
                   char *outdir = (char *) NULL;
                   bool check_only = FALSE;
                   bool suppress_untranslatable = FALSE;
              @@ -495,7 +510,7 @@
                    * be optional.
                    */
                   while ((this_opt = getopt(argc, argv,
              -			      "0123456789CILNR:TUVace:fGgo:rstvwx")) != EOF) {
              +			      "0123456789CILNR:TUVace:fGgo:rstvwx")) != -1) {
               	if (isdigit(this_opt)) {
               	    switch (last_opt) {
               	    case 'v':
              @@ -784,6 +799,9 @@
               	else
               	    fprintf(log_fp, "No entries written\n");
                   }
              +#if NO_LEAKS
              +    free_namelist(namelst);
              +#endif
                   cleanup();
                   ExitProgram(EXIT_SUCCESS);
               }
              diff -Naur ncurses-5.6.orig/progs/toe.c ncurses-5.6/progs/toe.c
              --- ncurses-5.6.orig/progs/toe.c	2006-08-19 14:18:09.000000000 -0400
              +++ ncurses-5.6/progs/toe.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -40,13 +40,11 @@
               
               #include 
               
              -#include 
              -
               #if USE_HASHED_DB
               #include 
               #endif
               
              -MODULE_ID("$Id: toe.c,v 1.41 2006/08/19 18:18:09 tom Exp $")
              +MODULE_ID("$Id: toe.c,v 1.46 2007/10/13 22:26:38 tom Exp $")
               
               #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
               
              @@ -59,8 +57,7 @@
               ExitProgram(int code)
               {
                   _nc_free_entries(_nc_head);
              -    _nc_leaks_dump_entry();
              -    _nc_free_and_exit(code);
              +    _nc_free_tic(code);
               }
               #endif
               
              @@ -326,7 +323,7 @@
               
                   _nc_progname = _nc_rootname(argv[0]);
               
              -    while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != EOF) {
              +    while ((this_opt = getopt(argc, argv, "0123456789ahuvUV")) != -1) {
               	/* handle optional parameter */
               	if (isdigit(this_opt)) {
               	    switch (last_opt) {
              diff -Naur ncurses-5.6.orig/progs/tput.c ncurses-5.6/progs/tput.c
              --- ncurses-5.6.orig/progs/tput.c	2006-11-25 19:27:47.000000000 -0500
              +++ ncurses-5.6/progs/tput.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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,6 +38,7 @@
                * Ross Ridge's mytinfo package.
                */
               
              +#define USE_LIBTINFO
               #include 
               
               #if !PURE_TERMINFO
              @@ -45,7 +46,7 @@
               #endif
               #include 
               
              -MODULE_ID("$Id: tput.c,v 1.38 2006/11/26 00:27:47 tom Exp $")
              +MODULE_ID("$Id: tput.c,v 1.41 2007/10/13 20:34:16 tom Exp $")
               
               #define PUTS(s)		fputs(s, stdout)
               #define PUTCHAR(c)	putchar(c)
              @@ -325,6 +326,7 @@
               	    case Num_Str_Str:
               		s = TPARM_3(s, numbers[1], strings[2], strings[3]);
               		break;
              +	    case Numbers:
               	    default:
               		(void) _nc_tparm_analyze(s, p_is_s, &popcount);
               #define myParam(n) (p_is_s[n - 1] != 0 ? ((long) strings[n]) : numbers[n])
              @@ -363,7 +365,7 @@
               
                   term = getenv("TERM");
               
              -    while ((c = getopt(argc, argv, "ST:V")) != EOF) {
              +    while ((c = getopt(argc, argv, "ST:V")) != -1) {
               	switch (c) {
               	case 'S':
               	    cmdline = FALSE;
              diff -Naur ncurses-5.6.orig/progs/tset.c ncurses-5.6/progs/tset.c
              --- ncurses-5.6.orig/progs/tset.c	2006-09-16 13:51:10.000000000 -0400
              +++ ncurses-5.6/progs/tset.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -73,6 +73,7 @@
                * SUCH DAMAGE.
                */
               
              +#define USE_LIBTINFO
               #define __INTERNAL_CAPS_VISIBLE	/* we need to see has_hardware_tabs */
               #include 
               
              @@ -103,7 +104,7 @@
               #include 
               #include 
               
              -MODULE_ID("$Id: tset.c,v 1.67 2006/09/16 17:51:10 tom Exp $")
              +MODULE_ID("$Id: tset.c,v 1.70 2007/10/13 22:22:04 tom Exp $")
               
               extern char **environ;
               
              @@ -777,7 +778,22 @@
               		      | OFDEL
               #endif
               #ifdef NLDLY
              -		      | NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY
              +		      | NLDLY
              +#endif
              +#ifdef CRDLY 
              +		      | CRDLY
              +#endif
              +#ifdef TABDLY 
              +		      | TABDLY
              +#endif
              +#ifdef BSDLY 
              +		      | BSDLY
              +#endif
              +#ifdef VTDLY 
              +		      | VTDLY
              +#endif
              +#ifdef FFDLY
              +		      | FFDLY
               #endif
               	);
               
              @@ -1129,7 +1145,7 @@
               
                   obsolete(argv);
                   noinit = noset = quiet = Sflag = sflag = showterm = 0;
              -    while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:np:qQSrsVw")) != EOF) {
              +    while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:np:qQSrsVw")) != -1) {
               	switch (ch) {
               	case 'c':		/* set control-chars */
               	    opt_c = TRUE;
              diff -Naur ncurses-5.6.orig/tack/COPYING ncurses-5.6/tack/COPYING
              --- ncurses-5.6.orig/tack/COPYING	2005-09-17 15:46:56.000000000 -0400
              +++ ncurses-5.6/tack/COPYING	1969-12-31 19:00:00.000000000 -0500
              @@ -1,340 +0,0 @@
              -		    GNU GENERAL PUBLIC LICENSE
              -		       Version 2, June 1991
              -
              - Copyright (C) 1989, 1991 Free Software Foundation, Inc.
              -                 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
              - Everyone is permitted to copy and distribute verbatim copies
              - of this license document, but changing it is not allowed.
              -
              -			    Preamble
              -
              -  The licenses for most software are designed to take away your
              -freedom to share and change it.  By contrast, the GNU General Public
              -License is intended to guarantee your freedom to share and change free
              -software--to make sure the software is free for all its users.  This
              -General Public License applies to most of the Free Software
              -Foundation's software and to any other program whose authors commit to
              -using it.  (Some other Free Software Foundation software is covered by
              -the GNU Library General Public License instead.)  You can apply it to
              -your programs, too.
              -
              -  When we speak of free software, we are referring to freedom, not
              -price.  Our General Public Licenses are designed to make sure that you
              -have the freedom to distribute copies of free software (and charge for
              -this service if you wish), that you receive source code or can get it
              -if you want it, that you can change the software or use pieces of it
              -in new free programs; and that you know you can do these things.
              -
              -  To protect your rights, we need to make restrictions that forbid
              -anyone to deny you these rights or to ask you to surrender the rights.
              -These restrictions translate to certain responsibilities for you if you
              -distribute copies of the software, or if you modify it.
              -
              -  For example, if you distribute copies of such a program, whether
              -gratis or for a fee, you must give the recipients all the rights that
              -you have.  You must make sure that they, too, receive or can get the
              -source code.  And you must show them these terms so they know their
              -rights.
              -
              -  We protect your rights with two steps: (1) copyright the software, and
              -(2) offer you this license which gives you legal permission to copy,
              -distribute and/or modify the software.
              -
              -  Also, for each author's protection and ours, we want to make certain
              -that everyone understands that there is no warranty for this free
              -software.  If the software is modified by someone else and passed on, we
              -want its recipients to know that what they have is not the original, so
              -that any problems introduced by others will not reflect on the original
              -authors' reputations.
              -
              -  Finally, any free program is threatened constantly by software
              -patents.  We wish to avoid the danger that redistributors of a free
              -program will individually obtain patent licenses, in effect making the
              -program proprietary.  To prevent this, we have made it clear that any
              -patent must be licensed for everyone's free use or not licensed at all.
              -
              -  The precise terms and conditions for copying, distribution and
              -modification follow.
              -
              -		    GNU GENERAL PUBLIC LICENSE
              -   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
              -
              -  0. This License applies to any program or other work which contains
              -a notice placed by the copyright holder saying it may be distributed
              -under the terms of this General Public License.  The "Program", below,
              -refers to any such program or work, and a "work based on the Program"
              -means either the Program or any derivative work under copyright law:
              -that is to say, a work containing the Program or a portion of it,
              -either verbatim or with modifications and/or translated into another
              -language.  (Hereinafter, translation is included without limitation in
              -the term "modification".)  Each licensee is addressed as "you".
              -
              -Activities other than copying, distribution and modification are not
              -covered by this License; they are outside its scope.  The act of
              -running the Program is not restricted, and the output from the Program
              -is covered only if its contents constitute a work based on the
              -Program (independent of having been made by running the Program).
              -Whether that is true depends on what the Program does.
              -
              -  1. You may copy and distribute verbatim copies of the Program's
              -source code as you receive it, in any medium, provided that you
              -conspicuously and appropriately publish on each copy an appropriate
              -copyright notice and disclaimer of warranty; keep intact all the
              -notices that refer to this License and to the absence of any warranty;
              -and give any other recipients of the Program a copy of this License
              -along with the Program.
              -
              -You may charge a fee for the physical act of transferring a copy, and
              -you may at your option offer warranty protection in exchange for a fee.
              -
              -  2. You may modify your copy or copies of the Program or any portion
              -of it, thus forming a work based on the Program, and copy and
              -distribute such modifications or work under the terms of Section 1
              -above, provided that you also meet all of these conditions:
              -
              -    a) You must cause the modified files to carry prominent notices
              -    stating that you changed the files and the date of any change.
              -
              -    b) You must cause any work that you distribute or publish, that in
              -    whole or in part contains or is derived from the Program or any
              -    part thereof, to be licensed as a whole at no charge to all third
              -    parties under the terms of this License.
              -
              -    c) If the modified program normally reads commands interactively
              -    when run, you must cause it, when started running for such
              -    interactive use in the most ordinary way, to print or display an
              -    announcement including an appropriate copyright notice and a
              -    notice that there is no warranty (or else, saying that you provide
              -    a warranty) and that users may redistribute the program under
              -    these conditions, and telling the user how to view a copy of this
              -    License.  (Exception: if the Program itself is interactive but
              -    does not normally print such an announcement, your work based on
              -    the Program is not required to print an announcement.)
              -
              -These requirements apply to the modified work as a whole.  If
              -identifiable sections of that work are not derived from the Program,
              -and can be reasonably considered independent and separate works in
              -themselves, then this License, and its terms, do not apply to those
              -sections when you distribute them as separate works.  But when you
              -distribute the same sections as part of a whole which is a work based
              -on the Program, the distribution of the whole must be on the terms of
              -this License, whose permissions for other licensees extend to the
              -entire whole, and thus to each and every part regardless of who wrote it.
              -
              -Thus, it is not the intent of this section to claim rights or contest
              -your rights to work written entirely by you; rather, the intent is to
              -exercise the right to control the distribution of derivative or
              -collective works based on the Program.
              -
              -In addition, mere aggregation of another work not based on the Program
              -with the Program (or with a work based on the Program) on a volume of
              -a storage or distribution medium does not bring the other work under
              -the scope of this License.
              -
              -  3. You may copy and distribute the Program (or a work based on it,
              -under Section 2) in object code or executable form under the terms of
              -Sections 1 and 2 above provided that you also do one of the following:
              -
              -    a) Accompany it with the complete corresponding machine-readable
              -    source code, which must be distributed under the terms of Sections
              -    1 and 2 above on a medium customarily used for software interchange; or,
              -
              -    b) Accompany it with a written offer, valid for at least three
              -    years, to give any third party, for a charge no more than your
              -    cost of physically performing source distribution, a complete
              -    machine-readable copy of the corresponding source code, to be
              -    distributed under the terms of Sections 1 and 2 above on a medium
              -    customarily used for software interchange; or,
              -
              -    c) Accompany it with the information you received as to the offer
              -    to distribute corresponding source code.  (This alternative is
              -    allowed only for noncommercial distribution and only if you
              -    received the program in object code or executable form with such
              -    an offer, in accord with Subsection b above.)
              -
              -The source code for a work means the preferred form of the work for
              -making modifications to it.  For an executable work, complete source
              -code means all the source code for all modules it contains, plus any
              -associated interface definition files, plus the scripts used to
              -control compilation and installation of the executable.  However, as a
              -special exception, the source code distributed need not include
              -anything that is normally distributed (in either source or binary
              -form) with the major components (compiler, kernel, and so on) of the
              -operating system on which the executable runs, unless that component
              -itself accompanies the executable.
              -
              -If distribution of executable or object code is made by offering
              -access to copy from a designated place, then offering equivalent
              -access to copy the source code from the same place counts as
              -distribution of the source code, even though third parties are not
              -compelled to copy the source along with the object code.
              -
              -  4. You may not copy, modify, sublicense, or distribute the Program
              -except as expressly provided under this License.  Any attempt
              -otherwise to copy, modify, sublicense or distribute the Program is
              -void, and will automatically terminate your rights under this License.
              -However, parties who have received copies, or rights, from you under
              -this License will not have their licenses terminated so long as such
              -parties remain in full compliance.
              -
              -  5. You are not required to accept this License, since you have not
              -signed it.  However, nothing else grants you permission to modify or
              -distribute the Program or its derivative works.  These actions are
              -prohibited by law if you do not accept this License.  Therefore, by
              -modifying or distributing the Program (or any work based on the
              -Program), you indicate your acceptance of this License to do so, and
              -all its terms and conditions for copying, distributing or modifying
              -the Program or works based on it.
              -
              -  6. Each time you redistribute the Program (or any work based on the
              -Program), the recipient automatically receives a license from the
              -original licensor to copy, distribute or modify the Program subject to
              -these terms and conditions.  You may not impose any further
              -restrictions on the recipients' exercise of the rights granted herein.
              -You are not responsible for enforcing compliance by third parties to
              -this License.
              -
              -  7. If, as a consequence of a court judgment or allegation of patent
              -infringement or for any other reason (not limited to patent issues),
              -conditions are imposed on you (whether by court order, agreement or
              -otherwise) that contradict the conditions of this License, they do not
              -excuse you from the conditions of this License.  If you cannot
              -distribute so as to satisfy simultaneously your obligations under this
              -License and any other pertinent obligations, then as a consequence you
              -may not distribute the Program at all.  For example, if a patent
              -license would not permit royalty-free redistribution of the Program by
              -all those who receive copies directly or indirectly through you, then
              -the only way you could satisfy both it and this License would be to
              -refrain entirely from distribution of the Program.
              -
              -If any portion of this section is held invalid or unenforceable under
              -any particular circumstance, the balance of the section is intended to
              -apply and the section as a whole is intended to apply in other
              -circumstances.
              -
              -It is not the purpose of this section to induce you to infringe any
              -patents or other property right claims or to contest validity of any
              -such claims; this section has the sole purpose of protecting the
              -integrity of the free software distribution system, which is
              -implemented by public license practices.  Many people have made
              -generous contributions to the wide range of software distributed
              -through that system in reliance on consistent application of that
              -system; it is up to the author/donor to decide if he or she is willing
              -to distribute software through any other system and a licensee cannot
              -impose that choice.
              -
              -This section is intended to make thoroughly clear what is believed to
              -be a consequence of the rest of this License.
              -
              -  8. If the distribution and/or use of the Program is restricted in
              -certain countries either by patents or by copyrighted interfaces, the
              -original copyright holder who places the Program under this License
              -may add an explicit geographical distribution limitation excluding
              -those countries, so that distribution is permitted only in or among
              -countries not thus excluded.  In such case, this License incorporates
              -the limitation as if written in the body of this License.
              -
              -  9. The Free Software Foundation may publish revised and/or new versions
              -of the General Public License from time to time.  Such new versions will
              -be similar in spirit to the present version, but may differ in detail to
              -address new problems or concerns.
              -
              -Each version is given a distinguishing version number.  If the Program
              -specifies a version number of this License which applies to it and "any
              -later version", you have the option of following the terms and conditions
              -either of that version or of any later version published by the Free
              -Software Foundation.  If the Program does not specify a version number of
              -this License, you may choose any version ever published by the Free Software
              -Foundation.
              -
              -  10. If you wish to incorporate parts of the Program into other free
              -programs whose distribution conditions are different, write to the author
              -to ask for permission.  For software which is copyrighted by the Free
              -Software Foundation, write to the Free Software Foundation; we sometimes
              -make exceptions for this.  Our decision will be guided by the two goals
              -of preserving the free status of all derivatives of our free software and
              -of promoting the sharing and reuse of software generally.
              -
              -			    NO WARRANTY
              -
              -  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
              -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
              -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
              -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
              -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
              -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
              -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
              -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
              -REPAIR OR CORRECTION.
              -
              -  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
              -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
              -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
              -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
              -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
              -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
              -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
              -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
              -POSSIBILITY OF SUCH DAMAGES.
              -
              -		     END OF TERMS AND CONDITIONS
              -
              -	    How to Apply These Terms to Your New Programs
              -
              -  If you develop a new program, and you want it to be of the greatest
              -possible use to the public, the best way to achieve this is to make it
              -free software which everyone can redistribute and change under these terms.
              -
              -  To do so, attach the following notices to the program.  It is safest
              -to attach them to the start of each source file to most effectively
              -convey the exclusion of warranty; and each file should have at least
              -the "copyright" line and a pointer to where the full notice is found.
              -
              -    
              -    Copyright (C)   
              -
              -    This program is free software; you can redistribute it and/or modify
              -    it under the terms of the GNU General Public License as published by
              -    the Free Software Foundation; either version 2 of the License, or
              -    (at your option) any later version.
              -
              -    This program is distributed in the hope that it will be useful,
              -    but WITHOUT ANY WARRANTY; without even the implied warranty of
              -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -    GNU General Public License for more details.
              -
              -    You should have received a copy of the GNU General Public License
              -    along with this program; if not, write to the Free Software
              -    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
              -
              -
              -Also add information on how to contact you by electronic and paper mail.
              -
              -If the program is interactive, make it output a short notice like this
              -when it starts in an interactive mode:
              -
              -    Gnomovision version 69, Copyright (C) year name of author
              -    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
              -    This is free software, and you are welcome to redistribute it
              -    under certain conditions; type `show c' for details.
              -
              -The hypothetical commands `show w' and `show c' should show the appropriate
              -parts of the General Public License.  Of course, the commands you use may
              -be called something other than `show w' and `show c'; they could even be
              -mouse-clicks or menu items--whatever suits your program.
              -
              -You should also get your employer (if you work as a programmer) or your
              -school, if any, to sign a "copyright disclaimer" for the program, if
              -necessary.  Here is a sample; alter the names:
              -
              -  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
              -  `Gnomovision' (which makes passes at compilers) written by James Hacker.
              -
              -  , 1 April 1989
              -  Ty Coon, President of Vice
              -
              -This General Public License does not permit incorporating your program into
              -proprietary programs.  If your program is a subroutine library, you may
              -consider it more useful to permit linking proprietary applications with the
              -library.  If this is what you want to do, use the GNU Library General
              -Public License instead of this License.
              diff -Naur ncurses-5.6.orig/tack/HISTORY ncurses-5.6/tack/HISTORY
              --- ncurses-5.6.orig/tack/HISTORY	2006-11-25 19:28:49.000000000 -0500
              +++ ncurses-5.6/tack/HISTORY	1969-12-31 19:00:00.000000000 -0500
              @@ -1,49 +0,0 @@
              -
              -Current history:
              -
              -2006/11/25		Fixes for ncurses tparm() prototype.
              -2006/06/24	1.02	Modify to support ncurses extended string capabilities.
              -2003/10/18	1.01	Fix some logic in pad.c, improve bce test.
              -2003/09/20		Modified to allow running from compiled-in terminfo.
              -2001/10/20		Make menu titles agree with descriptions.
              -2000/03/04		Fix a few spelling errors
              -1999/09/04		Minor fix to build/link on BeOS
              -1999/05/16		Minor fix to build/link on CLIX
              -1999/05/09		Update to build/link on NeXT
              -1999/04/17		Update to work with ncurses 5.0 beta1 (TERMTYPE struct)
              -1999/02/07		Build with ncurses 4.2 981219 (renamed function)
              -1998/01/09	1.00	First release under GPL
              -1997/12/24	0.02	First version that requires ncurses
              -1997/10/29	0.01	Second beta release to the ncurses mailing list.
              -1997/10/06	0.00	First beta release to the ncurses mailing list.
              -
              -Ancient history:	TACK -- the terminfo action checker
              -
              -   The purpose of this program is to verify the correctness of
              -terminfos and to calculate the pads needed for each capability.
              -This program is not designed to test curses and therefore uses
              -as little of curses as possible.
              -
              -   This program was originally called TED.  In 1991 it was
              -released to USENET in comp.sources.  TED was originally written to
              -test both terminfos and termcaps.  The original intent was to
              -create a terminfo editor.  This code fell quite short of its goal.
              -Tests were controlled by command line switches and editing was done
              -with pen and paper.
              -
              -   In 1995 Eric S. Raymond got interested in the program and added
              -a first cut at making the program menu driven.  He also converted
              -the code from K&R C to an ANSI/POSIX-conforming C.  He re-christened
              -the program TAC (Terminfo Action Checker).  Eric also wrote a man
              -page for TAC.
              -
              -   In 1997 I decided to dust off the code and make it easier to
              -use by the novice.  I totally rewrote the menu system and added
              -the editing features I originally planned for TED.  I also did
              -a total rewrite of the code that does the timings.  In the process
              -of rewriting the code I changed it to be more tightly coupled
              -with ncurses.  By this time someone had taken the name TAC so
              -I re-christened the program TACK.
              -
              -Daniel Weaver
              -
              diff -Naur ncurses-5.6.orig/tack/Makefile.in ncurses-5.6/tack/Makefile.in
              --- ncurses-5.6.orig/tack/Makefile.in	2006-12-17 10:58:32.000000000 -0500
              +++ ncurses-5.6/tack/Makefile.in	1969-12-31 19:00:00.000000000 -0500
              @@ -1,211 +0,0 @@
              -# $Id: Makefile.in,v 1.38 2006/12/17 15:58:32 tom Exp $
              -##############################################################################
              -# Copyright (c) 1998-2005,2006 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"), #
              -# to deal in the Software without restriction, including without limitation  #
              -# the rights to use, copy, modify, merge, publish, distribute, distribute    #
              -# with modifications, sublicense, and/or sell copies of the Software, and to #
              -# permit persons to whom the Software is furnished to do so, subject to the  #
              -# following conditions:                                                      #
              -#                                                                            #
              -# The above copyright notice and this permission notice shall be included in #
              -# all copies or substantial portions of the Software.                        #
              -#                                                                            #
              -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
              -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
              -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
              -# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
              -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
              -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
              -# DEALINGS IN THE SOFTWARE.                                                  #
              -#                                                                            #
              -# Except as contained in this notice, the name(s) of the above copyright     #
              -# holders shall not be used in advertising or otherwise to promote the sale, #
              -# use or other dealings in this Software without prior written               #
              -# authorization.                                                             #
              -##############################################################################
              -# Makefile for tack
              -#
              -# The variable 'srcdir' refers to the source-distribution, and can be set with
              -# the configure script by "--srcdir=DIR".
              -#
              -# The rules are organized to produce the libraries for the configured models,
              -# and the programs with the configured default model.
              -
              -# turn off _all_ suffix rules; we'll generate our own
              -.SUFFIXES:
              -
              -SHELL		= /bin/sh
              -THIS		= Makefile
              -
              -CF_MFLAGS 	= @cf_cv_makeflags@
              -@SET_MAKE@
              -
              -x		= @EXEEXT@
              -o		= .@OBJEXT@
              -
              -MODEL		= ../@DFT_OBJ_SUBDIR@
              -DESTDIR		= @DESTDIR@
              -srcdir		= @srcdir@
              -prefix		= @prefix@
              -exec_prefix	= @exec_prefix@
              -bindir		= @bindir@
              -libdir		= @libdir@
              -mandir		= @mandir@
              -includedir	= @includedir@
              -datadir		= @datadir@
              -
              -LIBTOOL		= @LIBTOOL@
              -LIBTOOL_CLEAN	= @LIB_CLEAN@
              -LIBTOOL_COMPILE	= @LIB_COMPILE@
              -LIBTOOL_LINK	= @LIB_LINK@
              -LIBTOOL_INSTALL	= @LIB_INSTALL@
              -LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
              -
              -INSTALL		= @INSTALL@
              -INSTALL_PROG	= @INSTALL_PROGRAM@
              -INSTALL_DATA	= @INSTALL_DATA@
              -
              -AWK		= @AWK@
              -LN_S		= @LN_S@
              -
              -CC		= @CC@
              -CPP		= @CPP@
              -CFLAGS		= @CFLAGS@
              -
              -INCDIR		= $(srcdir)/../include
              -CPPFLAGS	= -DHAVE_CONFIG_H -I../tack -I$(srcdir) @CPPFLAGS@
              -
              -CCFLAGS		= $(CPPFLAGS) $(CFLAGS)
              -
              -CFLAGS_LIBTOOL	= $(CCFLAGS)
              -CFLAGS_NORMAL	= $(CCFLAGS)
              -CFLAGS_DEBUG	= $(CCFLAGS) @CC_G_OPT@ -DTRACE
              -CFLAGS_PROFILE	= $(CCFLAGS) -pg
              -CFLAGS_SHARED	= $(CCFLAGS) @CC_SHARED_OPTS@
              -
              -CFLAGS_DEFAULT	= $(CFLAGS_@DFT_UPR_MODEL@)
              -
              -REL_VERSION	= @cf_cv_rel_version@
              -ABI_VERSION	= @cf_cv_abi_version@
              -LOCAL_LIBDIR	= @top_builddir@/lib
              -
              -LD		= @LD@
              -LINK		= @LINK_PROGS@ $(LIBTOOL_LINK) $(CC)
              -LDFLAGS		= @EXTRA_LDFLAGS@ \
              -		@TINFO_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@
              -
              -LDFLAGS_LIBTOOL	= $(LDFLAGS) $(CFLAGS_LIBTOOL)
              -LDFLAGS_NORMAL	= $(LDFLAGS) $(CFLAGS_NORMAL)
              -LDFLAGS_DEBUG	= $(LDFLAGS) $(CFLAGS_DEBUG)
              -LDFLAGS_PROFILE	= $(LDFLAGS) $(CFLAGS_PROFILE)
              -LDFLAGS_SHARED	= $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
              -
              -LDFLAGS_DEFAULT	= $(LDFLAGS_@DFT_UPR_MODEL@)
              -
              -LINT		= @LINT@
              -LINT_OPTS	= @LINT_OPTS@
              -LINT_LIBS	= -lncurses@LIB_SUFFIX@ @LIBS@
              -
              -PROGS = tack$x
              -
              -# Default library, for linking applications
              -DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
              -
              -################################################################################
              -all:	$(PROGS)
              -
              -sources:
              -
              -install: install.tack
              -uninstall: uninstall.tack
              -
              -# this line simplifies the configure-script
              -libs \
              -install.libs \
              -uninstall.libs:
              -
              -EDITARGS = $(DESTDIR)$(mandir) $(srcdir) $(srcdir)/*.[0-9]*
              -
              -install.tack: $(PROGS) \
              -	$(DESTDIR)$(bindir) \
              -	$(DESTDIR)$(mandir)
              -	$(LIBTOOL_INSTALL) $(INSTALL_PROG) tack$x $(DESTDIR)$(bindir)/tack$x
              -	sh ../edit_man.sh normal installing $(EDITARGS)
              -
              -uninstall.tack:
              -	-@$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(bindir)/tack$x
              -	-sh ../edit_man.sh normal removing $(EDITARGS)
              -
              -$(DESTDIR)$(bindir) \
              -$(DESTDIR)$(mandir) :
              -	sh $(srcdir)/../mkinstalldirs $@
              -
              -#
              -# Rules for building tack
              -#
              -
              -DEPS_TACK = \
              -	$(MODEL)/ansi$o \
              -	$(MODEL)/charset$o \
              -	$(MODEL)/color$o \
              -	$(MODEL)/control$o \
              -	$(MODEL)/crum$o \
              -	$(MODEL)/edit$o \
              -	$(MODEL)/fun$o \
              -	$(MODEL)/init$o \
              -	$(MODEL)/menu$o \
              -	$(MODEL)/modes$o \
              -	$(MODEL)/output$o \
              -	$(MODEL)/pad$o \
              -	$(MODEL)/scan$o \
              -	$(MODEL)/sync$o \
              -	$(MODEL)/sysdep$o \
              -	$(MODEL)/tack$o
              -
              -tack$x: $(DEPS_TACK) $(DEPS_CURSES)
              -	@ECHO_LINK@ $(LINK) $(DEPS_TACK) $(LDFLAGS_DEFAULT) -o $@
              -
              -#
              -# Utility productions start here
              -#
              -
              -tags:
              -	ctags *.[ch]
              -
              -@MAKE_UPPER_TAGS@TAGS:
              -@MAKE_UPPER_TAGS@	etags *.[ch]
              -
              -mostlyclean ::
              -	-rm -f core tags TAGS *~ *.bak *.i *.atac trace
              -
              -clean :: mostlyclean
              -	-sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi"
              -	-rm -f $(PROGS)
              -	-rm -rf .libs
              -
              -distclean :: clean
              -	-rm -f Makefile
              -
              -realclean :: distclean
              -
              -tack.tar: Makefile.in modules *.[ch] tack.1 HISTORY COPYING
              -	tar -cvf tack.tar Makefile.in modules *.[ch] tack.1 HISTORY COPYING
              -
              -# These rules are used to allow "make -n" to work on a clean directory-tree
              -../include/hashsize.h \
              -../include/parametrized.h \
              -../include/term.h :
              -	cd ../include; $(MAKE) $(CF_MFLAGS)
              -
              -$(DEPS_CURSES) :
              -	cd ../ncurses; $(MAKE) $(CF_MFLAGS)
              -
              -lint:
              -	$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/*.c $(LINT_LIBS)
              -
              -###############################################################################
              -# The remainder of this file is automatically generated during configuration
              -###############################################################################
              diff -Naur ncurses-5.6.orig/tack/README ncurses-5.6/tack/README
              --- ncurses-5.6.orig/tack/README	2000-03-11 21:39:12.000000000 -0500
              +++ ncurses-5.6/tack/README	1969-12-31 19:00:00.000000000 -0500
              @@ -1,14 +0,0 @@
              --- $Id: README,v 1.2 2000/03/12 02:39:12 Daniel.Weaver Exp $
              -
              -The 'tack' program is a diagnostic that is designed to create and
              -verify the correctness of terminfo's.  This program can be used to
              -create new terminal descriptions that are not included in the standard
              -release.  Although 'tack' is distributed with ncurses, it is not an
              -integral part of ncurses.  It may be removed from the release without
              -limiting the usefulness of ncurses on those terminals described in the
              -terminfo data base.  The best way to remove 'tack' from the build is
              -to delete or rename the 'tack' directory before running the configure
              -script.
              -
              -Unlike most of ncurses the 'tack' program is covered under the GNU
              -Public License.
              diff -Naur ncurses-5.6.orig/tack/ansi.c ncurses-5.6/tack/ansi.c
              --- ncurses-5.6.orig/tack/ansi.c	2005-09-17 15:49:16.000000000 -0400
              +++ ncurses-5.6/tack/ansi.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,854 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: ansi.c,v 1.10 2005/09/17 19:49:16 tom Exp $")
              -
              -/*
              - * Standalone tests for ANSI terminals.  Three entry points:
              - * test_ansi_graphics(), test_ansi_reports() and test_ansi_sgr().
              - */
              -
              -/*****************************************************************************
              - *
              - * Test ANSI status reports
              - *
              - *****************************************************************************/
              -
              -/* ASCII control characters */
              -#define A_DC1 0x11		/* Control Q */
              -#define A_DC3 0x13		/* Control S */
              -#define A_ESC 0x1b
              -#define A_DCS 0x90
              -#define A_CSI 0x9b
              -#define A_ST  0x9c
              -
              -#define MAX_MODES 256
              -
              -static char default_bank[] = "\033(B\017";
              -static int private_use, ape, terminal_class;
              -static short ansi_value[256];
              -static unsigned char ansi_buf[512], pack_buf[512];
              -
              -struct ansi_reports {
              -	int lvl, final;
              -	const char *text;
              -	const char *request;
              -};
              -
              -static struct ansi_reports report_list[] = {
              -	{0, 'c', "(DA) Primary device attributes", "\033[0c"},
              -	{1, 0, "(DSR) Terminal status", "\033[5n"},
              -	{1, 'R', "(DSR) Cursor position", "\033[6n"},
              -	{62, 0, "(DA) Secondary device attributes", "\033[>0c"},
              -	{62, 0, "(DSR) Printer status", "\033[?15n"},
              -	{62, 0, "(DSR) Function key definition", "\033[?25n"},
              -	{62, 0, "(DSR) Keyboard language", "\033[?26n"},
              -	{63, 0, "(DECRQSS) Data destination", "\033P$q$}\033\\"},
              -	{63, 0, "(DECRQSS) Status line type", "\033P$q$~\033\\"},
              -	{63, 0, "(DECRQSS) Erase attribute", "\033P$q\"q\033\\"},
              -	{63, 0, "(DECRQSS) Personality", "\033P$q\"p\033\\"},
              -	{63, 0, "(DECRQSS) Top and bottom margins", "\033P$qr\033\\"},
              -	{63, 0, "(DECRQSS) Character attributes", "\033P$qm\033\\"},
              -	{63, 0, "(DECRQSS) Illegal request", "\033P$q@\033\\"},
              -	{63, 0, "(DECRQUPSS) User pref supplemental set", "\033[&u"},
              -	{63, 0, "(DECRQPSR) Cursor information", "\033[1$w"},
              -	{63, 0, "(DECRQPSR) Tab stop information", "\033[2$w"},
              -	{64, 0, "(DA) Tertiary device attributes", "\033[=0c"},
              -	{64, 0, "(DSR) Extended cursor position", "\033[?6n"},
              -	{64, 0, "(DSR) Macro space", "\033[?62n"},
              -	{64, 0, "(DSR) Memory checksum", "\033[?63n"},
              -	{64, 0, "(DSR) Data integrity", "\033[?75n"},
              -	{64, 0, "(DSR) Multiple session status", "\033[?85n"},
              -	{64, 0, "(DECRQSS) Attribute change extent", "\033P$q*x\033\\"},
              -	{64, 0, "(DECRQSS) Columns per page", "\033P$q$|\033\\"},
              -	{64, 0, "(DECRQSS) Lines per page", "\033P$qt\033\\"},
              -	{64, 0, "(DECRQSS) Lines per screen", "\033P$q*|\033\\"},
              -	{64, 0, "(DECRQSS) Left and right margins", "\033P$qs\033\\"},
              -	{64, 0, "(DECRQSS) Local functions", "\033P$q+q\033\\"},
              -	{64, 0, "(DECRQSS) Local function key control", "\033P$q=}\033\\"},
              -	{64, 0, "(DECRQSS) Select modifier key reporting", "\033P$q+r\033\\"},
              -	{64, 0, "(DECRQDE) Window report", "\033[\"v"},
              -	{0, 0, 0, 0}
              -};
              -
              -struct request_control {
              -	const char *text;
              -	const char *expect;
              -	const char *request;
              -	const char *set_mode;
              -	const char *reset_mode;
              -};
              -
              -/* Request control function selection or setting */
              -static const struct request_control rqss[] = {
              -	{"Data sent to screen", "0", "$}", "\033[0$}", 0},
              -	{"Data sent to disabled status line", "0", "$}", 0, 0},
              -	{"\033[0$~\033[1$}", "\033[0$}", 0, 0, 0},
              -	{"Data sent to enabled status line", "1", "$}", 0, 0},
              -	{"\033[2$~\033[1$}", "\033[0$}", 0, 0, 0},
              -	{"Disable status line", "0", "$~", "\033[0$~", 0},
              -	{"Top status line", "1", "$~", "\033[1$~", 0},
              -	{"Bottom status line", "2", "$~", "\033[2$~", 0},
              -	{"Erasable character", "0", "\"q", "\033[0\"q", 0},
              -	{"Nonerasable character", "1", "\"q", "\033[1\"q", "\033[0\"q"},
              -	{"Top and bottom margins", "3;10", "r", "\0337\033[3;10r", 0},
              -	{"\033[r\0338", 0, 0, 0, 0},
              -	{"Top and bottom margins", "default", "r", "\0337\033[r", "\0338"},
              -	{"Character attributes, dim, bold", "1", "m", "\033[2;1m", "\033[m"},
              -	{"Character attributes, bold, dim", "2", "m", "\033[1;2m", "\033[m"},
              -	{"Character attributes, under, rev", "4;7", "m", "\033[4;7m", "\033[m"},
              -	{"Character attributes, color", "35;42", "m", "\033[35;42m", "\033[m"},
              -	{"All character attributes", "", "m", "\033[1;2;3;4;5;6;7;8;9m", 0},
              -	{"\033[m", 0, 0, 0, 0},
              -	{0, 0, 0, 0, 0}
              -};
              -
              -
              -/*
              -**	read_ansi()
              -**
              -**	read an ANSI status report from terminal
              -*/
              -static void
              -read_ansi(void)
              -{
              -	int ch, i, j, last_escape;
              -
              -	fflush(stdout);
              -	read_key((char *)ansi_buf, sizeof(ansi_buf));
              -	/* Throw away control characters inside CSI sequences.
              -	   Convert two character 7-bit sequences into 8-bit sequences. */
              -	for (i = j = last_escape = 0; (ch = ansi_buf[i]) != 0; i++) {
              -		if (ch == A_ESC) {
              -			if (last_escape == A_ESC) {
              -				pack_buf[j++] = A_ESC;
              -			}
              -			last_escape = A_ESC;
              -		} else
              -		if (last_escape == A_ESC && ch >= '@' && ch <= '_') {
              -			pack_buf[j++] = last_escape = ch + 0x40;
              -		} else
              -		if (last_escape != A_CSI || (ch > 0x20 && ch != 0x80)) {
              -			if (last_escape == A_ESC) {
              -				pack_buf[j++] = A_ESC;
              -			}
              -			if (ch > 0x80 && ch < 0xa0) {
              -				last_escape = ch;
              -			}
              -			pack_buf[j++] = ch;
              -		}
              -	}
              -	if (last_escape == A_ESC) {
              -		pack_buf[j++] = A_ESC;
              -	}
              -	pack_buf[j] = '\0';
              -	return;
              -}
              -
              -/*
              -**	valid_mode(expected)
              -**
              -**	read a terminal mode status report and parse the result
              -**	Return TRUE if we got the expected terminating character.
              -*/
              -static int
              -valid_mode(int expected)
              -{
              -	unsigned char *s;
              -	int ch, terminator;
              -
              -	read_ansi();
              -
              -	ape = 0;
              -	ch = UChar(pack_buf[0]);
              -	ansi_value[0] = 0;
              -	if (ch != A_CSI && ch != A_DCS)
              -		return FALSE;
              -
              -	s = pack_buf + 1;
              -	private_use = 0;
              -	if ((*s >= '<') & (*s <= '?')) {
              -		private_use = *s++;
              -	}
              -	terminator = 0;
              -	for (; (ch = *s); s++) {
              -		if (ch >= '0' && ch <= '9')
              -			ansi_value[ape] = ansi_value[ape] * 10 + ch - '0';
              -		else if (ch == ';' || ch == ':')
              -			ansi_value[++ape] = 0;
              -		else if (ch >= '<' && ch <= '?')
              -			private_use = ch;
              -		else if (ch >= ' ')
              -			terminator = (terminator << 8) | ch;
              -		else
              -			break;
              -	}
              -	return terminator == expected;
              -}
              -
              -/*
              -**	read_reports()
              -**
              -**	read all the reports in the ANSI report structure
              -*/
              -static int
              -read_reports(void)
              -{
              -	int i, j, k, tc, vcr, lc;
              -	char *s;
              -	const char *t;
              -
              -	lc = 5;
              -	terminal_class = tc = 0;
              -	for (i = 0; report_list[i].text; i++, lc++) {
              -		if (terminal_class < report_list[i].lvl &&
              -			tc < report_list[i].lvl) {
              -			put_crlf();
              -			menu_prompt();
              -			ptext("/status [q] > ");
              -			j = wait_here();
              -			if (j != 'n' && j != 'N')
              -				return 0;
              -			tc = report_list[i].lvl;
              -			lc = 1;
              -		} else if (lc + 2 >= lines) {
              -			put_crlf();
              -			ptext("Hit any key to continue ");
              -			(void) wait_here();
              -			lc = 1;
              -		}
              -		sprintf(temp, "%s (%s) ", report_list[i].text,
              -			expand_command(report_list[i].request));
              -		ptext(temp);
              -		for (j = strlen(temp); j < 49; j++)
              -			putchp(' ');
              -		tc_putp(report_list[i].request);
              -		vcr = 0;
              -		if (report_list[i].final == 0) {
              -			read_ansi();
              -		} else if (valid_mode(report_list[i].final))
              -			switch (report_list[i].final) {
              -			case 'c':
              -				terminal_class = ansi_value[0];
              -				break;
              -			case 'R':
              -				vcr = TRUE;
              -				break;
              -			}
              -		j = UChar(pack_buf[0]);
              -		if (j != A_CSI && j != A_DCS) {
              -			put_crlf();
              -			t = "*** The above request gives illegal response ***";
              -			ptext(t);
              -			for (j = strlen(t); j < 49; j++)
              -				putchp(' ');
              -		}
              -		s = expand((const char *)ansi_buf);
              -		if (char_count + expand_chars >= columns) {
              -			put_str("\r\n        ");
              -			lc++;
              -		}
              -		putln(s);
              -		if (vcr) {	/* find out how big the screen is */
              -			tc_putp(report_list[i].request);
              -			if (!valid_mode('R'))
              -				continue;
              -			j = ansi_value[0];
              -			k = ansi_value[1];
              -			tc_putp("\033[255B\033[255C\033[6n");
              -			if (!valid_mode('R'))
              -				continue;
              -			sprintf(temp, "\033[%d;%dH", j, k);
              -			tc_putp(temp);
              -			ptext("(DSR) Screen size (CSI 6 n)");
              -			for (j = char_count; j < 50; j++)
              -				putchp(' ');
              -			sprintf(temp, "%d x %d", ansi_value[1], ansi_value[0]);
              -			ptextln(temp);
              -
              -		}
              -	}
              -	menu_prompt();
              -	ptext("/status r->repeat test,  to continue > ");
              -	return wait_here();
              -}
              -
              -/*
              -**	request_cfss()
              -**
              -**	Request Control function selection or settings
              -*/
              -static int
              -request_cfss(void)
              -{
              -	int i, j, k, l, ch;
              -	char *s;
              -
              -	put_clear();
              -	ptextln("Request                         Expected  Received");
              -	put_crlf();
              -	for (i = 0; rqss[i].text; i++) {
              -		ptext(rqss[i].text);
              -		j = strlen(rqss[i].text) + strlen(rqss[i].expect);
              -		putchp(' ');
              -		for (j++; j < 40; j++)
              -			putchp(' ');
              -		ptext(rqss[i].expect);
              -		putchp(' ');
              -		tc_putp(rqss[i].set_mode);
              -		sprintf(temp, "\033P$q%s\033\\", rqss[i].request);
              -		tc_putp(temp);
              -		read_ansi();
              -		tc_putp(rqss[i].reset_mode);
              -		putchp(' ');
              -		for (j = 0; ansi_buf[j]; j++) {
              -			if (ansi_buf[j] == 'r') {
              -				for (k = j++; (ch = UChar(ansi_buf[k])) != 0; k++)
              -					if (ch == A_ESC) {
              -						break;
              -					} else if (ch == A_ST) {
              -						break;
              -					}
              -				ansi_buf[k] = '\0';
              -				s = expand((const char *)&ansi_buf[j]);
              -				if (char_count + expand_chars >= columns)
              -					put_str("\r\n        ");
              -				put_str(s);
              -			}
              -		}
              -		put_crlf();
              -	}
              -	/* calculate the valid attributes */
              -	ptext("Valid attributes:         0");
              -	j = 0;
              -	for (i = 1; i < 20; i++) {
              -		sprintf(temp, "\033[0;%dm\033P$qm\033\\", i);
              -		tc_putp(temp);
              -		(void) valid_mode('m');
              -		if (ape > 0) {
              -			j = i;
              -			sprintf(temp, "\033[0m; %d", i);
              -			tc_putp(temp);
              -		}
              -	}
              -	put_crlf();
              -	/* calculate how many parameters can be sent */
              -	ptext("Max number of parameters: ");
              -	sprintf(temp, "%dm\033P$qm\033\\", j);
              -	l = -1;
              -	if (j > 0)
              -		for (l = 1; l < 33; l++) {
              -			tc_putp("\033[0");
              -			for (ch = 1; ch <= l; ch++)
              -				put_this(';');
              -			tc_putp(temp);
              -			(void) valid_mode('m');
              -			if (ape == 0)
              -				break;
              -		}
              -	tc_putp("\033[m");
              -	if (l >= 0) {
              -		sprintf(temp, "%d", l);
              -		ptext(temp);
              -	} else
              -		ptext("unknown");
              -	put_crlf();
              -	return wait_here();
              -}
              -
              -/*
              -**	mode_display(puc, mode, initial, set, reset)
              -**
              -**	print the mode display entry
              -*/
              -static void
              -mode_display(const char *p, int n, int c, char s, char r)
              -{
              -	int k;
              -
              -	sprintf(temp, "%s%d (%c, %c, %c)", p, n, c, s, r);
              -	k = strlen(temp);
              -	if (char_count + k >= columns)
              -		put_crlf();
              -	for (; k < 14; k++)
              -		putchp(' ');
              -	put_str(temp);
              -}
              -
              -/*
              -**	terminal_state()
              -**
              -**	test DECRQM status reports
              -*/
              -static void
              -terminal_state(void)
              -{
              -	static const char *puc[] = {"", "<", "=", ">", "?", 0};
              -
              -	int i, j, k, l, modes_found;
              -	char *s;
              -	char buf[256], tms[256];
              -	int mode_puc[MAX_MODES], mode_number[MAX_MODES];
              -	char set_value[MAX_MODES], reset_value[MAX_MODES];
              -	char current_value[MAX_MODES];
              -
              -	ptext("Testing terminal mode status. (CSI 0 $ p)");
              -	tc_putp("\033[0$p");
              -	modes_found = 0;
              -	tms[0] = '\0';
              -	if (valid_mode(('$' << 8) | 'y')) {
              -		for (i = 0; puc[i]; i++) {
              -			put_crlf();
              -			if (i) {
              -				sprintf(temp, "Private use: %c", puc[i][0]);
              -			} else {
              -				strcpy(temp, "Standard modes:");
              -			}
              -			k = strlen(temp);
              -			ptext(temp);
              -			for (j = 0; j < (int) sizeof(buf); buf[j++] = ' ')
              -				;
              -			for (j = l = 0; j < 255 && j - l < 50; j++) {
              -				sprintf(temp, "\033[%s%d$p", puc[i], j);
              -				tc_putp(temp);
              -				if (!valid_mode(('$' << 8) | 'y')) {
              -					/* not valid, save terminating value */
              -					s = expand((const char *)ansi_buf);
              -					sprintf(tms, "%s%s%d %s  ", tms,
              -						puc[i], j, s);
              -					break;
              -				}
              -				if (private_use != puc[i][0])
              -					break;
              -				if (ansi_value[0] != j)
              -					break;
              -				if (ansi_value[1]) {
              -					l = j;
              -					if (k > 70) {
              -						buf[k] = '\0';
              -						put_crlf();
              -						ptextln(buf);
              -						for (k = 0; k < (int) sizeof(buf);) {
              -							buf[k++] = ' ';
              -						}
              -						k = 0;
              -					}
              -					sprintf(temp, " %d", j);
              -					ptext(temp);
              -					k += strlen(temp);
              -					buf[k - 1] = ansi_value[1] + '0';
              -					if (modes_found >= MAX_MODES)
              -						continue;
              -					current_value[modes_found] =
              -						ansi_value[1] + '0';
              -					/* some modes never return */
              -					if ((i == 0 && j == 13)	/* control execution */
              -						|| (puc[i][0] == '?' && j == 2))	/* VT52 */
              -						set_value[modes_found] =
              -							reset_value[modes_found] = '-';
              -					else
              -						set_value[modes_found] =
              -							reset_value[modes_found] = ' ';
              -					mode_puc[modes_found] = i;
              -					mode_number[modes_found++] = j;
              -				}
              -			}
              -			buf[k] = '\0';
              -			if (buf[k - 1] != ' ') {
              -				put_crlf();
              -				ptext(buf);
              -			}
              -		}
              -
              -	if ((i = modes_found) != 0) {
              -		put_crlf();
              -		put_crlf();
              -		if (tms[0]) {
              -			ptextln(tms);
              -		}
              -		ptext("Hit 'Y' to test mode set/reset states: ");
              -		i = wait_here();
              -	}
              -	if (i == 'y' || i == 'Y')
              -		while (1) {
              -#ifdef STATUSFIX
              -			FILE *fp;
              -
              -#ifdef TEDANSI
              -			fp = fopen("ted.ansi", "w");
              -#else
              -			fp = fopen("/dev/console", "w");
              -#endif
              -#endif
              -			for (i = j = 0; j < modes_found; j = ++i >> 1) {
              -				if (set_value[j] == '-')
              -					continue;
              -				k = (current_value[j] ^ i) & 1;
              -				sprintf(temp, "\033[%s%d%c\033[%s%d$p",
              -					puc[mode_puc[j]], mode_number[j],
              -					k ? 'l' : 'h',
              -					puc[mode_puc[j]], mode_number[j]);
              -#ifdef STATUSFIX
              -				if (fp) {
              -					fprintf(fp, "%s\n", expand(temp));
              -					fflush(fp);
              -				}
              -#endif
              -				tc_putp(temp);
              -				if (!valid_mode(('$' << 8) | 'y'))
              -					continue;
              -				if (k) {
              -					reset_value[j] = ansi_value[1] + '0';
              -				} else {
              -					set_value[j] = ansi_value[1] + '0';
              -				}
              -			}
              -			put_str("\033[30l");	/* added for GORT bug
              -						   (WY-185) */
              -#ifdef STATUSFIX
              -			if (fp)
              -				fclose(fp);
              -#endif
              -			tty_set();
              -			/* print the results */
              -			put_clear();
              -			putln("mode (initial, set, reset)");
              -			for (j = 0; j < modes_found; j++) {
              -				mode_display(puc[mode_puc[j]], mode_number[j],
              -					current_value[j], set_value[j], reset_value[j]);
              -			}
              -			ptext("\n\nHit 'R' to repeat test.  'S' to sort results: ");
              -			i = wait_here();
              -			if (i == 's' || i == 'S') {	/* print the same stuff,
              -							   sorted by
              -							   current_value */
              -				put_crlf();
              -				for (i = '1'; i <= '4'; i++) {
              -					for (j = 0; j < modes_found; j++) {
              -						if (current_value[j] == i)
              -							mode_display(puc[mode_puc[j]],
              -								mode_number[j], current_value[j],
              -								set_value[j], reset_value[j]);
              -					}
              -				}
              -				ptext("\n\nHit 'R' to repeat test: ");
              -				i = wait_here();
              -			}
              -			if (i != 'r' && i != 'R')
              -				break;
              -			tty_raw(1, char_mask);
              -		}
              -	} else {
              -		tty_set();
              -	}
              -}
              -
              -
              -/*
              -**	ansi_report_help()
              -**
              -**	Display the informational data for the ANSI report test.
              -*/
              -static void
              -ansi_report_help(void)
              -{
              -	ptext("Begin ANSI status report testing. ");
              -	ptext(" Parity bit set will be displayed in reverse video. ");
              -	ptext(" If the terminal hangs, hit any alphabetic key. ");
              -	ptextln(" Use n to continue testing.  Use q to quit.");
              -	put_crlf();
              -}
              -
              -/*
              -**	test_ansi_reports()
              -**
              -**	Test the ANSI status report functions
              -*/
              -void
              -tools_status(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int i;
              -
              -	put_clear();
              -	ansi_report_help();
              -	tty_raw(1, char_mask);
              -
              -	do {
              -		i = read_reports();
              -		if (i != 'r' && i != 'R') {
              -			*ch = i;
              -			return;
              -		}
              -	} while (i);
              -
              -	if (terminal_class >= 63) {
              -		do {
              -			i = request_cfss();
              -		} while (i == 'r' || i == 'R');
              -		*ch = i;
              -		terminal_state();
              -	} else {
              -		tty_set();
              -	}
              -}
              -
              -
              -/*
              -**	display_sgr()
              -**
              -**	Test a range of ANSI sgr attributes
              -**	puc -> Private Use Character
              -*/
              -static void 
              -display_sgr(int puc)
              -{
              -	int k;
              -
              -	temp[0] = puc;
              -	temp[1] = '\0';
              -	for (k = 0; k < 80; k++) {
              -		if (char_count + 8 > 80)
              -			put_crlf();
              -		else if (char_count + 8 > columns)
              -			put_crlf();
              -		else if (k > 0)
              -			printf(" ");
              -		printf("\033[%s%dmMode %2d\033[0m", temp, k, k);
              -		char_count += 8;
              -		if (puc == '\0') {
              -			if (k == 19)
              -				printf("\033[10m");
              -			if (k == 39)
              -				printf("\033[37m");
              -			if (k == 49)
              -				printf("\033[40m");
              -		}
              -	}
              -	put_crlf();
              -	if (puc == '<')
              -		printf("\033[<1m");
              -	else if (puc)
              -		printf("\033[%s0m", temp);
              -	set_attr(0);
              -}
              -
              -/*
              -**	print_sgr20(on, off)
              -**
              -**	print the sgr line for sgr20()
              -*/
              -static void 
              -print_sgr20(int on, int off)
              -{
              -	if (char_count > columns - 13) {
              -		put_crlf();
              -	} else if (char_count) {
              -		put_str("  ");
              -	}
              -	char_count += 11;
              -	printf("%d/%d \033[%dmon\033[%dm off\033[0m", on, off, on, off);
              -}
              -
              -/*
              -**	sgr20(void)
              -**
              -**	display the enter/exit attributes 1-9 and 20-29
              -*/
              -static void 
              -sgr20(void)
              -{
              -	int k;
              -
              -	put_crlf();
              -	ptextln("Test enter/exit attributes 1-9 and 21-29.");
              -	for (k = 1; k < 10; k++) {
              -		print_sgr20(k, k + 20);
              -	}
              -	print_sgr20(1, 22);	/* bold */
              -	print_sgr20(2, 22);	/* dim */
              -	print_sgr20(8, 22);	/* blank */
              -	printf("\033[0m");
              -	set_attr(0);
              -}
              -
              -/*
              -**	tools_sgr(testlist, state, ch)
              -**
              -**	Run the ANSI graphics rendition mode tool
              -**	Return the last character typed.
              -*/
              -void
              -tools_sgr(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int k;
              -
              -	put_clear();
              -	for (k = 0;;) {
              -		display_sgr(k);
              -		put_crlf();
              -		menu_prompt();
              -		ptext("/sgr Enter =>] > ");
              -		k = wait_here();
              -		if ((k == 'r') || (k == 'R')) {
              -			k = 0;
              -		} else if ((k < '<') || (k > '?')) {
              -			break;
              -		}
              -	}
              -	sgr20();
              -
              -	put_newlines(2);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*****************************************************************************
              - *
              - * Test ANSI graphics
              - *
              - *****************************************************************************/
              -/*
              -**	select_bank(bank)
              -**
              -**	select a graphics character set for ANSI terminals
              -*/
              -static void
              -select_bank(char *bank)
              -{
              -	tc_putp(bank);
              -	switch (bank[1] & 3) {
              -	case 0:
              -		putchp('O' & 0x1f);	/* control O */
              -		break;
              -	case 1:
              -		putchp('N' & 0x1f);	/* control N */
              -		tc_putp("\033~");
              -		break;
              -	case 2:
              -		tc_putp("\033n\033}");
              -		break;
              -	case 3:
              -		tc_putp("\033o\033|");
              -		break;
              -	}
              -}
              -
              -/*
              -**	show_characters(bank, bias)
              -**
              -**	print the ANSI graphics characters
              -*/
              -static void
              -show_characters(char *bank, int bias)
              -{
              -	int i;
              -
              -	sprintf(temp, "G%d GL   ", bank[1] & 3);
              -	ptext(temp);
              -	select_bank(bank);
              -	for (i = ' '; i < 0x80; i++) {
              -		if (char_count >= columns ||
              -			(i != ' ' && (i & 31) == 0))
              -			put_str("\n        ");
              -		putchp(i + bias);
              -	}
              -	select_bank(default_bank);
              -	put_str("   DEL <");
              -	select_bank(bank);
              -	putchp(0x7f + bias);
              -	select_bank(default_bank);
              -	putchp('>');
              -	put_crlf();
              -	put_crlf();
              -}
              -
              -
              -/* ANSI graphics test
              -        94     96   character sets
              -   G0   (      ,
              -   G1   )      -
              -   G2   *      .
              -   G3   +      /
              -
              -Standard Definitions
              -   A    UK
              -   B    US ASCII
              -
              -Dec extended definitions
              -   0    Special graphics
              -
              - */
              -
              -/*
              -**	tools_charset(testlist, state, ch)
              -**
              -**	Run the ANSI alt-charset mode tool
              -*/
              -void
              -tools_charset(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *chp GCC_UNUSED)
              -{
              -	int j, ch;
              -	char bank[32];
              -
              -	put_clear();
              -	ptext("Enter the bank ()*+,-./ followed by the character set");
              -	ptext(" 0123456789:;<=>? for private use, and");
              -	ptextln(" @A...Z[\\]^_`a...z{|}~ for standard sets.");
              -	strcpy(bank, "\033)0");
              -	for (; bank[0];) {
              -		put_crlf();
              -		show_characters(bank, 0);
              -
              -		/* G0 will not print in GR */
              -		if (bank[1] & 3) {
              -			show_characters(bank, 0x80);
              -		}
              -		ptext("bank+set> ");
              -		for (j = 1; (ch = getchp(char_mask)); j++) {
              -			if (ch == EOF)
              -				break;
              -			putchp(ch);
              -			if (j == 1 && ch > '/')
              -				j++;
              -			bank[j] = ch;
              -			if (ch < ' ' || ch > '/')
              -				break;
              -			if (j + 1 >= (int) sizeof(bank))
              -				break;
              -		}
              -		if (j == 1)
              -			break;
              -		if (bank[j] < '0' || bank[j] > '~')
              -			break;
              -		bank[j + 1] = '\0';
              -	}
              -	put_crlf();
              -}
              diff -Naur ncurses-5.6.orig/tack/charset.c ncurses-5.6/tack/charset.c
              --- ncurses-5.6.orig/tack/charset.c	2006-11-25 19:13:36.000000000 -0500
              +++ ncurses-5.6/tack/charset.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,711 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997-2000 Free Software Foundation, Inc.
              -**
              -** This file is part of TACK.
              -**
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -**
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -**
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: charset.c,v 1.11 2006/11/26 00:13:36 tom Exp $")
              -
              -/*
              -	Menu definitions for alternate character set and SGR tests.
              -*/
              -
              -static void charset_bel(struct test_list *t, int *state, int *ch);
              -static void charset_flash(struct test_list *t, int *state, int *ch);
              -static void charset_civis(struct test_list *t, int *state, int *ch);
              -static void charset_cvvis(struct test_list *t, int *state, int *ch);
              -static void charset_cnorm(struct test_list *t, int *state, int *ch);
              -static void charset_hs(struct test_list *t, int *state, int *ch);
              -static void charset_status(struct test_list *t, int *state, int *ch);
              -static void charset_dsl(struct test_list *t, int *state, int *ch);
              -static void charset_enacs(struct test_list *t, int *state, int *ch);
              -static void charset_smacs(struct test_list *t, int *state, int *ch);
              -static void charset_attributes(struct test_list *t, int *state, int *ch);
              -static void charset_sgr(struct test_list *t, int *state, int *ch);
              -
              -struct test_list acs_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{MENU_NEXT, 3, "bel", 0, 0, charset_bel, 0},
              -	{MENU_NEXT, 3, "flash", 0, 0, charset_flash, 0},
              -	{MENU_NEXT, 3, "civis", 0, 0, charset_civis, 0},
              -	{MENU_NEXT, 3, "cvvis", 0, 0, charset_cvvis, 0},
              -	{MENU_NEXT, 3, "cnorm", 0, 0, charset_cnorm, 0},
              -	{MENU_NEXT, 3, "hs", 0, 0, charset_hs, 0},
              -	{MENU_NEXT, 3, "tsl) (fsl) (wsl", "hs", 0, charset_status, 0},
              -	{MENU_NEXT, 3, "dsl", "hs", 0, charset_dsl, 0},
              -	{MENU_NEXT, 0, "acsc) (enacs) (smacs) (rmacs", 0, 0, charset_enacs, 0},
              -	{MENU_NEXT, 0, "smacs) (rmacs", 0, 0, charset_smacs, 0},
              -	{MENU_NEXT, 11, 0, 0, 0, charset_attributes, 0},
              -	{MENU_NEXT, 11, "sgr) (sgr0", "ma", 0, charset_sgr, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -const struct mode_list alt_modes[] = {
              -	{"normal", "(sgr0)", "(sgr0)", 1},
              -	{"standout", "(smso)", "(rmso)", 2},
              -	{"underline", "(smul)", "(rmul)", 4},
              -	{"reverse", "(rev)", "(sgr0)", 8},
              -	{"blink", "(blink)", "(sgr0)", 16},
              -	{"dim", "(dim)", "(sgr0)", 32},
              -	{"bold", "(bold)", "(sgr0)", 64},
              -	{"invis", "(invis)", "(sgr0)", 128},
              -	{"protect", "(prot)", "(sgr0)", 256},
              -	{"altcharset", "(smacs)", "(rmacs)", 512}
              -};
              -
              -/* On many terminals the underline attribute is the last scan line.
              -   This is OK unless the following line is reverse video.
              -   Then the underline attribute does not show up.  The following map
              -   will reorder the display so that the underline attribute will
              -   show up. */
              -const int mode_map[10] = {0, 1, 3, 4, 5, 6, 7, 8, 9, 2};
              -
              -struct graphics_pair {
              -	unsigned char c;
              -	const char *name;
              -};
              -
              -static struct graphics_pair glyph[] = {
              -	{'+', "arrow pointing right"},
              -	{',', "arrow pointing left"},
              -	{'.', "arrow pointing down"},
              -	{'0', "solid square block"},
              -	{'i', "lantern symbol"},
              -	{'-', "arrow pointing up"},
              -	{'`', "diamond"},
              -	{'a', "checker board (stipple)"},
              -	{'f', "degree symbol"},
              -	{'g', "plus/minus"},
              -	{'h', "board of squares"},
              -	{'j', "lower right corner"},
              -	{'k', "upper right corner"},
              -	{'l', "upper left corner"},
              -	{'m', "lower left corner"},
              -	{'n', "plus"},
              -	{'o', "scan line 1"},
              -	{'p', "scan line 3"},
              -	{'q', "horizontal line"},
              -	{'r', "scan line 7"},
              -	{'s', "scan line 9"},
              -	{'t', "left tee (|-)"},
              -	{'u', "right tee (-|)"},
              -	{'v', "bottom tee(_|_)"},
              -	{'w', "top tee (T)"},
              -	{'x', "vertical line"},
              -	{'y', "less/equal"},
              -	{'z', "greater/equal"},
              -	{'{', "Pi"},
              -	{'|', "not equal"},
              -	{'}', "UK pound sign"},
              -	{'~', "bullet"},
              -	{'\0', "\0"}
              -};
              -
              -/*
              -**	charset_hs(test_list, status, ch)
              -**
              -**	(hs) test Has status line
              -*/
              -static void
              -charset_hs(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (has_status_line != 1) {
              -		ptext("(hs) Has-status line is not defined.  ");
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	charset_status(test_list, status, ch)
              -**
              -**	(tsl) (fsl) (wsl) test Status line
              -*/
              -static void
              -charset_status(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, max;
              -	char *s;
              -	static char m[] = "*** status line *** 123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.";
              -
              -	if (has_status_line != 1) {
              -		return;
              -	}
              -	put_clear();
              -	max = width_status_line == -1 ? columns : width_status_line;
              -	sprintf(temp, "Terminal has status line of %d characters", max);
              -	ptextln(temp);
              -
              -	put_str("This line s");
              -	s = TPARM_1(to_status_line, 0);
              -	tc_putp(s);
              -	for (i = 0; i < max; i++)
              -		putchp(m[i]);
              -	tc_putp(from_status_line);
              -	putln("hould not be broken.");
              -	ptextln("If the previous line is not a complete sentence then (tsl) to-status-line, (fsl) from-status-line, or (wsl) width-of-status-line is incorrect."  );
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	charset_dsl(test_list, status, ch)
              -**
              -**	(dsl) test Disable status line
              -*/
              -static void
              -charset_dsl(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (has_status_line != 1) {
              -		return;
              -	}
              -	if (dis_status_line) {
              -		ptextln("Disable status line (dsl)");
              -		tc_putp(dis_status_line);
              -		ptext("If you can still see the status line then (dsl) disable-status-line has failed.  ");
              -	} else {
              -		ptext("(dsl) Disable-status-line is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -
              -void
              -eat_cookie(void)
              -{				/* put a blank if this is not a magic cookie
              -				   terminal */
              -	if (magic_cookie_glitch < 1)
              -		putchp(' ');
              -}
              -
              -
              -void
              -put_mode(char *s)
              -{				/* send the attribute string (with or without
              -				   % execution) */
              -	tc_putp(TPARM_0(s));		/* allow % execution */
              -}
              -
              -
              -void
              -set_attr(int a)
              -{				/* set the attribute from the bits in a */
              -	int i, b[32];
              -
              -	if (magic_cookie_glitch > 0) {
              -		char_count += magic_cookie_glitch;
              -	}
              -	if (a == 0 && exit_attribute_mode) {
              -		put_mode(exit_attribute_mode);
              -		return;
              -	}
              -	for (i = 0; i < 31; i++) {
              -		b[i] = (a >> i) & 1;
              -	}
              -	tc_putp(TPARM_9(set_attributes, b[1], b[2], b[3], b[4], b[5],
              -			b[6], b[7], b[8], b[9]));
              -}
              -
              -/*
              -**	charset_sgr(test_list, status, ch)
              -**
              -**	(sgr) test Set Graphics Rendition
              -*/
              -static void
              -charset_sgr(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!set_attributes) {
              -		ptext("(sgr) Set-graphics-rendition is not defined.  ");
              -		generic_done_message(t, state, ch);
              -		return;
              -	}
              -	if (!exit_attribute_mode) {
              -		ptextln("(sgr0) Set-graphics-rendition-zero is not defined.");
              -		/* go ahead and test anyway */
              -	}
              -	ptext("Test video attributes (sgr)");
              -
              -	for (i = 0; i < (int) (sizeof(alt_modes) / sizeof(struct mode_list));
              -		i++) {
              -		put_crlf();
              -		sprintf(temp, "%d %-20s", i, alt_modes[i].name);
              -		put_str(temp);
              -		set_attr(alt_modes[i].number);
              -		sprintf(temp, "%s", alt_modes[i].name);
              -		put_str(temp);
              -		set_attr(0);
              -	}
              -
              -	putln("\n\nDouble mode test");
              -	for (i = 0; i <= 9; i++) {
              -		sprintf(temp, " %2d ", mode_map[i]);
              -		put_str(temp);
              -	}
              -	for (i = 0; i <= 9; i++) {
              -		put_crlf();
              -		sprintf(temp, "%d", mode_map[i]);
              -		put_str(temp);
              -		for (j = 0; j <= 9; j++) {
              -			eat_cookie();
              -			set_attr((1 << mode_map[i]) | (1 << mode_map[j]));
              -			put_str("Aa");
              -			set_attr(0);
              -			if (j < 9)
              -				eat_cookie();
              -		}
              -	}
              -	put_crlf();
              -
              -#ifdef max_attributes
              -	if (max_attributes >= 0) {
              -		sprintf(temp, "(ma) Maximum attributes %d  ", max_attributes);
              -		ptext(temp);
              -	}
              -#endif
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	test_one_attr(mode-number, begin-string, end-string)
              -**
              -**	Display one attribute line.
              -*/
              -static void
              -test_one_attr(
              -	int n,
              -	char *begin_mode,
              -	char *end_mode)
              -{
              -	int i;
              -
              -	sprintf(temp, "%-10s %s ", alt_modes[n].name, alt_modes[n].begin_mode);
              -	ptext(temp);
              -	for (; char_count < 19;) {
              -		putchp(' ');
              -	}
              -	if (begin_mode) {
              -		putchp('.');
              -		put_mode(begin_mode);
              -		put_str(alt_modes[n].name);
              -		for (i = strlen(alt_modes[n].name); i < 13; i++) {
              -			putchp(' ');
              -		}
              -		if (end_mode) {
              -			put_mode(end_mode);
              -			sprintf(temp, ". %s", alt_modes[n].end_mode);
              -		} else {
              -			set_attr(0);
              -			strcpy(temp, ". (sgr)");
              -		}
              -		ptextln(temp);
              -	} else {
              -		for (i = 0; i < magic_cookie_glitch; i++)
              -			putchp('*');
              -		put_str("*** missing ***");
              -		for (i = 0; i < magic_cookie_glitch; i++)
              -			putchp('*');
              -		put_crlf();
              -	}
              -}
              -
              -/*
              -**	charset_attributes(test_list, status, ch)
              -**
              -**	Test SGR
              -*/
              -static void
              -charset_attributes(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	putln("Test video attributes");
              -	test_one_attr(1, enter_standout_mode, exit_standout_mode);
              -	test_one_attr(2, enter_underline_mode, exit_underline_mode);
              -	test_one_attr(9, enter_alt_charset_mode, exit_alt_charset_mode);
              -	if (!exit_attribute_mode && !set_attributes) {
              -		ptextln("(sgr0) exit attribute mode is not defined.");
              -		generic_done_message(t, state, ch);
              -		return;
              -	}
              -	test_one_attr(3, enter_reverse_mode, exit_attribute_mode);
              -	test_one_attr(4, enter_blink_mode, exit_attribute_mode);
              -	test_one_attr(5, enter_dim_mode, exit_attribute_mode);
              -	test_one_attr(6, enter_bold_mode, exit_attribute_mode);
              -	test_one_attr(7, enter_secure_mode, exit_attribute_mode);
              -	test_one_attr(8, enter_protected_mode, exit_attribute_mode);
              -	generic_done_message(t, state, ch);
              -}
              -
              -#define GLYPHS 256
              -
              -/*
              -**	charset_smacs(test_list, status, ch)
              -**
              -**	display all possible acs characters
              -**	(smacs) (rmacs)
              -*/
              -static void
              -charset_smacs(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, c;
              -
              -	if (enter_alt_charset_mode) {
              -		put_clear();
              -		ptextln("The following characters are available. (smacs) (rmacs)");
              -		for (i = ' '; i <= '`'; i += 32) {
              -			put_crlf();
              -			put_mode(exit_alt_charset_mode);
              -			for (c = 0; c < 32; c++) {
              -				putchp(c + i);
              -			}
              -			put_crlf();
              -			put_mode(enter_alt_charset_mode);
              -			for (c = 0; c < 32; c++) {
              -				putchp(c + i);
              -			}
              -			put_mode(exit_alt_charset_mode);
              -			put_crlf();
              -		}
              -		put_mode(exit_alt_charset_mode);
              -		put_crlf();
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -
              -static void
              -test_acs(
              -	int attr)
              -{				/* alternate character set */
              -	int i, j;
              -	char valid_glyph[GLYPHS];
              -	char acs_table[GLYPHS];
              -	static unsigned char vt100[] = "`afgjklmnopqrstuvwxyz{|}~";
              -
              -	line_count = 0;
              -	for (i = 0; i < GLYPHS; i++) {
              -		valid_glyph[i] = FALSE;
              -		acs_table[i] = i;
              -	}
              -	if (acs_chars) {
              -		sprintf(temp, "Alternate character set map: %s",
              -			expand(acs_chars));
              -		putln(temp);
              -		for (i = 0; acs_chars[i]; i += 2) {
              -			if (acs_chars[i + 1] == 0) {
              -				break;
              -			}
              -			for (j = 0;; j++) {
              -				if (glyph[j].c == (unsigned char) acs_chars[i]) {
              -					acs_table[glyph[j].c] = acs_chars[i + 1];
              -					valid_glyph[glyph[j].c] = TRUE;
              -					break;
              -				}
              -				if (glyph[j].name[0] == '\0') {
              -					if (isgraph(UChar(acs_chars[i]))) {
              -						sprintf(temp, "    %c",
              -							acs_chars[i]);
              -					} else {
              -						sprintf(temp, " 0x%02x",
              -							UChar(acs_chars[i]));
              -					}
              -					strcpy(&temp[5], " *** has no mapping ***");
              -					putln(temp);
              -					break;
              -				}
              -			}
              -		}
              -	} else {
              -		ptextln("acs_chars not defined (acsc)");
              -		/* enable the VT-100 graphics characters (default) */
              -		for (i = 0; vt100[i]; i++) {
              -			valid_glyph[vt100[i]] = TRUE;
              -		}
              -	}
              -	if (attr) {
              -		set_attr(attr);
              -	}
              -	_nc_init_acs();	/* puts 'ena_acs' and incidentally links acs_map[] */
              -	for (i = 0; glyph[i].name[0]; i++) {
              -		if (valid_glyph[glyph[i].c]) {
              -			put_mode(enter_alt_charset_mode);
              -			put_this(acs_table[glyph[i].c]);
              -			char_count++;
              -			put_mode(exit_alt_charset_mode);
              -			if (magic_cookie_glitch >= 1) {
              -				sprintf(temp, " %-30.30s", glyph[i].name);
              -				put_str(temp);
              -				if (char_count + 33 >= columns)
              -					put_crlf();
              -			} else {
              -				sprintf(temp, " %-24.24s", glyph[i].name);
              -				put_str(temp);
              -				if (char_count + 26 >= columns)
              -					put_crlf();
              -			}
              -			if (line_count >= lines) {
              -				(void) wait_here();
              -				put_clear();
              -			}
              -		}
              -	}
              -	if (char_count > 1) {
              -		put_crlf();
              -	}
              -#ifdef ACS_ULCORNER
              -	maybe_wait(5);
              -	put_mode(enter_alt_charset_mode);
              -	put_that(ACS_ULCORNER);
              -	put_that(ACS_TTEE);
              -	put_that(ACS_URCORNER);
              -	put_that(ACS_ULCORNER);
              -	put_that(ACS_HLINE);
              -	put_that(ACS_URCORNER);
              -	char_count += 6;
              -	put_mode(exit_alt_charset_mode);
              -	put_crlf();
              -	put_mode(enter_alt_charset_mode);
              -	put_that(ACS_LTEE);
              -	put_that(ACS_PLUS);
              -	put_that(ACS_RTEE);
              -	put_that(ACS_VLINE);
              -	if (magic_cookie_glitch >= 1)
              -		put_this(' ');
              -	else {
              -		put_mode(exit_alt_charset_mode);
              -		put_this(' ');
              -		put_mode(enter_alt_charset_mode);
              -	}
              -	put_that(ACS_VLINE);
              -	char_count += 6;
              -	put_mode(exit_alt_charset_mode);
              -	put_str("   Here are 2 boxes");
              -	put_crlf();
              -	put_mode(enter_alt_charset_mode);
              -	put_that(ACS_LLCORNER);
              -	put_that(ACS_BTEE);
              -	put_that(ACS_LRCORNER);
              -	put_that(ACS_LLCORNER);
              -	put_that(ACS_HLINE);
              -	put_that(ACS_LRCORNER);
              -	char_count += 6;
              -	put_mode(exit_alt_charset_mode);
              -	put_crlf();
              -#endif
              -}
              -
              -/*
              -**	charset_bel(test_list, status, ch)
              -**
              -**	(bel) test Bell
              -*/
              -static void
              -charset_bel(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (bell) {
              -		ptextln("Testing bell (bel)");
              -		tc_putp(bell);
              -		ptext("If you did not hear the Bell then (bel) has failed.  ");
              -	} else {
              -		ptext("(bel) Bell is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	charset_flash(test_list, status, ch)
              -**
              -**	(flash) test Visual bell
              -*/
              -static void
              -charset_flash(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (flash_screen) {
              -		ptextln("Testing visual bell (flash)");
              -		tc_putp(flash_screen);
              -		ptext("If you did not see the screen flash then (flash) has failed.  ");
              -	} else {
              -		ptext("(flash) Flash is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	charset_civis(test_list, status, ch)
              -**
              -**	(civis) test Cursor invisible
              -*/
              -static void
              -charset_civis(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (cursor_normal) {
              -		if (cursor_invisible) {
              -			ptext("(civis) Turn off the cursor.  ");
              -			tc_putp(cursor_invisible);
              -			ptext("If you can still see the cursor then (civis) has failed.  ");
              -		} else {
              -			ptext("(civis) Cursor-invisible is not defined.  ");
              -		}
              -		generic_done_message(t, state, ch);
              -		tc_putp(cursor_normal);
              -	}
              -}
              -
              -/*
              -**	charset_cvvis(test_list, status, ch)
              -**
              -**	(cvvis) test Cursor very visible
              -*/
              -static void
              -charset_cvvis(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (cursor_normal) {
              -		if (cursor_visible) {
              -			ptext("(cvvis) Make cursor very visible.  ");
              -			tc_putp(cursor_visible);
              -			ptext("If the cursor is not very visible then (cvvis) has failed.  ");
              -		} else {
              -			ptext("(cvvis) Cursor-very-visible is not defined.  ");
              -		}
              -		generic_done_message(t, state, ch);
              -		tc_putp(cursor_normal);
              -	}
              -}
              -
              -/*
              -**	charset_cnorm(test_list, status, ch)
              -**
              -**	(cnorm) test Cursor normal
              -*/
              -static void
              -charset_cnorm(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (cursor_normal) {
              -		ptext("(cnorm) Normal cursor.  ");
              -		tc_putp(cursor_normal);
              -		ptext("If the cursor is not normal then (cnorm) has failed.  ");
              -	} else {
              -		ptext("(cnorm) Cursor-normal is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	charset_enacs(test_list, status, ch)
              -**
              -**	test Alternate character set mode and alternate characters
              -**	(acsc) (enacs) (smacs) (rmacs)
              -*/
              -static void
              -charset_enacs(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int c, i;
              -
              -	if (enter_alt_charset_mode || acs_chars) {
              -		c = 0;
              -		while (1) {
              -			put_clear();
              -			/*
              -			   for terminals that use separate fonts for
              -			   attributes (such as X windows) the line
              -			   drawing characters must be checked for
              -			   each font.
              -			*/
              -			if (c >= '0' && c <= '9') {
              -				test_acs(alt_modes[c - '0'].number);
              -				set_attr(0);
              -			} else {
              -				test_acs(0);
              -			}
              -
              -			while (1) {
              -				ptextln("[r] to repeat, [012345789] to test with attributes on, [?] for a list of attributes, anything else to go to next test.  ");
              -				generic_done_message(t, state, ch);
              -				if (*ch != '?') {
              -					break;
              -				}
              -				for (i = 0; i <= 9; i++) {
              -					sprintf(temp, " %d %s %s", i, alt_modes[i].begin_mode,
              -						alt_modes[i].name);
              -					ptextln(temp);
              -				}
              -			}
              -			if (*ch >= '0' && *ch <= '9') {
              -				c = *ch;
              -			} else
              -			if (*ch != 'r') {
              -				break;
              -			}
              -		}
              -	} else {
              -		ptext("(smacs) Enter-alt-char-set-mode and (acsc) Alternate-char-set are not defined.  ");
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	charset_can_test()
              -**
              -**	Initialize the can_test data base
              -*/
              -void
              -charset_can_test(void)
              -{
              -	int i;
              -
              -	for (i = 0; i < 9; i++) {
              -		can_test(alt_modes[i].begin_mode, FLAG_CAN_TEST);
              -		can_test(alt_modes[i].end_mode, FLAG_CAN_TEST);
              -	}
              -}
              diff -Naur ncurses-5.6.orig/tack/color.c ncurses-5.6/tack/color.c
              --- ncurses-5.6.orig/tack/color.c	2006-11-25 19:14:25.000000000 -0500
              +++ ncurses-5.6/tack/color.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,769 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -**
              -** This file is part of TACK.
              -**
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -**
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -**
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: color.c,v 1.7 2006/11/26 00:14:25 tom Exp $")
              -
              -/*
              - * Color terminal tests.  Has only one entry point: test_color().
              - */
              -
              -static void color_check(struct test_list *, int *, int *);
              -static void color_setf(struct test_list *, int *, int *);
              -static void color_matrix(struct test_list *, int *, int *);
              -static void color_ncv(struct test_list *, int *, int *);
              -static void color_ccc(struct test_list *, int *, int *);
              -static void color_bce(struct test_list *, int *, int *);
              -
              -struct test_list color_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{MENU_NEXT, 2, "colors) (pairs", 0, 0, color_check, 0},
              -	{MENU_NEXT, 12, "setf) (setb) (scp", 0, 0, color_setf, 0},
              -	{MENU_NEXT, 24, "op", 0, 0, color_matrix, 0},
              -	{MENU_NEXT, 16, "ncv", 0, 0, color_ncv, 0},
              -	{MENU_NEXT, 0, "bce", 0, 0, color_bce, 0},
              -	{MENU_NEXT | MENU_CLEAR, 0, "ccc) (initc) (initp", "hls op oc", 0, color_ccc, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -#ifndef COLOR_BLACK
              -#define COLOR_BLACK     0
              -#define COLOR_BLUE      1
              -#define COLOR_GREEN     2
              -#define COLOR_CYAN      3
              -#define COLOR_RED       4
              -#define COLOR_MAGENTA   5
              -#define COLOR_YELLOW    6
              -#define COLOR_WHITE     7
              -#endif
              -
              -struct color_table {
              -	const char *name;
              -	int index;
              -	int r, g, b;
              -	int h, l, s;
              -};
              -
              -static struct color_table def_colors[8] = {
              -	{"black  ", COLOR_BLACK, 0, 0, 0, 0, 0, 0},
              -	{"blue   ", COLOR_BLUE, 0, 0, 1000, 330, 50, 100},
              -	{"green  ", COLOR_GREEN, 0, 1000, 0, 240, 50, 100},
              -	{"cyan   ", COLOR_CYAN, 0, 1000, 1000, 300, 50, 100},
              -	{"red    ", COLOR_RED, 1000, 0, 0, 120, 50, 100},
              -	{"magenta", COLOR_MAGENTA, 1000, 0, 1000, 60, 50, 100},
              -	{"yellow ", COLOR_YELLOW, 1000, 1000, 0, 180, 50, 100},
              -	{"white  ", COLOR_WHITE, 1000, 1000, 1000, 0, 100, 0}
              -};
              -
              -#define MAX_PAIR	256
              -static int fg_color[MAX_PAIR] = {COLOR_BLACK, COLOR_BLUE, COLOR_GREEN,
              -COLOR_CYAN, COLOR_RED, COLOR_MAGENTA, COLOR_YELLOW, COLOR_WHITE};
              -static int bg_color[MAX_PAIR] = {COLOR_BLACK, COLOR_BLACK, COLOR_BLACK,
              -COLOR_BLACK, COLOR_BLACK, COLOR_BLACK, COLOR_BLACK, COLOR_BLACK};
              -static int pairs_used = 8;
              -static int a_bright_color, bright_value;
              -static int cookie_monster, color_step, colors_per_line;
              -static int R, G, B;
              -
              -static void reset_colors(void)
              -{
              -	tc_putp(orig_colors);
              -	tc_putp(TPARM_0(orig_pair));
              -}
              -
              -static int
              -color_trans(int c)
              -{				/* translate or load the color */
              -	int i;
              -
              -	for (i = 0; i < pairs_used; i++) {
              -		if (fg_color[i] == c) {
              -			return i;
              -		}
              -	}
              -	if (!can_change) {
              -		return 0;
              -	}
              -	if (pairs_used > max_colors || pairs_used >= MAX_PAIR) {
              -		pairs_used = 0;
              -		ptextln("Ran out of colors");
              -	}
              -	fg_color[pairs_used] = c;
              -	bg_color[pairs_used] = c;
              -	if (hue_lightness_saturation) {
              -		tc_putp(TPARM_4(initialize_color, pairs_used,
              -			def_colors[c].h, def_colors[c].l, def_colors[c].s));
              -	} else {
              -		tc_putp(TPARM_4(initialize_color, pairs_used,
              -			def_colors[c].r, def_colors[c].g, def_colors[c].b));
              -	}
              -	return pairs_used++;
              -}
              -
              -static void
              -new_color(
              -	int fg,
              -	int bg,
              -	int hungry)
              -{				/* change the color to fg and bg. */
              -	int i;
              -
              -	if (hungry) {
              -		eat_cookie();
              -	}
              -	if (set_a_foreground) {
              -		/* set ANSI color (setaf) (setab) */
              -		tc_putp(TPARM_1(set_a_foreground, fg));
              -		tc_putp(TPARM_1(set_a_background, bg));
              -	} else if (set_foreground) {
              -		/* make sure black is zero */
              -		(void) color_trans(COLOR_BLACK);
              -		tc_putp(TPARM_1(set_foreground, color_trans(fg)));
              -		tc_putp(TPARM_1(set_background, color_trans(bg)));
              -	} else {	/* set color pair */
              -		for (i = 0; i < pairs_used; i++) {
              -			if (fg_color[i] == fg && bg_color[i] == bg) {
              -				tc_putp(TPARM_1(set_color_pair, i));
              -				if (hungry) {
              -					eat_cookie();
              -				}
              -				return;
              -			}
              -		}
              -		if (!can_change) {
              -			/* try to set just the foreground */
              -			for (i = pairs_used - 1; i; i--) {
              -				if (fg_color[i] == fg)
              -					break;
              -			}
              -			tc_putp(TPARM_1(set_color_pair, i));
              -			if (hungry) {
              -				eat_cookie();
              -			}
              -			return;
              -		}
              -		if (pairs_used > max_pairs || pairs_used >= MAX_PAIR) {
              -			pairs_used = 0;
              -			ptextln("Ran out of color pairs");
              -		}
              -		fg_color[pairs_used] = fg;
              -		bg_color[pairs_used] = bg;
              -		if (hue_lightness_saturation) {
              -			tc_putp(TPARM_7(initialize_pair, pairs_used,
              -				def_colors[fg].h, def_colors[fg].l, def_colors[fg].s,
              -				def_colors[bg].h, def_colors[bg].l, def_colors[bg].s));
              -		} else {
              -			tc_putp(TPARM_7(initialize_pair, pairs_used,
              -				def_colors[fg].r, def_colors[fg].g, def_colors[fg].b,
              -				def_colors[bg].r, def_colors[bg].g, def_colors[bg].b));
              -		}
              -		tc_putp(TPARM_1(set_color_pair, pairs_used));
              -		pairs_used++;
              -	}
              -	if (hungry) {
              -		eat_cookie();
              -	}
              -}
              -
              -
              -static void
              -set_color_step(void)
              -{				/* set the color_step for the (ccc) display */
              -	int i;
              -
              -	for (i = 2; i < 1000; i++) {
              -		if ((i * i * i) >= max_colors) {
              -			break;
              -		}
              -	}
              -	color_step = 1000 / (i - 1);
              -}
              -
              -
              -static void
              -rgb_2_hls(int r, int g, int b, int *h, int *l, int *s)
              -{				/* convert RGB to HLS system */
              -	int min, max, t;
              -
              -	if ((min = g < r ? g : r) > b) {
              -		min = b;
              -	}
              -	if ((max = g > r ? g : r) < b) {
              -		max = b;
              -	}
              -
              -	/* calculate lightness */
              -	*l = (min + max) / 20;
              -
              -	if (min == max) {	/* black, white and all shades of gray */
              -		*h = 0;
              -		*s = 0;
              -		return;
              -	}
              -	/* calculate saturation */
              -	if (*l < 50) {
              -		*s = ((max - min) * 100) / (max + min);
              -	} else {
              -		*s = ((max - min) * 100) / (2000 - max - min);
              -	}
              -
              -	/* calculate hue */
              -	if (r == max) {
              -		t = 120 + ((g - b) * 60) / (max - min);
              -	} else if (g == max) {
              -		t = 240 + ((b - r) * 60) / (max - min);
              -	} else {
              -		t = 360 + ((r - g) * 60) / (max - min);
              -	}
              -	*h = t % 360;
              -}
              -
              -
              -static void
              -send_color(int p, int r, int g, int b)
              -{				/* send the initialize_color (initc) command */
              -	int h, l, s;
              -
              -	if (hue_lightness_saturation) {
              -		rgb_2_hls(r, g, b, &h, &l, &s);
              -		tc_putp(TPARM_4(initialize_color, p, h, l, s));
              -	} else {
              -		tc_putp(TPARM_4(initialize_color, p, r, g, b));
              -	}
              -}
              -
              -
              -static void
              -send_pair(int p, int fr, int fg, int fb, int br, int bg, int bb)
              -{				/* send the initialize_pair (initp) command */
              -	int fh, fl, fs, bh, bl, bs;
              -
              -	if (hue_lightness_saturation) {
              -		rgb_2_hls(fr, fg, fb, &fh, &fl, &fs);
              -		rgb_2_hls(br, bg, bb, &bh, &bl, &bs);
              -		tc_putp(TPARM_7(initialize_pair, p, fh, fl, fs, bh, bl, bs));
              -	} else {
              -		tc_putp(TPARM_7(initialize_pair, p, fr, fg, fb, bb, bg, bb));
              -	}
              -}
              -
              -
              -static int
              -load_palette(int n)
              -{				/* load the color palette */
              -	int rgb;
              -
              -	for (;;) {
              -		if (pairs_used >= n) {
              -			return FALSE;
              -		}
              -		if (set_a_foreground || set_foreground) {
              -			if (pairs_used >= max_colors) {
              -				return FALSE;
              -			}
              -			send_color(pairs_used, R, G, B);
              -			rgb = R + G + B;
              -			if (rgb > bright_value) {
              -				bright_value = rgb;
              -				a_bright_color = pairs_used;
              -			}
              -		} else {
              -			if (pairs_used >= max_pairs) {
              -				return FALSE;
              -			}
              -			if (pairs_used == 0) {
              -				send_pair(pairs_used, 1000, 1000, 1000, R, G, B);
              -			} else {
              -				send_pair(pairs_used, R, G, B, R, G, B);
              -			}
              -		}
              -		pairs_used++;
              -		if ((B += color_step) > 1000) {
              -			B = 0;
              -			if ((G += color_step) > 1000) {
              -				G = 0;
              -				if ((R += color_step) > 1000) {
              -					return TRUE;
              -				}
              -			}
              -		}
              -	}
              -}
              -
              -
              -static int
              -rainbow(int n)
              -{				/* print the programmable color display */
              -	int i, c, d, palette_full, initial_pair;
              -	static const struct {
              -		const char *name;
              -		char ch;
              -	}  splat[] = {
              -		{"Bg normal", ' '},
              -		{"Fg normal", ' '},
              -		{0, 0}
              -	};
              -
              -	if ((set_a_foreground || set_foreground)
              -	  ? pairs_used >= max_colors
              -	  : pairs_used >= max_pairs) {
              -		ptext("New palette: ");
              -		(void) wait_here();
              -		initial_pair = pairs_used = 1;
              -		bright_value = 0;
              -	} else if (line_count + 3 >= lines) {
              -		ptext("Go: ");
              -		(void) wait_here();
              -		put_clear();
              -		initial_pair = pairs_used = 1;
              -		bright_value = 0;
              -		n++;
              -	} else {
              -		initial_pair = pairs_used;
              -		n += initial_pair;
              -	}
              -	palette_full = load_palette(n);
              -	for (d = 0; splat[d].name; d++) {
              -		c = splat[d].ch;
              -		if (d == 1) {
              -			put_mode(enter_reverse_mode);
              -		}
              -		for (i = initial_pair; i < n; i++) {
              -			if (i >= pairs_used) {
              -				break;
              -			}
              -			if (set_a_foreground) {
              -				if (i >= max_colors) {
              -					break;
              -				}
              -				tc_putp(TPARM_1(set_a_foreground, i));
              -				tc_putp(TPARM_1(set_a_background, i));
              -			} else if (set_foreground) {
              -				if (i >= max_colors) {
              -					break;
              -				}
              -				tc_putp(TPARM_1(set_foreground, i));
              -				tc_putp(TPARM_1(set_background, i));
              -			} else {
              -				if (i >= max_pairs) {
              -					break;
              -				}
              -				tc_putp(TPARM_1(set_color_pair, i));
              -			}
              -			putchp(c);
              -		}
              -		if (d == 1) {
              -			put_mode(exit_attribute_mode);
              -		}
              -		if (set_a_foreground) {
              -			tc_putp(TPARM_1(set_a_foreground, a_bright_color));
              -			tc_putp(TPARM_1(set_a_background, 0));
              -		} else if (set_foreground) {
              -			tc_putp(TPARM_1(set_foreground, a_bright_color));
              -			tc_putp(TPARM_1(set_background, 0));
              -		} else {
              -			tc_putp(TPARM_1(set_color_pair, 0));
              -		}
              -		put_str("   ");
              -		put_str(splat[d].name);
              -		put_crlf();
              -	}
              -	return palette_full;
              -}
              -
              -
              -static void
              -ncv_display(int m)
              -{				/* print the no_color_video (ncv) test line */
              -	putchp('0' + m);
              -	putchp(' ');
              -	eat_cookie();
              -	set_attr(1 << m);
              -	sprintf(temp, "%-11s", alt_modes[m].name);
              -	put_str(temp);
              -
              -	new_color(COLOR_BLUE, COLOR_BLACK, TRUE);
              -	put_str("blue");
              -
              -	new_color(COLOR_BLACK, COLOR_GREEN, TRUE);
              -	put_str("green");
              -
              -	new_color(COLOR_WHITE, COLOR_BLACK, TRUE);
              -	put_str(alt_modes[m].name);
              -	eat_cookie();
              -	set_attr(0);
              -	reset_colors();
              -	put_crlf();
              -}
              -
              -
              -static void
              -dump_colors(void)
              -{				/* display the colors in some esthetic
              -				   pattern */
              -	static int xmap[8] = {0, 3, 4, 7, 1, 2, 5, 6};
              -	int i, j, k, xi, xj, width, p, cs;
              -	int found_one;
              -
              -	cs = color_step <= 125 ? 125 : color_step;
              -	width = (1000 / cs) + 1;
              -	for (xi = 0; xi < 16; xi++) {
              -		i = (xi & 8) ? xi ^ 15 : xi;
              -		R = i * cs;
              -		if (R <= 1000) {
              -			found_one = FALSE;
              -			for (xj = 0; xj < 32; xj++) {
              -				j = ((xj & 8) ? xj ^ 15 : xj) & 7;
              -				k = xmap[((xi >> 1) & 4) + (xj >> 3)];
              -				G = j * cs;
              -				B = k * cs;
              -				if (G <= 1000 && B <= 1000) {
              -					p = (k * width + j) * width + i;
              -					if (set_a_background) {
              -						if (p >= max_colors) {
              -							continue;
              -						}
              -						send_color(p, R, G, B);
              -						tc_putp(TPARM_1(set_a_background, p));
              -					} else if (set_background) {
              -						if (p >= max_colors) {
              -							continue;
              -						}
              -						send_color(p, R, G, B);
              -						tc_putp(TPARM_1(set_background, p));
              -					} else {
              -						if (p >= max_pairs) {
              -							continue;
              -						}
              -						send_pair(p, R, G, B, R, G, B);
              -						tc_putp(TPARM_1(set_color_pair, p));
              -					}
              -					found_one = TRUE;
              -					putchp(' ');
              -					putchp(' ');
              -				}
              -			}
              -			if (found_one) {
              -				put_crlf();
              -			}
              -		}
              -	}
              -}
              -
              -/*
              -**	color_check(test_list, status, ch)
              -**
              -**	test (colors) and (pairs)
              -*/
              -static void
              -color_check(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (max_colors <= 0 && max_pairs <= 0) {
              -		ptext("This is not a color terminal; (colors) and (pairs) are missing.  ");
              -		*state |= MENU_STOP;
              -	} else {
              -		sprintf(temp, "This terminal can display %d colors and %d color pairs.  (colors) (pairs)",
              -			max_colors, max_pairs);
              -		ptextln(temp);
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	color_setf(test_list, status, ch)
              -**
              -**	test (setf) (setb) and (scp)
              -*/
              -static void
              -color_setf(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (max_colors <= 0 && max_pairs <= 0) {
              -		ptext("This is not a color terminal; (colors) and (pairs) are missing.  ");
              -		generic_done_message(t, state, ch);
              -		*state |= MENU_STOP;
              -		return;
              -	}
              -	if ((set_a_foreground == NULL || set_a_background == NULL)
              -	 && (set_foreground == NULL   || set_background == NULL)
              -	 && set_color_pair == NULL) {
              -		ptextln("Both set foreground (setaf/setf) and set color pair (scp) are not present.");
              -		if (!set_a_background || !set_background) {
              -			ptextln("(setab/setb) set background not present");
              -		}
              -		ptext("These must be defined for color testing.  ");
              -		generic_done_message(t, state, ch);
              -		*state |= MENU_STOP;
              -		return;
              -	}
              -	/* initialize the color palette */
              -	pairs_used = max_colors >= 8 ? 8 : max_colors;
              -	reset_colors();
              -	new_color(COLOR_WHITE, COLOR_BLACK, FALSE);
              -
              -	ptextln("(setf) (setb) (scp) The following colors are predefined:");
              -	ptextln("\n   Foreground     Background");
              -	put_crlf();
              -	j = max_colors > 8 ? 8 : max_colors;
              -	/*
              -	 * the black on white test is the same as the white on black test.
              -	 */
              -	for (i = 1; i < j; i++) {
              -		putchp('0' + def_colors[i].index);
              -		putchp(' ');
              -		sprintf(temp, " %s ", def_colors[i].name);
              -
              -		new_color(def_colors[i].index, COLOR_BLACK, TRUE);
              -		put_str(temp);
              -
              -		new_color(COLOR_BLACK, COLOR_BLACK, TRUE);
              -		put_str("  ");
              -
              -		new_color(COLOR_BLACK, def_colors[i].index, TRUE);
              -		put_str(temp);
              -
              -		new_color(COLOR_WHITE, COLOR_BLACK, FALSE);
              -		put_crlf();
              -	}
              -	reset_colors();
              -	put_crlf();
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	color_matrix(test_list, status, ch)
              -**
              -**	test (pairs) (op)
              -*/
              -static void
              -color_matrix(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j, matrix_size, matrix_area, brightness;
              -
              -	matrix_size = max_colors > 8 ? 8 : max_colors;
              -
              -	sprintf(temp, "(pairs) There are %d color pairs.", max_pairs);
              -	ptextln(temp);
              -
              -	for ( ; matrix_size; matrix_size--) {
              -		if (matrix_size * matrix_size <= max_pairs) {
              -			break;
              -		}
              -	}
              -	matrix_area = matrix_size * matrix_size;
              -	for (brightness = 0; brightness < 2; brightness++) {
              -		put_crlf();
              -		sprintf(temp,
              -			"%dx%d matrix of foreground/background colors, bright *o%s*",
              -			matrix_size, matrix_size, brightness ? "n" : "ff");
              -		put_str(temp);
              -
              -		put_str("\n          ");
              -		for (i = 0; i < matrix_size; i++) {
              -			(void) sprintf(temp, "%-8s", def_colors[i].name);
              -			put_str(temp);
              -		}
              -		for (j = 0; j < matrix_area; j++) {
              -			if (j % matrix_size == 0) {
              -				reset_colors();
              -				put_crlf();
              -				if (brightness) {
              -					tc_putp(exit_attribute_mode);
              -				}
              -				(void) sprintf(temp, "%-8s", def_colors[j / matrix_size].name);
              -				put_str(temp);
              -				if (brightness) {
              -					put_mode(enter_bold_mode);
              -				}
              -			}
              -			new_color(def_colors[j % matrix_size].index,
              -				def_colors[j / matrix_size].index,
              -				FALSE);
              -			put_str("  Hello ");
              -		}
              -		reset_colors();
              -		if (brightness) {
              -			tc_putp(exit_attribute_mode);
              -		}
              -		put_crlf();
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	color_ncv(test_list, status, ch)
              -**
              -**	test (ncv)
              -*/
              -static void
              -color_ncv(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (no_color_video == -1) {
              -		/* I have no idea what this means */
              -		return;
              -	}
              -	sprintf(temp, "According to no_color_video (ncv) which is %d, the following attributes should work correctly with color.", no_color_video);
              -	ptextln(temp);
              -	put_crlf();
              -	set_attr(0);
              -	ncv_display(0);
              -	for (i = 1; i <= 9; i++) {
              -		if (((no_color_video >> (mode_map[i] - 1)) & 1) == 0) {
              -			ncv_display(mode_map[i]);
              -		}
              -	}
              -	if (no_color_video & 0x3ff) {
              -		ptextln("\nThe following attributes should not work correctly with color. (ncv)\n");
              -		for (i = 1; i <= 9; i++) {
              -			if ((no_color_video >> (mode_map[i] - 1)) & 1) {
              -				ncv_display(mode_map[i]);
              -			}
              -		}
              -	}
              -	reset_colors();
              -	put_crlf();
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	color_bce(test_list, status, ch)
              -**
              -**	test (bce) background color erase
              -*/
              -static void
              -color_bce(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	new_color(COLOR_CYAN, COLOR_BLUE, FALSE);
              -	put_clear();
              -	put_newlines(2);
              -	reset_colors();
              -	ptextln("If the two lines above are blue then back_color_erase (bce) should be true.");
              -	sprintf(temp, "(bce) is %s in the data base.", back_color_erase ? "true" : "false");
              -	ptextln(temp);
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	color_ccc(test_list, status, ch)
              -**
              -**	test (ccc) color palette test (oc) (op) (initc) (initp)
              -*/
              -static void
              -color_ccc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!can_change) {
              -		ptextln("Terminal can not change colors (ccc)");
              -		generic_done_message(t, state, ch);
              -		return;
              -	}
              -	reset_colors();
              -	pairs_used = 0;
              -	new_color(COLOR_WHITE, COLOR_BLACK, FALSE);
              -	sprintf(temp, "Reloading colors (init%c) using %s method",
              -		set_foreground ? 'c' : 'p',
              -		hue_lightness_saturation ? "HLS" : "RGB");
              -	ptextln(temp);
              -	put_crlf();
              -	j = max_colors > 7 ? 7 : max_colors;
              -	/* redisplay the above test with reinitialized colors */
              -	/* If these colors don't look right to you... */
              -	for (i = 0; i < j; i++) {
              -		sprintf(temp, " %s ", def_colors[i ^ 7].name);
              -
              -		new_color(i ^ 7, COLOR_BLACK, TRUE);
              -		put_str(temp);
              -
              -		new_color(COLOR_BLACK, COLOR_BLACK, TRUE);
              -		put_str("  ");
              -
              -		new_color(COLOR_BLACK, i ^ 7, TRUE);
              -		put_str(temp);
              -
              -		new_color(COLOR_WHITE, COLOR_BLACK, FALSE);
              -		put_crlf();
              -	}
              -	generic_done_message(t, state, ch);
              -	if (*ch != 0 && *ch != 'n') {
              -		reset_colors();
              -		return;
              -	}
              -
              -	pairs_used = 0;
              -	cookie_monster = 0;
              -	if (magic_cookie_glitch > 0) {
              -		cookie_monster =
              -			((set_a_foreground || set_foreground)
              -				? magic_cookie_glitch : 0) +
              -			((set_a_background || set_background)
              -				? magic_cookie_glitch : 0) +
              -			(set_color_pair ? magic_cookie_glitch : 0);
              -	}
              -	set_color_step();
              -	colors_per_line = max_colors > max_pairs
              -		? max_pairs : max_colors;
              -	j = (columns - 14) / (cookie_monster + 1);
              -	if (colors_per_line > j) {
              -		colors_per_line = (j / i) * i;
              -	}
              -	sprintf(temp, "RGB color step %d, cookies %d", color_step,
              -		cookie_monster);
              -	ptextln(temp);
              -
              -	R = G = B = 0;
              -	pairs_used = 0;
              -	for (;;) {
              -		if (rainbow(colors_per_line)) {
              -			break;
              -		}
              -	}
              -	generic_done_message(t, state, ch);
              -	if (*ch != 0 && *ch != 'n') {
              -		reset_colors();
              -		return;
              -	}
              -	dump_colors();
              -	reset_colors();
              -	generic_done_message(t, state, ch);
              -}
              diff -Naur ncurses-5.6.orig/tack/control.c ncurses-5.6/tack/control.c
              --- ncurses-5.6.orig/tack/control.c	2006-06-24 17:27:53.000000000 -0400
              +++ ncurses-5.6/tack/control.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,664 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -#if HAVE_SYS_TIME_H
              -#include 
              -#endif
              -
              -MODULE_ID("$Id: control.c,v 1.9 2006/06/24 21:27:53 tom Exp $")
              -
              -/* terminfo test program control subroutines */
              -
              -#if HAVE_GETTIMEOFDAY
              -#define MY_TIMER struct timeval
              -#else
              -#define MY_TIMER time_t
              -#endif
              -
              -/* globals */
              -int test_complete;		/* counts number of tests completed */
              -
              -char txt_longer_test_time[80];	/* +) use longer time */
              -char txt_shorter_test_time[80];	/* -) use shorter time */
              -static int pad_test_duration = 1;	/* number of seconds for a pad test */
              -int auto_pad_mode;		/* run the time tests */
              -int no_alarm_event;		/* TRUE if the alarm has not gone off yet */
              -unsigned long usec_run_time;	/* length of last test in microseconds */
              -static MY_TIMER stop_watch[MAX_TIMERS]; /* Hold the start timers */
              -
              -char txt_longer_augment[80];	/* >) use bigger augment */
              -char txt_shorter_augment[80];	/* <) use smaller augment */
              -
              -/* caps under test data base */
              -int tt_delay_max;		/* max number of milliseconds we can delay */
              -int tt_delay_used;		/* number of milliseconds consumed in delay */
              -const char *tt_cap[TT_MAX];	/* value of string */
              -int tt_affected[TT_MAX];	/* lines or columns effected (repetition factor) */
              -int tt_count[TT_MAX];		/* Number of times sent */
              -int tt_delay[TT_MAX];		/* Number of milliseconds delay */
              -int ttp;			/* number of entries used */
              -
              -/* Saved value of the above data base */
              -const char *tx_cap[TT_MAX];	/* value of string */
              -int tx_affected[TT_MAX];	/* lines or columns effected (repetition factor) */
              -int tx_count[TT_MAX];		/* Number of times sent */
              -int tx_index[TT_MAX];		/* String index */
              -int tx_delay[TT_MAX];		/* Number of milliseconds delay */
              -int txp;			/* number of entries used */
              -int tx_characters;		/* printing characters sent by test */
              -unsigned long tx_cps;		/* characters per second */
              -static struct test_list *tx_source;	/* The test that generated this data */
              -
              -#define RESULT_BLOCK		1024
              -static int blocks;		/* number of result blocks available */
              -static struct test_results *results;	/* pointer to next available */
              -static struct test_results **pads;	/* save pad results here */
              -
              -static void
              -alloc_arrays(void)
              -{
              -    	if (pads == 0) {
              -	    	pads = (struct test_results **)calloc(MAX_STRINGS, sizeof(struct test_results *));
              -	}
              -}
              -
              -/*
              -**	event_start(number)
              -**
              -**	Begin the stopwatch at the current time-of-day.
              -*/
              -void
              -event_start(int n)
              -{
              -#if HAVE_GETTIMEOFDAY
              -	(void) gettimeofday(&stop_watch[n], (struct timezone *)0);
              -#else
              -	stop_watch[n] = time((time_t *)0);
              -#endif
              -}
              -
              -/*
              -**	event_time(number)
              -**
              -**	Return the number of milliseconds since this stop watch began.
              -*/
              -long
              -event_time(int n)
              -{
              -#if HAVE_GETTIMEOFDAY
              -	MY_TIMER current_time;
              -
              -	(void) gettimeofday(¤t_time, (struct timezone *)0);
              -	return ((current_time.tv_sec - stop_watch[n].tv_sec) * 1000000)
              -		+ current_time.tv_usec - stop_watch[n].tv_usec;
              -#else
              -	return (time((time_t *)0) - stop_watch[n]) * 1000;
              -#endif
              -}
              -
              -/*****************************************************************************
              - *
              - * Execution control for string capability tests
              - *
              - *****************************************************************************/
              -
              -/*
              -**	get_next_block()
              -**
              -**	Get a results block for pad test data.
              -*/
              -static struct test_results *
              -get_next_block(void)
              -{
              -	if (blocks <= 0) {
              -		results = (struct test_results *)
              -			malloc(sizeof(struct test_results) * RESULT_BLOCK);
              -		if (!results) {
              -			ptextln("Malloc failed");
              -			return (struct test_results *) 0;
              -		}
              -		blocks = RESULT_BLOCK;
              -	}
              -	blocks--;
              -	return results++;
              -}
              -
              -/*
              -**	set_augment_txt()
              -**
              -**	Initialize the augment menu selections
              -*/
              -void
              -set_augment_txt(void)
              -{
              -	sprintf(txt_longer_augment,
              -		">) Change lines/characters effected to %d", augment << 1);
              -	sprintf(txt_shorter_augment,
              -		"<) Change lines/characters effected to %d", augment >> 1);
              -}
              -
              -void
              -control_init(void)
              -{
              -	sprintf(txt_longer_test_time, "+) Change test time to %d seconds",
              -		pad_test_duration + 1);
              -	sprintf(txt_shorter_test_time, "-) Change test time to %d seconds",
              -		pad_test_duration - 1);
              -	set_augment_txt();
              -}
              -
              -/*
              -**	msec_cost(cap, affected-count)
              -**
              -**	Return the number of milliseconds delay needed by the cap.
              -*/
              -int
              -msec_cost(
              -	const char *const cap,
              -	int affcnt)
              -{
              -	int dec, value, total, star, ch;
              -	const char *cp;
              -
              -	if (!cap) {
              -		return 0;
              -	}
              -	total = 0;
              -	for (cp = cap; *cp; cp++) {
              -		if (*cp == '$' && cp[1] == '<') {
              -			star = 1;
              -			value = dec = 0;
              -			for (cp += 2; (ch = *cp); cp++) {
              -				if (ch >= '0' && ch <= '9') {
              -					value = value * 10 + (ch - '0');
              -					dec *= 10;
              -				} else
              -				if (ch == '.') {
              -					dec = 1;
              -				} else
              -				if (ch == '*') {
              -					star = affcnt;
              -				} else
              -				if (ch == '>') {
              -					break;
              -				}
              -			}
              -			if (dec > 1) {
              -				total += (value * star) / dec;
              -			} else {
              -				total += (value * star);
              -			}
              -		}
              -	}
              -	return total;
              -}
              -
              -/*
              -**	liberated(cap)
              -**
              -**	Return the cap without padding
              -*/
              -char *
              -liberated(char *cap)
              -{
              -	static char cb[1024];
              -	char *ts, *ls;
              -
              -	cb[0] = '\0';
              -	ls = NULL;
              -	if (cap) {
              -		for (ts = cb; (*ts = *cap); ++cap) {
              -			if (*cap == '$' && cap[1] == '<') {
              -				ls = ts;
              -			}
              -			++ts;
              -			if (*cap == '>') {
              -				if (ls) {
              -					ts = ls;
              -					ls = NULL;
              -				}
              -			}
              -		}
              -	}
              -	return cb;
              -}
              -
              -/*
              -**	page_loop()
              -**
              -**	send CR/LF or go home and bump letter
              -*/
              -void
              -page_loop(void)
              -{
              -	if (line_count + 2 >= lines) {
              -		NEXT_LETTER;
              -		go_home();
              -	} else {
              -		put_crlf();
              -	}
              -}
              -
              -/*
              -**	skip_pad_test(test-list-entry, state, ch, text)
              -**
              -**	Print the start test line.  Handle start up commands.
              -**	Return TRUE if a return is requested.
              -*/
              -int
              -skip_pad_test(
              -	struct test_list *test,
              -	int *state,
              -	int *ch,
              -	const char *text)
              -{
              -	char rep_text[16];
              -
              -	while(1) {
              -		if (text) {
              -			ptext(text);
              -		}
              -		if ((test->flags & MENU_LC_MASK)) {
              -			sprintf(rep_text, " *%d", augment);
              -			ptext(rep_text);
              -		}
              -		ptext(" [n] > ");
              -		*ch = wait_here();
              -		if (*ch == 's') {
              -			/* Skip is converted to next */
              -			*ch = 'n';
              -			return TRUE;
              -		}
              -		if (*ch == 'q') {
              -			/* Quit is converted to help */
              -			*ch = '?';
              -			return TRUE;
              -		}
              -		if (*ch == '\r' || *ch == '\n' || *ch == 'n' || *ch == 'r') {
              -			/* this is the only response that allows the test to run */
              -			*ch = 0;
              -		}
              -		if (subtest_menu(pad_test_list, state, ch)) {
              -			continue;
              -		}
              -		return (*ch != 0);
              -	}
              -}
              -
              -/*
              -**	pad_done_message(test_list)
              -**
              -**	Print the Done message and request input.
              -*/
              -void
              -pad_done_message(
              -	struct test_list *test,
              -	int *state,
              -	int *ch)
              -{
              -	int default_action = 0;
              -	char done_message[128];
              -	char rep_text[16];
              -
              -	while (1) {
              -		if ((test->flags & MENU_LC_MASK)) {
              -			sprintf(rep_text, "*%d", augment);
              -		} else {
              -			rep_text[0] = '\0';
              -		}
              -		if (test->caps_done) {
              -			sprintf(done_message, "(%s)%s Done ", test->caps_done,
              -			rep_text);
              -			ptext(done_message);
              -		} else {
              -			if (rep_text[0]) {
              -				ptext(rep_text);
              -				ptext(" ");
              -			}
              -			ptext("Done ");
              -		}
              -		if (debug_level & 2) {
              -			dump_test_stats(test, state, ch);
              -		} else {
              -			*ch = wait_here();
              -		}
              -		if (*ch == '\r' || *ch == '\n') {
              -			*ch = default_action;
              -			return;
              -		}
              -		if (*ch == 's' || *ch == 'n') {
              -			*ch = 0;
              -			return;
              -		}
              -		if (strchr(pad_repeat_test, *ch)) {
              -			/* default action is now repeat */
              -			default_action = 'r';
              -		}
              -		if (subtest_menu(pad_test_list, state, ch)) {
              -			continue;
              -		}
              -		return;
              -	}
              -}
              -
              -/*
              -**	sliding_scale(dividend, factor, divisor)
              -**
              -**	Return (dividend * factor) / divisor
              -*/
              -int
              -sliding_scale(
              -	int dividend,
              -	int factor,
              -	unsigned long divisor)
              -{
              -	double d = dividend;
              -
              -	if (divisor) {
              -		d = (d * (double) factor) / (double) divisor;
              -		return (int) (d + 0.5);
              -	}
              -	return 0;
              -}
              -
              -/*
              -**	pad_test_startup()
              -**
              -**	Do the stuff needed to begin a test.
              -*/
              -void
              -pad_test_startup(
              -	int do_clear)
              -{
              -	if (do_clear) {
              -		put_clear();
              -	}
              -	repeats = augment;
              -	raw_characters_sent = 0;
              -	test_complete = ttp = char_count = tt_delay_used = 0;
              -	letter = letters[letter_number = 0];
              -	if (pad_test_duration <= 0) {
              -		pad_test_duration = 1;
              -	}
              -	tt_delay_max = pad_test_duration * 1000;
              -	set_alarm_clock(pad_test_duration);
              -	event_start(TIME_TEST);
              -}
              -
              -/*
              -**	still_testing()
              -**
              -**	This function is called to see if the test loop should be terminated.
              -*/
              -int
              -still_testing(void)
              -{
              -	fflush(stdout);
              -	test_complete++;
              -	return EXIT_CONDITION;
              -}
              -
              -/*
              -**	pad_test_shutdown()
              -**
              -**	Do the stuff needed to end a test.
              -*/
              -void
              -pad_test_shutdown(
              -	struct test_list *t,
              -	int crlf)
              -{
              -	int i;
              -	int counts;			/* total counts */
              -	int ss;				/* Save string index */
              -	int cpo;			/* characters per operation */
              -	int delta;			/* difference in characters */
              -	int bogus;			/* Time is inaccurate */
              -	struct test_results *r;		/* Results of current test */
              -	int ss_index[TT_MAX];		/* String index */
              -
              -	alloc_arrays();
              -	if (tty_can_sync == SYNC_TESTED) {
              -		bogus = tty_sync_error();
              -	} else {
              -		bogus = 1;
              -	}
              -	usec_run_time = event_time(TIME_TEST);
              -	tx_source = t;
              -	tx_characters = raw_characters_sent;
              -	tx_cps = sliding_scale(tx_characters, 1000000, usec_run_time);
              -
              -	/* save the data base */
              -	for (txp = ss = counts = 0; txp < ttp; txp++) {
              -		tx_cap[txp]   = tt_cap[txp];
              -		tx_count[txp] = tt_count[txp];
              -		tx_delay[txp] = tt_delay[txp];
              -		tx_affected[txp] = tt_affected[txp];
              -		tx_index[txp] = get_string_cap_byvalue(tt_cap[txp]);
              -		if (tx_index[txp] >= 0) {
              -			if (cap_match(t->caps_done, strnames[tx_index[txp]])) {
              -				ss_index[ss++] = txp;
              -				counts += tx_count[txp];
              -			}
              -		}
              -	}
              -
              -	if (crlf) {
              -		put_crlf();
              -	}
              -	if (counts == 0 || tty_cps == 0 || bogus) {
              -		/* nothing to do */
              -		return;
              -	}
              -	/* calculate the suggested pad times */
              -	delta = usec_run_time - sliding_scale(tx_characters, 1000000, tty_cps);
              -	if (delta < 0) {
              -		/* probably should bump tx_characters */
              -		delta = 0;
              -	}
              -	cpo = delta / counts;
              -	for (i = 0; i < ss; i++) {
              -		if (!(r = get_next_block())) {
              -			return;
              -		}
              -		r->next = pads[tx_index[ss_index[i]]];
              -		pads[tx_index[ss_index[i]]] = r;
              -		r->test = t;
              -		r->reps = tx_affected[ss_index[i]];
              -		r->delay = cpo;
              -	}
              -}
              -
              -/*
              -**	show_cap_results(index)
              -**
              -**	Display the previous results
              -*/
              -static void
              -show_cap_results(
              -	int x)
              -{
              -	struct test_results *r;		/* a result */
              -	int delay;
              -
              -	alloc_arrays();
              -	if ((r = pads[x])) {
              -		sprintf(temp, "(%s)", strnames[x]);
              -		ptext(temp);
              -		while (r) {
              -			sprintf(temp, "$<%d>", r->delay / 1000);
              -			put_columns(temp, (int) strlen(temp), 10);
              -			r = r->next;
              -		}
              -		r = pads[x];
              -		while (r) {
              -			if (r->reps > 1) {
              -				delay = r->delay / (r->reps * 100);
              -				sprintf(temp, "$<%d.%d*>", delay / 10, delay % 10);
              -				put_columns(temp, (int) strlen(temp), 10);
              -			}
              -			r = r->next;
              -		}
              -		put_crlf();
              -	}
              -}
              -
              -/*
              -**	dump_test_stats(test_list, status, ch)
              -**
              -**	Dump the statistics about the last test
              -*/
              -void
              -dump_test_stats(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -	char tbuf[32];
              -	int x[32];
              -
              -	put_crlf();
              -	if (tx_source && tx_source->caps_done) {
              -		cap_index(tx_source->caps_done, x);
              -		if (x[0] >= 0) {
              -			sprintf(temp, "Caps summary for (%s)",
              -				tx_source->caps_done);
              -			ptextln(temp);
              -			for (i = 0; x[i] >= 0; i++) {
              -				show_cap_results(x[i]);
              -			}
              -			put_crlf();
              -		}
              -	}
              -	sprintf(tbuf, "%011lu", usec_run_time);
              -	sprintf(temp, "Test time: %lu.%s, characters per second %lu, characters %d",
              -		usec_run_time / 1000000UL, &tbuf[5], tx_cps, tx_characters);
              -	ptextln(temp);
              -	for (i = 0; i < txp; i++) {
              -		if ((j = get_string_cap_byvalue(tx_cap[i])) >= 0) {
              -			sprintf(tbuf, "(%s)", strnames[j]);
              -		} else {
              -			strcpy(tbuf, "(?)");
              -		}
              -		sprintf(temp, "%8d  %3d  $<%3d>  %8s %s",
              -			tx_count[i], tx_affected[i], tx_delay[i],
              -			tbuf, expand(tx_cap[i]));
              -		putln(temp);
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	longer_test_time(test_list, status, ch)
              -**
              -**	Extend the number of seconds for each test.
              -*/
              -void
              -longer_test_time(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	pad_test_duration += 1;
              -	sprintf(txt_longer_test_time, "+) Change test time to %d seconds",
              -		pad_test_duration + 1);
              -	sprintf(txt_shorter_test_time, "-) Change test time to %d seconds",
              -		pad_test_duration - 1);
              -	sprintf(temp, "Tests will run for %d seconds", pad_test_duration);
              -	ptext(temp);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	shorter_test_time(test_list, status, ch)
              -**
              -**	Shorten the number of seconds for each test.
              -*/
              -void
              -shorter_test_time(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	if (pad_test_duration > 1) {
              -		pad_test_duration -= 1;
              -		sprintf(txt_longer_test_time, "+) Change test time to %d seconds",
              -			pad_test_duration + 1);
              -		sprintf(txt_shorter_test_time, "-) Change test time to %d seconds",
              -			pad_test_duration - 1);
              -	}
              -	sprintf(temp, "Tests will run for %d second%s", pad_test_duration,
              -		pad_test_duration > 1 ? "s" : "");
              -	ptext(temp);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	longer_augment(test_list, status, ch)
              -**
              -**	Lengthen the number of lines/characters effected
              -*/
              -void
              -longer_augment(
              -	struct test_list *t,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	augment <<= 1;
              -	set_augment_txt();
              -	if (augment_test) {
              -		t = augment_test;
              -	}
              -	sprintf(temp, "The pad tests will effect %d %s.", augment,
              -		((t->flags & MENU_LC_MASK) == MENU_lines) ?
              -		"lines" : "characters");
              -	ptextln(temp);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	shorter_augment(test_list, status, ch)
              -**
              -**	Shorten the number of lines/characters effected
              -*/
              -void
              -shorter_augment(
              -	struct test_list *t,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	if (augment > 1) {
              -		/* don't let the augment go to zero */
              -		augment >>= 1;
              -	}
              -	set_augment_txt();
              -	if (augment_test) {
              -		t = augment_test;
              -	}
              -	sprintf(temp, "The pad tests will effect %d %s.", augment,
              -		((t->flags & MENU_LC_MASK) == MENU_lines) ?
              -		"lines" : "characters");
              -	ptextln(temp);
              -	*ch = REQUEST_PROMPT;
              -}
              diff -Naur ncurses-5.6.orig/tack/crum.c ncurses-5.6/tack/crum.c
              --- ncurses-5.6.orig/tack/crum.c	2006-11-25 19:15:02.000000000 -0500
              +++ ncurses-5.6/tack/crum.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,426 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: crum.c,v 1.5 2006/11/26 00:15:02 tom Exp $")
              -
              -/*
              - * Test cursor movement.
              - */
              -
              -static void crum_clear(struct test_list *t, int *state, int *ch);
              -static void crum_home(struct test_list *t, int *state, int *ch);
              -static void crum_ll(struct test_list *t, int *state, int *ch);
              -static void crum_move(struct test_list *t, int *state, int *ch);
              -static void crum_os(struct test_list *t, int *state, int *ch);
              -
              -static char crum_text[5][80];
              -
              -struct test_list crum_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{MENU_NEXT, 0, "clear", 0, 0, crum_clear, 0},
              -	{MENU_NEXT, 0, "home", 0, 0, crum_home, 0},
              -	{MENU_NEXT, 0, "ll", 0, 0, crum_ll, 0},
              -	{MENU_NEXT, 0, crum_text[0], "home cuu1", 0, crum_move, 0},
              -	{MENU_NEXT + 1, 0, crum_text[1], "cub1 cud1 cuf1 cuu1", 0, crum_move, 0},
              -	{MENU_NEXT + 2, 0, crum_text[2], "cub cud cuf cuu", 0, crum_move, 0},
              -	{MENU_NEXT + 3, 0, crum_text[3], "vpa hpa", 0, crum_move, 0},
              -	{MENU_NEXT + 4, 0, crum_text[4], "cup", 0, crum_move, 0},
              -	{MENU_NEXT, 0, "cup", "os", 0, crum_os, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -/*
              -**	move_to(from-row, from-column, to-row, to-column, selection)
              -**
              -**	move the cursor from (rf, cf) to (rt, ct) using sel
              -*/
              -static void
              -move_to(
              -	int rf,
              -	int cf,
              -	int rt,
              -	int ct,
              -	int sel)
              -{
              -	char *s;
              -
              -	if (sel & 16) {	/* use (cup) */
              -		s = TPARM_2(cursor_address, rt, ct);
              -		tputs(s, lines, tc_putch);
              -		return;
              -	}
              -	if (sel & 8) {	/* use (hpa) (vpa) */
              -		if (column_address) {
              -			s = TPARM_1(column_address, ct);
              -			tputs(s, 1, tc_putch);
              -			cf = ct;
              -		}
              -		if (row_address) {
              -			s = TPARM_1(row_address, rt);
              -			tputs(s, 1, tc_putch);
              -			rf = rt;
              -		}
              -	}
              -	if (sel & 4) {	/* parameterized relative cursor movement */
              -		if (parm_right_cursor)
              -			if (cf < ct) {
              -				s = TPARM_1(parm_right_cursor, ct - cf);
              -				tputs(s, ct - cf, tc_putch);
              -				cf = ct;
              -			}
              -		if (parm_left_cursor)
              -			if (cf > ct) {
              -				s = TPARM_1(parm_left_cursor, cf - ct);
              -				tputs(s, cf - ct, tc_putch);
              -				cf = ct;
              -			}
              -		if (parm_down_cursor)
              -			if (rf < rt) {
              -				s = TPARM_1(parm_down_cursor, rt - rf);
              -				tputs(s, rt - rf, tc_putch);
              -				rf = rt;
              -			}
              -		if (parm_up_cursor)
              -			if (rf > rt) {
              -				s = TPARM_1(parm_up_cursor, rf - rt);
              -				tputs(s, rf - rt, tc_putch);
              -				rf = rt;
              -			}
              -	}
              -	if (sel & 2) {
              -		if (cursor_left)
              -			while (cf > ct) {
              -				tc_putp(cursor_left);
              -				cf--;
              -			}
              -		/*
              -		   do vertical motion next.  Just in case cursor_down has a
              -		   side effect of changing the column.  This could happen if
              -		   the tty handler translates NL to CRNL.
              -		*/
              -		if (cursor_down)
              -			while (rf < rt) {
              -				tc_putp(cursor_down);
              -				rf++;
              -			}
              -		if (cursor_up)
              -			while (rf > rt) {
              -				tc_putp(cursor_up);
              -				rf--;
              -			}
              -		if (cursor_right)
              -			while (cf < ct) {
              -				tc_putp(cursor_right);
              -				cf++;
              -			}
              -	}
              -	/* last chance */
              -	if (rf > rt) {
              -		if (can_go_home) {	/* a bit drastic but ... */
              -			go_home();
              -			cf = 0;
              -			rf = 0;
              -		} else if (cursor_up) {
              -			while (rf > rt) {
              -				tc_putp(cursor_up);
              -				rf--;
              -			}
              -		}
              -	}
              -	if (ct == 0 && rt > rf) {
              -		put_crlf();
              -		cf = 0;
              -		rf++;
              -	}
              -	if (ct == 0 && cf != 0) {
              -		put_cr();
              -		cf = 0;
              -	}
              -	while (rf < rt) {
              -		put_lf();
              -		rf++;
              -	}
              -	while (cf > ct) {
              -		put_str("\b");
              -		cf--;
              -	}
              -	if (cursor_right) {
              -		while (cf < ct) {
              -			tc_putp(cursor_right);
              -			cf++;
              -		}
              -	} else {
              -		/* go ahead and trash my display */
              -		while (cf < ct) {
              -			putchp(' ');
              -			cf++;
              -		}
              -	}
              -}
              -
              -/*
              -**	display_it(selection, text)
              -**
              -**	print the display using sel
              -*/
              -static void
              -display_it(
              -	int sel,
              -	char *txt)
              -{
              -	int i, done_line;
              -
              -	put_clear();
              -	go_home();
              -	put_newlines(2);
              -	ptextln("    The top line should be alternating <'s and >'s");
              -	ptextln("    The left side should be alternating A's and V's");
              -	ptext("    Testing ");
              -	ptext(txt);
              -	put_cr();
              -
              -	/* horizontal */
              -	move_to(done_line = line_count, 0, 0, 2, sel);
              -	for (i = 4; i < columns - 2; i += 2) {
              -		putchp('>');
              -		move_to(0, i - 1, 0, i, sel);
              -	}
              -	putchp('>');
              -	i -= 2;
              -	move_to(0, i + 1, 0, i - 1, sel);
              -	for (; i > 2; i -= 2) {
              -		putchp('<');
              -		move_to(0, i, 0, i - 3, sel);
              -	}
              -	putchp('<');
              -
              -	/* vertical */
              -	move_to(0, 2, 0, 0, sel);
              -	for (i = 2; i < lines - 1; i += 2) {
              -		putchp('V');
              -		move_to(i - 2, 1, i, 0, sel);
              -	}
              -	putchp('V');
              -	i -= 2;
              -	move_to(i, 1, i + 1, 0, sel);
              -	for (; i > 0; i -= 2) {
              -		putchp('A');
              -		move_to(i + 1, 1, i - 1, 0, sel);
              -	}
              -	putchp('A');
              -	move_to(i + 1, 1, 0, 0, sel);	/* go home first */
              -	move_to(0, 0, done_line + 1, 3, sel);
              -	put_str(txt);
              -	put_str(" Done. ");
              -}
              -
              -/*
              -**	crum_clear(test_list, status, ch)
              -**
              -**	(clear) test Clear screen
              -*/
              -static void
              -crum_clear(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (clear_screen) {
              -		for (i = lines; i > 1; i--) {
              -			putln("garbage");
              -		}
              -		put_clear();
              -		ptextln("This line should start in the home position.");
              -		ptext("The rest of the screen should be clear.  ");
              -	} else {
              -		ptextln("(clear) Clear screen is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	crum_home(test_list, status, ch)
              -**
              -**	(home) test Home cursor
              -*/
              -static void
              -crum_home(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (cursor_home) {
              -		put_clear();
              -		put_newlines(lines / 2);
              -		go_home();
              -		put_crlf();
              -		ptext("The bottom line should have text.");
              -		go_home();
              -		put_newlines(lines - 1);
              -		ptext("This line is on the bottom.");
              -		go_home();
              -		ptextln("This line starts in the home position.");
              -		put_crlf();
              -	} else {
              -		ptextln("(home) Home cursor is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	crum_ll(test_list, status, ch)
              -**
              -**	(ll) test Last line
              -*/
              -static void
              -crum_ll(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	/*
              -	   (ll) may be simulated with (cup).  Don't complain if (cup) is present.
              -	*/
              -	if (cursor_to_ll) {
              -		put_clear();
              -		put_str("This line could be anywhere.");
              -		tc_putp(cursor_to_ll);
              -		ptext("This line should be on the bottom");
              -		go_home();
              -		put_crlf();
              -	} else
              -	if (cursor_address) {
              -		return;
              -	} else {
              -		ptextln("(ll) Move to last line is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	crum_move(test_list, status, ch)
              -**
              -**	(*) test all cursor move commands
              -*/
              -static void
              -crum_move(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	char buf[80];
              -	int n;
              -
              -	switch (n = (t->flags & 15)) {
              -	case 0:
              -		sprintf(buf, " (cr) (nel) (cub1)%s",
              -			cursor_home ? " (home)" : (cursor_up ? " (cuu1)" : ""));
              -		break;
              -	case 1:
              -		sprintf(buf, "%s%s%s%s", cursor_left ? " (cub1)" : "",
              -			cursor_down ? " (cud1)" : "", cursor_right ? " (cuf1)" : "",
              -			cursor_up ? " (cuu1)" : "");
              -		if (buf[0] == '\0') {
              -			ptext("    (cub1) (cud1) (cuf1) (cuu1) not defined.");
              -		}
              -		break;
              -	case 2:
              -		sprintf(buf, "%s%s%s%s", parm_left_cursor ? " (cub)" : "",
              -			parm_down_cursor ? " (cud)" : "",
              -			parm_right_cursor ? " (cuf)" : "",
              -			parm_up_cursor ? " (cuu)" : "");
              -		if (buf[0] == '\0') {
              -			ptext("    (cub) (cud) (cuf) (cuu) not defined.");
              -		}
              -		break;
              -	case 3:
              -		sprintf(buf, "%s%s", row_address ? " (vpa)" : "",
              -			column_address ? " (hpa)" : "");
              -		if (buf[0] == '\0') {
              -			ptext("    (vpa) (hpa) not defined.");
              -		}
              -		break;
              -	case 4:
              -		if (!cursor_address) {
              -			ptext("    (cup) not defined.  ");
              -			generic_done_message(t, state, ch);
              -			return;
              -		}
              -		strcpy(buf, " (cup)");
              -		break;
              -	}
              -	if (buf[0] == '\0') {
              -		put_str("  Done. ");
              -	} else {
              -		can_test(buf, FLAG_TESTED);
              -		strcpy(crum_text[n], &buf[2]);
              -		crum_text[n][strlen(buf) - 3] = '\0';
              -
              -		display_it(1 << n, buf);
              -	}
              -	*ch = wait_here();
              -	if (*ch != 'r') {
              -		put_clear();
              -	}
              -}
              -
              -/*
              -**	crum_os(test_list, status, ch)
              -**
              -**	(cup) test Cursor position on overstrike terminals
              -*/
              -static void
              -crum_os(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (cursor_address && over_strike) {
              -		put_clear();
              -		for (i = 0; i < columns - 2; i++) {
              -			tc_putch('|');
              -		}
              -		for (i = 1; i < lines - 2; i++) {
              -			put_crlf();
              -			tc_putch('_');
              -		}
              -		for (i = 0; i < columns - 2; i++) {
              -			tputs(TPARM_2(cursor_address, 0, i), lines, tc_putch);
              -			tc_putch('+');
              -		}
              -		for (i = 0; i < lines - 2; i++) {
              -			tputs(TPARM_2(cursor_address, i, 0), lines, tc_putch);
              -			tc_putch(']');
              -			tc_putch('_');
              -		}
              -		go_home();
              -		put_newlines(3);
              -		ptext("    All the characters should look the same.  ");
              -		generic_done_message(t, state, ch);
              -		put_clear();
              -	}
              -}
              diff -Naur ncurses-5.6.orig/tack/edit.c ncurses-5.6/tack/edit.c
              --- ncurses-5.6.orig/tack/edit.c	2006-06-24 17:22:42.000000000 -0400
              +++ ncurses-5.6/tack/edit.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,992 +0,0 @@
              -/*
              -** Copyright (C) 1997 Free Software Foundation, Inc.
              -**
              -** This file is part of TACK.
              -**
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -**
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -**
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -#include 
              -#include 
              -
              -MODULE_ID("$Id: edit.c,v 1.11 2006/06/24 21:22:42 tom Exp $")
              -
              -/*
              - * Terminfo edit features
              - */
              -static void show_info(struct test_list *, int *, int *);
              -static void show_value(struct test_list *, int *, int *);
              -static void show_untested(struct test_list *, int *, int *);
              -static void show_changed(struct test_list *, int *, int *);
              -
              -#define SHOW_VALUE	1
              -#define SHOW_EDIT	2
              -#define SHOW_DELETE	3
              -
              -struct test_list edit_test_list[] = {
              -	{MENU_CLEAR, 0, 0, 0, "i) display current terminfo", show_info, 0},
              -	{0, 0, 0, 0, "w) write the current terminfo to a file", save_info, 0},
              -	{SHOW_VALUE, 3, 0, 0, "v) show value of a selected cap", show_value, 0},
              -	{SHOW_EDIT, 4, 0, 0, "e) edit value of a selected cap", show_value, 0},
              -	{SHOW_DELETE, 3, 0, 0, "d) delete string", show_value, 0},
              -	{0, 3, 0, 0, "m) show caps that have been modified", show_changed, 0},
              -	{MENU_CLEAR + FLAG_CAN_TEST, 0, 0, 0, "c) show caps that can be tested", show_report, 0},
              -	{MENU_CLEAR + FLAG_TESTED, 0, 0, 0, "t) show caps that have been tested", show_report, 0},
              -	{MENU_CLEAR + FLAG_FUNCTION_KEY, 0, 0, 0, "f) show a list of function keys", show_report, 0},
              -	{MENU_CLEAR, 0, 0, 0, "u) show caps defined that can not be tested", show_untested, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -static char change_pad_text[MAX_CHANGES][80];
              -static struct test_list change_pad_list[MAX_CHANGES] = {
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -static void build_change_menu(struct test_menu *);
              -static void change_one_entry(struct test_list *, int *, int *);
              -
              -struct test_menu change_pad_menu = {
              -	0, 'q', 0,
              -	"Select cap name", "change", 0,
              -	build_change_menu, change_pad_list, 0, 0, 0
              -};
              -
              -static TERMTYPE	original_term;		/* terminal type description */
              -
              -static char flag_boolean[BOOLCOUNT];	/* flags for booleans */
              -static char flag_numerics[NUMCOUNT];	/* flags for numerics */
              -static char *flag_strings;		/* flags for strings */
              -static int *label_strings;
              -static int xon_index;			/* Subscript for (xon) */
              -static int xon_shadow;
              -
              -static int start_display;		/* the display has just started */
              -static int display_lines;		/* number of lines displayed */
              -
              -static void
              -alloc_arrays(void)
              -{
              -	if (flag_strings == 0) {
              -		label_strings = (int *)calloc(MAX_STRINGS, sizeof(int));
              -		flag_strings = (char *)calloc(MAX_STRINGS, sizeof(char));
              -	}
              -}
              -
              -/*
              -**	send_info_string(str)
              -**
              -**	Return the terminfo string prefixed by the correct separator
              -*/
              -static void
              -send_info_string(
              -	const char *str,
              -	int *ch)
              -{
              -	int len;
              -
              -	if (display_lines == -1) {
              -		return;
              -	}
              -	len = strlen(str);
              -	if (len + char_count + 3 >= columns) {
              -		if (start_display == 0) {
              -			put_str(",");
              -		}
              -		put_crlf();
              -		if (++display_lines > lines) {
              -			ptext("-- more -- ");
              -			*ch = wait_here();
              -			if (*ch == 'q') {
              -				display_lines = -1;
              -				return;
              -			}
              -			display_lines = 0;
              -		}
              -		if (len >= columns) {
              -			/* if the terminal does not (am) then this loses */
              -			if (columns) {
              -				display_lines += ((strlen(str) + 3) / columns) + 1;
              -			}
              -			put_str("   ");
              -			put_str(str);
              -			start_display = 0;
              -			return;
              -		}
              -		ptext("   ");
              -	} else
              -	if (start_display == 0) {
              -		ptext(", ");
              -	} else {
              -		ptext("   ");
              -	}
              -	ptext(str);
              -	start_display = 0;
              -}
              -
              -/*
              -**	show_info(test_list, status, ch)
              -**
              -**	Display the current terminfo
              -*/
              -static void
              -show_info(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int i;
              -	char buf[1024];
              -
              -	display_lines = 1;
              -	start_display = 1;
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		if ((i == xon_index) ? xon_shadow : CUR Booleans[i]) {
              -			send_info_string(boolnames[i], ch);
              -		}
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		if (CUR Numbers[i] >= 0) {
              -			sprintf(buf, "%s#%d", numnames[i], CUR Numbers[i]);
              -			send_info_string(buf, ch);
              -		}
              -	}
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		if (CUR Strings[i]) {
              -			sprintf(buf, "%s=%s", STR_NAME(i),
              -				print_expand(CUR Strings[i]));
              -			send_info_string(buf, ch);
              -		}
              -	}
              -	put_newlines(2);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	save_info_string(str, fp)
              -**
              -**	Write the terminfo string prefixed by the correct separator
              -*/
              -static void
              -save_info_string(
              -	const char *str,
              -	FILE *fp)
              -{
              -	int len;
              -
              -	len = strlen(str);
              -	if (len + display_lines >= 77) {
              -		if (display_lines > 0) {
              -			(void) fprintf(fp, "\n\t");
              -		}
              -		display_lines = 8;
              -	} else
              -	if (display_lines > 0) {
              -		(void) fprintf(fp, " ");
              -		display_lines++;
              -	} else {
              -		(void) fprintf(fp, "\t");
              -		display_lines = 8;
              -	}
              -	(void) fprintf(fp, "%s,", str);
              -	display_lines += len + 1;
              -}
              -
              -/*
              -**	save_info(test_list, status, ch)
              -**
              -**	Write the current terminfo to a file
              -*/
              -void
              -save_info(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -	FILE *fp;
              -	time_t now;
              -	char buf[1024];
              -
              -	if ((fp = fopen(tty_basename, "w")) == (FILE *) NULL) {
              -		(void) sprintf(temp, "can't open: %s", tty_basename);
              -		ptextln(temp);
              -		generic_done_message(t, state, ch);
              -		return;
              -	}
              -	time(&now);
              -	/* Note: ctime() returns a newline at the end of the string */
              -	(void) fprintf(fp, "# Terminfo created by TACK for TERM=%s on %s",
              -		tty_basename, ctime(&now));
              -	(void) fprintf(fp, "%s|%s,\n", tty_basename, longname());
              -
              -	display_lines = 0;
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		if (i == xon_index ? xon_shadow : CUR Booleans[i]) {
              -			save_info_string(boolnames[i], fp);
              -		}
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		if (CUR Numbers[i] >= 0) {
              -			sprintf(buf, "%s#%d", numnames[i], CUR Numbers[i]);
              -			save_info_string(buf, fp);
              -		}
              -	}
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		if (CUR Strings[i]) {
              -			sprintf(buf, "%s=%s", STR_NAME(i),
              -				_nc_tic_expand(CUR Strings[i], TRUE, TRUE));
              -			save_info_string(buf, fp);
              -		}
              -	}
              -	(void) fprintf(fp, "\n");
              -	(void) fclose(fp);
              -	sprintf(temp, "Terminfo saved as file: %s", tty_basename);
              -	ptextln(temp);
              -}
              -
              -/*
              -**	show_value(test_list, status, ch)
              -**
              -**	Display the value of a selected cap
              -*/
              -static void
              -show_value(
              -	struct test_list *t,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	struct name_table_entry const *nt;
              -	char *s;
              -	int n, op, b;
              -	char buf[1024];
              -	char tmp[1024];
              -
              -	ptext("enter name: ");
              -	read_string(buf, 80);
              -	if (buf[0] == '\0' || buf[1] == '\0') {
              -		*ch = buf[0];
              -		return;
              -	}
              -	if (line_count + 2 >= lines) {
              -		put_clear();
              -	}
              -	op = t->flags & 255;
              -	if ((nt = _nc_find_entry(buf, _nc_info_hash_table))) {
              -		switch (nt->nte_type) {
              -		case BOOLEAN:
              -			if (op == SHOW_DELETE) {
              -				if (nt->nte_index == xon_index) {
              -					xon_shadow = 0;
              -				} else {
              -					CUR Booleans[nt->nte_index] = 0;
              -				}
              -				return;
              -			}
              -			b = nt->nte_index == xon_index ? xon_shadow :
              -				CUR Booleans[nt->nte_index];
              -			sprintf(temp, "boolean  %s %s", buf,
              -				b ? "True" : "False");
              -			break;
              -		case STRING:
              -			if (op == SHOW_DELETE) {
              -				CUR Strings[nt->nte_index] = (char *) 0;
              -				return;
              -			}
              -			if (CUR Strings[nt->nte_index]) {
              -				sprintf(temp, "string  %s %s", buf,
              -					expand(CUR Strings[nt->nte_index]));
              -			} else {
              -				sprintf(temp, "undefined string %s", buf);
              -			}
              -			break;
              -		case NUMBER:
              -			if (op == SHOW_DELETE) {
              -				CUR Numbers[nt->nte_index] = -1;
              -				return;
              -			}
              -			sprintf(temp, "numeric  %s %d", buf,
              -				CUR Numbers[nt->nte_index]);
              -			break;
              -		default:
              -			sprintf(temp, "unknown");
              -			break;
              -		}
              -		ptextln(temp);
              -	} else {
              -		sprintf(temp, "Cap not found: %s", buf);
              -		ptextln(temp);
              -		return;
              -	}
              -	if (op != SHOW_EDIT) {
              -		return;
              -	}
              -	if (nt->nte_type == BOOLEAN) {
              -		ptextln("Value flipped");
              -		if (nt->nte_index == xon_index) {
              -			xon_shadow = !xon_shadow;
              -		} else {
              -			CUR Booleans[nt->nte_index] = !CUR Booleans[nt->nte_index];
              -		}
              -		return;
              -	}
              -	ptextln("Enter new value");
              -	read_string(buf, sizeof(buf));
              -
              -	switch (nt->nte_type) {
              -	case STRING:
              -		_nc_reset_input((FILE *) 0, buf);
              -		_nc_trans_string(tmp, tmp + sizeof(tmp));
              -		s = (char *)malloc(strlen(tmp) + 1);
              -		strcpy(s, tmp);
              -		CUR Strings[nt->nte_index] = s;
              -		sprintf(temp, "new string value  %s", nt->nte_name);
              -		ptextln(temp);
              -		ptextln(expand(CUR Strings[nt->nte_index]));
              -		break;
              -	case NUMBER:
              -		if (sscanf(buf, "%d", &n) == 1) {
              -			CUR Numbers[nt->nte_index] = n;
              -			sprintf(temp, "new numeric value  %s %d",
              -				nt->nte_name, n);
              -			ptextln(temp);
              -		} else {
              -			sprintf(temp, "Illegal number: %s", buf);
              -			ptextln(temp);
              -		}
              -		break;
              -	default:
              -		break;
              -	}
              -}
              -
              -/*
              -**	get_string_cap_byname(name, long_name)
              -**
              -**	Given a cap name, find the value
              -**	Errors are quietly ignored.
              -*/
              -char *
              -get_string_cap_byname(
              -	const char *name,
              -	const char **long_name)
              -{
              -	struct name_table_entry const *nt;
              -
              -	if ((nt = _nc_find_entry(name, _nc_info_hash_table))) {
              -		if (nt->nte_type == STRING) {
              -			*long_name = strfnames[nt->nte_index];
              -			return (CUR Strings[nt->nte_index]);
              -		}
              -	}
              -	*long_name = "??";
              -	return (char *) 0;
              -}
              -
              -/*
              -**	get_string_cap_byvalue(value)
              -**
              -**	Given a capability string, find its position in the data base.
              -**	Return the index or -1 if not found.
              -*/
              -int
              -get_string_cap_byvalue(
              -	const char *value)
              -{
              -	int i;
              -
              -	if (value) {
              -		for (i = 0; i < MAX_STRINGS; i++) {
              -			if (CUR Strings[i] == value) {
              -				return i;
              -			}
              -		}
              -		/* search for translated strings */
              -		for (i = 0; i < TM_last; i++) {
              -			if (TM_string[i].value == value) {
              -				return TM_string[i].index;
              -			}
              -		}
              -	}
              -	return -1;
              -}
              -
              -/*
              -**	show_changed(test_list, status, ch)
              -**
              -**	Display a list of caps that have been changed.
              -*/
              -static void
              -show_changed(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int i, header = 1, v;
              -	const char *a;
              -	const char *b;
              -	static char title[] = "                     old value   cap  new value";
              -	char abuf[1024];
              -
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		v = (i == xon_index) ? xon_shadow : CUR Booleans[i];
              -		if (original_term.Booleans[i] != v) {
              -			if (header) {
              -				ptextln(title);
              -				header = 0;
              -			}
              -			sprintf(temp, "%30d %6s %d",
              -				original_term.Booleans[i], boolnames[i], v);
              -			ptextln(temp);
              -		}
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		if (original_term.Numbers[i] != CUR Numbers[i]) {
              -			if (header) {
              -				ptextln(title);
              -				header = 0;
              -			}
              -			sprintf(temp, "%30d %6s %d",
              -				original_term.Numbers[i], numnames[i],
              -				CUR Numbers[i]);
              -			ptextln(temp);
              -		}
              -	}
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		a = original_term.Strings[i] ? original_term.Strings[i] : "";
              -		b = CUR Strings[i] ?  CUR Strings[i] : "";
              -		if (strcmp(a, b)) {
              -			if (header) {
              -				ptextln(title);
              -				header = 0;
              -			}
              -			strcpy(abuf, _nc_tic_expand(a, TRUE, TRUE));
              -			sprintf(temp, "%30s %6s %s", abuf, STR_NAME(i),
              -				_nc_tic_expand(b, TRUE, TRUE));
              -			putln(temp);
              -		}
              -	}
              -	if (header) {
              -		ptextln("No changes");
              -	}
              -	put_crlf();
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	user_modified()
              -**
              -**	Return TRUE if the user has modified the terminfo
              -*/
              -int
              -user_modified(void)
              -{
              -	const char *a, *b;
              -	int i, v;
              -
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		v = (i == xon_index) ? xon_shadow : CUR Booleans[i];
              -		if (original_term.Booleans[i] != v) {
              -			return TRUE;
              -		}
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		if (original_term.Numbers[i] != CUR Numbers[i]) {
              -			return TRUE;
              -		}
              -	}
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		a = original_term.Strings[i] ? original_term.Strings[i] : "";
              -		b = CUR Strings[i] ?  CUR Strings[i] : "";
              -		if (strcmp(a, b)) {
              -			return TRUE;
              -		}
              -	}
              -	return FALSE;
              -}
              -
              -/*****************************************************************************
              - *
              - * Maintain the list of capabilities that can be tested
              - *
              - *****************************************************************************/
              -
              -/*
              -**	mark_cap(name, flag)
              -**
              -**	Mark the cap data base with the flag provided.
              -*/
              -static void
              -mark_cap(
              -	char *name,
              -	int flag)
              -{
              -	struct name_table_entry const *nt;
              -
              -	alloc_arrays();
              -	if ((nt = _nc_find_entry(name, _nc_info_hash_table))) {
              -		switch (nt->nte_type) {
              -		case BOOLEAN:
              -			flag_boolean[nt->nte_index] |= flag;
              -			break;
              -		case STRING:
              -			flag_strings[nt->nte_index] |= flag;
              -			break;
              -		case NUMBER:
              -			flag_numerics[nt->nte_index] |= flag;
              -			break;
              -		default:
              -			sprintf(temp, "unknown cap type (%s)", name);
              -			ptextln(temp);
              -			break;
              -		}
              -	} else {
              -		sprintf(temp, "Cap not found: %s", name);
              -		ptextln(temp);
              -		(void) wait_here();
              -	}
              -}
              -
              -/*
              -**	can_test(name-list, flags)
              -**
              -**	Scan the name list and get the names.
              -**	Enter each name into the can-test data base.
              -**	 ( and ) may be used as separators.
              -*/
              -void
              -can_test(
              -	const char *s,
              -	int flags)
              -{
              -	int ch, j;
              -	char name[32];
              -
              -	if (s) {
              -		for (j = 0; (name[j] = ch = *s); s++) {
              -			if (ch == ' ' || ch == ')' || ch == '(') {
              -				if (j) {
              -					name[j] = '\0';
              -					mark_cap(name, flags);
              -				}
              -				j = 0;
              -			} else {
              -				j++;
              -			}
              -		}
              -		if (j) {
              -			mark_cap(name, flags);
              -		}
              -	}
              -}
              -
              -/*
              -**	cap_index(name-list, index-list)
              -**
              -**	Scan the name list and return a list of indexes.
              -**	 ( and ) may be used as separators.
              -**	This list is terminated with -1.
              -*/
              -void
              -cap_index(
              -	const char *s,
              -	int *inx)
              -{
              -	struct name_table_entry const *nt;
              -	int ch, j;
              -	char name[32];
              -
              -	if (s) {
              -		for (j = 0; ; s++) {
              -			name[j] = ch = *s;
              -			if (ch == ' ' || ch == ')' || ch == '(' || ch == 0) {
              -				if (j) {
              -					name[j] = '\0';
              -					if ((nt = _nc_find_entry(name,
              -						_nc_info_hash_table)) &&
              -						(nt->nte_type == STRING)) {
              -						*inx++ = nt->nte_index;
              -					}
              -				}
              -				if (ch == 0) {
              -					break;
              -				}
              -				j = 0;
              -			} else {
              -				j++;
              -			}
              -		}
              -	}
              -	*inx = -1;
              -}
              -
              -/*
              -**	cap_match(name-list, cap)
              -**
              -**	Scan the name list and see if the cap is in the list.
              -**	Return TRUE if we find an exact match.
              -**	 ( and ) may be used as separators.
              -*/
              -int
              -cap_match(
              -	const char *names,
              -	const char *cap)
              -{
              -	char *s;
              -	int c, l, t;
              -
              -	if (names) {
              -		l = strlen(cap);
              -		while ((s = strstr(names, cap))) {
              -			c = (names == s) ? 0 : *(s - 1);
              -			t = s[l];
              -			if ((c == 0 || c == ' ' || c == '(') &&
              -				(t == 0 || t == ' ' || t == ')')) {
              -				return TRUE;
              -			}
              -			if (t == 0) {
              -				break;
              -			}
              -			names = s + l;
              -		}
              -	}
              -	return FALSE;
              -}
              -
              -/*
              -**	show_report(test_list, status, ch)
              -**
              -**	Display a list of caps that can be tested
              -*/
              -void
              -show_report(
              -	struct test_list *t,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int i, j, nc, flag;
              -	const char *s;
              -	const char **nx = malloc(BOOLCOUNT + NUMCOUNT + MAX_STRINGS);
              -
              -	alloc_arrays();
              -	flag = t->flags & 255;
              -	nc = 0;
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		if (flag_boolean[i] & flag) {
              -			nx[nc++] = boolnames[i];
              -		}
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		if (flag_numerics[i] & flag) {
              -			nx[nc++] = numnames[i];
              -		}
              -	}
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		if (flag_strings[i] & flag) {
              -			nx[nc++] = STR_NAME(i);
              -		}
              -	}
              -	/* sort */
              -	for (i = 0; i < nc - 1; i++) {
              -		for (j = i + 1; j < nc; j++) {
              -			if (strcmp(nx[i], nx[j]) > 0) {
              -				s = nx[i];
              -				nx[i] = nx[j];
              -				nx[j] = s;
              -			}
              -		}
              -	}
              -	if (flag & FLAG_FUNCTION_KEY) {
              -		ptextln("The following function keys can be tested:");
              -	} else
              -	if (flag & FLAG_CAN_TEST) {
              -		ptextln("The following capabilities can be tested:");
              -	} else
              -	if (flag & FLAG_TESTED) {
              -		ptextln("The following capabilities have been tested:");
              -	}
              -	put_crlf();
              -	for (i = 0; i < nc; i++) {
              -		sprintf(temp, "%s ", nx[i]);
              -		ptext(temp);
              -	}
              -	put_newlines(1);
              -	*ch = REQUEST_PROMPT;
              -	free (nx);
              -}
              -
              -/*
              -**	show_untested(test_list, status, ch)
              -**
              -**	Display a list of caps that are defined but cannot be tested.
              -**	Don't bother to sort this list.
              -*/
              -static void
              -show_untested(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int i;
              -
              -	alloc_arrays();
              -	ptextln("Caps that are defined but cannot be tested:");
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		if (flag_boolean[i] == 0 && CUR Booleans[i]) {
              -			sprintf(temp, "%s ", boolnames[i]);
              -			ptext(temp);
              -		}
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		if (flag_numerics[i] == 0 && CUR Numbers[i] >= 0) {
              -			sprintf(temp, "%s ", numnames[i]);
              -			ptext(temp);
              -		}
              -	}
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		if (flag_strings[i] == 0 && CUR Strings[i]) {
              -			sprintf(temp, "%s ", STR_NAME(i));
              -			ptext(temp);
              -		}
              -	}
              -	put_newlines(1);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	edit_init()
              -**
              -**	Initialize the function key data base
              -*/
              -void
              -edit_init(void)
              -{
              -	int i, j, lc;
              -	char *lab;
              -	struct name_table_entry const *nt;
              -
              -	alloc_arrays();
              -
              -	_nc_copy_termtype(&original_term, &cur_term->type);
              -	for (i = 0; i < BOOLCOUNT; i++) {
              -		original_term.Booleans[i] = CUR Booleans[i];
              -	}
              -	for (i = 0; i < NUMCOUNT; i++) {
              -		original_term.Numbers[i] = CUR Numbers[i];
              -	}
              -	/* scan for labels */
              -	for (i = lc = 0; i < MAX_STRINGS; i++) {
              -		original_term.Strings[i] = CUR Strings[i];
              -		if (strncmp(STR_NAME(i), "lf", 2) == 0) {
              -			flag_strings[i] |= FLAG_LABEL;
              -			if (CUR Strings[i]) {
              -				label_strings[lc++] = i;
              -			}
              -		}
              -	}
              -	/* scan for function keys */
              -	for (i = 0; i < MAX_STRINGS; i++) {
              -		const char *this_name = STR_NAME(i);
              -		if ((this_name[0] == 'k') && strcmp(this_name, "kmous")) {
              -			flag_strings[i] |= FLAG_FUNCTION_KEY;
              -			lab = (char *) 0;
              -			for (j = 0; j < lc; j++) {
              -				if (!strcmp(this_name,
              -					STR_NAME(label_strings[j]))) {
              -					lab = CUR Strings[label_strings[j]];
              -					break;
              -				}
              -			}
              -			enter_key(this_name, CUR Strings[i], lab);
              -		}
              -	}
              -	/* Lookup the translated strings */
              -	for (i = 0; i < TM_last; i++) {
              -		if ((nt = _nc_find_entry(TM_string[i].name,
              -			_nc_info_hash_table)) && (nt->nte_type == STRING)) {
              -			TM_string[i].index = nt->nte_index;
              -		} else {
              -			sprintf(temp, "TM_string lookup failed for: %s",
              -				TM_string[i].name);
              -			ptextln(temp);
              -		}
              -	}
              -	if ((nt = _nc_find_entry("xon", _nc_info_hash_table)) != 0) {
              -		xon_index = nt->nte_index;
              -	}
              -	xon_shadow = xon_xoff;
              -	free(label_strings);
              -}
              -
              -/*
              -**	change_one_entry(test_list, status, ch)
              -**
              -**	Change the padding on the selected cap
              -*/
              -static void
              -change_one_entry(
              -	struct test_list *test,
              -	int *state,
              -	int *chp)
              -{
              -	struct name_table_entry const *nt;
              -	int i, j, x, star, slash,  v, dot, ch;
              -	const char *s;
              -	char *t, *p;
              -	const char *current_string;
              -	char buf[1024];
              -	char pad[1024];
              -
              -	i = test->flags & 255;
              -	if (i == 255) {
              -		/* read the cap name from the user */
              -		ptext("enter name: ");
              -		read_string(pad, 32);
              -		if (pad[0] == '\0' || pad[1] == '\0') {
              -			*chp = pad[0];
              -			return;
              -		}
              -		if ((nt = _nc_find_entry(pad, _nc_info_hash_table)) &&
              -			(nt->nte_type == STRING)) {
              -			x = nt->nte_index;
              -			current_string = CUR Strings[x];
              -		} else {
              -			sprintf(temp, "%s is not a string capability", pad);
              -			ptext(temp);
              -			generic_done_message(test, state, chp);
              -			return;
              -		}
              -	} else {
              -		x = tx_index[i];
              -		current_string = tx_cap[i];
              -		strcpy(pad, STR_NAME(x));
              -	}
              -	if (!current_string) {
              -		ptextln("That string is not currently defined.  Please enter a new value, including the padding delay:");
              -		read_string(buf, sizeof(buf));
              -		_nc_reset_input((FILE *) 0, buf);
              -		_nc_trans_string(pad, pad + sizeof(pad));
              -		t = (char *)malloc(strlen(pad) + 1);
              -		strcpy(t, pad);
              -		CUR Strings[x] = t;
              -		sprintf(temp, "new string value  %s", STR_NAME(x));
              -		ptextln(temp);
              -		ptextln(expand(t));
              -		return;
              -	}
              -	sprintf(buf, "Current value: (%s) %s", pad, _nc_tic_expand(current_string, TRUE, TRUE));
              -	putln(buf);
              -	ptextln("Enter new pad.  0 for no pad.  CR for no change.");
              -	read_string(buf, 32);
              -	if (buf[0] == '\0' || (buf[1] == '\0' && isalpha(UChar(buf[0])))) {
              -		*chp = buf[0];
              -		return;
              -	}
              -	star = slash = FALSE;
              -	for (j = v = dot = 0; (ch = buf[j]); j++) {
              -		if (ch >= '0' && ch <= '9') {
              -			v = ch - '0' + v * 10;
              -			if (dot) {
              -				dot++;
              -			}
              -		} else if (ch == '*') {
              -			star = TRUE;
              -		} else if (ch == '/') {
              -			slash = TRUE;
              -		} else if (ch == '.') {
              -			dot = 1;
              -		} else {
              -			sprintf(temp, "Illegal character: %c", ch);
              -			ptextln(temp);
              -			ptext("General format:  99.9*/  ");
              -			generic_done_message(test, state, chp);
              -			return;
              -		}
              -	}
              -	while (dot > 2) {
              -		v /= 10;
              -		dot--;
              -	}
              -	if (dot == 2) {
              -		sprintf(pad, "%d.%d%s%s", v / 10, v % 10,
              -				star ? "*" : "", slash ? "/" : "");
              -	} else {
              -		sprintf(pad, "%d%s%s",
              -			v, star ? "*" : "", slash ? "/" : "");
              -	}
              -	s = current_string;
              -	t = buf;
              -	for (v = 0; (ch = *t = *s++); t++) {
              -		if (v == '$' && ch == '<') {
              -			while ((ch = *s++) && (ch != '>'));
              -			for (p = pad; (*++t = *p++); );
              -			*t++ = '>';
              -			while ((*t++ = *s++));
              -			pad[0] = '\0';
              -			break;
              -		}
              -		v = ch;
              -	}
              -	if (pad[0]) {
              -		sprintf(t, "$<%s>", pad);
              -	}
              -	if ((t = (char *)malloc(strlen(buf) + 1))) {
              -		strcpy(t, buf);
              -		CUR Strings[x] = t;
              -		if (i != 255) {
              -			tx_cap[i] = t;
              -		}
              -	}
              -	generic_done_message(test, state, chp);
              -}
              -
              -/*
              -**	build_change_menu(menu_list)
              -**
              -**	Build the change pad menu list
              -*/
              -static void
              -build_change_menu(
              -	struct test_menu *m)
              -{
              -	int i, j, k;
              -	char *s;
              -
              -	for (i = j = 0; i < txp; i++) {
              -		if ((k = tx_index[i]) >= 0) {
              -			s = _nc_tic_expand(tx_cap[i], TRUE, TRUE);
              -			s[40] = '\0';
              -			sprintf(change_pad_text[j], "%c) (%s) %s",
              -				'a' + j, STR_NAME(k), s);
              -			change_pad_list[j].flags = i;
              -			change_pad_list[j].lines_needed = 4;
              -			change_pad_list[j].menu_entry = change_pad_text[j];
              -			change_pad_list[j].test_procedure = change_one_entry;
              -			j++;
              -		}
              -	}
              -	strcpy(change_pad_text[j], "z) enter name");
              -	change_pad_list[j].flags = 255;
              -	change_pad_list[j].lines_needed = 4;
              -	change_pad_list[j].menu_entry = change_pad_text[j];
              -	change_pad_list[j].test_procedure = change_one_entry;
              -	j++;
              -	change_pad_list[j].flags = MENU_LAST;
              -	if (m->menu_title) {
              -		put_crlf();
              -		ptextln(m->menu_title);
              -	}
              -}
              diff -Naur ncurses-5.6.orig/tack/fun.c ncurses-5.6/tack/fun.c
              --- ncurses-5.6.orig/tack/fun.c	2006-11-25 19:15:53.000000000 -0500
              +++ ncurses-5.6/tack/fun.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,925 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -**
              -** This file is part of TACK.
              -**
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -**
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -**
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: fun.c,v 1.9 2006/11/26 00:15:53 tom Exp $")
              -
              -/*
              - * Test the function keys on the terminal.  The code for echo tests
              - * lives here too.
              - */
              -
              -static void funkey_keys(struct test_list *, int *, int *);
              -static void funkey_meta(struct test_list *, int *, int *);
              -static void funkey_label(struct test_list *, int *, int *);
              -static void funkey_prog(struct test_list *, int *, int *);
              -static void funkey_local(struct test_list *, int *, int *);
              -
              -struct test_list funkey_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{MENU_CLEAR + FLAG_FUNCTION_KEY, 0, 0, 0, "f) show a list of function keys", show_report, 0},
              -	{MENU_NEXT | MENU_CLEAR, 0, "smkx) (rmkx", 0,
              -		"k) test function keys", funkey_keys, 0},
              -	{MENU_NEXT, 10, "km", "smm rmm", 0, funkey_meta, 0},
              -	{MENU_NEXT, 8, "nlab) (smln) (pln) (rmln", "lw lh", 0, funkey_label, 0},
              -	{MENU_NEXT, 2, "pfx", 0, 0, funkey_prog, 0},
              -	{MENU_NEXT, 2, "pfloc", 0, 0, funkey_local, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -static void printer_on(struct test_list *, int *, int *);
              -static void printer_mc0(struct test_list *, int *, int *);
              -
              -struct test_list printer_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{MENU_NEXT | MENU_CLEAR, 0, "mc4) (mc5) (mc5i", 0, 0, printer_on, 0},
              -	{MENU_NEXT | MENU_CLEAR, 0, "mc0", 0, 0, printer_mc0, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -/* local definitions */
              -static const char **fk_name;
              -static char **fkval;
              -static char **fk_label;		/* function key labels (if any) */
              -static int *fk_tested;
              -static int num_strings = 0;
              -
              -static int fkmax = 1;		/* length of longest key */
              -static int got_labels = 0;	/* true if we have some labels */
              -static int key_count = 0;
              -static int end_state;
              -
              -/* unknown function keys */
              -#define MAX_FK_UNK 50
              -static char *fk_unknown[MAX_FK_UNK];
              -static int fk_length[MAX_FK_UNK];
              -static int funk;
              -
              -/*
              - * Initialize arrays that depend on the actual number of strings.
              - */
              -static void
              -alloc_strings(void)
              -{
              -	if (num_strings != MAX_STRINGS) {
              -		num_strings = MAX_STRINGS;
              -		fk_name = (const char **)calloc(num_strings, sizeof(const char *));
              -		fkval = (char **)calloc(num_strings, sizeof(char *));
              -		fk_label = (char **)calloc(num_strings, sizeof(char *));
              -		fk_tested = (int *)calloc(num_strings, sizeof(int));
              -	}
              -}
              -
              -/*
              -**	keys_tested(first-time, show-help, hex-output)
              -**
              -**	Display a list of the keys not tested.
              -*/
              -static void
              -keys_tested(
              -	int first_time,
              -	int show_help,
              -	int hex_output)
              -{
              -	int i, l;
              -	char outbuf[256];
              -
              -	alloc_strings();
              -	put_clear();
              -	tty_set();
              -	flush_input();
              -	if (got_labels) {
              -		putln("Function key labels:");
              -		for (i = 0; i < key_count; ++i) {
              -			if (fk_label[i]) {
              -				sprintf(outbuf, "%s %s",
              -					fk_name[i] ? fk_name[i] : "??", fk_label[i]);
              -				put_columns(outbuf, (int) strlen(outbuf), 16);
              -			}
              -		}
              -		put_newlines(2);
              -	}
              -	if (funk) {
              -		putln("The following keys are not defined:");
              -		for (i = 0; i < funk; ++i) {
              -			put_columns(fk_unknown[i], fk_length[i], 16);
              -		}
              -		put_mode(exit_attribute_mode);
              -		put_newlines(2);
              -	}
              -	if (first_time) {
              -		putln("The following keys are defined:");
              -	} else {
              -		putln("The following keys have not been tested:");
              -	}
              -	if (scan_mode) {
              -		for (i = 0; scan_down[i]; i++) {
              -			if (!scan_tested[i]) {
              -				if (hex_output) {
              -					strcpy(outbuf, hex_expand_to(scan_down[i], 3));
              -				} else {
              -					strcpy(outbuf, expand(scan_down[i]));
              -				}
              -				l = expand_chars;
              -				if (hex_output) {
              -					strcat(outbuf, hex_expand_to(scan_up[i], 3));
              -				} else {
              -					strcat(outbuf, expand(scan_up[i]));
              -				}
              -				expand_chars += l;
              -				l = strlen(scan_name[i]);
              -				if (((char_count + 16) & ~15) +
              -					((expand_chars + 7) & ~7) + l >= columns) {
              -					put_crlf();
              -				} else
              -				if (char_count + 24 > columns) {
              -					put_crlf();
              -				} else if (char_count) {
              -					putchp(' ');
              -				}
              -				put_columns(outbuf, expand_chars, 16);
              -				put_columns(scan_name[i], l, 8);
              -			}
              -		}
              -	} else {
              -		for (i = 0; i < key_count; i++) {
              -			if (!fk_tested[i]) {
              -				if (hex_output) {
              -					strcpy(outbuf, hex_expand_to(fkval[i], 3));
              -				} else {
              -					strcpy(outbuf, expand(fkval[i]));
              -				}
              -				l = strlen(fk_name[i]);
              -				if (((char_count + 16) & ~15) +
              -					((expand_chars + 7) & ~7) + l >= columns) {
              -					put_crlf();
              -				} else
              -				if (char_count + 24 > columns) {
              -					put_crlf();
              -				} else
              -				if (char_count) {
              -					putchp(' ');
              -				}
              -				put_columns(outbuf, expand_chars, 16);
              -				put_columns(fk_name[i], l, 8);
              -			}
              -		}
              -	}
              -	put_newlines(2);
              -	if (show_help) {
              -		ptextln("Hit any function key.  Type 'end' to quit.  Type ? to update the display.");
              -		put_crlf();
              -	}
              -}
              -
              -/*
              -**	enter_key(name, value, label)
              -**
              -**	Enter a function key into the data base
              -*/
              -void
              -enter_key(
              -	const char *name,
              -	char *value,
              -	char *lab)
              -{
              -	int j;
              -
              -	alloc_strings();
              -	if (value) {
              -		j = strlen(value);
              -		fkmax = fkmax > j ? fkmax : j;
              -		/* do not permit duplicates */
              -		for (j = 0; j < key_count; j++) {
              -			if (!strcmp(fk_name[j], name)) {
              -				return;
              -			}
              -		}
              -		fkval[key_count] = value;
              -		fk_tested[key_count] = 0;
              -		fk_label[key_count] = lab;
              -		fk_name[key_count++] = name;
              -		if (lab) {
              -			got_labels = TRUE;
              -		}
              -	}
              -}
              -
              -
              -static void
              -fresh_line(void)
              -{				/* clear the line for a new function key line */
              -	if (over_strike) {
              -		put_crlf();
              -	} else {
              -		put_cr();
              -		if (clr_eol) {
              -			tc_putp(clr_eol);
              -		} else {
              -			put_str("                    \r");
              -		}
              -	}
              -}
              -
              -
              -static int
              -end_funky(int ch)
              -{				/* return true if this is the end */
              -	switch (ch) {
              -	case 'e':
              -	case 'E':
              -		end_state = 'e';
              -		break;
              -	case 'n':
              -	case 'N':
              -		if (end_state == 'e') {
              -			end_state = 'n';
              -		} else {
              -			end_state = 0;
              -		}
              -		break;
              -	case 'd':
              -	case 'D':
              -		if (end_state == 'n') {
              -			end_state = 'd';
              -		} else {
              -			end_state = 0;
              -		}
              -		break;
              -	case 'l':
              -	case 'L':
              -		if (end_state == 'l') {
              -			end_state = '?';
              -		} else {
              -			end_state = 'l';
              -		}
              -		break;
              -	default:
              -		end_state = 0;
              -		break;
              -	}
              -	return end_state == 'd';
              -}
              -
              -
              -static int
              -found_match(char *s, int hx, int cc)
              -{				/* return true if this string is a match */
              -	int j, f;
              -	char outbuf[256];
              -
              -	alloc_strings();
              -	if (!*s) {
              -		return 0;
              -	}
              -	if (scan_mode) {
              -		for (j = f = 0; scan_down[j]; j++) {
              -			if (scan_length[j] == 0) {
              -				continue;
              -			}
              -			if (!strncmp(s, scan_down[j], scan_length[j])) {
              -				if (!f) {	/* first match */
              -					put_cr();
              -					if (hx) {
              -						put_str(hex_expand_to(s, 10));
              -					} else {
              -						put_str(expand_to(s, 10));
              -					}
              -					f = 1;
              -				}
              -				(void) end_funky(scan_name[j][0]);
              -				put_str(" ");
              -				put_str(scan_name[j]);
              -				scan_tested[j] = 1;
              -				s += scan_length[j];
              -				if (strncmp(s, scan_up[j], scan_length[j])) {
              -					put_str(" scan down");
              -				} else {
              -					s += scan_length[j];
              -				}
              -				if (!*s) {
              -					break;
              -				}
              -				j = -1;
              -			}
              -			if (!strncmp(s, scan_up[j], scan_length[j])) {
              -				if (!f) {	/* first match */
              -					put_cr();
              -					if (hx) {
              -						put_str(hex_expand_to(s, 10));
              -					} else {
              -						put_str(expand_to(s, 10));
              -					}
              -					f = 1;
              -				}
              -				put_str(" ");
              -				put_str(scan_name[j]);
              -				put_str(" scan up");
              -				s += scan_length[j];
              -				if (!*s) {
              -					break;
              -				}
              -				j = -1;
              -			}
              -		}
              -	} else {
              -		for (j = f = 0; j < key_count; j++) {
              -			if (!strcmp(s, fkval[j])) {
              -				if (!f) {	/* first match */
              -					put_cr();
              -					if (hx) {
              -						put_str(hex_expand_to(s, 10));
              -					} else {
              -						put_str(expand_to(s, 10));
              -					}
              -					f = 1;
              -				}
              -				sprintf(outbuf, " (%s)", fk_name[j]);
              -				put_str(outbuf);
              -				if (fk_label[j]) {
              -					sprintf(outbuf, " <%s>", fk_label[j]);
              -					put_str(outbuf);
              -				}
              -				fk_tested[j] = 1;
              -			}
              -		}
              -	}
              -	if (end_state == '?') {
              -		keys_tested(0, 1, hx);
              -		tty_raw(cc, char_mask);
              -		end_state = 0;
              -	}
              -	return f;
              -}
              -
              -
              -static int
              -found_exit(char *keybuf, int hx, int cc)
              -{				/* return true if the user wants to exit */
              -	int j, k;
              -	char *s;
              -
              -
              -	if (scan_mode) {
              -		if (*keybuf == '\0') {
              -			return TRUE;
              -		}
              -	} else {
              -		/* break is a special case */
              -		if (*keybuf == '\0') {
              -			fresh_line();
              -			tty_set();
              -			ptext("Hit X to exit: ");
              -			if (wait_here() == 'X') {
              -				return TRUE;
              -			}
              -			keys_tested(0, 1, hx);
              -			tty_raw(cc, char_mask);
              -			return FALSE;
              -		}
              -		/* is this the end? */
              -		for (k = 0; (j = (keybuf[k] & STRIP_PARITY)); k++) {
              -			if (end_funky(j)) {
              -				return TRUE;
              -			}
              -		}
              -
              -		j = TRUE;	/* does he need an updated list? */
              -		for (k = 0; keybuf[k]; k++) {
              -			j &= (keybuf[k] & STRIP_PARITY) == '?';
              -		}
              -		if (j || end_state == '?') {
              -			keys_tested(0, 1, hx);
              -			tty_raw(cc, char_mask);
              -			end_state = 0;
              -			return FALSE;
              -		}
              -	}
              -
              -	put_cr();
              -	if (hx) {
              -		s = hex_expand_to(keybuf, 10);
              -	} else {
              -		s = expand_to(keybuf, 10);
              -	}
              -	sprintf(temp, "%s Unknown", s);
              -	put_str(temp);
              -	for (j = 0; j < MAX_FK_UNK; j++) {
              -		if (j == funk) {
              -			fk_length[funk] = expand_chars;
              -			if ((fk_unknown[funk] = (char *)malloc(strlen(s) + 1))) {
              -				strcpy(fk_unknown[funk++], s);
              -			}
              -			break;
              -		}
              -		if (fk_length[j] == expand_chars) {
              -			if (!strcmp(fk_unknown[j], s)) {
              -				break;
              -			}
              -		}
              -	}
              -	return FALSE;
              -}
              -
              -/*
              -**	funkey_keys(test_list, status, ch)
              -**
              -**	Test function keys
              -*/
              -static void
              -funkey_keys(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	char keybuf[256];
              -
              -	if (keypad_xmit) {
              -		tc_putp(keypad_xmit);
              -	}
              -	keys_tested(1, 1, hex_out);	/* also clears screen */
              -	keybuf[0] = '\0';
              -	end_state = 0;
              -	if (scan_mode) {
              -		fkmax = scan_max;
              -	}
              -	tty_raw(0, char_mask);
              -	while (end_state != 'd') {
              -		read_key(keybuf, sizeof(keybuf));
              -		fresh_line();
              -		if (found_match(keybuf, hex_out, 0)) {
              -			continue;
              -		}
              -		if (found_exit(keybuf, hex_out, 0)) {
              -			break;
              -		}
              -	}
              -	if (keypad_local) {
              -		tc_putp(keypad_local);
              -	}
              -	keys_tested(0, 0, hex_out);
              -	ptext("Function key test ");
              -	generic_done_message(t, state, ch);
              -}
              -
              -int
              -tty_meta_prep(void)
              -{				/* print a warning before the meta key test */
              -	if (not_a_tty) {
              -		return 0;
              -	}
              -	if (initial_stty_query(TTY_8_BIT)) {
              -		return 0;
              -	}
              -	ptext("The meta key test must be run with the");
              -	ptext(" terminal set for 8 data bits.  Two stop bits");
              -	ptext(" may also be needed for correct display.  I will");
              -	ptext(" transmit 8 bit data but if the terminal is set for");
              -	ptextln(" 7 bit data, garbage may appear on the screen.");
              -	return 1;
              -}
              -
              -/*
              -**	funkey_meta(test_list, status, ch)
              -**
              -**	Test meta key (km) (smm) (rmm)
              -*/
              -static void
              -funkey_meta(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j, k, len;
              -	char outbuf[256];
              -
              -	if (has_meta_key) {
              -		put_crlf();
              -		if (char_mask != ALLOW_PARITY) {
              -			if (tty_meta_prep()) {
              -				ptext("\nHit any key to continue > ");
              -				(void) wait_here();
              -				put_crlf();
              -			}
              -		}
              -		ptext("Begin meta key test. (km) (smm) (rmm)  Hit any key");
              -		ptext(" with the meta key.  The character will be");
              -		ptext(" displayed in hex.  If the meta key is working");
              -		ptext(" then the most significant bit will be set.  Type");
              -		ptextln(" 'end' to exit.");
              -		tty_raw(1, ALLOW_PARITY);
              -		tc_putp(meta_on);
              -
              -		for (i = j = k = len = 0; i != 'e' || j != 'n' || k != 'd';) {
              -			i = j;
              -			j = k;
              -			k = getchp(ALLOW_PARITY);
              -			if (k == EOF) {
              -				break;
              -			}
              -			if ((len += 3) >= columns) {
              -				put_crlf();
              -				len = 3;
              -			}
              -			sprintf(outbuf, "%02X ", k);
              -			put_str(outbuf);
              -			k &= STRIP_PARITY;
              -		}
              -		tc_putp(meta_off);
              -		put_crlf();
              -		tty_set();
              -		put_crlf();
              -	} else {
              -		ptext("(km) Has-meta-key is not set.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	funkey_label(test_list, status, ch)
              -**
              -**	Test labels (nlab) (smln) (pln) (rmln) (lw) (lh)
              -*/
              -static void
              -funkey_label(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -	char outbuf[256];
              -
              -	if (num_labels == -1) {
              -		ptextln("Your terminal has no labels. (nlab)");
              -	} else {
              -		sprintf(temp, "Your terminal has %d labels (nlab) that are %d characters wide (lw) and %d lines high (lh)",
              -			num_labels, label_width, label_height);
              -		ptext(temp);
              -		ptextln(" Testing (smln) (pln) (rmln)");
              -		if (label_on) {
              -			tc_putp(label_on);
              -		}
              -		if (label_width <= 0) {
              -			label_width = sizeof(outbuf) - 1;
              -		}
              -		for (i = 1; i <= num_labels; i++) {
              -			sprintf(outbuf, "L%d..............................", i);
              -			outbuf[label_width] = '\0';
              -			tc_putp(TPARM_2(plab_norm, i, outbuf));
              -		}
              -		if (label_off) {
              -			ptext("Hit any key to remove the labels: ");
              -			(void) wait_here();
              -			tc_putp(label_off);
              -		}
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	funkey_prog(test_list, status, ch)
              -**
              -**	Test program function keys (pfx)
              -*/
              -static void
              -funkey_prog(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, fk;
              -	char mm[256];
              -
              -	fk = 1;	/* use function key 1 for now */
              -	if (pkey_xmit) {
              -		/* test program function key */
              -		sprintf(temp,
              -			"(pfx) Set function key %d to transmit abc\\n", fk);
              -		ptextln(temp);
              -		tc_putp(TPARM_2(pkey_xmit, fk, "abc\n"));
              -		sprintf(temp, "Hit function key %d\n", fk);
              -		ptextln(temp);
              -		for (i = 0; i < 4; ++i)
              -			mm[i] = getchp(STRIP_PARITY);
              -		mm[i] = '\0';
              -		put_crlf();
              -		if (mm[0] != 'a' || mm[1] != 'b' || mm[2] != 'c') {
              -			sprintf(temp, "Error string received was: %s", expand(mm));
              -			ptextln(temp);
              -		} else {
              -			putln("Thank you\n");
              -		}
              -		flush_input();
              -		if (key_f1) {
              -			tc_putp(TPARM_2(pkey_xmit, fk, key_f1));
              -		}
              -	} else {
              -		ptextln("Function key transmit (pfx), not present.");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	funkey_local(test_list, status, ch)
              -**
              -**	Test program local function keys (pfloc)
              -*/
              -static void
              -funkey_local(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int fk;
              -
              -	fk = 1;
              -	if (pkey_local) {
              -		/* test local function key */
              -		sprintf(temp,
              -			"(pfloc) Set function key %d to execute a clear and print \"Done!\"", fk);
              -		ptextln(temp);
              -		sprintf(temp, "%sDone!", liberated(clear_screen));
              -		tc_putp(TPARM_2(pkey_local, fk, temp));
              -		sprintf(temp, "Hit function key %d.  Then hit return.", fk);
              -		ptextln(temp);
              -		(void) wait_here();
              -		flush_input();
              -		if (key_f1 && pkey_xmit) {
              -			tc_putp(TPARM_2(pkey_xmit, fk, key_f1));
              -		}
              -	} else {
              -		ptextln("Function key execute local (pfloc), not present.");
              -	}
              -
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	printer_on(test_list, status, ch)
              -**
              -**	Test printer on/off (mc4) (mc5) (mc5i)
              -*/
              -static void
              -printer_on(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (!prtr_on || !prtr_off) {
              -		ptextln("Printer on/off missing. (mc5) (mc4)");
              -	} else if (prtr_silent) {
              -		ptextln("Your printer is silent. (mc5i) is set.");
              -		tc_putp(prtr_on);
              -		ptextln("This line should be on the printer but not your screen. (mc5)");
              -		tc_putp(prtr_off);
              -		ptextln("This line should be only on the screen. (mc4)");
              -	} else {
              -		ptextln("Your printer is not silent. (mc5i) is reset.");
              -		tc_putp(prtr_on);
              -		ptextln("This line should be on the printer and the screen. (mc5)");
              -		tc_putp(prtr_off);
              -		ptextln("This line should only be on the screen. (mc4)");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	printer_mc0(test_list, status, ch)
              -**
              -**	Test screen print (mc0)
              -*/
              -static void
              -printer_mc0(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (print_screen) {
              -		ptext("I am going to send the contents of the screen to");
              -		ptext(" the printer, then wait for a keystroke from you.");
              -		ptext("  All of the text that appears on the screen");
              -		ptextln(" should be printed. (mc0)");
              -		tc_putp(print_screen);
              -	} else {
              -		ptext("(mc0) Print-screen is not present.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -
              -static void
              -line_pattern(void)
              -{				/* put up a pattern that will help count the
              -				   number of lines */
              -	int i, j;
              -
              -	put_clear();
              -	if (over_strike) {
              -		for (i = 0; i < 100; i++) {
              -			if (i) {
              -				put_crlf();
              -			}
              -			for (j = i / 10; j; j--) {
              -				put_this(' ');
              -			}
              -			put_this('0' + ((i + 1) % 10));
              -		}
              -	} else	/* I assume it will scroll */ {
              -		for (i = 100; i; i--) {
              -			sprintf(temp, "\r\n%d", i);
              -			put_str(temp);
              -		}
              -	}
              -}
              -
              -
              -static void
              -column_pattern(void)
              -{				/* put up a pattern that will help count the
              -				   number of columns */
              -	int i, j;
              -
              -	put_clear();
              -	for (i = 0; i < 20; i++) {
              -		for (j = 1; j < 10; j++) {
              -			put_this('0' + j);
              -		}
              -		put_this('.');
              -	}
              -}
              -
              -/*
              -**	report_help()
              -**
              -**	Print the help text for the echo tests
              -*/
              -static void
              -report_help(int crx)
              -{
              -	ptextln("The following commands may also be entered:");
              -	ptextln(" clear   clear screen.");
              -	ptextln(" columns print a test pattern to help count screen width.");
              -	ptextln(" lines   print a test pattern to help count screen length.");
              -	ptextln(" end     exit.");
              -	ptextln(" echo    redisplay last report.");
              -	if (crx) {
              -		ptextln(" hex     redisplay last report in hex.");
              -	} else {
              -		ptextln(" hex     toggle hex display mode.");
              -	}
              -	ptextln(" help    display this list.");
              -	ptextln(" high    toggle forced high bit (0x80).");
              -	ptextln(" scan    toggle scan mode.");
              -	ptextln(" one     echo one character after  or  as is. (report mode)");
              -	ptextln(" two     echo two characters after  or  as is.");
              -	ptextln(" all     echo all characters after  or  as is. (echo mode)");
              -}
              -
              -/*
              -**	tools_report(testlist, state, ch)
              -**
              -**	Run the echo tool and report tool
              -*/
              -void
              -tools_report(
              -	struct test_list *t,
              -	int *state GCC_UNUSED,
              -	int *pch GCC_UNUSED)
              -{
              -	int i, j, ch, crp, crx, high_bit, save_scan_mode, hex_display;
              -	char buf[1024];
              -	char txt[8];
              -
              -	hex_display = hex_out;
              -	put_clear();
              -	if ((crx = (t->flags & 255)) == 1) {
              -		ptext("Characters after a CR or LF will be echoed as");
              -		ptextln(" is.  All other characters will be expanded.");
              -		report_help(crx);
              -	} else {	/* echo test */
              -		ptextln("Begin echo test.");
              -		report_help(crx);
              -	}
              -	memset(txt, 0, sizeof(txt));
              -	save_scan_mode = scan_mode;
              -	tty_raw(1, char_mask);
              -	for (i = crp = high_bit = 0;;) {
              -		ch = getchp(char_mask);
              -		if (ch == EOF) {
              -			break;
              -		}
              -		if (i >= (int) sizeof(buf) - 1) {
              -			i = 0;
              -		}
              -		buf[i++] = ch;
              -		buf[i] = '\0';
              -		for (j = 0; j < (int) sizeof(txt) - 1; j++) {
              -			txt[j] = txt[j + 1];
              -		}
              -		txt[sizeof(txt) - 1] = ch & STRIP_PARITY;
              -		if (crx == 0) {	/* echo test */
              -			if (hex_display) {
              -				ptext(hex_expand_to(&buf[i - 1], 3));
              -			} else {
              -				tc_putch(ch | high_bit);
              -			}
              -		} else /* status report test */
              -		if (ch == '\n' || ch == '\r') {
              -			put_crlf();
              -			crp = 0;
              -		} else if (crp++ < crx) {
              -			tc_putch(ch | high_bit);
              -		} else {
              -			put_str(expand(&buf[i - 1]));
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 7], "columns", 7)) {
              -			column_pattern();
              -			buf[i = 0] = '\0';
              -			crp = 0;
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 5], "lines", 5)) {
              -			line_pattern();
              -			buf[i = 0] = '\0';
              -			crp = 0;
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 5], "clear", 5)) {
              -			put_clear();
              -			buf[i = 0] = '\0';
              -			crp = 0;
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 4], "high", 4)) {
              -			high_bit ^= 0x80;
              -			if (high_bit) {
              -				ptextln("\nParity bit set");
              -			} else {
              -				ptextln("\nParity bit reset");
              -			}
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 4], "help", 4)) {
              -			put_crlf();
              -			report_help(crx);
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 4], "echo", 4)) {
              -			/* display the last status report */
              -			/* clear bypass condition on Tek terminals */
              -			put_crlf();
              -			if (i >= 4) {
              -				buf[i -= 4] = '\0';
              -			}
              -			put_str(expand(buf));
              -		}
              -		if (save_scan_mode &&
              -			!strncmp(&txt[sizeof(txt) - 4], "scan", 4)) {
              -			/* toggle scan mode */
              -			scan_mode = !scan_mode;
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 3], "end", 3))
              -			break;
              -		if (!strncmp(&txt[sizeof(txt) - 3], "hex", 3)) {
              -			if (crx) {
              -				/* display the last status report in hex */
              -				/* clear bypass condition on Tek terminals */
              -				put_crlf();
              -				if (i >= 3) {
              -					buf[i -= 3] = '\0';
              -				}
              -				put_str(hex_expand_to(buf, 3));
              -			} else {
              -				hex_display = !hex_display;
              -			}
              -		}
              -		if (!strncmp(&txt[sizeof(txt) - 3], "two", 3))
              -			crx = 2;
              -		if (!strncmp(&txt[sizeof(txt) - 3], "one", 3))
              -			crx = 1;
              -		if (!strncmp(&txt[sizeof(txt) - 3], "all", 3))
              -			crx = 0;
              -	}
              -	scan_mode = save_scan_mode;
              -	put_crlf();
              -	tty_set();
              -	if (crx) {
              -		ptextln("End of status report test.");
              -	} else {
              -		ptextln("End of echo test.");
              -	}
              -}
              diff -Naur ncurses-5.6.orig/tack/init.c ncurses-5.6/tack/init.c
              --- ncurses-5.6.orig/tack/init.c	2006-11-25 19:16:01.000000000 -0500
              +++ ncurses-5.6/tack/init.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,316 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -**
              -** This file is part of TACK.
              -**
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -**
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -**
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -/* initialization and wrapup code */
              -
              -#include 
              -
              -MODULE_ID("$Id: init.c,v 1.7 2006/11/26 00:16:01 tom Exp $")
              -
              -#if NCURSES_VERSION_MAJOR >= 5 || NCURSES_VERSION_PATCH >= 981219
              -#define _nc_get_curterm(p) _nc_get_tty_mode(p)
              -#endif
              -
              -FILE *debug_fp;
              -char temp[1024];
              -char tty_basename[64];
              -
              -void
              -put_name(const char *cap, const char *name)
              -{				/* send the cap name followed by the cap */
              -	if (cap) {
              -		ptext(name);
              -		tc_putp(cap);
              -	}
              -}
              -
              -static void
              -report_cap(const char *tag, const char *s)
              -{				/* expand the cap or print *** missing *** */
              -	int i;
              -
              -	ptext(tag);
              -	for (i = char_count; i < 13; i++) {
              -		putchp(' ');
              -	}
              -	put_str(" = ");
              -	if (s) {
              -		putln(expand(s));
              -	} else {
              -		putln("*** missing ***");
              -	}
              -}
              -
              -
              -void
              -reset_init(void)
              -{				/* send the reset and init strings */
              -	int i;
              -
              -	ptext("Terminal reset");
              -	i = char_count;
              -	put_name(reset_1string, " (rs1)");
              -	put_name(reset_2string, " (rs2)");
              -	/* run the reset file */
              -	if (reset_file && reset_file[0]) {
              -		FILE *fp;
              -		int ch;
              -
              -		can_test("rf", FLAG_TESTED);
              -		if ((fp = fopen(reset_file, "r"))) {	/* send the reset file */
              -			sprintf(temp, " (rf) %s", reset_file);
              -			ptextln(temp);
              -			while (1) {
              -				ch = getc(fp);
              -				if (ch == EOF)
              -					break;
              -				put_this(ch);
              -			}
              -			fclose(fp);
              -		} else {
              -			sprintf(temp, "\nCannot open reset file (rf) %s", reset_file);
              -			ptextln(temp);
              -		}
              -	}
              -	put_name(reset_3string, " (rs3)");
              -	if (i != char_count) {
              -		put_crlf();
              -	}
              -	ptext(" init");
              -	put_name(init_1string, " (is1)");
              -	put_name(init_2string, " (is2)");
              -	if (set_tab && clear_all_tabs && init_tabs != 8) {
              -		put_crlf();
              -		tc_putp(clear_all_tabs);
              -		for (char_count = 0; char_count < columns; char_count++) {
              -			put_this(' ');
              -			if ((char_count & 7) == 7) {
              -				tc_putp(set_tab);
              -			}
              -		}
              -		put_cr();
              -	}
              -	/* run the initialization file */
              -	if (init_file && init_file[0]) {
              -		FILE *fp;
              -		int ch;
              -
              -		can_test("if", FLAG_TESTED);
              -		if ((fp = fopen(init_file, "r"))) {	/* send the init file */
              -			sprintf(temp, " (if) %s", init_file);
              -			ptextln(temp);
              -			while (1) {
              -				ch = getc(fp);
              -				if (ch == EOF)
              -					break;
              -				put_this(ch);
              -			}
              -			fclose(fp);
              -		} else {
              -			sprintf(temp, "\nCannot open init file (if) %s", init_file);
              -			ptextln(temp);
              -		}
              -	}
              -	if (init_prog) {
              -		can_test("iprog", FLAG_TESTED);
              -		(void) system(init_prog);
              -	}
              -	put_name(init_3string, " (is3)");
              -
              -	fflush(stdout);
              -}
              -
              -/*
              -**	display_basic()
              -**
              -**	display the basic terminal definitions
              -*/
              -void
              -display_basic(void)
              -{
              -	put_str("Name: ");
              -	putln(ttytype);
              -
              -	report_cap("\\r ^M (cr)", carriage_return);
              -	report_cap("\\n ^J (ind)", scroll_forward);
              -	report_cap("\\b ^H (cub1)", cursor_left);
              -	report_cap("\\t ^I (ht)", tab);
              -/*      report_cap("\\f ^L (ff)", form_feed);	*/
              -	if (newline) {
              -		/* OK if missing */
              -		report_cap("      (nel)", newline);
              -	}
              -	report_cap("      (clear)", clear_screen);
              -	if (!cursor_home && cursor_address) {
              -		report_cap("(cup) (home)", TPARM_2(cursor_address, 0, 0));
              -	} else {
              -		report_cap("      (home)", cursor_home);
              -	}
              -#ifdef user9
              -	report_cap("ENQ   (u9)", user9);
              -#endif
              -#ifdef user8
              -	report_cap("ACK   (u8)", user8);
              -#endif
              -
              -	sprintf(temp, "\nTerminal size: %d x %d.  Baud rate: %u.  Frame size: %d.%d",
              -		columns, lines,
              -		tty_baud_rate,
              -		tty_frame_size >> 1,
              -		(tty_frame_size & 1) * 5);
              -	putln(temp);
              -}
              -
              -/*
              -**	curses_setup(exec_name)
              -**
              -**	Startup ncurses
              -*/
              -void
              -curses_setup(
              -	char *exec_name)
              -{
              -	int status;
              -	static TERMTYPE term;
              -	char tty_filename[2048];
              -
              -	tty_init();
              -
              -	/**
              -	   See if the terminal is in the terminfo data base.  This call has
              -	two useful benefits, 1) it returns the filename of the terminfo entry,
              -	and 2) it searches only terminfo's.  This allows us to abort before
              -	ncurses starts scanning the termcap file.
              -	**/
              -	if ((status = _nc_read_entry(tty_basename, tty_filename, &term)) == 0) {
              -		const TERMTYPE *fallback = _nc_fallback(tty_basename);
              -
              -		if (fallback) {
              -		    term = *fallback;
              -		    sprintf(tty_filename, "(fallback)%s", tty_basename);
              -		    status = 1;
              -		} else {
              -		    fprintf(stderr, "Terminal not found: TERM=%s\n", tty_basename);
              -		    show_usage(exec_name);
              -		    exit(1);
              -		}
              -	}
              -	if (status == -1) {
              -		fprintf(stderr, "Terminfo database is inaccessible\n");
              -		exit(1);
              -	}
              -
              -	/**
              -	   This call will load the terminfo data base and set the cur-term
              -	variable.  Only terminals that actually exist will get here so its
              -	OK to ignore errors.  This is a good thing since ncurses does not
              -	permit (os) or (gn) to be set.
              -	**/
              -	setupterm(tty_basename, 1, &status);
              -
              -	/**
              -	   Get the current terminal definitions.  This must be done before
              -	getting the baudrate.
              -	**/
              -	_nc_get_curterm(&cur_term->Nttyb);
              -	tty_baud_rate = baudrate();
              -	tty_cps = (tty_baud_rate << 1) / tty_frame_size;
              -
              -	/* set up the defaults */
              -	replace_mode = TRUE;
              -	scan_mode = 0;
              -	char_count = 0;
              -	select_delay_type = debug_level = 0;
              -	char_mask = (meta_on && meta_on[0] == '\0') ? ALLOW_PARITY : STRIP_PARITY;
              -	/* Don't change the XON/XOFF modes yet. */
              -	select_xon_xoff = initial_stty_query(TTY_XON_XOFF) ? 1 : needs_xon_xoff;
              -
              -	fflush(stdout);	/* flush any output */
              -	tty_set();
              -
              -	go_home();	/* set can_go_home */
              -	put_clear();	/* set can_clear_screen */
              -
              -	if (send_reset_init) {
              -		reset_init();
              -	}
              -
              -	/*
              -	   I assume that the reset and init strings may not have the correct
              -	   pads.  (Because that part of the test comes much later.)  Because
              -	   of this, I allow the terminal some time to catch up.
              -	*/
              -	fflush(stdout);	/* waste some time */
              -	sleep(1);	/* waste more time */
              -	charset_can_test();
              -	can_test("lines cols cr nxon rf if iprog rmp smcup rmcup", FLAG_CAN_TEST);
              -	edit_init();			/* initialize the edit data base */
              -
              -	if (send_reset_init && enter_ca_mode) {
              -		tc_putp(enter_ca_mode);
              -		put_clear();	/* just in case we switched pages */
              -	}
              -	put_crlf();
              -	ptext("Using terminfo from: ");
              -	ptextln(tty_filename);
              -	put_crlf();
              -
              -	if (tty_can_sync == SYNC_NEEDED) {
              -		verify_time();
              -	}
              -
              -	display_basic();
              -}
              -
              -/*
              -**	bye_kids(exit-condition)
              -**
              -**	Shutdown the terminal, clear the signals, and exit
              -*/
              -void
              -bye_kids(int n)
              -{				/* reset the tty and exit */
              -	ignoresig();
              -	if (send_reset_init) {
              -		if (exit_ca_mode) {
              -			tc_putp(exit_ca_mode);
              -		}
              -		if (initial_stty_query(TTY_XON_XOFF)) {
              -			if (enter_xon_mode) {
              -				tc_putp(enter_xon_mode);
              -			}
              -		} else if (exit_xon_mode) {
              -			tc_putp(exit_xon_mode);
              -		}
              -	}
              -	if (debug_fp) {
              -		fclose(debug_fp);
              -	}
              -	if (log_fp) {
              -		fclose(log_fp);
              -	}
              -	tty_reset();
              -	fclose(stdin);
              -	fclose(stdout);
              -	fclose(stderr);
              -	if (not_a_tty)
              -		sleep(1);
              -	exit(n);
              -}
              diff -Naur ncurses-5.6.orig/tack/menu.c ncurses-5.6/tack/menu.c
              --- ncurses-5.6.orig/tack/menu.c	2005-09-17 15:49:16.000000000 -0400
              +++ ncurses-5.6/tack/menu.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,421 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: menu.c,v 1.3 2005/09/17 19:49:16 tom Exp $")
              -
              -/*
              -   Menu control
              - */
              -
              -static void test_byname(struct test_menu *, int *, int *);
              -
              -struct test_list *augment_test;
              -char prompt_string[80];	/* menu prompt storage */
              -
              -/*
              -**	menu_prompt()
              -**
              -**	Print the menu prompt string.
              -*/
              -void
              -menu_prompt(void)
              -{
              -	ptext(&prompt_string[1]);
              -}
              -
              -/*
              -**	menu_test_loop(test-structure, state, control-character)
              -**
              -**	This function implements the repeat test function.
              -*/
              -static void
              -menu_test_loop(
              -	struct test_list *test,
              -	int *state,
              -	int *ch)
              -{
              -	int nch, p;
              -
              -	if ((test->flags & MENU_REP_MASK) && (augment_test != test)) {
              -		/* set the augment variable (first time only) */
              -		p = (test->flags >> 8) & 15;
              -		if ((test->flags & MENU_REP_MASK) == MENU_LM1) {
              -			augment = lines - 1;
              -		} else
              -		if ((test->flags & MENU_ONE_MASK) == MENU_ONE) {
              -			augment = 1;
              -		} else
              -		if ((test->flags & MENU_LC_MASK) == MENU_lines) {
              -			augment = lines * p / 10;
              -		} else
              -		if ((test->flags & MENU_LC_MASK) == MENU_columns) {
              -			augment = columns * p / 10;
              -		} else {
              -			augment = 1;
              -		}
              -		augment_test = test;
              -		set_augment_txt();
              -	}
              -	do {
              -		if ((test->flags | *state) & MENU_CLEAR) {
              -			put_clear();
              -		} else
              -		if (line_count + test->lines_needed >= lines) {
              -			put_clear();
              -		}
              -		nch = 0;
              -		if (test->test_procedure) {
              -			/* The procedure takes precedence so I can pass
              -			   the menu entry as an argument.
              -			*/
              -			can_test(test->caps_done, FLAG_TESTED);
              -			can_test(test->caps_tested, FLAG_TESTED);
              -			test->test_procedure(test, state, &nch);
              -		} else
              -		if (test->sub_menu) {
              -			/* nested menu's */
              -			menu_display(test->sub_menu, &nch);
              -			*state = 0;
              -			if (nch == 'q' || nch == 's') {
              -				/* Quit and skip are killed here */
              -				nch = '?';
              -			}
              -		} else {
              -			break;	/* cya */
              -		}
              -		if (nch == '\r' || nch == '\n' || nch == 'n') {
              -			nch = 0;
              -			break;
              -		}
              -	} while (nch == 'r');
              -	*ch = nch;
              -}
              -
              -/*
              -**	menu_display(menu-structure, flags)
              -**
              -**	This function implements menu control.
              -*/
              -void
              -menu_display(
              -	struct test_menu *menu,
              -	int *last_ch)
              -{
              -	int test_state = 0, run_standard_tests;
              -	int hot_topic, ch = 0, nch = 0;
              -	struct test_list *mt;
              -	struct test_list *repeat_tests = 0;
              -	int repeat_state = 0;
              -	int prompt_length;
              -
              -	prompt_length = strlen(prompt_string);
              -	if (menu->ident) {
              -		sprintf(&prompt_string[prompt_length], "/%s", menu->ident);
              -	}
              -	hot_topic = menu->default_action;
              -	run_standard_tests = menu->standard_tests ?
              -		menu->standard_tests[0] : -1;
              -	if (!last_ch) {
              -		last_ch = &ch;
              -	}
              -	while (1) {
              -		if (ch == 0) {
              -			/* Display the menu */
              -			put_crlf();
              -			if (menu->menu_function) {
              -				/*
              -				   this function may be used to restrict menu
              -				   entries.  If used it must print the title.
              -				*/
              -				menu->menu_function(menu);
              -			} else
              -			if (menu->menu_title) {
              -				ptextln(menu->menu_title);
              -			}
              -			for (mt = menu->tests; (mt->flags & MENU_LAST) == 0; mt++) {
              -				if (mt->menu_entry) {
              -					ptext(" ");
              -					ptextln(mt->menu_entry);
              -				}
              -			}
              -			if (menu->standard_tests) {
              -				ptext(" ");
              -				ptextln(menu->standard_tests);
              -				ptextln(" r) repeat test");
              -				ptextln(" s) skip to next test");
              -			}
              -			ptextln(" q) quit");
              -			ptextln(" ?) help");
              -		}
              -		if (ch == 0 || ch == REQUEST_PROMPT) {
              -			put_crlf();
              -			ptext(&prompt_string[1]);
              -			if (hot_topic) {
              -				ptext(" [");
              -				putchp(hot_topic);
              -				ptext("]");
              -			}
              -			ptext(" > ");
              -			/* read a character */
              -			ch = wait_here();
              -		}
              -		if (ch == '\r' || ch == '\n') {
              -			ch = hot_topic;
              -		}
              -		if (ch == 'q') {
              -			break;
              -		}
              -		if (ch == '?') {
              -			ch = 0;
              -			continue;
              -		}
              -		nch = ch;
              -		ch = 0;
              -		/* Run one of the standard tests (by request) */
              -		for (mt = menu->tests; (mt->flags & MENU_LAST) == 0; mt++) {
              -			if (mt->menu_entry && (nch == mt->menu_entry[0])) {
              -				if (mt->flags & MENU_MENU) {
              -					test_byname(menu, &test_state, &nch);
              -				} else {
              -					menu_test_loop(mt, &test_state, &nch);
              -				}
              -				ch = nch;
              -				if ((mt->flags & MENU_COMPLETE) && ch == 0) {
              -					/* top level */
              -					hot_topic = 'q';
              -					ch = '?';
              -				}
              -			}
              -		}
              -		if (menu->standard_tests && nch == 'r') {
              -			menu->resume_tests = repeat_tests;
              -			test_state = repeat_state;
              -			nch = run_standard_tests;
              -		}
              -		if (nch == run_standard_tests) {
              -			if (!(mt = menu->resume_tests)) {
              -				mt = menu->tests;
              -			}
              -			if (mt->flags & MENU_LAST) {
              -				mt = menu->tests;
              -			}
              -			/* Run the standard test suite */
              -			for ( ; (mt->flags & MENU_LAST) == 0; ) {
              -				if ((mt->flags & MENU_NEXT) == MENU_NEXT) {
              -					repeat_tests = mt;
              -					repeat_state = test_state;
              -					nch = run_standard_tests;
              -					menu_test_loop(mt, &test_state, &nch);
              -					if (nch != 0 && nch != 'n') {
              -						ch = nch;
              -						break;
              -					}
              -					if (test_state & MENU_STOP) {
              -						break;
              -					}
              -				}
              -				mt++;
              -			}
              -			if (ch == 0) {
              -				ch = hot_topic;
              -			}
              -			menu->resume_tests = mt;
              -			menu->resume_state = test_state;
              -			menu->resume_char = ch;
              -
              -			if (ch == run_standard_tests) {
              -				/* pop up a level */
              -				break;
              -			}
              -		}
              -	}
              -	*last_ch = ch;
              -	prompt_string[prompt_length] = '\0';
              -}
              -
              -/*
              -**	generic_done_message(test_list)
              -**
              -**	Print the Done message and request input.
              -*/
              -void
              -generic_done_message(
              -	struct test_list *test,
              -	int *state,
              -	int *ch)
              -{
              -	char done_message[128];
              -
              -	if (test->caps_done) {
              -		sprintf(done_message, "(%s) Done ", test->caps_done);
              -		ptext(done_message);
              -	} else {
              -		ptext("Done ");
              -	}
              -	*ch = wait_here();
              -	if (*ch == '\r' || *ch == '\n' || *ch == 'n') {
              -		*ch = 0;
              -	}
              -	if (*ch == 's') {
              -		*state |= MENU_STOP;
              -		*ch = 0;
              -	}
              -}
              -
              -/*
              -**	menu_clear_screen(test, state, ch)
              -**
              -**	Just clear the screen.
              -*/
              -void
              -menu_clear_screen(
              -	struct test_list *test GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	put_clear();
              -}
              -
              -/*
              -**	menu_reset_init(test, state, ch)
              -**
              -**	Send the reset and init strings.
              -*/
              -void
              -menu_reset_init(
              -	struct test_list *test GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	reset_init();
              -	put_crlf();
              -}
              -
              -/*
              -**	subtest_menu(test, state, ch)
              -**
              -**	Scan the menu looking for something to execute
              -**	Return TRUE if we found anything.
              -*/
              -int
              -subtest_menu(
              -	struct test_list *test,
              -	int *state,
              -	int *ch)
              -{
              -	struct test_list *mt;
              -
              -	if (*ch) {
              -		for (mt = test; (mt->flags & MENU_LAST) == 0; mt++) {
              -			if (mt->menu_entry && (*ch == mt->menu_entry[0])) {
              -				*ch = 0;
              -				menu_test_loop(mt, state, ch);
              -				return TRUE;
              -			}
              -		}
              -	}
              -	return FALSE;
              -}
              -
              -/*
              -**	menu_can_scan(menu-structure)
              -**
              -**	Recursively scan the menu tree and find which cap names can be tested.
              -*/
              -void
              -menu_can_scan(
              -	const struct test_menu *menu)
              -{
              -	struct test_list *mt;
              -
              -	for (mt = menu->tests; (mt->flags & MENU_LAST) == 0; mt++) {
              -		can_test(mt->caps_done, FLAG_CAN_TEST);
              -		can_test(mt->caps_tested, FLAG_CAN_TEST);
              -		if (!(mt->test_procedure)) {
              -			if (mt->sub_menu) {
              -				menu_can_scan(mt->sub_menu);
              -			}
              -		}
              -	}
              -}
              -
              -/*
              -**	menu_search(menu-structure, cap)
              -**
              -**	Recursively search the menu tree and execute any tests that use cap.
              -*/
              -static void
              -menu_search(
              -	struct test_menu *menu,
              -	int *state,
              -	int *ch,
              -	char *cap)
              -{
              -	struct test_list *mt;
              -	int nch;
              -
              -	for (mt = menu->tests; (mt->flags & MENU_LAST) == 0; mt++) {
              -		nch = 0;
              -		if (cap_match(mt->caps_done, cap)
              -			|| cap_match(mt->caps_tested, cap)) {
              -			menu_test_loop(mt, state, &nch);
              -		}
              -		if (!(mt->test_procedure)) {
              -			if (mt->sub_menu) {
              -				menu_search(mt->sub_menu, state, &nch, cap);
              -			}
              -		}
              -		if (*state & MENU_STOP) {
              -			break;
              -		}
              -		if (nch != 0 && nch != 'n') {
              -			*ch = nch;
              -			break;
              -		}
              -	}
              -}
              -
              -/*
              -**	test_byname(menu, state, ch)
              -**
              -**	Get a cap name then run all tests that use that cap.
              -*/
              -static void
              -test_byname(
              -	struct test_menu *menu,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	int test_state = 0;
              -	char cap[32];
              -
              -	if (tty_can_sync == SYNC_NOT_TESTED) {
              -		verify_time();
              -	}
              -	ptext("enter name: ");
              -	read_string(cap, sizeof(cap));
              -	if (cap[0]) {
              -		menu_search(menu, &test_state, ch, cap);
              -	}
              -	*ch = '?';
              -}
              diff -Naur ncurses-5.6.orig/tack/modes.c ncurses-5.6/tack/modes.c
              --- ncurses-5.6.orig/tack/modes.c	2006-11-25 19:16:21.000000000 -0500
              +++ ncurses-5.6/tack/modes.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,913 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: modes.c,v 1.3 2006/11/26 00:16:21 tom Exp $")
              -
              -/*
              - * Tests boolean flags and terminal modes.
              - */
              -static void subtest_os(struct test_list *, int *, int *);
              -static void subtest_rmam(struct test_list *, int *, int *);
              -static void subtest_smam(struct test_list *, int *, int *);
              -static void subtest_am(struct test_list *, int *, int *);
              -static void subtest_ul(struct test_list *, int *, int *);
              -static void subtest_uc(struct test_list *, int *, int *);
              -static void subtest_bw(struct test_list *, int *, int *);
              -static void subtest_xenl(struct test_list *, int *, int *);
              -static void subtest_eo(struct test_list *, int *, int *);
              -static void subtest_xmc(struct test_list *, int *, int *);
              -static void subtest_xhp(struct test_list *, int *, int *);
              -static void subtest_mir(struct test_list *, int *, int *);
              -static void subtest_msgr(struct test_list *, int *, int *);
              -static void subtest_tbc(struct test_list *, int *, int *);
              -static void subtest_xt(struct test_list *, int *, int *);
              -static void subtest_hts(struct test_list *, int *, int *);
              -static void subtest_cbt(struct test_list *, int *, int *);
              -static void subtest_in(struct test_list *, int *, int *);
              -static void subtest_dadb(struct test_list *, int *, int *);
              -
              -struct test_list mode_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{MENU_NEXT, 3, "os", 0, 0, subtest_os, 0},
              -	{MENU_NEXT, 1, "rmam", 0, 0, subtest_rmam, 0},
              -	{MENU_NEXT, 1, "smam", 0, 0, subtest_smam, 0},
              -	{MENU_NEXT, 1, "am", 0, 0, subtest_am, 0},
              -	{MENU_NEXT, 3, "ul", 0, 0, subtest_ul, 0},
              -	{MENU_NEXT, 3, "uc", 0, 0, subtest_uc, 0},
              -	{MENU_NEXT, 3, "bw", 0, 0, subtest_bw, 0},
              -	{MENU_NEXT, 4, "xenl", 0, 0, subtest_xenl, 0},
              -	{MENU_NEXT, 3, "eo", 0, 0, subtest_eo, 0},
              -	{MENU_NEXT, 3, "xmc", 0, 0, subtest_xmc, 0},
              -	{MENU_NEXT, 3, "xhp", 0, 0, subtest_xhp, 0},
              -	{MENU_NEXT, 6, "mir", 0, 0, subtest_mir, 0},
              -	{MENU_NEXT, 6, "msgr", 0, 0, subtest_msgr, 0},
              -	{MENU_NEXT | MENU_CLEAR, 0, "tbc", "it", 0, subtest_tbc, 0},
              -	{MENU_NEXT | MENU_CLEAR, 0, "hts", "it", 0, subtest_hts, 0},
              -	{MENU_NEXT, 4, "xt", "it", 0, subtest_xt, 0},
              -	{MENU_NEXT, 1, "cbt", "it", 0, subtest_cbt, 0},
              -	{MENU_NEXT, 6, "in", 0, 0, subtest_in, 0},
              -	{MENU_NEXT, 1, "da) (db", 0, 0, subtest_dadb, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -/*
              -**	subtest_os(test_list, status, ch)
              -**
              -**	test over strike mode (os)
              -*/
              -static void
              -subtest_os(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	ptext("(os) should be true, not false.");
              -	put_cr();
              -	ptextln("(os) should be           false.");
              -	sprintf(temp, "(os) over-strike is %s in the data base.  ",
              -		over_strike ? "true" : "false");
              -	ptext(temp);
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_rmam(test_list, status, ch)
              -**
              -**	test exit automatic margins mode (rmam)
              -*/
              -static void
              -subtest_rmam(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int j;
              -
              -	if (!exit_am_mode) {
              -		ptext("(rmam) not present.  ");
              -	} else
              -	if (!can_go_home) {
              -		ptext("(rmam) not tested, no way to home cursor.  ");
              -	} else
              -	if (over_strike) {
              -		put_clear();
              -		go_home();
              -		tc_putp(exit_am_mode);
              -		ptext("\n(rmam) will     reset (am)");
              -		go_home();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		ptext("(rmam) will not reset (am)");
              -		go_home();
              -		put_newlines(2);
              -	} else {
              -		put_clear();
              -		go_home();
              -		tc_putp(exit_am_mode);
              -		ptext("\n(rmam) will reset (am)");
              -		go_home();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		ptext("(rmam) will not reset (am) ");
              -		go_home();
              -		put_str("                          ");
              -		go_home();
              -		put_newlines(2);
              -	}
              -	ptext("Exit-automatic-margins ");
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_smam(test_list, status, ch)
              -**
              -**	test enter automatic margins mode (smam)
              -*/
              -static void
              -subtest_smam(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!enter_am_mode) {
              -		ptext("(smam) not present.  ");
              -	} else
              -	if (!can_go_home) {
              -		ptext("(smam) not tested, no way to home cursor.  ");
              -	} else
              -	if (over_strike) {
              -		put_clear();
              -		go_home();
              -		tc_putp(enter_am_mode);
              -		ptext("\n(smam) will ");
              -		i = char_count;
              -		ptext("not set (am)");
              -		go_home();
              -		for (j = -i; j < columns; j++)
              -			put_this(' ');
              -		put_str("@@@");
              -		put_newlines(2);
              -	} else {
              -		put_clear();
              -		go_home();
              -		tc_putp(enter_am_mode);
              -		ptext("\n(smam) will not set (am)");
              -		go_home();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		ptext("(smam) will set (am)    ");
              -		go_home();
              -		put_str("                          ");
              -		put_newlines(2);
              -	}
              -	ptext("Enter-automatic-margins ");
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_am(test_list, status, ch)
              -**
              -**	test automatic margins (am)
              -*/
              -static void
              -subtest_am(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!can_go_home) {
              -		ptextln("(am) not tested, no way to home cursor.  ");
              -	} else
              -	if (over_strike) {
              -		put_clear();
              -		go_home();
              -		ptext("\n(am) should ");
              -		i = char_count;
              -		ptext("not be set");
              -		go_home();
              -		for (j = -i; j < columns; j++)
              -			put_this(' ');
              -		put_str("@@@");
              -		go_home();
              -		put_newlines(2);
              -		sprintf(temp, "(am) is %s in the data base",
              -			auto_right_margin ? "true" : "false");
              -		ptextln(temp);
              -	} else {
              -		put_clear();
              -		go_home();
              -		ptext("\n(am) should not be set");
              -		go_home();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		ptext("(am) should be set    ");
              -		go_home();
              -		put_str("                       \n\n");
              -		sprintf(temp, "(am) is %s in the data base",
              -			auto_right_margin ? "true" : "false");
              -		ptextln(temp);
              -	}
              -	ptext("Automatic-right-margin ");
              -	generic_done_message(t, state, ch);
              -}
              -
              -/* Note: uprint() sends underscore back-space character, and
              -        ucprint() sends character back-space underscore.  */
              -
              -/*
              -**	uprint(string)
              -**
              -**	underline string for (ul) test
              -*/
              -static void
              -uprint(const char *s)
              -{
              -	if (s) {
              -		while (*s) {
              -			put_str("_\b");
              -			putchp(*s++);
              -		}
              -	}
              -}
              -
              -/*
              -**	ucprint(string)
              -**
              -**	underline string for (uc) test
              -*/
              -static void
              -ucprint(const char *s)
              -{
              -	if (s) {
              -		while (*s) {
              -			putchp(*s++);
              -			putchp('\b');
              -			tc_putp(underline_char);
              -		}
              -	}
              -}
              -
              -/*
              -**	subtest_ul(test_list, status, ch)
              -**
              -**	test transparent underline (ul)
              -*/
              -static void
              -subtest_ul(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (!over_strike) {
              -		/* (ul) is used only if (os) is reset */
              -		put_crlf();
              -		sprintf(temp, "This text should %sbe underlined.",
              -			transparent_underline ? "" : "not ");
              -		uprint(temp);
              -		put_crlf();
              -		ptextln("If the above line is not underlined the (ul) should be false.");
              -		sprintf(temp, "(ul) Transparent-underline is %s in the data base",
              -			transparent_underline ? "true" : "false");
              -		ptextln(temp);
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_uc(test_list, status, ch)
              -**
              -**	test underline character (uc)
              -*/
              -static void
              -subtest_uc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (!over_strike) {
              -		if (underline_char) {
              -			ucprint("This text should be underlined.");
              -			put_crlf();
              -			ptextln("If the above text is not underlined the (uc) has failed.");
              -			ptext("Underline-character ");
              -		} else {
              -			ptext("(uc) underline-character is not defined.  ");
              -		}
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_bw(test_list, status, ch)
              -**
              -**	test auto left margin (bw)
              -*/
              -static void
              -subtest_bw(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (over_strike) {
              -		/* test (bw) */
              -		ptext("\n(bw) should ");
              -		i = char_count;
              -		ptextln("not be set.");
              -		for (j = i; j < columns; j++)
              -			put_str("\b");
              -		put_str("@@@");
              -		put_crlf();
              -		sprintf(temp, "(bw) Auto-left-margin is %s in the data base",
              -			auto_left_margin ? "true" : "false");
              -		ptextln(temp);
              -	} else {
              -		/* test (bw) */
              -		ptextln("(bw) should not be set.");
              -		for (i = 12; i < columns; i++)
              -			put_str("\b");
              -		if (delete_character) {
              -			for (i = 0; i < 4; i++)
              -				tc_putp(delete_character);
              -		} else {
              -			put_str("   ");
              -		}
              -		put_crlf();
              -		sprintf(temp, "(bw) Auto-left-margin is %s in the data base",
              -			auto_left_margin ? "true" : "false");
              -		ptextln(temp);
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_tbc(test_list, status, ch)
              -**
              -**	test clear tabs (tbc)
              -*/
              -static void
              -subtest_tbc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int tabat;		/* the tab spacing we end up with */
              -	int i;
              -
              -	if (clear_all_tabs && !set_tab) {
              -		ptext("(tbc) Clear-all-tabs is defined but (hts) set-tab is not.  ");
              -		ptext("Once the tabs are cleared there is no way to set them.  ");
              -	} else
              -	if (clear_all_tabs) {
              -		tabat = set_tab ? 8 : init_tabs;
              -		tc_putp(clear_all_tabs);
              -		ptext("Clear tabs (tbc)");
              -		go_home();
              -		put_crlf();
              -		putchp('\t');
              -		putchp('T');
              -		go_home();
              -		put_newlines(2);
              -		for (i = 0; i < columns; i++) {
              -			if (i == tabat) {
              -				putchp('T');
              -			} else {
              -				putchp('.');
              -			}
              -		}
              -		go_home();
              -		ptext("\n\n\nIf the above two lines have T's in the same column then (tbc) has failed.  ");
              -	} else {
              -		ptext("(tbc) Clear-all-tabs is not defined.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_hts(test_list, status, ch)
              -**
              -**	(ht) and set tabs with (hts)
              -*/
              -static void
              -subtest_hts(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int tabat;		/* the tab spacing we end up with */
              -	int i;
              -
              -	tabat = init_tabs;
              -	if (set_tab) {
              -		ptext("Tabs set with (hts)");
              -		put_crlf();
              -		for (i = 1; i < columns; i++) {
              -			if (i % 8 == 1) {
              -				tc_putp(set_tab);
              -			}
              -			putchp(' ');
              -		}
              -		tabat = 8;
              -	} else {
              -		sprintf(temp, "(hts) Set-tabs not defined.  (it) Initial-tabs at %d", init_tabs);
              -		ptext(temp);
              -	}
              -	go_home();
              -	put_newlines(2);
              -	if (tabat <= 0) {
              -		tabat = 8;
              -	}
              -	for (i = tabat; i < columns; i += tabat) {
              -		putchp('\t');
              -		putchp('T');
              -	}
              -	go_home();
              -	put_newlines(3);
              -	for (i = 1; i < columns; i++) {
              -		putchp('.');
              -	}
              -	go_home();
              -	put_newlines(3);
              -	for (i = tabat; i < columns; i += tabat) {
              -		putchp('\t');
              -		putchp('T');
              -	}
              -	go_home();
              -	put_newlines(4);
              -	putchp('.');
              -	for (i = 2; i < columns; i++) {
              -		if (i % tabat == 1) {
              -			putchp('T');
              -		} else {
              -			putchp('.');
              -		}
              -	}
              -	go_home();
              -	put_newlines(5);
              -	if (set_tab) {
              -		ptextln("If the last two lines are not the same then (hts) has failed.");
              -	} else
              -	if (init_tabs > 0) {
              -		ptextln("If the last two lines are not the same then (it) is wrong.");
              -	} else {
              -		ptextln("If the last two lines are the same then maybe you do have tabs and (it) should be changed.");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_xt(test_list, status, ch)
              -**
              -**	(xt) glitch
              -*/
              -static void
              -subtest_xt(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int tabat;		/* the tab spacing we end up with */
              -	int cc;
              -
              -	tabat = set_tab ? 8 : init_tabs;
              -	if (!over_strike && (tabat > 0)) {
              -		ptext("(xt) should not ");
              -		put_cr();
              -		ptext("(xt) should");
              -		cc = char_count;
              -		while (cc < 16) {
              -			putchp('\t');
              -			cc = ((cc / tabat) + 1) * tabat;
              -		}
              -		putln("be set.");
              -		sprintf(temp, "(xt) Destructive-tab is %s in the data base.",
              -			dest_tabs_magic_smso ? "true" : "false");
              -		ptextln(temp);
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_cbt(test_list, status, ch)
              -**
              -**	(cbt) back tab
              -*/
              -static void
              -subtest_cbt(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (back_tab) {
              -		put_clear();
              -		ptext("Back-tab (cbt)");
              -		go_home();
              -		put_crlf();
              -		for (i = 1; i < columns; i++) {
              -			putchp(' ');
              -		}
              -		for (i = 0; i < columns; i += 8) {
              -			tc_putp(back_tab);
              -			putchp('T');
              -			tc_putp(back_tab);
              -		}
              -		go_home();
              -		put_newlines(2);
              -		for (i = 1; i < columns; i++) {
              -			if (i % 8 == 1) {
              -				putchp('T');
              -			} else {
              -				putchp(' ');
              -			}
              -		}
              -		go_home();
              -		put_newlines(3);
              -		ptextln("The preceding two lines should be the same.");
              -	} else {
              -		ptextln("(cbt) Back-tab not present");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_xenl(test_list, status, ch)
              -**
              -**	(xenl) eat newline glitch
              -*/
              -static void
              -subtest_xenl(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j, k;
              -
              -	if (over_strike) {
              -		/* test (xenl) on overstrike terminals */
              -		if (!can_go_home || !can_clear_screen) {
              -			ptextln("(xenl) Newline-glitch not tested, can't home cursor and clear.");
              -			generic_done_message(t, state, ch);
              -			return;
              -		}
              -		put_clear();
              -		/*
              -		   this test must be done in raw mode.  Otherwise UNIX will
              -		   translate CR to CRLF.
              -		*/
              -		if (stty_query(TTY_OUT_TRANS))
              -			tty_raw(1, char_mask);
              -		ptext("\nreset (xenl). Does ");
              -		i = char_count;
              -		put_str("not ignore CR, does ");
              -		k = char_count;
              -		put_str("not ignore LF");
              -		go_home();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		put_cr();
              -		for (j = 0; j < i; j++)
              -			putchp(' ');
              -		put_str("@@@\n@@");
              -		go_home();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		put_lf();
              -		for (j = 0; j < k; j++)
              -			putchp(' ');
              -		put_str("@@@\r@@");
              -		tty_set();
              -		go_home();
              -		put_newlines(4);
              -		sprintf(temp, "(xenl) Newline-glitch is %s in the data base",
              -			eat_newline_glitch ? "true" : "false");
              -		ptextln(temp);
              -	} else {
              -		/* test (xenl) when (os) is reset */
              -		if (!can_go_home) {
              -			ptextln("(xenl) Newline-glitch not tested, can't home cursor");
              -			generic_done_message(t, state, ch);
              -			return;
              -		}
              -		/* (xenl) test */
              -		put_clear();
              -		/*
              -		   this test must be done in raw mode.  Otherwise
              -		   UNIX will translate CR to CRLF.
              -		*/
              -		if (stty_query(TTY_OUT_TRANS))
              -			tty_raw(1, char_mask);
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		put_cr();
              -		ptext("(xenl) should be set. Does not ignore CR");
              -		go_home();
              -		put_crlf();
              -		for (j = 0; j < columns; j++)
              -			put_this(' ');
              -		put_lf();	/* test (cud1) */
              -		ptext("(xenl) should be set. Ignores (cud1)");
              -		go_home();
              -		put_newlines(3);
              -		if (scroll_forward && cursor_down &&
              -			strcmp(scroll_forward, cursor_down)) {
              -			for (j = 0; j < columns; j++)
              -				put_this(' ');
              -			put_ind();	/* test (ind) */
              -			ptext("(xenl) should be set. Ignores (ind)");
              -			go_home();
              -			put_newlines(5);
              -		}
              -		tty_set();
              -		ptextln("If you don't see text above telling you to set it, (xenl) should be false");
              -		sprintf(temp, "(xenl) Newline-glitch is %s in the data base",
              -			eat_newline_glitch ? "true" : "false");
              -		ptextln(temp);
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_eo(test_list, status, ch)
              -**
              -**	(eo) erase overstrike
              -*/
              -static void
              -subtest_eo(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (transparent_underline || over_strike || underline_char) {
              -		ptext("(eo) should ");
              -		if (underline_char) {
              -			ucprint("not");
              -		} else {
              -			uprint("not");
              -		}
              -		put_cr();
              -		ptextln("(eo) should     be set");
              -		sprintf(temp, "\n(eo) Erase-overstrike is %s in the data base",
              -			erase_overstrike ? "true" : "false");
              -		ptextln(temp);
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_xmc(test_list, status, ch)
              -**
              -**	(xmc) magic cookie glitch
              -*/
              -static void
              -subtest_xmc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (enter_standout_mode) {
              -		sprintf(temp, "\n(xmc) Magic-cookie-glitch is %d in the data base", magic_cookie_glitch);
              -		ptextln(temp);
              -		j = magic_cookie_glitch * 8;
              -		for (i = 0; i < j; i++) {
              -			put_str(" ");
              -		}
              -		ptextln("        These two lines should line up.");
              -		if (j > 0) {
              -			char_count += j;
              -		}
              -		for (i = 0; i < 4; i++) {
              -			put_mode(enter_standout_mode);
              -			putchp(' ');
              -			put_mode(exit_standout_mode);
              -			putchp(' ');
              -		}
              -		ptextln("These two lines should line up.");
              -		ptext("If they don't line up then (xmc) magic-cookie-glitch should be greater than zero.  ");
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_xhp(test_list, status, ch)
              -**
              -**	(xhp) erase does not clear standout mode
              -*/
              -static void
              -subtest_xhp(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (enter_standout_mode) {
              -		put_crlf();
              -		put_mode(enter_standout_mode);
              -		put_str("Stand out");
              -		put_mode(exit_standout_mode);
              -		put_cr();
              -		ptextln("If any part of this line is standout then (xhp) should be set.");
              -		sprintf(temp, "(xhp) Erase-standout-glitch is %s in the data base",
              -			ceol_standout_glitch ? "true" : "false");
              -		ptextln(temp);
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_mir(test_list, status, ch)
              -**
              -**	(mir) move in insert mode
              -*/
              -static void
              -subtest_mir(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -	char *s;
              -
              -	if (enter_insert_mode && exit_insert_mode && cursor_address) {
              -		put_clear();
              -		i = line_count;
              -		put_str("\nXXX\nXXX\nXXX\nXXX");
              -		tc_putp(enter_insert_mode);
              -		s = TPARM_2(cursor_address, i + 1, 0);
              -		tputs(s, lines, tc_putch);
              -		putchp('X');
              -		s = TPARM_2(cursor_address, i + 2, 1);
              -		tputs(s, lines, tc_putch);
              -		putchp('X');
              -		s = TPARM_2(cursor_address, i + 3, 2);
              -		tputs(s, lines, tc_putch);
              -		putchp('X');
              -		s = TPARM_2(cursor_address, i + 4, 3);
              -		tputs(s, lines, tc_putch);
              -		putchp('X');
              -		tc_putp(exit_insert_mode);
              -		put_newlines(2);
              -		ptextln("If you see a 4 by 4 block of X's then (mir) should be true.");
              -		sprintf(temp, "(mir) Move-in-insert-mode is %s in the data base",
              -			move_insert_mode ? "true" : "false");
              -		ptextln(temp);
              -	} else {
              -		ptext("(mir) Move-in-insert-mode not tested, ");
              -		if (!enter_insert_mode) {
              -			ptext("(smir) ");
              -		}
              -		if (!exit_insert_mode) {
              -			ptext("(rmir) ");
              -		}
              -		if (!cursor_address) {
              -			ptext("(cup) ");
              -		}
              -		ptext("not present.  ");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_msgr(test_list, status, ch)
              -**
              -**	(msgr) move in sgr mode
              -*/
              -static void
              -subtest_msgr(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (cursor_address &&
              -		((enter_standout_mode && exit_standout_mode) ||
              -		(enter_alt_charset_mode && exit_alt_charset_mode))) {
              -		put_crlf();
              -		i = line_count + 1;
              -		tputs(TPARM_2(cursor_address, i, 0), lines, tc_putch);
              -		put_mode(enter_alt_charset_mode);
              -		put_crlf();
              -		/*
              -		   some versions of the wy-120 can not clear lines or
              -		   screen when in alt charset mode.  If (el) and (ed)
              -		   are defined then I can test them.  If they are not
              -		   defined then they can not break (msgr)
              -		*/
              -		tc_putp(clr_eos);
              -		tc_putp(clr_eol);
              -		put_mode(exit_alt_charset_mode);
              -		put_mode(enter_standout_mode);
              -		putchp('X');
              -		tputs(TPARM_2(cursor_address, i + 2, 1), lines, tc_putch);
              -		putchp('X');
              -		tputs(TPARM_2(cursor_address, i + 3, 2), lines, tc_putch);
              -		putchp('X');
              -		tputs(TPARM_2(cursor_address, i + 4, 3), lines, tc_putch);
              -		putchp('X');
              -		put_mode(exit_standout_mode);
              -		put_crlf();
              -		tc_putp(clr_eos);	/* OK if missing */
              -		put_crlf();
              -		ptextln("If you see a diagonal line of standout X's then (msgr) should be true.  If any of the blanks are standout then (msgr) should be false.");
              -		sprintf(temp, "(msgr) Move-in-SGR-mode is %s in the data base",
              -			move_standout_mode ? "true" : "false");
              -		ptextln(temp);
              -	} else {
              -		ptextln("(smso) (rmso) (smacs) (rmacs) missing; (msgr) Move-in-SGR-mode not tested.");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	subtest_in(test_list, status, ch)
              -**
              -**	(in) insert null glitch
              -*/
              -static void
              -subtest_in(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (enter_insert_mode && exit_insert_mode) {
              -		ptextln("\nTesting (in) with (smir) and (rmir)");
              -		putln("\tIf these two lines line up ...");
              -		put_str("\tIf these two lines line up ...");
              -		put_cr();
              -		tc_putp(enter_insert_mode);
              -		putchp(' ');
              -		tc_putp(exit_insert_mode);
              -		ptext("\nthen (in) should be set.  ");
              -		sprintf(temp,
              -			"(in) Insert-null-glitch is %s in the data base.",
              -			insert_null_glitch ? "true" : "false");
              -		ptextln(temp);
              -		generic_done_message(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	subtest_dadb(test_list, status, ch)
              -**
              -**	(da) (db) data above, (db) data below
              -*/
              -static void
              -subtest_dadb(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (can_clear_screen && scroll_reverse && scroll_forward) {
              -		put_clear();
              -		if (scroll_reverse)
              -			ptext("(da) Data-above should be set\r");
              -		home_down();
              -		if (scroll_forward)
              -			ptext("(db) Data-below should be set\r");
              -		tc_putp(scroll_forward);
              -		go_home();
              -		tc_putp(scroll_reverse);
              -		tc_putp(scroll_reverse);
              -		home_down();
              -		tc_putp(scroll_forward);
              -		go_home();
              -		ptextln("\n\n\n\n\nIf the top line is blank then (da) should be false.");
              -		ptextln("If the bottom line is blank then (db) should be false.");
              -		sprintf(temp, "\n(da) Data-above is %s, and (db) Data-below is %s, in the data base.",
              -			memory_above ? "true" : "false",
              -			memory_below ? "true" : "false");
              -		ptextln(temp);
              -		line_count = lines;
              -	} else {
              -		ptextln("(da) Data-above, (db) Data-below not tested, scrolls or (clear) is missing.");
              -	}
              -	generic_done_message(t, state, ch);
              -}
              diff -Naur ncurses-5.6.orig/tack/modules ncurses-5.6/tack/modules
              --- ncurses-5.6.orig/tack/modules	2006-04-22 18:37:18.000000000 -0400
              +++ ncurses-5.6/tack/modules	1969-12-31 19:00:00.000000000 -0500
              @@ -1,45 +0,0 @@
              -##############################################################################
              -# Copyright (c) 1998-1999,2006 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"), #
              -# to deal in the Software without restriction, including without limitation  #
              -# the rights to use, copy, modify, merge, publish, distribute, distribute    #
              -# with modifications, sublicense, and/or sell copies of the Software, and to #
              -# permit persons to whom the Software is furnished to do so, subject to the  #
              -# following conditions:                                                      #
              -#                                                                            #
              -# The above copyright notice and this permission notice shall be included in #
              -# all copies or substantial portions of the Software.                        #
              -#                                                                            #
              -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
              -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
              -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
              -# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
              -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
              -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
              -# DEALINGS IN THE SOFTWARE.                                                  #
              -#                                                                            #
              -# Except as contained in this notice, the name(s) of the above copyright     #
              -# holders shall not be used in advertising or otherwise to promote the sale, #
              -# use or other dealings in this Software without prior written               #
              -# authorization.                                                             #
              -##############################################################################
              -# $Id: modules,v 1.5 2006/04/22 22:37:18 tom Exp $
              -@ base
              -ansi      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -charset   progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -color     progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -control   progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -crum      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -edit      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h $(INCDIR)/tic.h
              -fun       progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -init      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -menu      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -modes     progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -output    progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -pad       progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -scan      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -sync      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -sysdep    progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              -tack      progs   $(srcdir) $(srcdir)/tack.h ../include/term.h
              diff -Naur ncurses-5.6.orig/tack/output.c ncurses-5.6/tack/output.c
              --- ncurses-5.6.orig/tack/output.c	2006-11-25 19:16:49.000000000 -0500
              +++ ncurses-5.6/tack/output.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,818 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -/* screen formatting and I/O utility functions */
              -
              -#include 
              -#include 
              -
              -MODULE_ID("$Id: output.c,v 1.11 2006/11/26 00:16:49 tom Exp $")
              -
              -/* globals */
              -long char_sent;			/* number of characters sent */
              -int char_count;			/* counts characters */
              -int line_count;			/* counts line feeds */
              -int expand_chars;		/* length of expand() string */
              -int replace_mode;		/* used to output replace mode padding */
              -int can_go_home;		/* TRUE if we can fashion a home command */
              -int can_clear_screen;		/* TRUE if we can somehow clear the screen */
              -int raw_characters_sent;	/* Total output characters */
              -static int log_count;		/* Number of characters on a log line */
              -
              -/* translate mode default strings */
              -#define TM_carriage_return	TM_string[0].value
              -#define TM_cursor_down		TM_string[1].value
              -#define TM_scroll_forward	TM_string[2].value
              -#define TM_newline		TM_string[3].value
              -#define TM_cursor_left		TM_string[4].value
              -#define TM_bell			TM_string[5].value
              -#define TM_form_feed		TM_string[6].value
              -#define TM_tab			TM_string[7].value
              -
              -struct default_string_list TM_string[TM_last] = {
              -	{"cr", "\r", 0},
              -	{"cud1", "\n", 0},
              -	{"ind", "\n", 0},
              -	{"nel", "\r\n", 0},
              -	{"cub1", "\b", 0},
              -	{"bel", "\007", 0},
              -	{"ff", "\f", 0},
              -	{"ht", "\t", 0}
              -};
              -
              -static const char *c0[32] = {
              -	"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK",
              -	"BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI",
              -	"DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB",
              -	"CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US"
              -};
              -
              -static const char *c1[32] = {
              -	"", "", "", "", "IND", "NEL", "SSA", "ESA",
              -	"HTS", "HTJ", "VTS", "PLD", "PLU", "RI", "SS2", "SS3",
              -	"DCS", "PU1", "PU2", "STS", "CCH", "MW", "SPA", "EPA",
              -	"", "", "", "CSI", "ST", "OSC", "PM", "APC"
              -};
              -
              -int
              -getnext(int mask)
              -{				/* get the next character without scan mode
              -				   conversion */
              -	int ch;
              -	unsigned char buf;
              -
              -	tc_putp(req_for_input);
              -	fflush(stdout);
              -	if (nodelay_read)
              -		while (1) {
              -			ch = read(fileno(stdin), &buf, 1);
              -			if (ch == -1)
              -				return EOF;
              -			if (ch == 1)
              -				return buf;
              -		}
              -	ch = getchar();
              -	if (ch == EOF)
              -		return EOF;
              -	return ch & mask;
              -}
              -
              -
              -int
              -getchp(int mask)
              -{				/* read a character with scan mode conversion */
              -	if (scan_mode) {
              -		tc_putp(req_for_input);
              -		fflush(stdout);
              -		return scan_key();
              -	} else
              -		return getnext(mask);
              -}
              -
              -/*
              -**	tc_putch(c)
              -**
              -**	Output one character
              -*/
              -int
              -tc_putch(int c)
              -{
              -	char_sent++;
              -	raw_characters_sent++;
              -	putchar(c);
              -	if ((raw_characters_sent & 31) == 31) {
              -		fflush(stdout);
              -	}
              -	if (log_fp) {
              -		/* terminal output logging */
              -		c = UChar(c);
              -		if (c < 32) {
              -			fprintf(log_fp, "<%s>", c0[c]);
              -			log_count += 5;
              -		} else
              -		if (c < 127) {
              -			fprintf(log_fp, "%c", c);
              -			log_count += 1;
              -		} else {
              -			fprintf(log_fp, "<%02x>", c);
              -			log_count += 4;
              -		}
              -		if (c == '\n' || log_count >= 80) {
              -			fprintf(log_fp, "\n");
              -			log_count = 0;
              -		}
              -	}
              -	return (c);
              -}
              -
              -/*
              -**	tt_tputs(string, reps)
              -**
              -**	Output a string with tputs() translation.
              -**	Use this function inside timing tests.
              -*/
              -void
              -tt_tputs(const char *string, int reps)
              -{
              -	int i;
              -
              -	if (string) {
              -		for (i = 0; i < TT_MAX; i++) {
              -			if (i >= ttp) {
              -				tt_cap[i] = string;
              -				tt_affected[i] = reps;
              -				tt_count[i] = 1;
              -				tt_delay[i] = msec_cost(string, reps);
              -				ttp++;
              -				break;
              -			}
              -			if (string == tt_cap[i] && reps == tt_affected[i]) {
              -				tt_count[i]++;
              -				tt_delay_used += tt_delay[i];
              -				break;
              -			}
              -		}
              -		(void) tputs(string, reps, tc_putch);
              -	}
              -}
              -
              -/*
              -**	tt_putp(string)
              -**
              -**	Output a string with tputs() translation.
              -**	Use this function inside timing tests.
              -*/
              -void
              -tt_putp(const char *string)
              -{
              -	tt_tputs(string, 1);
              -}
              -
              -/*
              -**	tt_putparm(string, reps, arg1, arg2)
              -**
              -**	Send tt_tputs(tparm(string, args1, arg2), reps)
              -**	Use this function inside timing tests.
              -*/
              -void
              -tt_putparm(
              -	NCURSES_CONST char *string,
              -	int reps,
              -	int arg1,
              -	int arg2)
              -{
              -	int i;
              -
              -	if (string) {
              -		for (i = 0; i < TT_MAX; i++) {
              -			if (i >= ttp) {
              -				tt_cap[i] = string;
              -				tt_affected[i] = reps;
              -				tt_count[i] = 1;
              -				tt_delay[i] = msec_cost(string, reps);
              -				ttp++;
              -				break;
              -			}
              -			if (string == tt_cap[i] && reps == tt_affected[i]) {
              -				tt_count[i]++;
              -				tt_delay_used += tt_delay[i];
              -				break;
              -			}
              -		}
              -		(void) tputs(TPARM_2((NCURSES_CONST char *)string, arg1, arg2), reps, tc_putch);
              -	}
              -}
              -
              -/*
              -**	tc_putp(string)
              -**
              -**	Output a string with tputs() translation.
              -**	Use this function instead of putp() so we can track
              -**	the actual number of characters sent.
              -*/
              -int
              -tc_putp(const char *string)
              -{
              -	return tputs(string, 1, tc_putch);
              -}
              -
              -
              -void
              -put_this(int c)
              -{				/* output one character (with padding) */
              -	tc_putch(c);
              -	if (char_padding && replace_mode)
              -		tt_putp(char_padding);
              -}
              -
              -
              -void
              -put_cr(void)
              -{
              -	if (translate_mode && carriage_return) {
              -		tt_putp(carriage_return);
              -	} else {
              -		tt_putp(TM_carriage_return);
              -	}
              -	char_count = 0;
              -}
              -
              -
              -void
              -put_lf(void)
              -{				/* send a linefeed (only works in RAW or
              -				   CBREAK mode) */
              -	if (translate_mode && cursor_down) {
              -		tt_putp(cursor_down);
              -	} else {
              -		tt_putp(TM_cursor_down);
              -	}
              -	line_count++;
              -}
              -
              -
              -void
              -put_ind(void)
              -{				/* scroll forward (only works in RAW or
              -				   CBREAK mode) */
              -	if (translate_mode && scroll_forward) {
              -		tt_putp(scroll_forward);
              -	} else {
              -		tt_putp(TM_scroll_forward);
              -	}
              -	line_count++;
              -}
              -
              -/*
              -**	put_crlf()
              -**
              -**	Send (nel)  or  
              -*/
              -void
              -put_crlf(void)
              -{
              -	if (translate_mode && newline) {
              -		tt_putp(newline);
              -	} else {
              -		tt_putp(TM_newline);
              -	}
              -	char_count = 0;
              -	line_count++;
              -}
              -
              -/*
              -**	put_new_lines(count)
              -**
              -**	Send a number of newlines. (nel)
              -*/
              -void
              -put_newlines(int n)
              -{
              -	while (n-- > 0) {
              -		put_crlf();
              -	}
              -}
              -
              -/*
              -**	putchp(character)
              -**
              -**	Send one character to the terminal.
              -**	This function does translation of control characters.
              -*/
              -void
              -putchp(int c)
              -{
              -	switch (c) {
              -	case '\b':
              -		if (translate_mode && cursor_left) {
              -			tt_putp(cursor_left);
              -		} else {
              -			tt_putp(TM_cursor_left);
              -		}
              -		char_count--;
              -		break;
              -	case 7:
              -		if (translate_mode && bell) {
              -			tt_putp(bell);
              -		} else {
              -			tt_putp(TM_bell);
              -		}
              -		break;
              -	case '\f':
              -		if (translate_mode && form_feed) {
              -			tt_putp(form_feed);
              -		} else {
              -			tt_putp(TM_form_feed);
              -		}
              -		char_count = 0;
              -		line_count++;
              -		break;
              -	case '\n':
              -		put_crlf();
              -		break;
              -	case '\r':
              -		put_cr();
              -		break;
              -	case '\t':
              -		if (translate_mode && tab) {
              -			tt_putp(tab);
              -		} else {
              -			tt_putp(TM_tab);
              -		}
              -		char_count = ((char_count / 8) + 1) * 8;
              -		break;
              -	default:
              -		put_this(c);
              -		char_count++;
              -		break;
              -	}
              -}
              -
              -
              -void
              -put_str(const char *s)
              -{				/* send the string to the terminal */
              -	for (; *s; putchp(*s++));
              -}
              -
              -
              -void
              -putln(const char *s)
              -{				/* output a string followed by a CR LF */
              -	for (; *s; putchp(*s++));
              -	put_crlf();
              -}
              -
              -
              -void
              -put_columns(const char *s, int len, int w)
              -{				/* put out s in column format */
              -	int l;
              -
              -	if (char_count + w > columns) {
              -		put_crlf();
              -	}
              -	l = char_count % w;
              -	if (l) {
              -		while (l < w) {
              -			putchp(' ');
              -			l++;
              -		}
              -	}
              -	if (char_count && char_count + len >= columns) {
              -		put_crlf();
              -	}
              -	l = char_count;
              -	put_str(s);
              -	char_count = l + len;
              -}
              -
              -
              -/*
              -**	ptext(string)
              -**
              -**	Output a string but do not assume the terminal will wrap to a
              -**	new line.  Break the line at a word boundary then send a CR LF.
              -**	This is more esthetic on 40 column terminals.
              -*/
              -void
              -ptext(const char *s)
              -{
              -	const char *t;
              -
              -	while (*s) {
              -		for (t = s + 1; *t > ' '; t++);
              -		if ((char_count != 0) && ((t - s) + char_count >= columns)) {
              -			put_crlf();
              -			while (*s == ' ')
              -				s++;
              -		}
              -		while (s < t) {
              -			putchp(*s++);
              -		}
              -	}
              -}
              -
              -
              -void
              -put_dec(char *f, int i)
              -{				/* print a line with a decimal number in it */
              -	char tm[128];
              -
              -	sprintf(tm, f, i / 10, i % 10);
              -	ptext(tm);
              -}
              -
              -
              -void
              -three_digit(char *tx, int i)
              -{				/* convert the decimal number to a string of
              -				   at least 3 digits */
              -	if (i < 1000)
              -		sprintf(tx, "%d.%d", i / 10, i % 10);
              -	else
              -		sprintf(tx, "%d", i / 10);
              -}
              -
              -
              -void
              -ptextln(const char *s)
              -{				/* print the text using ptext() then add a CR
              -				   LF */
              -	ptext(s);
              -	put_crlf();
              -}
              -
              -
              -static void
              -expand_one(int ch, char **v)
              -{				/* expand one character */
              -	char *t = *v;
              -
              -	if (ch & 0x80) {	/* dump it in octal (yuck) */
              -		*t++ = '\\';
              -		*t++ = '0' + ((ch >> 6) & 3);
              -		*t++ = '0' + ((ch >> 3) & 7);
              -		*t++ = '0' + (ch & 7);
              -		expand_chars += 4;
              -	} else if (ch == 127) {	/* DEL */
              -		*t++ = '^';
              -		*t++ = '?';
              -		expand_chars += 2;
              -	} else if (ch >= ' ') {
              -		*t++ = ch;
              -		expand_chars++;
              -	} else {	/* control characters */
              -		*t++ = '^';
              -		*t++ = ch + '@';
              -		expand_chars += 2;
              -	}
              -	*v = t;
              -}
              -
              -
              -char *
              -expand(const char *s)
              -{				/* convert the string to printable form */
              -	static char buf[4096];
              -	char *t, *v;
              -	int ch;
              -
              -	if (magic_cookie_glitch <= 0 && exit_attribute_mode) {
              -		v = enter_reverse_mode;
              -	} else {
              -		v = NULL;
              -	}
              -	expand_chars = 0;
              -	t = buf;
              -	if (s) {
              -		for (; (ch = *s); s++) {
              -			if ((ch & 0x80) && v) {	/* print it in reverse video
              -						   mode */
              -				strcpy(t, liberated(TPARM_0(v)));
              -				for (; *t; t++);
              -				expand_one(ch & 0x7f, &t);
              -				strcpy(t, liberated(TPARM_0(exit_attribute_mode)));
              -				for (; *t; t++);
              -			} else {
              -				expand_one(ch, &t);
              -			}
              -		}
              -	}
              -	*t = '\0';
              -	return buf;
              -}
              -
              -
              -char *
              -print_expand(char *s)
              -{				/* convert the string to 7-bit printable form */
              -	static char buf[4096];
              -	char *t;
              -	int ch;
              -
              -	expand_chars = 0;
              -	t = buf;
              -	if (s) {
              -		for (; (ch = *s); s++) {
              -			expand_one(ch, &t);
              -		}
              -	}
              -	*t = '\0';
              -	return buf;
              -}
              -
              -
              -char *
              -expand_to(char *s, int l)
              -{				/* expand s to length l */
              -	char *t;
              -
              -	for (s = t = expand(s); *t; t++);
              -	for (; expand_chars < l; expand_chars++) {
              -		*t++ = ' ';
              -	}
              -	*t = '\0';
              -	return s;
              -}
              -
              -
              -char *
              -hex_expand_to(char *s, int l)
              -{				/* expand s to length l in hex */
              -	static char buf[4096];
              -	char *t;
              -
              -	for (t = buf; *s; s++) {
              -		sprintf(t, "%02X ", UChar(*s));
              -		t += 3;
              -		if (t - buf > (int) sizeof(buf) - 4) {
              -			break;
              -		}
              -	}
              -	for (; t - buf < l;) {
              -		*t++ = ' ';
              -	}
              -	*t = '\0';
              -	expand_chars = t - buf;
              -	return buf;
              -}
              -
              -
              -char *
              -expand_command(const char *c)
              -{				/* expand an ANSI escape sequence */
              -	static char buf[256];
              -	int i, j, ch;
              -	char *s;
              -
              -	s = buf;
              -	for (i = FALSE; (ch = UChar(*c)) != 0; c++) {
              -		if (i) {
              -			*s++ = ' ';
              -		}
              -		i = TRUE;
              -		if (ch < 32) {
              -			j = UChar(c[1]);
              -			if (ch == '\033' && j >= '@' && j <= '_') {
              -				ch = j - '@';
              -				c++;
              -				for (j = 0; (*s = c1[ch][j++]); s++);
              -			} else
              -				for (j = 0; (*s = c0[ch][j++]); s++);
              -		} else {
              -			*s++ = ch;
              -			j = UChar(c[1]);
              -			if (ch >= '0' && ch <= '9' &&
              -				j >= '0' && j <= '9') {
              -				i = FALSE;
              -			}
              -		}
              -	}
              -	*s = '\0';
              -	return buf;
              -}
              -
              -/*
              -**	go_home()
              -**
              -**	Move the cursor to the home position
              -*/
              -void
              -go_home(void)
              -{
              -	int i;
              -
              -	if (cursor_home)
              -		tt_putp(cursor_home);
              -	else if (cursor_address)
              -		tt_putparm(cursor_address, lines, 0, 0);
              -	else if (row_address) {	/* use (vpa) */
              -		put_cr();
              -		tt_putparm(row_address, 1, 0, 0);
              -	} else if (cursor_up && cursor_to_ll) {
              -		tt_putp(cursor_to_ll);
              -		for (i = 1; i < lines; i++) {
              -			tt_putp(cursor_up);
              -		}
              -	} else {
              -		can_go_home = FALSE;
              -		return;
              -	}
              -	char_count = line_count = 0;
              -	can_go_home = TRUE;
              -}
              -
              -
              -void
              -home_down(void)
              -{				/* move the cursor to the lower left hand
              -				   corner */
              -	int i;
              -
              -	if (cursor_to_ll)
              -		tt_putp(cursor_to_ll);
              -	else if (cursor_address)
              -		tt_putparm(cursor_address, lines, lines - 1, 0);
              -	else if (row_address) {	/* use (vpa) */
              -		put_cr();
              -		tt_putparm(row_address, 1, lines - 1, 0);
              -	} else if (cursor_down && cursor_home) {
              -		tt_putp(cursor_home);
              -		for (i = 1; i < lines; i++)
              -			tt_putp(cursor_down);
              -	} else
              -		return;
              -	char_count = 0;
              -	line_count = lines - 1;
              -}
              -
              -
              -void
              -put_clear(void)
              -{				/* clear the screen */
              -	int i;
              -
              -	if (clear_screen)
              -		tt_tputs(clear_screen, lines);
              -	else if (clr_eos && can_go_home) {
              -		go_home();
              -		tt_tputs(clr_eos, lines);
              -	} else if (scroll_forward && !over_strike && (can_go_home || cursor_up)) {
              -		/* clear the screen by scrolling */
              -		put_cr();
              -		if (cursor_to_ll) {
              -			tt_putp(cursor_to_ll);
              -		} else if (cursor_address) {
              -			tt_putparm(cursor_address, lines, lines - 1, 0);
              -		} else if (row_address) {
              -			tt_putparm(row_address, 1, lines - 1, 0);
              -		} else {
              -			for (i = 1; i < lines; i++) {
              -				tt_putp(scroll_forward);
              -			}
              -		}
              -		for (i = 1; i < lines; i++) {
              -			tt_putp(scroll_forward);
              -		}
              -		if (can_go_home) {
              -			go_home();
              -		} else {
              -			for (i = 1; i < lines; i++) {
              -				tt_putp(cursor_up);
              -			}
              -		}
              -	} else {
              -		can_clear_screen = FALSE;
              -		return;
              -	}
              -	char_count = line_count = 0;
              -	can_clear_screen = TRUE;
              -}
              -
              -/*
              -**	wait_here()
              -**
              -**	read one character from the input stream
              -**	If the terminal is not in RAW mode then this function will
              -**	wait for a  or .
              -*/
              -int
              -wait_here(void)
              -{
              -	char ch, cc[64];
              -	char message[16];
              -	int i, j;
              -
              -	for (i = 0; i < (int) sizeof(cc); i++) {
              -		cc[i] = ch = getchp(STRIP_PARITY);
              -		if (ch == '\r' || ch == '\n') {
              -			put_crlf();
              -			char_sent = 0;
              -			return cc[i ? i - 1 : 0];
              -		}
              -		if (ch >= ' ') {
              -			if (stty_query(TTY_CHAR_MODE)) {
              -				put_crlf();
              -				char_sent = 0;
              -				return ch;
              -			}
              -			continue;
              -		}
              -		if (ch == 023) {	/* Control S */
              -			/* ignore control S, but tell me about it */
              -			while (ch == 023 || ch == 021) {
              -				ch = getchp(STRIP_PARITY);
              -				if (i < (int) sizeof(cc))
              -					cc[++i] = ch;
              -			}
              -			put_str("\nThe terminal sent a ^S -");
              -			for (j = 0; j <= i; j++) {
              -				sprintf(message, " %02X", cc[j] & 0xFF);
              -				put_str(message);
              -			}
              -			put_crlf();
              -			i = -1;
              -		} else if (ch != 021) {	/* Not Control Q */
              -			/* could be abort character */
              -			spin_flush();
              -			if (tty_can_sync == SYNC_TESTED) {
              -				(void) tty_sync_error();
              -			} else {
              -				put_str("\n? ");
              -			}
              -		}
              -	}
              -	return '?';
              -}
              -
              -
              -/*
              -**	read_string(buffer, length)
              -**
              -**	Read a string of characters from the input stream.
              -*/
              -void
              -read_string(
              -	char *buf,
              -	int length)
              -{
              -	int ch, i;
              -
              -	for (i = 0; i < length - 1; ) {
              -		ch = getchp(STRIP_PARITY);
              -		if (ch == '\r' || ch == '\n') {
              -			break;
              -		}
              -		if (ch == '\b' || ch == 127) {
              -			if (i) {
              -				putchp('\b');
              -				putchp(' ');
              -				putchp('\b');
              -				i--;
              -			}
              -		} else {
              -			buf[i++] = ch;
              -			putchp(ch);
              -		}
              -	}
              -	buf[i] = '\0';
              -	put_crlf();
              -	char_sent = 0;
              -}
              -
              -/*
              -**	maybe_wait(lines)
              -**
              -**	wait if near the end of the screen, then clear screen
              -*/
              -void 
              -maybe_wait(int n)
              -{
              -	if (line_count + n >= lines) {
              -		if (char_sent != 0) {
              -			ptext("Go? ");
              -			(void) wait_here();
              -		}
              -		put_clear();
              -	} else {
              -		put_crlf();
              -	}
              -}
              diff -Naur ncurses-5.6.orig/tack/pad.c ncurses-5.6/tack/pad.c
              --- ncurses-5.6.orig/tack/pad.c	2005-09-17 15:49:16.000000000 -0400
              +++ ncurses-5.6/tack/pad.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,1958 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: pad.c,v 1.6 2005/09/17 19:49:16 tom Exp $")
              -
              -/* test the pad counts on the terminal */
              -
              -static void pad_standard(struct test_list *, int *, int *);
              -static void init_xon_xoff(struct test_list *, int *, int *);
              -static void init_cup(struct test_list *, int *, int *);
              -static void pad_rmxon(struct test_list *, int *, int *);
              -static void pad_home1(struct test_list *, int *, int *);
              -static void pad_home2(struct test_list *, int *, int *);
              -static void pad_clear(struct test_list *, int *, int *);
              -static void pad_ech(struct test_list *, int *, int *);
              -static void pad_el1(struct test_list *, int *, int *);
              -static void pad_el(struct test_list *, int *, int *);
              -static void pad_smdc(struct test_list *, int *, int *);
              -static void pad_dch(struct test_list *, int *, int *);
              -static void pad_dch1(struct test_list *, int *, int *);
              -static void pad_smir(struct test_list *, int *, int *);
              -static void pad_ich(struct test_list *, int *, int *);
              -static void pad_ich1(struct test_list *, int *, int *);
              -static void pad_xch1(struct test_list *, int *, int *);
              -static void pad_rep(struct test_list *, int *, int *);
              -static void pad_cup(struct test_list *, int *, int *);
              -static void pad_hd(struct test_list *, int *, int *);
              -static void pad_hu(struct test_list *, int *, int *);
              -static void pad_rin(struct test_list *, int *, int *);
              -static void pad_il(struct test_list *, int *, int *);
              -static void pad_indn(struct test_list *, int *, int *);
              -static void pad_dl(struct test_list *, int *, int *);
              -static void pad_xl(struct test_list *, int *, int *);
              -static void pad_scrc(struct test_list *, int *, int *);
              -static void pad_csrind(struct test_list *, int *, int *);
              -static void pad_sccsrrc(struct test_list *, int *, int *);
              -static void pad_csr_nel(struct test_list *, int *, int *);
              -static void pad_csr_cup(struct test_list *, int *, int *);
              -static void pad_ht(struct test_list *, int *, int *);
              -static void pad_smso(struct test_list *, int *, int *);
              -static void pad_smacs(struct test_list *, int *, int *);
              -static void pad_crash(struct test_list *, int *, int *);
              -
              -/*
              -   Any command found in this list, executed from a "Done" prompt
              -   will force the default action to repeat rather than next.
              -*/
              -const char *pad_repeat_test = {"ep-+<>"};
              -
              -struct test_list pad_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{0, 0, 0, 0, "p) change padding", 0, &change_pad_menu},
              -	{0, 0, 0, 0, "@) display statistics about the last test", dump_test_stats, 0},
              -	{0, 0, 0, 0, "c) clear screen", menu_clear_screen, 0},
              -	{0, 0, 0, 0, "i) send reset and init", menu_reset_init, 0},
              -	{0, 0, 0, 0, txt_longer_test_time, longer_test_time, 0},
              -	{0, 0, 0, 0, txt_shorter_test_time, shorter_test_time, 0},
              -	{0, 0, 0, 0, txt_longer_augment, longer_augment, 0},
              -	{0, 0, 0, 0, txt_shorter_augment, shorter_augment, 0},
              -	/***
              -	   Phase 1: Test initialization and reset strings.
              -	
              -	   (rs1) (rs2) (rs3) (is1) (is2) (is3) are very difficult to test.
              -	   They have no defined output.  To make matters worse, the cap
              -	   builder could partition (rs1) (rs2) (rs3) by length, leaving the
              -	   terminal in some unknown state between (rs1) and (rs2) or between
              -	   (r2) and (rs3).  Some reset strings clear the screen when done.
              -	
              -	   We have no control over this.  The only thing we can do for
              -	   certain is to test the pad times by checking for overruns.
              -	***/
              -	{MENU_NEXT, 3, "rs1", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "rs2", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "rs3", 0, 0, pad_standard, 0},
              -	{MENU_NEXT | MENU_INIT, 0, 0, 0, 0, init_xon_xoff, 0},
              -	{MENU_NEXT, 3, "is1", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "is2", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "is3", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "rmxon", "smxon", 0, pad_rmxon, 0},
              -	{MENU_NEXT | MENU_INIT, 0, 0, 0, 0, init_cup, 0},
              -	/*
              -	   Phase 2: Test home, screen clears and erases.
              -	*/
              -	{MENU_NEXT, 0, "home", 0, 0, pad_home1, 0},
              -	{MENU_NEXT, 0, "home) (nel", 0, 0, pad_home2, 0},
              -	{MENU_NEXT | 1, 0, "clear", 0, 0, pad_clear, 0},
              -	{MENU_NEXT | MENU_LM1, 0, "ed", 0, 0, pad_clear, 0},
              -	{MENU_NEXT | MENU_80c, 0, "ech", 0, 0, pad_ech, 0},
              -	{MENU_NEXT | MENU_80c, 0, "el1", "cub1 nel", 0, pad_el1, 0},
              -	{MENU_NEXT | MENU_10c, 0, "el", "nel", 0, pad_el, 0},
              -	/*
              -	   Phase 3: Character deletions and insertions
              -	*/
              -	{MENU_NEXT, 0, "smdc) (rmdc", 0, 0, pad_smdc, 0},
              -	{MENU_NEXT | MENU_80c, 0, "dch", "smdc rmdc", 0, pad_dch, 0},
              -	{MENU_NEXT | MENU_80c, 0, "dch1", "smdc rmdc", 0, pad_dch1, 0},
              -	{MENU_NEXT, 0, "smir) (rmir", 0, 0, pad_smir, 0},
              -	{MENU_NEXT | MENU_90c, 0, "ich) (ip", "smir rmir", 0, pad_ich, 0},
              -	{MENU_NEXT | MENU_90c, 0, "ich1) (ip", "smir rmir", 0, pad_ich1, 0},
              -	{MENU_NEXT, 4, "ich1) (dch1", "smir rmir", 0, pad_xch1, 0},
              -	{MENU_NEXT | MENU_90c, 0, "rep", 0, 0, pad_rep, 0},
              -	/*
              -	   Phase 4: Test cursor addressing pads.
              -	*/
              -	{MENU_NEXT, 0, "cup", 0, 0, pad_cup, 0},
              -	/*
              -	   Phase 5: Test scrolling and cursor save/restore.
              -	*/
              -	{MENU_NEXT, 0, "hd", 0, 0, pad_hd, 0},
              -	{MENU_NEXT, 0, "hu", 0, 0, pad_hu, 0},
              -	{MENU_NEXT | MENU_LM1 | 1, 0, "rin", 0, 0, pad_rin, 0},
              -	{MENU_NEXT, 0, "ri", 0, 0, pad_rin, 0},
              -	{MENU_NEXT | MENU_LM1 | 1, 0, "il", 0, 0, pad_il, 0},
              -	{MENU_NEXT, 0, "il1", 0, 0, pad_il, 0},
              -	{MENU_NEXT | MENU_LM1 | 1, 0, "indn", 0, 0, pad_indn, 0},
              -	{MENU_NEXT, 0, "ind", 0, 0, pad_indn, 0},
              -	{MENU_NEXT | MENU_LM1 | 1, 0, "dl", 0, 0, pad_dl, 0},
              -	{MENU_NEXT, 0, "dl1", 0, 0, pad_dl, 0},
              -	{MENU_NEXT, 0, "il1) (dl1", 0, 0, pad_xl, 0},
              -	{MENU_NEXT, 0, "sc) (rc", 0, 0, pad_scrc, 0},
              -	{MENU_NEXT | MENU_50l, 0, "csr) (ind", 0, 0, pad_csrind, 0},
              -	{MENU_NEXT, 0, "sc) (csr) (rc", 0, 0, pad_sccsrrc, 0},
              -	{MENU_NEXT, 0, "csr) (nel", "sc rc", 0, pad_csr_nel, 0},
              -	{MENU_NEXT, 0, "csr) (cup", 0, 0, pad_csr_cup, 0},
              -	/*
              -	   Phase 6: Test tabs.
              -	*/
              -	{MENU_NEXT, 0, "ht", 0, 0, pad_ht, 0},
              -	/*
              -	   Phase 7: Test character-set-switch pads.
              -	*/
              -	{MENU_NEXT, 0, "smso) (rmso", 0, 0, pad_smso, 0},
              -	{MENU_NEXT, 0, "smacs) (rmacs", 0, 0, pad_smacs, 0},
              -	/*
              -	   Phase 8: Tests for miscellaneous mode-switch pads.
              -	*/
              -	{MENU_NEXT, 3, "flash", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "smkx", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "rmkx", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "smm", 0, 0, pad_standard, 0},
              -	{MENU_NEXT, 3, "rmm", 0, 0, pad_standard, 0},
              -	/*
              -	   Phase 9: Test crash-and-burn properties of unpadded (clear).
              -	*/
              -	{0, 0, "clear", "xon", "k) run clear test with no padding", pad_crash, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -/* globals */
              -static int hzcc;		/* horizontal character count */
              -char letter;			/* current character being displayed */
              -int letter_number;		/* points into letters[] */
              -int augment, repeats;		/* number of characters (or lines) effected */
              -char letters[] = "AbCdefghiJklmNopQrStuVwXyZ";
              -
              -static char every_line[] = "This text should be on every line.";
              -static char all_lines[] = "Each char on any line should be the same.  ";
              -static char above_line[] = "The above lines should be all Xs.  ";
              -static char no_visual[] = "This loop test has no visual failure indicator.  ";
              -
              -/*
              -**	pad_standard(test_list, status, ch)
              -**
              -**	Run a single cap pad test.
              -*/
              -static void
              -pad_standard(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	const char *long_name;
              -	char *cap;
              -	int l = 2, i;
              -	char tbuf[128];
              -
              -	if ((cap = get_string_cap_byname(t->caps_done, &long_name))) {
              -		sprintf(tbuf, "(%s) %s, start testing", t->caps_done,
              -			long_name);
              -		if (skip_pad_test(t, state, ch, tbuf)) {
              -			return;
              -		}
              -		i = 1;
              -		pad_test_startup(1);
              -		do {
              -			if (i >= columns) {
              -				page_loop();
              -				l++;
              -				i = 1;
              -			}
              -			tt_putp(cap);
              -			putchp(letter);
              -			i++;
              -		} while(still_testing());
              -		pad_test_shutdown(t, 0);
              -		if (l >= lines) {
              -			home_down();
              -		} else {
              -			put_crlf();
              -		}
              -		ptextln(no_visual);
              -	} else {
              -		CAP_NOT_FOUND;
              -		/* Note: get_string_cap_byname() always sets long_name */
              -		sprintf(temp, "(%s) %s, not present.  ", t->caps_done,
              -			long_name);
              -		ptext(temp);
              -	}
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	init_xon_xoff(test_list, status, ch)
              -**
              -**	Initialize the xon_xoff values
              -*/
              -static void
              -init_xon_xoff(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	/* the reset strings may dink with the XON/XOFF modes */
              -	if (select_xon_xoff == 0 && exit_xon_mode) {
              -		tc_putp(exit_xon_mode);
              -	}
              -	if (select_xon_xoff == 1 && enter_xon_mode) {
              -		tc_putp(enter_xon_mode);
              -	}
              -}
              -
              -/*
              -**	pad_rmxon(test_list, status, ch)
              -**
              -**	Test (rmxon) exit XON/XOFF mode
              -*/
              -static void
              -pad_rmxon(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (select_xon_xoff == 0 && exit_xon_mode) {
              -		pad_standard(t, state, ch);
              -	}
              -}
              -
              -/*
              -**	init_cup(test_list, status, ch)
              -**
              -**	Send the initialization strings for XON/XOFF and (smcup)
              -**	Stop pad testing if clear screen is missing.
              -*/
              -static void
              -init_cup(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	init_xon_xoff(t, state, ch);
              -	if (enter_ca_mode) {
              -		tc_putp(enter_ca_mode);
              -	}
              -	if (!can_clear_screen) {
              -		ptext("(clear) clear screen not present,");
              -		ptext(" pad processing terminated.  ");
              -		pad_done_message(t, state, ch);
              -		if (*ch == 0 || *ch == 'n' || *ch == 's' || *ch == 'r') {
              -			*ch = '?';
              -		}
              -		return;
              -	}
              -}
              -
              -/*
              -**	pad_home1(test_list, status, ch)
              -**
              -**	Test (home) when (am) is set.
              -*/
              -static void
              -pad_home1(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int j, k;
              -
              -	if (can_go_home && auto_right_margin) {
              -		/*
              -		   truly brain damaged terminals will fail this test because
              -		   they cannot accept data at full rate
              -		*/
              -		if (skip_pad_test(t, state, ch, "(home) Home start testing")) {
              -			return;
              -		}
              -		pad_test_startup(1);
              -		do {
              -			go_home();
              -			for (j = 1; j < lines; j++) {
              -				for (k = 0; k < columns; k++) {
              -					if (k & 0xF) {
              -						put_this(letter);
              -					} else {
              -						put_this('.');
              -					}
              -				}
              -				SLOW_TERMINAL_EXIT;
              -			}
              -			NEXT_LETTER;
              -		} while(still_testing());
              -		pad_test_shutdown(t, 0);
              -		ptext("All the dots should line up.  ");
              -		pad_done_message(t, state, ch);
              -		put_clear();
              -	}
              -}
              -
              -/*
              -**	pad_home2(test_list, status, ch)
              -**
              -**	Test (home) and (nel).  (am) is reset.
              -*/
              -static void
              -pad_home2(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int j, k;
              -
              -	if (can_go_home) {
              -		if (skip_pad_test(t, state, ch,
              -			"(home) Home, (nel) newline start testing")) {
              -			return;
              -		}
              -		pad_test_startup(1);
              -		do {
              -			go_home();
              -			for (j = 1; j < lines; j++) {
              -				for (k = 2; k < columns; k++) {
              -					if (k & 0xF) {
              -						put_this(letter);
              -					} else {
              -						put_this('.');
              -					}
              -				}
              -				put_crlf();	/* this does the (nel) */
              -				SLOW_TERMINAL_EXIT;
              -			}
              -			NEXT_LETTER;
              -		} while(still_testing());
              -		pad_test_shutdown(t, 0);
              -		ptext("All the dots should line up.  ");
              -		pad_done_message(t, state, ch);
              -		put_clear();
              -	}
              -}
              -
              -/*
              -**	pad_clear(test_list, status, ch)
              -**
              -**	Test (clear) and (ed)
              -**	run the clear screen tests (also clear-to-end-of-screen)
              -**
              -**	0) full page
              -**	1) sparse page
              -**	2) short lines
              -**	3) one full line
              -**	4) one short line
              -*/
              -static void
              -pad_clear(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	const char *end_message = 0;
              -	const char *txt;
              -	int j, k, is_clear;
              -	int clear_select;		/* select the test number */
              -
              -	is_clear = t->flags & 1;
              -	clear_select = auto_right_margin ? 0 : 1;
              -	if (is_clear) {
              -		txt = "(clear) clear-screen start testing";
              -	} else {
              -		if (!clr_eos) {
              -			CAP_NOT_FOUND;
              -			ptext("(ed) erase-to-end-of-display, not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		txt = "(ed) erase-to-end-of-display start testing";
              -	}
              -	if (skip_pad_test(t, state, ch, txt)) {
              -		return;
              -	}
              -	if (enter_am_mode) {
              -		tc_putp(enter_am_mode);
              -		clear_select = 0;
              -	}
              -	for (; clear_select < 5; clear_select++) {
              -		if (augment > lines || is_clear || !cursor_address) {
              -			augment = lines;
              -		} else {
              -			if (augment <= 1) {
              -				augment = 2;
              -			}
              -			if (augment < lines) {
              -				put_clear();
              -				tt_putparm(cursor_address, 1,
              -					lines - augment - 1, 0);
              -				ptextln("This line should not be erased (ed)");
              -			}
              -		}
              -		repeats = augment;
              -		switch (clear_select) {
              -		case 0:
              -			end_message = "Clear full screen.  ";
              -			break;
              -		case 1:
              -			end_message = "Clear sparse screen.  ";
              -			if (cursor_down) {
              -				break;
              -			}
              -			clear_select++;
              -			/* FALLTHRU */
              -		case 2:
              -			end_message = "Clear one character per line.  ";
              -			if (newline) {
              -				break;
              -			}
              -			clear_select++;
              -			/* FALLTHRU */
              -		case 3:
              -			end_message = "Clear one full line.  ";
              -			break;
              -		case 4:
              -			end_message = "Clear single short line.  ";
              -			break;
              -		}
              -		pad_test_startup(0);
              -		do {
              -			switch (clear_select) {
              -			case 0:	/* full screen test */
              -				for (j = 1; j < repeats; j++) {
              -					for (k = 0; k < columns; k++) {
              -						if (k & 0xF) {
              -							put_this(letter);
              -						} else {
              -							put_this('.');
              -						}
              -					}
              -					SLOW_TERMINAL_EXIT;
              -				}
              -				break;
              -			case 1:	/* sparse screen test */
              -				for (j = columns - repeats; j > 2; j--) {
              -					put_this(letter);
              -				}
              -				for (j = 2; j < repeats; j++) {
              -					tt_putp(cursor_down);
              -					put_this(letter);
              -				}
              -				break;
              -			case 2:	/* short lines */
              -				for (j = 2; j < repeats; j++) {
              -					put_this(letter);
              -					tt_putp(newline);
              -				}
              -				put_this(letter);
              -				break;
              -			case 3:	/* one full line */
              -				for (j = columns - 5; j > 1; j--) {
              -					put_this(letter);
              -				}
              -				break;
              -			case 4:	/* one short line */
              -				put_str("Erase this!");
              -				break;
              -			}
              -			if (is_clear) {
              -				put_clear();
              -			} else {
              -				if (augment == lines) {
              -					go_home();
              -				} else {
              -					tt_putparm(cursor_address, 1,
              -						lines - repeats, 0);
              -				}
              -				tt_tputs(clr_eos, repeats);
              -			}
              -			NEXT_LETTER;
              -		} while(still_testing());
              -		pad_test_shutdown(t, 1);
              -		ptext(end_message);
              -
              -		pad_done_message(t, state, ch);
              -
              -		if (*ch != 0 && *ch != 'n') {
              -			return;
              -		}
              -	}
              -}
              -
              -/*
              -**	pad_ech(test_list, status, ch)
              -**
              -**	Test (ech) erase characters
              -*/
              -static void
              -pad_ech(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!erase_chars) {
              -		CAP_NOT_FOUND;
              -		ptext("(ech) Erase-characters, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(ech) Erase-characters start testing")) {
              -		return;
              -	}
              -	if (augment > columns - 2) {
              -		augment = columns - 2;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			for (j = 0; j <= repeats; j++) {
              -				putchp(letter);
              -			}
              -			put_cr();
              -			tt_putparm(erase_chars, repeats, repeats, 0);
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		for (i = 1; i <= repeats; i++) {
              -			putchp(' ');
              -		}
              -		putchp(letter);
              -		put_crlf();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_el1(test_list, status, ch)
              -**
              -**	Test (el1) erase to start of line also (cub1) and (nel)
              -*/
              -static void
              -pad_el1(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!clr_bol) {
              -		CAP_NOT_FOUND;
              -		ptext("(el1) Erase-to-beginning-of-line, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(el1) Erase-to-beginning-of-line start testing")) {
              -		return;
              -	}
              -	if (augment > columns - 2) {
              -		augment = columns - 2;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			for (j = 0; j <= repeats; j++) {
              -				putchp(letter);
              -			}
              -			tt_putp(cursor_left);
              -			tt_putp(cursor_left);
              -			tt_tputs(clr_bol, repeats);
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		for (i = 1; i <= repeats; i++) {
              -			putchp(' ');
              -		}
              -		putchp(letter);
              -		put_crlf();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_el(test_list, status, ch)
              -**
              -**	Test (el) clear to end of line also (nel)
              -*/
              -static void
              -pad_el(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!clr_eol) {
              -		CAP_NOT_FOUND;
              -		ptext("(el) Clear-to-end-of-line, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(el) Clear-to-end-of-line start testing")) {
              -		return;
              -	}
              -	hzcc = columns * 8 / 10;	/* horizontal character count */
              -	if (augment > hzcc) {
              -		augment = hzcc;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			for (j = -1; j < augment; j++) {
              -				putchp(letter);
              -			}
              -			put_cr();
              -			putchp(letter);
              -			tt_putp(clr_eol);
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		putchp(letter);
              -		put_crlf();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_smdc(test_list, status, ch)
              -**
              -**	Test (smdc) (rmdc) Delete mode
              -*/
              -static void
              -pad_smdc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (!enter_delete_mode) {
              -		CAP_NOT_FOUND;
              -		ptext("(smdc) Enter-delete-mode");
              -		if (!exit_delete_mode) {
              -			ptext(", (rmdc) Exit-delete-mode");
              -		}
              -		ptext(", not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(smdc) (rmdc) Enter/Exit-delete-mode start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		page_loop();
              -		for (i = 1; i < columns; i++) {
              -			tt_putp(enter_delete_mode);
              -			tt_putp(exit_delete_mode);
              -			putchp(letter);
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext(no_visual);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_dch(test_list, status, ch)
              -**
              -**	Test (smdc) (rmdc) Delete mode and (dch)
              -*/
              -static void
              -pad_dch(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!parm_dch) {
              -		CAP_NOT_FOUND;
              -		ptext("(dch) Delete-characters, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(dch) Delete-characters start testing")) {
              -		return;
              -	}
              -	hzcc = columns * 8 / 10;	/* horizontal character count */
              -	if (augment > hzcc) {
              -		augment = hzcc;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			for (j = 0; j <= repeats; j++) {
              -				putchp(letter);
              -			}
              -			put_cr();
              -			tt_putp(enter_delete_mode);
              -			tt_putparm(parm_dch, repeats, repeats, 0);
              -			tt_putp(exit_delete_mode);
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		putchp(letter);
              -		put_crlf();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_dch1(test_list, status, ch)
              -**
              -**	Test (smdc) (rmdc) Delete mode and (dch1)
              -*/
              -static void
              -pad_dch1(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!delete_character) {
              -		if (parm_dch) {
              -			/* if the other one is defined then its OK */
              -			return;
              -		}
              -		CAP_NOT_FOUND;
              -		ptext("(dch1) Delete-character, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(dch1) Delete-character start testing")) {
              -		return;
              -	}
              -	hzcc = columns * 8 / 10;	/* horizontal character count */
              -	if (augment > hzcc) {
              -		augment = hzcc;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			for (j = -1; j < augment; j++) {
              -				putchp(letter);
              -			}
              -			put_cr();
              -			tt_putp(enter_delete_mode);
              -			for (j = 0; j < augment; j++) {
              -				tt_putp(delete_character);
              -			}
              -			tt_putp(exit_delete_mode);
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		putchp(letter);
              -		put_crlf();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_smir(test_list, status, ch)
              -**
              -**	Test (smir) (rmir) Insert mode
              -*/
              -static void
              -pad_smir(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (!enter_insert_mode) {
              -		CAP_NOT_FOUND;
              -		ptext("(smir) Enter-insert-mode");
              -		if (!exit_insert_mode) {
              -			ptext(", (rmir) Exit-insert-mode");
              -		}
              -		ptext(", not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(smir) (rmir) Enter/Exit-insert-mode start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		page_loop();
              -		for (i = 1; i < columns; i++) {
              -			tt_putp(enter_insert_mode);
              -			tt_putp(exit_insert_mode);
              -			putchp(letter);
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext(no_visual);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_ich(test_list, status, ch)
              -**
              -**	Test (smir) (rmir) Insert mode and (ich) and (ip)
              -*/
              -static void
              -pad_ich(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!parm_ich) {
              -		CAP_NOT_FOUND;
              -		ptext("(ich) Insert-characters, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(ich) Insert-characters, (ip) Insert-padding start testing")) {
              -		return;
              -	}
              -	j = columns * 9 / 10;
              -	if (augment > j) {
              -		augment = j;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			putchp(letter);
              -			put_cr();
              -			tt_putp(enter_insert_mode);
              -			replace_mode = 0;
              -			tt_putparm(parm_ich, repeats, repeats, 0);
              -			tt_putp(exit_insert_mode);
              -			replace_mode = 1;
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		for (i = 0; i < repeats; i++) {
              -			putchp(' ');
              -		}
              -		putchp(letter);
              -		NEXT_LETTER;
              -		put_crlf();
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	tc_putp(exit_insert_mode);
              -}
              -
              -/*
              -**	pad_ich1(test_list, status, ch)
              -**
              -**	Test (smir) (rmir) Insert mode and (ich1) and (ip)
              -*/
              -static void
              -pad_ich1(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!insert_character) {
              -		CAP_NOT_FOUND;
              -		ptext("(ich1) Insert-character, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(ich1) Insert-character, (ip) Insert-padding start testing")) {
              -		return;
              -	}
              -	if (augment > columns - 2) {
              -		augment = columns - 2;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		put_clear();
              -		for (i = 2; i < lines; i++) {
              -			putchp(letter);
              -			put_cr();
              -			tt_putp(enter_insert_mode);
              -			replace_mode = 0;
              -			if (!insert_padding && !insert_character) {
              -				/* only enter/exit is needed */
              -				for (j = 0; j < augment; j++) {
              -					putchp('.');
              -				}
              -			} else {
              -				for (j = 0; j < augment; j++) {
              -					tt_putp(insert_character);
              -					putchp('.');
              -					tt_putp(insert_padding);
              -				}
              -			}
              -			tt_putp(exit_insert_mode);
              -			replace_mode = 1;
              -			put_crlf();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		for (j = 0; j < augment; j++) {
              -			putchp('.');
              -		}
              -		putchp(letter);
              -		NEXT_LETTER;
              -		put_crlf();
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptext(all_lines);
              -	pad_done_message(t, state, ch);
              -	tc_putp(exit_insert_mode);
              -}
              -
              -/*
              -**	pad_xch1(test_list, status, ch)
              -**
              -**	Test (ich1) (ip) (dch1)
              -*/
              -static void
              -pad_xch1(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	static char xch1[] =
              -	"This line should not be garbled. It should be left justified.";
              -
              -	if (enter_insert_mode || exit_insert_mode ||
              -		enter_delete_mode || exit_delete_mode ||
              -		!insert_character || !delete_character) {
              -		/* this test is quietly ignored */
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(ich1) Insert-character, (dch1) Delete-character start testing")) {
              -		return;
              -	}
              -	put_crlf();
              -	ptext(xch1);
              -	put_cr();
              -	pad_test_startup(0);
              -	do {
              -		tt_putp(insert_character);
              -		tt_putp(delete_character);
              -	} while(still_testing());
              -	pad_test_shutdown(t, 1);
              -	ptextln(xch1);
              -	ptext("The preceding two lines should be the same.  ");
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_rep(test_list, status, ch)
              -**
              -**	Test (rep) repeat character
              -*/
              -static void
              -pad_rep(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!repeat_char) {
              -		CAP_NOT_FOUND;
              -		ptext("(rep) Repeat-character, not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(rep) Repeat-character start testing")) {
              -		return;
              -	}
              -	if (augment > columns - 2) {
              -		augment = columns - 2;
              -	}
              -	if (augment < 2) {
              -		augment = 2;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (i = 2; i < lines; i++) {
              -			tt_putparm(repeat_char, repeats, letter, repeats);
              -			put_crlf();
              -		}
              -		for (j = 0; j < repeats; j++) {
              -			putchp(letter);
              -		}
              -		put_crlf();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptextln(all_lines);
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_cup(test_list, status, ch)
              -**
              -**	Test (cup) Cursor address
              -*/
              -static void
              -pad_cup(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j, l, r, c;
              -
              -	if (!cursor_address) {
              -		CAP_NOT_FOUND;
              -		ptext("(cup) Cursor-address not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(cup) Cursor-address start testing")) {
              -		return;
              -	}
              -	put_clear();
              -	ptext("Each line should be filled with the same letter.  There should");
              -	ptext(" be no gaps, or single letters scattered over the screen.  ");
              -	if (char_count + 15 > columns) {
              -		put_crlf();
              -	}
              -	if (((lines - line_count) & 1) == 0) {
              -		/* this removes the gap in the middle of the test when the
              -		number of lines is odd.  */
              -		put_crlf();
              -	}
              -	r = line_count;
              -	c = char_count;
              -	l = (columns - 4) >> 1;
              -	pad_test_startup(0);
              -	do {
              -		for (i = 1; i + i + r < lines; i++) {
              -			for (j = 0; j <= l; j++) {
              -				tt_putparm(cursor_address, 1, r + i, j);
              -				putchp(letter);
              -				tt_putparm(cursor_address, 1, r + i, l + l + 1 - j);
              -				putchp(letter);
              -				tt_putparm(cursor_address, 1, lines - i, j);
              -				putchp(letter);
              -				tt_putparm(cursor_address, 1, lines - i, l + l + 1 - j);
              -				putchp(letter);
              -			}
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	tt_putparm(cursor_address, 1, line_count = r, char_count = c);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_hd(test_list, status, ch)
              -**
              -**	Test (hd) Half down
              -*/
              -static void
              -pad_hd(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j, k;
              -
              -	if (!down_half_line) {
              -		CAP_NOT_FOUND;
              -		ptext("(hd) Half-line-down not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(hd) Half-line-down start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		for (i = 1; i < columns; i += 2) {
              -			for (j = 1; j < i; ++j) {
              -				putchp(' ');
              -			}
              -			tt_putp(down_half_line);
              -			for (k = lines + lines; k > 4; k--) {
              -				if (j++ >= columns) {
              -					break;
              -				}
              -				tt_putp(down_half_line);
              -				putchp(letter);
              -			}
              -			go_home();
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_hu(test_list, status, ch)
              -**
              -**	Test (hu) Half line up
              -*/
              -static void
              -pad_hu(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j, k;
              -
              -	if (!up_half_line) {
              -		CAP_NOT_FOUND;
              -		ptext("(hu) Half-line-up not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(hu) Half-line-up start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		for (i = 1; i < columns; i += 2) {
              -			home_down();
              -			for (j = 1; j < i; ++j) {
              -				putchp(' ');
              -			}
              -			tt_putp(up_half_line);
              -			for (k = lines + lines; k > 4; k--) {
              -				if (j++ >= columns) {
              -					break;
              -				}
              -				tt_putp(up_half_line);
              -				putchp(letter);
              -			}
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		go_home();
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_rin(test_list, status, ch)
              -**
              -**	Test (rin) and (ri) Reverse index
              -*/
              -static void
              -pad_rin(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -	const char *start_message;
              -
              -	if (t->flags & 1) {
              -		/* rin */
              -		if (!parm_rindex) {
              -			CAP_NOT_FOUND;
              -			ptext("(rin) Scroll-reverse-n-lines not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(rin) Scroll-reverse-n-lines start testing";
              -	} else {
              -		/* ri */
              -		if (!scroll_reverse) {
              -			CAP_NOT_FOUND;
              -			ptext("(ri) Scroll-reverse not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(ri) Scroll-reverse start testing";
              -		augment = 1;
              -	}
              -	if (skip_pad_test(t, state, ch, start_message)) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		sprintf(temp, "%d\r", test_complete);
              -		put_str(temp);
              -		if (scroll_reverse && repeats == 1) {
              -			tt_putp(scroll_reverse);
              -		} else {
              -			tt_putparm(parm_rindex, repeats, repeats, 0);
              -		}
              -	} while(still_testing());
              -	put_str("This line should be on the bottom.\r");
              -	if (scroll_reverse && augment == 1) {
              -		for (i = 1; i < lines; i++) {
              -			tt_putp(scroll_reverse);
              -		}
              -	} else {
              -		tt_putparm(parm_rindex, lines - 1, lines - 1, 0);
              -	}
              -	putln("The screen should have text on the bottom line.");
              -	sprintf(temp, "Scroll reverse %d line%s.  ", augment,
              -		augment == 1 ? "" : "s");
              -	put_str(temp);
              -	pad_test_shutdown(t, 0);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_il(test_list, status, ch)
              -**
              -**	Test (il) and (il1) Insert line
              -*/
              -static void
              -pad_il(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -	const char *start_message;
              -
              -	if (t->flags & 1) {
              -		/* il */
              -		if (!parm_insert_line) {
              -			CAP_NOT_FOUND;
              -			ptext("(il) Insert-lines not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(il) Insert-lines start testing";
              -	} else {
              -		/* il1 */
              -		if (!insert_line) {
              -			CAP_NOT_FOUND;
              -			ptext("(il1) Insert-line not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(il1) Insert-line start testing";
              -		augment = 1;
              -	}
              -	if (skip_pad_test(t, state, ch, start_message)) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		sprintf(temp, "%d\r", test_complete);
              -		put_str(temp);
              -		if (insert_line && repeats == 1) {
              -			tt_putp(insert_line);
              -		} else {
              -			tt_putparm(parm_insert_line, repeats, repeats, 0);
              -		}
              -	} while(still_testing());
              -	put_str("This line should be on the bottom.\r");
              -	if (insert_line && augment == 1) {
              -		for (i = 1; i < lines; i++) {
              -			tt_putp(insert_line);
              -		}
              -	} else {
              -		tt_putparm(parm_insert_line, lines - 1, lines - 1, 0);
              -	}
              -	putln("The screen should have text on the bottom line.");
              -	sprintf(temp, "Insert %d line%s.  ", augment,
              -		augment == 1 ? "" : "s");
              -	put_str(temp);
              -	pad_test_shutdown(t, 0);
              -	pad_done_message(t, state, ch);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_indn(test_list, status, ch)
              -**
              -**	Test (indn) and (ind) Scroll forward
              -*/
              -static void
              -pad_indn(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -	const char *start_message;
              -
              -	if (t->flags & 1) {
              -		/* indn */
              -		if (!parm_index) {
              -			CAP_NOT_FOUND;
              -			ptext("(indn) Scroll-forward-n-lines not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(indn) Scroll-forward-n-lines start testing";
              -	} else {
              -		/* ind */
              -		if (!scroll_forward) {
              -			CAP_NOT_FOUND;
              -			ptext("(ind) Scroll-forward not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		if (over_strike) {
              -			ptext("(ind) Scroll-forward not tested on overstrike terminals.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(ind) Scroll-forward start testing";
              -		augment = 1;
              -	}
              -	if (skip_pad_test(t, state, ch, start_message)) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	/* go to the bottom of the screen */
              -	home_down();
              -	do {
              -		sprintf(temp, "%d\r", test_complete);
              -		put_str(temp);
              -		if (scroll_forward && repeats == 1) {
              -			put_ind();
              -		} else {
              -			tt_putparm(parm_index, repeats, repeats, 0);
              -		}
              -	} while(still_testing());
              -	put_str("This line should be on the top.\r");
              -	if (scroll_forward && augment == 1) {
              -		for (i = 1; i < lines; i++) {
              -			put_ind();
              -		}
              -	} else {
              -		tt_putparm(parm_index, lines - 1, lines - 1, 0);
              -	}
              -	go_home();
              -	sprintf(temp, "\nScroll forward %d line%s.  ", augment,
              -		augment == 1 ? "" : "s");
              -	put_str(temp);
              -	pad_test_shutdown(t, 0);
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_dl(test_list, status, ch)
              -**
              -**	Test (dl) and (dl1) Delete lines
              -*/
              -static void
              -pad_dl(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i = 0;
              -	const char *start_message;
              -
              -	if (t->flags & 1) {
              -		/* dl */
              -		if (!parm_delete_line) {
              -			CAP_NOT_FOUND;
              -			ptext("(dl) Delete-lines not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(dl) Delete-lines start testing";
              -	} else {
              -		/* dl1 */
              -		if (!delete_line) {
              -			CAP_NOT_FOUND;
              -			ptext("(dl1) Delete-line not present.  ");
              -			pad_done_message(t, state, ch);
              -			return;
              -		}
              -		start_message = "(dl1) Delete-line start testing";
              -		augment = 1;
              -	}
              -	if (skip_pad_test(t, state, ch, start_message)) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		sprintf(temp, "%d\r", test_complete);
              -		if (augment < lines - 1) {
              -			go_home();
              -			putln(temp);
              -		}
              -		put_str(temp);
              -		if (delete_line && repeats == 1) {
              -			tt_putp(delete_line);
              -		} else {
              -			tt_putparm(parm_delete_line, repeats, repeats, 0);
              -		}
              -	} while(still_testing());
              -	home_down();
              -	put_str("This line should be on the top.");
              -	go_home();
              -	if (delete_line && augment == 1) {
              -		for (i = 1; i < lines; i++) {
              -			tt_putp(delete_line);
              -		}
              -	} else {
              -		tt_putparm(parm_delete_line, lines - 1, lines - 1, 0);
              -	}
              -	sprintf(temp, "\nDelete %d line%s.  ", augment,
              -		augment == 1 ? "" : "s");
              -	put_str(temp);
              -	pad_test_shutdown(t, 0);
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_xl(test_list, status, ch)
              -**
              -**	Test (il1) Insert and (dl1) Delete lines
              -*/
              -static void
              -pad_xl(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	if (!insert_line && !delete_line) {
              -		/* quietly skip this test */
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(il1) Insert-line, (dl1) Delete-line start testing")) {
              -		return;
              -	}
              -	put_clear();
              -	putln("\rThis text is written on the first line.");
              -	ptext("This sentence begins on the second line.  As this");
              -	ptext(" test runs the bottom part of this paragraph will");
              -	ptext(" jump up and down.  Don't worry, that's normal.  When");
              -	ptext(" the jumping stops, the entire paragraph should");
              -	ptext(" still be on the screen and in the same place as when");
              -	ptext(" the test started.  If this paragraph has scrolled");
              -	ptext(" off the top or bottom of the screen then the test");
              -	ptext(" has failed.  Scrolling off the top of the screen");
              -	ptext(" usually means that the delete line capability is");
              -	ptext(" working better than the insert line capability.  If");
              -	ptext(" the text scrolls off the bottom then delete line may");
              -	ptext(" be broken.  If parts of the text are missing then");
              -	ptext(" you should get professional help.");
              -	put_crlf();
              -	go_home();
              -	put_newlines(2);
              -	pad_test_startup(0);
              -	do {
              -		tt_putp(insert_line);
              -		put_cr();
              -		tt_putp(delete_line);
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext("The top of the screen should have a paragraph of text.  ");
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_scrc(test_list, status, ch)
              -**
              -**	Test (sc) (rc) Save/restore cursor
              -*/
              -static void
              -pad_scrc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (!save_cursor || !restore_cursor) {
              -		CAP_NOT_FOUND;
              -		if (save_cursor) {
              -			ptext("(rc) Restore-cursor");
              -		} else
              -		if (restore_cursor) {
              -			ptext("(sc) Save-cursor");
              -		} else {
              -			ptext("(sc) Save-cursor, (rc) Restore-cursor");
              -		}
              -		ptext(" not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(sc) (rc) Save/Restore-cursor start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		page_loop();
              -		for (i = 1; i < columns; i++) {
              -			tt_putp(save_cursor);
              -			putchp(letter);
              -			tt_putp(restore_cursor);
              -			putchp('X');
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext(above_line);
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_csrind(test_list, status, ch)
              -**
              -**	Test (csr) and (ind) Change scroll region and index.
              -*/
              -static void
              -pad_csrind(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (!change_scroll_region) {
              -		CAP_NOT_FOUND;
              -		ptext("(csr) Change-scroll-region not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(csr) Save/Restore-cursor, (ind) index start testing")) {
              -		return;
              -	}
              -	if (augment < 2) {
              -		augment = 2;
              -	}
              -	if (augment > lines - 1) {
              -		augment = lines - 1;
              -	}
              -	put_clear();
              -	ptext("This text is on the top line.");
              -	tt_putparm(change_scroll_region, 1, lines - augment, lines - 1);
              -	/* go to the bottom of the screen */
              -	home_down();
              -	pad_test_startup(0);
              -	do {
              -		sprintf(temp, "%d\r", test_complete);
              -		put_str(temp);
              -		put_ind();
              -	} while(still_testing());
              -	ptextln("(csr) is broken.");
              -	for (i = augment; i > 1; i--) {
              -		put_ind();
              -	}
              -	pad_test_shutdown(t, 0);
              -	ptext("All but top and bottom lines should be blank.  ");
              -	pad_done_message(t, state, ch);
              -	tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -	put_clear();
              -}
              -
              -/*
              -**	pad_sccsrrc(test_list, status, ch)
              -**
              -**	Test (sc) (csr) and (rc) Save/Change/Restore scroll region
              -*/
              -static void
              -pad_sccsrrc(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i;
              -
              -	if (!save_cursor || !change_scroll_region || !restore_cursor) {
              -		/* quietly ignore this test */
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(sc) (csr) (rc) Save/Change/Restore-cursor, start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		page_loop();
              -		for (i = 1; i < columns; i++) {
              -			tt_putp(save_cursor);
              -			putchp(letter);
              -			tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -			tt_putp(restore_cursor);
              -			putchp('X');
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext(above_line);
              -	pad_done_message(t, state, ch);
              -	tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -}
              -
              -/*
              -**	pad_csr_nel(test_list, status, ch)
              -**
              -**	Test (sc) (csr) (nel) and (rc) Save/Change/Restore scroll region
              -*/
              -static void
              -pad_csr_nel(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!save_cursor || !change_scroll_region || !restore_cursor) {
              -		/* quietly ignore this test */
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(csr) Change-scroll-region, (nel) newline start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		for (i = 0; i < lines; i++) {
              -			for (j = lines - i; j > 0; j--) {
              -				put_crlf();
              -			}
              -			tt_putp(save_cursor);
              -			tt_putparm(change_scroll_region, 1, i, lines - 1);
              -			tt_putp(restore_cursor);
              -			put_str(every_line);
              -		}
              -		tt_putp(save_cursor);
              -		tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -		tt_putp(restore_cursor);
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	put_str("  ");
              -	pad_done_message(t, state, ch);
              -	tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -}
              -
              -/*
              -**	pad_csr_cup(test_list, status, ch)
              -**
              -**	Test (csr) (cup) Change scroll region and cursor address
              -*/
              -static void
              -pad_csr_cup(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!change_scroll_region || !cursor_address) {
              -		/* quietly ignore this test */
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(csr) Change-scroll-region, (cup) cursor-address start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		for (i = 0; i < lines; i++) {
              -			for (j = lines - i; j > 0; j--) {
              -				put_crlf();
              -			}
              -			tt_putparm(change_scroll_region, 1, i, lines - 1);
              -			tt_putparm(cursor_address, 1, lines - 1, 0);
              -			put_str(every_line);
              -		}
              -		tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -		tt_putparm(cursor_address, 1, lines - 1, (int) strlen(every_line));
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	put_str("  ");
              -	pad_done_message(t, state, ch);
              -	tt_putparm(change_scroll_region, 1, 0, lines - 1);
              -}
              -
              -/*
              -**	pad_ht(test_list, status, ch)
              -**
              -**	Test (ht) Tabs
              -*/
              -static void
              -pad_ht(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!set_tab && init_tabs <= 0) {
              -		CAP_NOT_FOUND;
              -		ptext("(ht) Tab not tested.  (hts) Set-tabs and (it) initial-tabs not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch, "(ht) Tab start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		/*
              -		   it is not always possible to test tabs with caps
              -		   that do not already have padding. The following
              -		   test uses a mixed bag of tests in order to avoid
              -		   this problem. Note: I do not scroll
              -		*/
              -		if (auto_right_margin && can_go_home)
              -			for (i = 1, go_home(); i < lines - 2; i++) {
              -				for (j = 8; j < columns; j += 8) {
              -					putchp('\t');
              -				}
              -				put_str("A        ");
              -			}
              -		if (cursor_down && can_go_home)
              -			for (i = 1, go_home(); i < lines - 2; i++) {
              -				for (j = 8; j < columns; j += 8) {
              -					putchp('\t');
              -				}
              -				put_str("D\r");
              -				tt_putp(cursor_down);
              -			}
              -		if (cursor_address)
              -			for (i = 1; i < lines - 2; i++) {
              -				tt_putparm(cursor_address, 1, i - 1, 0);
              -				for (j = 8; j < columns; j += 8) {
              -					putchp('\t');
              -				}
              -				put_str("C");
              -			}
              -		go_home();
              -		for (i = 1; i < lines - 2; i++) {
              -			for (j = 8; j < columns; j += 8) {
              -				putchp('\t');
              -			}
              -			putln("N");
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	ptextln("Letters on the screen other than Ns at the right margin indicate failure.");
              -	ptext("A-(am) D-(cud1) C-(cup) N-(nel)  ");
              -	pad_done_message(t, state, ch);
              -}
              -
              -/*
              -**	pad_smso(test_list, status, ch)
              -**
              -**	Test (smso) (rmso) Enter/exit mode
              -*/
              -static void
              -pad_smso(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	if (!enter_standout_mode || !exit_standout_mode) {
              -		CAP_NOT_FOUND;
              -		ptext("(smso) (rmso) Enter/Exit-standout-mode not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(smso) (rmso) Enter/Exit-standout-mode start testing")) {
              -		return;
              -	}
              -	/*
              -	   In terminals that emulate non-hidden attributes with hidden
              -	   attributes, the amount of time that it takes to fill the screen
              -	   with an attribute is nontrivial. The following test is designed to
              -	   catch those delays
              -	*/
              -	pad_test_startup(1);
              -	do {
              -		page_loop();
              -		j = magic_cookie_glitch > 0 ? magic_cookie_glitch : 0;
              -		for (i = 2 + j + j; i < columns;) {
              -			put_mode(enter_standout_mode);
              -			i += j + j + 2;
              -			putchp('X');
              -			put_mode(exit_standout_mode);
              -			putchp('X');
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext(above_line);
              -	pad_done_message(t, state, ch);
              -	put_mode(exit_standout_mode);
              -}
              -
              -/*
              -**	pad_smacs(test_list, status, ch)
              -**
              -**	Test (smacs) (rmacs) Enter/exit altcharset mode
              -*/
              -static void
              -pad_smacs(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int i, j;
              -
              -	/* test enter even if exit is missing */
              -	if (!enter_alt_charset_mode) {
              -		CAP_NOT_FOUND;
              -		ptext("(smacs) Enter-altcharset-mode not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(smacs) (rmacs) Enter/Exit-altcharset-mode start testing")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		page_loop();
              -		j = magic_cookie_glitch > 0 ? magic_cookie_glitch : 0;
              -		for (i = 2 + j + j; i < columns;) {
              -			put_mode(enter_alt_charset_mode);
              -			i += j + j + 2;
              -			putchp(letter);
              -			put_mode(exit_alt_charset_mode);
              -			putchp(letter);
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	home_down();
              -	ptext("Every other character is from the alternate character set.  ");
              -	pad_done_message(t, state, ch);
              -	put_mode(exit_alt_charset_mode);
              -}
              -
              -/*
              -**	pad_crash(test_list, status, ch)
              -**
              -**	Test (clear) without padding
              -*/
              -static void
              -pad_crash(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int save_xon_xoff;
              -
              -	if (!clear_screen) {
              -		ptext("(clear) Clear-screen not present.  ");
              -		pad_done_message(t, state, ch);
              -		return;
              -	}
              -	ptext("If you would like to see if the terminal will really lock up.");
              -	ptextln("  I will send the clear screen sequence without the pads.");
              -	if (skip_pad_test(t, state, ch,
              -		"(clear) Clear-screen start crash testing")) {
              -		return;
              -	}
              -	save_xon_xoff = xon_xoff;
              -	xon_xoff = 1;
              -	pad_test_startup(0);
              -	do {
              -		put_str("Erase this!");
              -		tt_putp(clear_screen);
              -	} while(still_testing());
              -	xon_xoff = save_xon_xoff;
              -	pad_test_shutdown(t, 1);
              -	pad_done_message(t, state, ch);
              -}
              diff -Naur ncurses-5.6.orig/tack/scan.c ncurses-5.6/tack/scan.c
              --- ncurses-5.6.orig/tack/scan.c	2005-09-17 15:49:16.000000000 -0400
              +++ ncurses-5.6/tack/scan.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,264 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -/* scan mode keyboard support */
              -
              -#include 
              -
              -MODULE_ID("$Id: scan.c,v 1.5 2005/09/17 19:49:16 tom Exp $")
              -
              -unsigned scan_max;		/* length of longest scan code */
              -char **scan_up, **scan_down, **scan_name;
              -unsigned *scan_tested, *scan_length;
              -static unsigned *scan_value;
              -
              -static int shift_state;
              -static char *str;
              -static int debug_char_count;
              -
              -#define SHIFT_KEY   0x100
              -#define CONTROL_KEY 0x200
              -#define META_KEY    0x400
              -#define CAPS_LOCK   0x800
              -
              -static const struct {
              -	const char *name;
              -	unsigned type;
              -}  scan_special[] = {
              -	{"", SHIFT_KEY},
              -	{"", SHIFT_KEY},
              -	{"", SHIFT_KEY},
              -	{"", CONTROL_KEY},
              -	{"", CONTROL_KEY},
              -	{"", CONTROL_KEY},
              -	{"", META_KEY},
              -	{"", META_KEY},
              -	{"", META_KEY},
              -	{"", CAPS_LOCK},
              -	{"", '\t'},
              -	{"", ' '},
              -	{"", '\r'},
              -	{"", '\n'},
              -	{"", '\f'},
              -	{"", '\b'},
              -	{0, 0}
              -};
              -
              -static void
              -scan_blanks(void)
              -{				/* scan past the white space */
              -	while (*str == ' ' || *str == '\t')
              -		str++;
              -}
              -
              -static char *
              -smash(void)
              -{				/* convert a string to hex */
              -	char *s, *t;
              -	int ch, i, j;
              -
              -	t = s = str;
              -	for (i = 0; (ch = *str); str++) {
              -		if (ch >= '0' && ch <= '9')
              -			j = ch - '0';
              -		else if (ch >= 'a' && ch <= 'f')
              -			j = 10 - 'a' + ch;
              -		else if (ch >= 'A' && ch <= 'F')
              -			j = 10 - 'A' + ch;
              -		else if (ch == ' ' || ch == '\t')
              -			break;
              -		else
              -			continue;
              -		if (i) {
              -			*s |= j;
              -			s++;
              -		} else
              -			*s = j << 4;
              -		i ^= 1;
              -	}
              -	*s = '\0';
              -	return t;
              -}
              -
              -void
              -scan_init(char *fn)
              -{				/* read the scan mode key definitions */
              -	char *s, *sl;
              -	FILE *fp;
              -	int ch, i, j;
              -	unsigned len;
              -	char home[512];
              -
              -	if ((str = getenv("HOME")))
              -		strcpy(home, str);
              -	else
              -		home[0] = '\0';
              -	fp = NULL;
              -	if ((str = getenv("KEYBOARD"))) {
              -		if (!(fp = fopen(str, "r")) && home[0]) {
              -			sprintf(temp, "%s/.scan.%s", home, str);
              -			fp = fopen(temp, "r");
              -		}
              -	}
              -	if (!fp) {
              -		sprintf(temp, ".scan.%s", fn);
              -		fp = fopen(temp, "r");
              -	}
              -	if (!fp && home[0]) {
              -		sprintf(temp, "%s/.scan.%s", home, fn);
              -		fp = fopen(temp, "r");
              -	}
              -	if (!fp) {
              -		ptext("Unable to open scanfile: ");
              -		ptextln(temp);
              -		bye_kids(1);
              -		return;
              -	}
              -	/*
              -	   scan file format:
              -	
              -	  
              -	
              -	values are in hex.  may be any string of characters
              -	
              -	*/
              -	scan_up = (char **) malloc(sizeof(char *) * MAX_SCAN);
              -	scan_down = (char **) malloc(sizeof(char *) * MAX_SCAN);
              -	scan_name = (char **) malloc(sizeof(char *) * MAX_SCAN);
              -	scan_tested = (unsigned *) malloc(sizeof(unsigned *) * MAX_SCAN);
              -	scan_length = (unsigned *) malloc(sizeof(unsigned *) * MAX_SCAN);
              -	scan_value = (unsigned *) malloc(sizeof(unsigned *) * MAX_SCAN);
              -	scan_up[0] = scan_down[0] = scan_name[0] = (char *) 0;
              -	str = (char *) malloc(4096);	/* buffer space */
              -	sl = str + 4000;	/* an upper limit */
              -	scan_max = 1;
              -	for (i = 0;;) {
              -		for (s = str; (ch = getc(fp)) != EOF;) {
              -			if (ch == '\n' || ch == '\r')
              -				break;
              -			*s++ = ch;
              -		}
              -		*s++ = '\0';
              -		if (ch == EOF)
              -			break;
              -		if (*str == '#' || *str == '\0')
              -			continue;
              -		scan_down[i] = smash();
              -		scan_blanks();
              -		scan_up[i] = smash();
              -		scan_blanks();
              -		scan_name[i] = str;
              -
              -		scan_length[i] = strlen(scan_down[i]);
              -		len = strlen(scan_up[i]) + scan_length[i];
              -		if (len > scan_max)
              -			scan_max = len;
              -
              -		scan_value[i] = UChar(scan_name[i][0]);
              -		if (scan_name[i][1])	/* multi-character name */
              -			for (j = 0; scan_special[j].name; j++) {
              -				if (!strcmp(scan_name[i], scan_special[j].name)) {
              -					scan_value[i] = scan_special[j].type;
              -					break;
              -				}
              -			}
              -
              -		i++;
              -		if (str > sl) {
              -			str = (char *) malloc(4096);
              -			sl = str + 4000;
              -		} else
              -			str = s;
              -	}
              -	fclose(fp);
              -#ifdef notdef
              -	for (i = 0; scan_down[i]; i++) {
              -		put_str(hex_expand_to(scan_down[i], 3));
              -		put_str(hex_expand_to(scan_up[i], 3));
              -		put_str("   ");
              -		put_str(scan_name[i]);
              -		put_crlf();
              -	}
              -	(void) wait_here();
              -#endif
              -}
              -
              -int
              -scan_key(void)
              -{				/* read a key and translate scan mode to
              -				   ASCII */
              -	unsigned i;
              -	int j, ch;
              -	char buf[64];
              -
              -	for (i = 1;; i++) {
              -		ch = getchar();
              -		if (ch == EOF)
              -			return EOF;
              -		if (debug_fp) {
              -			fprintf(debug_fp, "%02X ", ch);
              -			debug_char_count += 3;
              -			if (debug_char_count > 72) {
              -				fprintf(debug_fp, "\n");
              -				debug_char_count = 0;
              -			}
              -		}
              -		buf[i - 1] = ch;
              -		buf[i] = '\0';
              -		if (buf[0] & 0x80) {	/* scan up */
              -			for (j = 0; scan_up[j]; j++) {
              -				if (i == scan_length[j] &&
              -					!strcmp(buf, scan_up[j])) {
              -					i = 0;
              -					shift_state &= ~scan_value[j];
              -					break;
              -				}
              -			}
              -			continue;
              -		}
              -		for (j = 0; scan_down[j]; j++) {
              -			if (i == scan_length[j] && !strcmp(buf, scan_down[j])) {
              -				i = 0;
              -				shift_state |= scan_value[j];
              -				ch = scan_value[j];
              -				if (ch == CAPS_LOCK)
              -					shift_state ^= SHIFT_KEY;
              -				if (ch >= 256)
              -					break;
              -				if (shift_state & SHIFT_KEY) {
              -					if (ch >= 0x60)
              -						ch -= 0x20;
              -					else if (ch >= 0x30 && ch <= 0x3f)
              -						ch -= 0x10;
              -				}
              -				if (shift_state & CONTROL_KEY) {
              -					if ((ch | 0x20) >= 0x60 &&
              -						(ch | 0x20) <= 0x7f)
              -						ch = (ch | 0x20) - 0x60;
              -				}
              -				if (shift_state & META_KEY)
              -					ch |= 0x80;
              -				return ch;
              -			}
              -		}
              -		if (i > scan_max)
              -			i = 1;
              -	}
              -}
              diff -Naur ncurses-5.6.orig/tack/sync.c ncurses-5.6/tack/sync.c
              --- ncurses-5.6.orig/tack/sync.c	2006-05-06 16:45:48.000000000 -0400
              +++ ncurses-5.6/tack/sync.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,436 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -#include 
              -
              -MODULE_ID("$Id: sync.c,v 1.9 2006/05/06 20:45:48 tom Exp $")
              -
              -/* terminal-synchronization and performance tests */
              -
              -static void sync_home(struct test_list *, int *, int *);
              -static void sync_lines(struct test_list *, int *, int *);
              -static void sync_clear(struct test_list *, int *, int *);
              -static void sync_summary(struct test_list *, int *, int *);
              -
              -static struct test_list sync_test_list[] = {
              -	{MENU_NEXT, 0, 0, 0, "b) baud rate test", sync_home, 0},
              -	{MENU_NEXT, 0, 0, 0, "l) scroll performance", sync_lines, 0},
              -	{MENU_NEXT, 0, 0, 0, "c) clear screen performance", sync_clear, 0},
              -	{MENU_NEXT, 0, 0, 0, "p) summary of results", sync_summary, 0},
              -	{0, 0, 0, 0, txt_longer_test_time, longer_test_time, 0},
              -	{0, 0, 0, 0, txt_shorter_test_time, shorter_test_time, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -struct test_menu sync_menu = {
              -	0, 'n', 0,
              -	"Performance tests", "perf", "n) run standard tests",
              -	sync_test, sync_test_list, 0, 0, 0
              -};
              -
              -int tty_can_sync;		/* TRUE if tty_sync_error() returned FALSE */
              -static int tty_newline_rate;	/* The number of newlines per second */
              -static int tty_clear_rate;	/* The number of clear-screens per second */
              -unsigned long tty_cps;		/* The number of characters per second */
              -
              -#define TTY_ACK_SIZE 64
              -
              -static int ACK_terminator;	/* terminating ACK character */
              -static int ACK_length;		/* length of ACK string */
              -static const char *tty_ENQ;	/* enquire string */
              -static char tty_ACK[TTY_ACK_SIZE]; /* ACK response, set by tty_sync_error() */
              -
              -/*****************************************************************************
              - *
              - * Terminal synchronization.
              - *
              - *	These functions handle the messy business of enq-ack handshaking
              - *	for timing purposes.
              - *
              - *****************************************************************************/
              -
              -int
              -tty_sync_error(void)
              -{
              -	int ch, trouble, ack;
              -
              -	trouble = FALSE;
              -	for (;;) {
              -		tt_putp(tty_ENQ);	/* send ENQ */
              -		ch = getnext(STRIP_PARITY);
              -		event_start(TIME_SYNC);	/* start the timer */
              -
              -		/*
              -		   The timer doesn't start until we get the first character.
              -		   After that I expect to get the remaining characters of
              -		   the acknowledge string in a short period of time.  If
              -		   that is not true then these characters are coming from
              -		   the user and we need to send the ENQ sequence out again.
              -		*/
              -		for (ack = 0; ; ) {
              -			if (ack < TTY_ACK_SIZE - 2) {
              -				tty_ACK[ack] = ch;
              -				tty_ACK[ack + 1] = '\0';
              -			}
              -			if (ch == ACK_terminator) {
              -				return trouble;
              -			}
              -			if (++ack >= ACK_length) {
              -				return trouble;
              -			}
              -			ch = getnext(STRIP_PARITY);
              -			if (event_time(TIME_SYNC) > 400000) {
              -				break;
              -			}
              -		}
              -
              -		set_attr(0);	/* just in case */
              -		put_crlf();
              -		if (trouble) {
              -			/* The terminal won't sync.  Life is not good. */
              -			return TRUE;
              -		}
              -		put_str(" -- sync -- ");
              -		trouble = TRUE;
              -	}
              -}
              -
              -/*
              -**	flush_input()
              -**
              -**	Throw away any output.
              -*/
              -void 
              -flush_input(void)
              -{
              -	if (tty_can_sync == SYNC_TESTED && ACK_terminator >= 0) {
              -		(void) tty_sync_error();
              -	} else {
              -		spin_flush();
              -	}
              -}
              -
              -/*
              -**	probe_enq_ok()
              -**
              -**	does the terminal do enq/ack handshaking?
              -*/
              -static void 
              -probe_enq_ok(void)
              -{
              -	int tc, len, ulen;
              -
              -	put_str("Testing ENQ/ACK, standby...");
              -	fflush(stdout);
              -	can_test("u8 u9", FLAG_TESTED);
              -
              -#ifdef user9
              -	tty_ENQ = user9 ? user9 : "\005";
              -#else
              -	tty_ENQ = "\005";
              -#endif
              -	tc_putp(tty_ENQ);
              -	event_start(TIME_SYNC);	/* start the timer */
              -	read_key(tty_ACK, TTY_ACK_SIZE - 1);
              -
              -	if (event_time(TIME_SYNC) > 400000 || tty_ACK[0] == '\0') {
              -		/* These characters came from the user.  Sigh. */
              -		tty_can_sync = SYNC_FAILED;
              -		ptext("\nThis program expects the ENQ sequence to be");
              -		ptext(" answered with the ACK character.  This will help");
              -		ptext(" the program reestablish synchronization when");
              -		ptextln(" the terminal is overrun with data.");
              -		ptext("\nENQ sequence from (u9): ");
              -		putln(expand(tty_ENQ));
              -		ptext("ACK received: ");
              -		putln(expand(tty_ACK));
              -#ifdef user8
              -		len = user8 ? strlen(user8) : 0;
              -#else
              -		len = 0;
              -#endif
              -		sprintf(temp, "Length of ACK %d.  Expected length of ACK %d.",
              -			(int) strlen(tty_ACK), len);
              -		ptextln(temp);
              -#ifdef user8
              -		if (len) {
              -			temp[0] = user8[len - 1];
              -			temp[1] = '\0';
              -			ptext("Terminating character found in (u8): ");
              -			putln(expand(temp));
              -		}
              -#endif
              -		return;
              -	}
              -
              -	tty_can_sync = SYNC_TESTED;
              -	if ((len = strlen(tty_ACK)) == 1) {
              -		/* single character acknowledge string */
              -		ACK_terminator = tty_ACK[0];
              -		ACK_length = 4096;
              -		return;
              -	}
              -	tc = tty_ACK[len - 1];
              -#ifdef user8
              -	if (user8) {
              -		ulen = strlen(user8);
              -		if (tc == user8[ulen - 1]) {
              -			/* ANSI style acknowledge string */
              -			ACK_terminator = tc;
              -			ACK_length = 4096;
              -			return;
              -		}
              -	}
              -#endif
              -	/* fixed length acknowledge string */
              -	ACK_length = len;
              -	ACK_terminator = -2;
              -}
              -
              -/*
              -**	verify_time()
              -**
              -**	verify that the time tests are ready to run.
              -**	If the baud rate is not set then compute it.
              -*/
              -void
              -verify_time(void)
              -{
              -	int status, ch;
              -
              -	if (tty_can_sync == SYNC_FAILED) {
              -		return;
              -	}
              -	probe_enq_ok();
              -	put_crlf();
              -	if (tty_can_sync == SYNC_TESTED) {
              -		put_crlf();
              -		if (ACK_terminator >= 0) {
              -			ptext("ACK terminating character: ");
              -			temp[0] = ACK_terminator;
              -			temp[1] = '\0';
              -			ptextln(expand(temp));
              -		} else {
              -			sprintf(temp, "Fixed length ACK, %d characters",
              -				ACK_length);
              -			ptextln(temp);
              -		}
              -	}
              -	if (tty_baud_rate == 0) {
              -		sync_home(&sync_test_list[0], &status, &ch);
              -	}
              -}
              -
              -/*****************************************************************************
              - *
              - * Terminal performance tests
              - *
              - *	Find out how fast the terminal can:
              - *	  1) accept characters
              - *	  2) scroll the screen
              - *	  3) clear the screen
              - *
              - *****************************************************************************/
              -
              -/*
              -**	sync_home(test_list, status, ch)
              -**
              -**	Baudrate test
              -*/
              -static void
              -sync_home(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int j, k;
              -	unsigned long rate;
              -
              -	if (!cursor_home && !cursor_address && !row_address) {
              -		ptext("Terminal can not home cursor.  ");
              -		generic_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(home) Start baudrate search")) {
              -		return;
              -	}
              -	pad_test_startup(1);
              -	do {
              -		go_home();
              -		for (j = 1; j < lines; j++) {
              -			for (k = 0; k < columns; k++) {
              -				if (k & 0xF) {
              -					put_this(letter);
              -				} else {
              -					put_this('.');
              -				}
              -			}
              -			SLOW_TERMINAL_EXIT;
              -		}
              -		NEXT_LETTER;
              -	} while(still_testing());
              -	pad_test_shutdown(t, auto_right_margin == 0);
              -	/* note:  tty_frame_size is the real framesize times two.
              -	   This takes care of half bits. */
              -	rate = (tx_cps * tty_frame_size) >> 1;
              -	if (rate > tty_baud_rate) {
              -		tty_baud_rate = rate;
              -	}
              -	if (tx_cps > tty_cps) {
              -		tty_cps = tx_cps;
              -	}
              -	sprintf(temp, "%lu characters per second.  Baudrate %d  ", tx_cps, j);
              -	ptext(temp);
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	sync_lines(test_list, status, ch)
              -**
              -**	How many newlines/second?
              -*/
              -static void
              -sync_lines(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int j;
              -
              -	if (skip_pad_test(t, state, ch,
              -		"(nel) Start scroll performance test")) {
              -		return;
              -	}
              -	pad_test_startup(0);
              -	repeats = 100;
              -	do {
              -		sprintf(temp, "%d", test_complete);
              -		put_str(temp);
              -		put_newlines(repeats);
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	j = sliding_scale(tx_count[0], 1000000, usec_run_time);
              -	if (j > tty_newline_rate) {
              -		tty_newline_rate = j;
              -	}
              -	sprintf(temp, "%d linefeeds per second.  ", j);
              -	ptext(temp);
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	sync_clear(test_list, status, ch)
              -**
              -**	How many clear-screens/second?
              -*/
              -static void
              -sync_clear(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	int j;
              -
              -	if (!clear_screen) {
              -		ptext("Terminal can not clear-screen.  ");
              -		generic_done_message(t, state, ch);
              -		return;
              -	}
              -	if (skip_pad_test(t, state, ch,
              -		"(clear) Start clear-screen performance test")) {
              -		return;
              -	}
              -	pad_test_startup(0);
              -	repeats = 20;
              -	do {
              -		sprintf(temp, "%d", test_complete);
              -		put_str(temp);
              -		for (j = 0; j < repeats; j++) {
              -			put_clear();
              -		}
              -	} while(still_testing());
              -	pad_test_shutdown(t, 0);
              -	j = sliding_scale(tx_count[0], 1000000, usec_run_time);
              -	if (j > tty_clear_rate) {
              -		tty_clear_rate = j;
              -	}
              -	sprintf(temp, "%d clear-screens per second.  ", j);
              -	ptext(temp);
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	sync_summary(test_list, status, ch)
              -**
              -**	Print out the test results.
              -*/
              -static void
              -sync_summary(
              -	struct test_list *t,
              -	int *state,
              -	int *ch)
              -{
              -	char size[32];
              -
              -	put_crlf();
              -	ptextln("Terminal  size    characters/sec linefeeds/sec  clears/sec");
              -	sprintf(size, "%dx%d", columns, lines);
              -	sprintf(temp, "%-10s%-11s%11lu   %11d %11d", tty_basename, size,
              -		tty_cps, tty_newline_rate, tty_clear_rate);
              -	ptextln(temp);
              -	generic_done_message(t, state, ch);
              -}
              -
              -/*
              -**	sync_test(menu)
              -**
              -**	Run at the beginning of the pad tests and function key tests
              -*/
              -void
              -sync_test(
              -	struct test_menu *menu)
              -{
              -	control_init();
              -	if (tty_can_sync == SYNC_NOT_TESTED) {
              -		verify_time();
              -	}
              -	if (menu->menu_title) {
              -		put_crlf();
              -		ptextln(menu->menu_title);
              -	}
              -}
              -
              -/*
              -**	sync_handshake(test_list, status, ch)
              -**
              -**	Test or retest the ENQ/ACK handshake
              -*/
              -void
              -sync_handshake(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	tty_can_sync = SYNC_NOT_TESTED;
              -	verify_time();
              -}
              diff -Naur ncurses-5.6.orig/tack/sysdep.c ncurses-5.6/tack/sysdep.c
              --- ncurses-5.6.orig/tack/sysdep.c	2005-09-17 15:49:16.000000000 -0400
              +++ ncurses-5.6/tack/sysdep.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,504 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -/*
              - * Operating system dependent functions.  We assume the POSIX API.
              - * Note: on strict-POSIX systems (including BSD/OS) the select_delay_type
              - * global has no effect.
              - */
              -
              -#ifdef HAVE_CONFIG_H
              -#include 
              -#endif
              -#include 	/* include before curses.h to work around glibc bug */
              -
              -#include 
              -
              -#include 
              -#include 
              -
              -#if defined(__BEOS__)
              -#undef false
              -#undef true
              -#include 
              -#endif
              -
              -#if HAVE_SELECT
              -#if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT
              -#include 
              -#endif
              -#if HAVE_SYS_SELECT_H
              -#include 
              -#endif
              -#endif
              -
              -MODULE_ID("$Id: sysdep.c,v 1.15 2005/09/17 19:49:16 tom Exp $")
              -
              -#if DECL_ERRNO
              -extern int errno;
              -#endif
              -
              -#ifdef TERMIOS
              -#define PUT_TTY(fd, buf) tcsetattr(fd, TCSAFLUSH, buf)
              -#else
              -#define PUT_TTY(fd, buf) stty(fd, buf)
              -#endif
              -
              -/* globals */
              -int tty_frame_size;		/* asynch frame size times 2 */
              -unsigned tty_baud_rate;		/* baud rate - bits per second */
              -int not_a_tty;			/* TRUE if output is not a tty (i.e. pipe) */
              -int nodelay_read;		/* TRUE if NDELAY is set */
              -
              -#ifdef TERMIOS
              -#define TTY_IS_NOECHO	!(new_modes.c_lflag & ECHO)
              -#define TTY_IS_OUT_TRANS (new_modes.c_oflag & OPOST)
              -#define TTY_IS_CHAR_MODE !(new_modes.c_lflag & ICANON)
              -#define TTY_WAS_CS8 ((old_modes.c_cflag & CSIZE) == CS8)
              -#define TTY_WAS_XON_XOFF (old_modes.c_iflag & (IXON|IXOFF))
              -#else
              -#define TTY_IS_NOECHO	!(new_modes.sg_flags & (ECHO))
              -#define TTY_IS_OUT_TRANS (new_modes.sg_flags & (CRMOD))
              -#define TTY_IS_CHAR_MODE (new_modes.sg_flags & (RAW|CBREAK))
              -#define TTY_WAS_CS8	 (old_modes.sg_flags & (PASS8))
              -#define TTY_WAS_XON_XOFF (old_modes.sg_flags & (TANDEM|MDMBUF|DECCTQ))
              -#endif
              -
              -static TTY old_modes, new_modes;
              -
              -void catchsig(void);
              -
              -/*
              - * These are a sneaky way of conditionalizing bit unsets so strict-POSIX
              - * systems won't see them.
              - */
              -#ifndef XCASE
              -#define XCASE	0
              -#endif
              -#ifndef OLCUC
              -#define OLCUC	0
              -#endif
              -#ifndef IUCLC
              -#define IUCLC	0
              -#endif
              -#ifndef TABDLY
              -#define	TABDLY	0
              -#endif
              -#ifndef IXANY
              -#define	IXANY	0
              -#endif
              -
              -void
              -tty_raw(int minch GCC_UNUSED, int mask)
              -{				/* set tty to raw noecho */
              -	new_modes = old_modes;
              -#ifdef TERMIOS
              -#if HAVE_SELECT
              -	new_modes.c_cc[VMIN] = 1;
              -#else
              -	new_modes.c_cc[VMIN] = minch;
              -#endif
              -	new_modes.c_cc[VTIME] = 2;
              -	new_modes.c_lflag &=
              -		~(ISIG | ICANON | XCASE | ECHO | ECHOE | ECHOK | ECHONL);
              -#ifdef LOBLK
              -	new_modes.c_lflag &= ~LOBLK;
              -#endif
              -	new_modes.c_oflag &= ~(OPOST | OLCUC | TABDLY);
              -	if (mask == ALLOW_PARITY) {
              -		new_modes.c_cflag &= ~(CSIZE | PARENB | HUPCL);
              -		new_modes.c_cflag |= CS8;
              -	}
              -	new_modes.c_iflag &=
              -		~(IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK | ISTRIP | INLCR | IGNCR | ICRNL |
              -		IUCLC | IXON | IXANY | IXOFF);
              -#else
              -	new_modes.sg_flags |= RAW;
              -#endif
              -	if (not_a_tty)
              -		return;
              -	PUT_TTY(fileno(stdin), &new_modes);
              -}
              -
              -void 
              -tty_set(void)
              -{				/* set tty to special modes */
              -	new_modes = old_modes;
              -#ifdef TERMIOS
              -	new_modes.c_cc[VMIN] = 1;
              -	new_modes.c_cc[VTIME] = 1;
              -	new_modes.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL);
              -#if defined(ONLCR) && defined(OCRNL) && defined(ONLRET) && defined(OFILL)
              -	new_modes.c_oflag &= ~(ONLCR | OCRNL | ONLRET | OFILL);
              -#else
              -	new_modes.c_oflag &= ~(OPOST);
              -#endif
              -	if (char_mask == ALLOW_PARITY)
              -		new_modes.c_iflag &= ~ISTRIP;
              -	switch (select_xon_xoff) {
              -	case 0:
              -		new_modes.c_iflag &= ~(IXON | IXOFF);
              -		break;
              -	case 1:
              -#if defined(sequent) && sequent
              -		/* the sequent System V emulation is broken */
              -		new_modes = old_modes;
              -		new_modes.c_cc[VEOL] = 6;	/* control F  (ACK) */
              -#endif
              -		new_modes.c_iflag |= IXON | IXOFF;
              -		break;
              -	}
              -	switch (select_delay_type) {
              -	case 0:
              -#ifdef NLDLY
              -		new_modes.c_oflag &=
              -			~(NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY);
              -#endif	/* NLDLY */
              -		break;
              -	case 1:
              -#ifdef NLDLY
              -		new_modes.c_oflag &=
              -			~(NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY);
              -#endif	/* NLDLY */
              -#ifdef NL1
              -		new_modes.c_oflag |= NL1 | CR2;
              -#endif	/* NL1 */
              -		break;
              -	}
              -	if (!(new_modes.c_oflag & (unsigned long) ~OPOST))
              -		new_modes.c_oflag &= (unsigned long) ~OPOST;
              -#else
              -	new_modes.sg_flags |= RAW;
              -	if (not_a_tty)
              -		return;
              -#endif
              -	PUT_TTY(fileno(stdin), &new_modes);
              -}
              -
              -
              -void 
              -tty_reset(void)
              -{				/* reset the tty to the original modes */
              -	fflush(stdout);
              -	if (not_a_tty)
              -		return;
              -	PUT_TTY(fileno(stdin), &old_modes);
              -}
              -
              -
              -void 
              -tty_init(void)
              -{				/* ATT terminal init */
              -#if defined(F_GETFL) && defined(O_NDELAY)
              -	int flags;
              -
              -	flags = fcntl(fileno(stdin), F_GETFL, 0);
              -	nodelay_read = flags & O_NDELAY;
              -#else
              -	nodelay_read = FALSE;
              -#endif
              -	not_a_tty = FALSE;
              -	if (GET_TTY(fileno(stdin), &old_modes) == -1) {
              -		if (errno == ENOTTY) {
              -			tty_frame_size = 20;
              -			not_a_tty = TRUE;
              -			return;
              -		}
              -		printf("tcgetattr error: %d\n", errno);
              -		exit(1);
              -	}
              -	/* if TAB3 is set then setterm() wipes out tabs (ht) */
              -	new_modes = old_modes;
              -#ifdef TERMIOS
              -#ifdef TABDLY
              -	new_modes.c_oflag &= ~TABDLY;
              -#endif	/* TABDLY */
              -#endif
              -	if (PUT_TTY(fileno(stdin), &new_modes) == -1) {
              -		printf("tcsetattr error: %d\n", errno);
              -		exit(1);
              -	}
              -#ifdef sequent
              -	/* the sequent ATT emulation is broken soooo. */
              -	old_modes.c_cflag &= ~(CSIZE | CSTOPB);
              -	old_modes.c_cflag |= CS7 | PARENB;
              -#endif
              -	catchsig();
              -#ifdef TERMIOS
              -	switch (old_modes.c_cflag & CSIZE) {
              -#if defined(CS5) && (CS5 != 0)
              -	case CS5:
              -		tty_frame_size = 10;
              -		break;
              -#endif
              -#if defined(CS6) && (CS6 != 0)
              -	case CS6:
              -		tty_frame_size = 12;
              -		break;
              -#endif
              -#if defined(CS7) && (CS7 != 0)
              -	case CS7:
              -		tty_frame_size = 14;
              -		break;
              -#endif
              -#if defined(CS8) && (CS8 != 0)
              -	case CS8:
              -		tty_frame_size = 16;
              -		break;
              -#endif
              -	}
              -	tty_frame_size += 2 +
              -		((old_modes.c_cflag & PARENB) ? 2 : 0) +
              -		((old_modes.c_cflag & CSTOPB) ? 4 : 2);
              -#else
              -	tty_frame_size = 6 +
              -		(old_modes.sg_flags & PASS8) ? 16 : 14;
              -#endif
              -}
              -
              -/*
              -**	stty_query(question)
              -**
              -**	Does the current driver settings have this property?
              -*/
              -int
              -stty_query(int q)
              -{
              -	switch (q) {
              -		case TTY_NOECHO:
              -		return TTY_IS_NOECHO;
              -	case TTY_OUT_TRANS:
              -		return TTY_IS_OUT_TRANS;
              -	case TTY_CHAR_MODE:
              -		return TTY_IS_CHAR_MODE;
              -	}
              -	return (-1);
              -}
              -
              -/*
              -**	initial_stty_query(question)
              -**
              -**	Did the initial driver settings have this property?
              -*/
              -int
              -initial_stty_query(int q)
              -{
              -	switch (q) {
              -	case TTY_8_BIT:
              -		return TTY_WAS_CS8;
              -	case TTY_XON_XOFF:
              -		return TTY_WAS_XON_XOFF;
              -	}
              -	return (-1);
              -}
              -
              -#if HAVE_SELECT && defined(FD_ZERO)
              -static int
              -char_ready(void)
              -{
              -	int n;
              -	fd_set ifds;
              -	struct timeval tv;
              -
              -	FD_ZERO(&ifds);
              -	FD_SET(fileno(stdin), &ifds);
              -	tv.tv_sec = 0;
              -	tv.tv_usec = 200000;
              -	n = select(fileno(stdin)+1, &ifds, NULL, NULL, &tv);
              -	return (n != 0);
              -}
              -
              -#else
              -#ifdef FIONREAD
              -int
              -char_ready(void)
              -{
              -	int i, j;
              -
              -	/* the following loop has to be tuned for each computer */
              -	for (j = 0; j < 1000; j++) {
              -		ioctl(fileno(stdin), FIONREAD, &i);
              -		if (i)
              -			return i;
              -	}
              -	return i;
              -}
              -
              -#else
              -#if defined(__BEOS__)
              -int
              -char_ready(void)
              -{
              -	int n = 0;
              -	int howmany = ioctl(0, 'ichr', &n);
              -	return (howmany >= 0 && n > 0);
              -}
              -#else
              -#define char_ready() 1
              -#endif
              -#endif
              -#endif
              -
              -/*
              -**	spin_flush()
              -**
              -**	Wait for the input stream to stop.
              -**	Throw away all input characters.
              -*/
              -void
              -spin_flush(void)
              -{
              -	unsigned char buf[64];
              -
              -	fflush(stdout);
              -	event_start(TIME_FLUSH);	/* start the timer */
              -	do {
              -		if (char_ready()) {
              -			(void) read(fileno(stdin), &buf, sizeof(buf));
              -		}
              -	} while (event_time(TIME_FLUSH) < 400000);
              -}
              -
              -/*
              -**	read_key(input-buffer, length-of-buffer)
              -**
              -**	read one function key from the input stream.
              -**	A null character is converted to 0x80.
              -*/
              -void 
              -read_key(char *buf, int max)
              -{
              -	int got, ask, i, l;
              -	char *s;
              -
              -	*buf = '\0';
              -	s = buf;
              -	fflush(stdout);
              -	/* ATT unix may return 0 or 1, Berkeley Unix should be 1 */
              -	while (read(fileno(stdin), s, 1) == 0);
              -	++s;
              -	--max;
              -	while (max > 0 && (ask = char_ready())) {
              -		if (ask > max) {
              -			ask = max;
              -		}
              -		if ((got = read(fileno(stdin), s, (unsigned) ask))) {
              -			s += got;
              -		} else {
              -			break;
              -		}
              -		max -= got;
              -	}
              -	*s = '\0';
              -	l = s - buf;
              -	for (s = buf, i = 0; i < l; i++) {
              -		if ((*s & 0x7f) == 0) {
              -			/* convert nulls to 0x80 */
              -			*(unsigned char *)s = 128;
              -		} else {
              -			/* strip high order bits (if any) */
              -			*s &= char_mask;
              -		}
              -	}
              -}
              -
              -
              -void 
              -ignoresig(void)
              -{
              -	/* ignore signals */
              -	signal(SIGINT, SIG_IGN);
              -	signal(SIGHUP, SIG_IGN);
              -	signal(SIGQUIT, SIG_IGN);
              -	signal(SIGTERM, SIG_IGN);
              -	signal(SIGALRM, SIG_IGN);
              -}
              -
              - /*
              -    onintr( )
              - 
              - is the interrupt handling routine onintr turns off interrupts while doing
              -    clean-up
              - 
              - onintr always exits fatally
              - */
              -
              -
              -static RETSIGTYPE 
              -onintr(int sig GCC_UNUSED)
              -{
              -	ignoresig();
              -	tty_reset();
              -	exit(1);
              -}
              -
              -
              - /*
              -    catchsig( )
              - 
              - set up to field interrupts (via function onintr( )) so that if interrupted
              -    we can restore the correct terminal modes
              - 
              - catchsig simply returns
              - */
              -
              -
              -void 
              -catchsig(void)
              -{
              -	if ((signal(SIGINT, SIG_IGN)) == SIG_DFL)
              -		signal(SIGINT, onintr);
              -
              -	if ((signal(SIGHUP, SIG_IGN)) == SIG_DFL)
              -		signal(SIGHUP, onintr);
              -
              -	if ((signal(SIGQUIT, SIG_IGN)) == SIG_DFL)
              -		signal(SIGQUIT, onintr);
              -
              -	if ((signal(SIGTERM, SIG_IGN)) == SIG_DFL)
              -		signal(SIGTERM, onintr);
              -
              -}
              -
              -/*
              -**	alarm_event(sig)
              -**
              -**	Come here for an alarm event
              -*/
              -static void
              -alarm_event(
              -	int sig GCC_UNUSED)
              -{
              -	no_alarm_event = 0;
              -}
              -
              -/*
              -**	set_alarm_clock(seconds)
              -**
              -**	Set the alarm clock to fire in 
              -*/
              -void
              -set_alarm_clock(
              -	int seconds)
              -{
              -	signal(SIGALRM, alarm_event);
              -	no_alarm_event = 1;
              -	(void) alarm((unsigned) seconds);
              -}
              diff -Naur ncurses-5.6.orig/tack/tack.1 ncurses-5.6/tack/tack.1
              --- ncurses-5.6.orig/tack/tack.1	2006-04-22 18:26:55.000000000 -0400
              +++ ncurses-5.6/tack/tack.1	1969-12-31 19:00:00.000000000 -0500
              @@ -1,340 +0,0 @@
              -.\"***************************************************************************
              -.\" Copyright (c) 1998-2005,2006 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"), to deal in the Software without restriction, including      *
              -.\" without limitation the rights to use, copy, modify, merge, publish,      *
              -.\" distribute, distribute with modifications, sublicense, and/or sell       *
              -.\" copies of the Software, and to permit persons to whom the Software is    *
              -.\" furnished to do so, subject to the following conditions:                 *
              -.\"                                                                          *
              -.\" The above copyright notice and this permission notice shall be included  *
              -.\" in all copies or substantial portions of the Software.                   *
              -.\"                                                                          *
              -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              -.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              -.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              -.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              -.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              -.\"                                                                          *
              -.\" Except as contained in this notice, the name(s) of the above copyright   *
              -.\" holders shall not be used in advertising or otherwise to promote the     *
              -.\" sale, use or other dealings in this Software without prior written       *
              -.\" authorization.                                                           *
              -.\"***************************************************************************
              -.\"
              -.\" $Id: tack.1,v 1.3 2006/04/22 22:26:55 tom Exp $
              -.TH tack 1M ""
              -.ds n 5
              -.ds d @TERMINFO@
              -.SH NAME
              -\fBtack\fR - \fIterminfo\fR action checker
              -.SH SYNOPSIS
              -\fBtack\fR [-itV] [term]
              -.br
              -.SH DESCRIPTION
              -The \fBtack\fR program has three purposes:
              -(1) to help you build a new terminfo entry describing an unknown terminal,
              -(2) to test the correctness of an existing entry, and
              -(3) to develop the correct pad timings needed to ensure that screen updates
              -don't fall behind the incoming data stream.
              -.PP
              -\fBTack\fR presents a series of screen-painting and interactive
              -tests in ways which are intended to make any mismatches between the
              -terminfo entry and reality visually obvious. 
              -\fBTack\fR also provides tools that can help in understanding how
              -the terminal operates.
              -.SS OPTIONS
              -.TP
              -.I "\-i"
              -Usually \fBtack\fR will send the reset and init strings to the terminal
              -when the program starts up.  The \fI-i\fR option will inhibit the
              -terminal initialization.
              -.TP
              -.I "\-t"
              -Tell \fBtack\fR to override the terminfo settings for basic terminal
              -functions.  When this option is set \fBtack\fR will translate
              -(cr) to \\r, (cud1) to \\n, (ind) to \\n, (nel) to \\r\\n,
              -(cub1) to \\b, (bel) to \\007, (ff) to \\f and (ht) to \\t.
              -.TP
              -.I "\-V"
              -Display the version information and exit.
              -.TP
              -.I "term"
              -Terminfo terminal name to be tested.  If not present then the $TERM
              -environment variable will be used.
              -.SH OVERVIEW
              -Since \fBtack\fR is designed to test terminfo's it is not possible
              -to rely on the correctness of the terminfo data base.  Because of this
              -the menuing system used with \fBtack\fR is vary primitive.  When a
              -menu is printed it will scroll the entire screen.  To compensate
              -for this verbose menu system \fBtack\fR permits menu selection
              -type ahead.
              -If you already know what action you would like \fBtack\fR to perform
              -then you can enter that value immediately and avoid the menu display.
              -When in doubt the question mark (?) is a good character to type.
              -A carriage return will execute the default action.  These default
              -actions are designed to run all the standard tests.
              -.PP
              -When \fBtack\fR first comes up it will display some basic information
              -about the terminal.  Take some time to verify this information.
              -If it is wrong many of the subsequent tests will fail.  The most
              -important item is the screen size.  If the screen size is wrong there
              -is no point in proceeding.  (home) and (clear) are also critical
              -to the success of subsequent tests.  The values of (cr) (ind)
              -(cub1) and (ht) may effect the tests if they are defined incorrectly.
              -If they are undefined \fBtack\fR will set them to reasonable defaults.
              -The last two entries on the display are the enquire and acknowledge strings.
              -These strings are taken from the user strings (u9) and (u8).
              -.PP
              -By now you must be wondering why the terminfo names are enclosed
              -in parenthesis.  This has no profound meaning other than it makes
              -them stand out.  The \fBtack\fR program uses this convention any time
              -it displays a terminfo name.  Remember \fBtack\fR is designed to
              -rely on as little of the terminfo entry as possible.
              -.SH CREATING NEW ENTRIES
              -\fBTack\fR has a number of tools that are designed to help gather
              -information about the terminal.  Although these functions are not
              -dependent on terminal type, you may wish to execute \fBtack\fR
              -with options \fI\-it\fR.  This will turn off initialization
              -and default the standard entries.
              -.PP
              -These tools may be reached from the main menu by selecting
              -the 'tools' entry.
              -.PP
              -\fBEcho tool\fR:  All data typed from the keyboard will be echoed back
              -to the terminal.  Control characters are not translated to the up arrow format
              -but are sent as control characters.  This allows you to test an escape
              -sequence and see what it actually does.  You may also elect to
              -\fBenable hex output on echo tool\fR this will echo the characters in
              -hexadecimal.  Once the test is running you may enter the 'lines'
              -or 'columns' keywords which will display a pattern that will help
              -you determine your screen size.  A complete list of keywords will
              -be displayed when the test starts.  Type 'help' to redisplay
              -the list of available commands.
              -.PP
              -\fBReply tool\fR:  This tool acts much like the echo tool, but
              -control characters that are sent from the terminal more than one character
              -after a carriage return will be expanded to the up arrow format.  For example
              -on a standard ANSI terminal you may type:
              -
              -		CR ESC [ c
              -
              -and the response will be echoed as something like:
              -
              -		^[ [ ? 6 c
              -.PP
              -\fBANSI sgr display\fR:  This test assumes you have an ANSI terminal.  It
              -goes through attribute numbers 0 to 79, displaying each in turn and using that
              -SGR number to write the text.  This shows you which of the SGR
              -modes are actually implemented by the terminal.  Note: some terminals (such as
              -Tektronix color) use the private use characters to augment the functionality of
              -the SGR command.  These private use characters may be interjected into the
              -escape sequence by typing the character ( <, =, >, ? ) after the original
              -display has been shown.
              -.PP
              -\fBANSI status reports\fR:  This test queries the terminal in standard
              -ANSI/VT-100 fashion.  The results of this test may help
              -determine what options are supported by your terminal.
              -.PP
              -\fBANSI character sets\fR:  This test displays the character sets
              -available on a ANSI/VT-100 style terminal.
              -Character sets on a real VT-100 terminal are usually defined
              -with smacs=\\E(0 and rmacs=\\E(B.  The first character after the
              -escape defines the font bank.  The second character defines the
              -character set.  This test allows you to view any of the possible
              -combinations.  Private use character sets are defined by the digits.
              -Standard character sets are located in the alphabetic range.
              -.SH VERIFYING AN EXISTING ENTRY
              -.PP
              -You can verify the correctness of an entry with the `begin testing'
              -function.  This entry is the default action and will be chosen
              -if you hit carriage return (or enter).  This will bring up a
              -secondary menu that allows you to select more specific tests.
              -.PP
              -The general philosophy of the program is, for each capability, to send an
              -appropriate test pattern to the terminal then send a description of
              -what the user should expect.  Occasionally (as when checking function-key
              -capabilities) the program will ask you to enter input for it to check.
              -.PP
              -If the test fails then you have the option of dynamically changing
              -the terminfo entry and re-running the test.  This is done with
              -the 'edit terminfo' menu item.  The edit submenu allows you to change
              -the offending terminfo entry and immediately retest the capability.
              -The edit menu lets you do other things with the terminfo, such as;
              -display the entire terminfo entry,
              -display which caps have been tested and display which caps cannot
              -be tested.  This menu also allows you to write the newly modified
              -terminfo to disc.  If you have made any modifications to the
              -terminfo \fBtack\fR will ask you if you want to save the file
              -to disc before it exits.  The filename will be the same as the terminal name.
              -After the program exits you can run the tic(1M) compiler on the
              -new terminfo to install it in the terminfo data base.
              -.PP
              -.SH CORRECTING PAD TIMINGS
              -.SS Theory of Overruns and Padding
              -.PP
              -Some terminals require significant amounts of time (that is, more than one
              -transmitted-character interval) to do screen updates that change large
              -portions of the screen, such as screen clears, line insertions,
              -line deletions, and scrolls (including scrolls triggered by line feeds
              -or a write to the lowest, right-hand-most cell of the screen).
              -.PP
              -If the computer continues to send characters to the terminal while one
              -of these time-consuming operations is going on, the screen may be garbled.
              -Since the length of a character transmission time varies inversely with
              -transmission speed in cps, entries which function at lower speeds may
              -break at higher speeds.
              -.PP
              -Similar problems result if the host machine is simply sending characters at a
              -sustained rate faster than the terminal can buffer and process them.  In either
              -case, when the terminal cannot process them and can't tell the host to stop
              -soon enough, it will just drop them.  The dropped characters could be text,
              -escape sequences or the escape character itself, causing some really
              -strange-looking displays.  This kind of glitch is called an \fIoverrun\fR.
              -.PP
              -In terminfo entries, you can attach a \fBpad time\fR to each string capability
              -that is a number of milliseconds to delay after sending it.  This will give
              -the terminal time to catch up and avoid overruns.
              -.PP
              -If you are running a software terminal emulator, or you are on an X pseudo-tty,
              -or your terminal is on an RS-232C line which correctly handles RTS/CTS
              -hardware flow control, then pads are not strictly necessary.  However, some
              -display packages (such as ncurses(3X)) use the pad counts to calculate
              -the fastest way to implement certain functions.
              -For example: scrolling the screen may be faster than deleting the top line.
              -.PP
              -One common way to avoid overruns is with XON/XOFF handshaking.
              -But even this handshake may have problems at high baud rates.
              -This is a result of the way XON/XOFF works.  The terminal tells
              -the host to stop with an XOFF.  When the host gets this character, it stops
              -sending.  However, there is a small amount of time between the stop request and
              -the actual stop.  During this window, the terminal must continue to accept
              -characters even though it has told the host to stop.  If the terminal sends
              -the stop request too late, then its internal buffer will overflow.  If it sends
              -the stop character too early, then the terminal is not getting the most
              -efficient use out of its internal buffers.  In a real application at high baud
              -rates, a terminal could get a dozen or more characters before the host gets
              -around to suspending transmission.  Connecting the terminal over a network
              -will make the problem much worse.
              -.PP
              -(RTS/CTS handshaking does not have this problem because the UARTs are
              -signal-connected and the "stop flow" is done at the lowest level, without
              -software intervention).
              -.PP
              -.SS Timing your terminal
              -.PP
              -In order to get accurate timings from your terminal \fBtack\fR 
              -needs to know when the terminal has finished processing all the
              -characters that were sent.  This requires a different type of handshaking
              -than the XON/XOFF that is supported by most terminals.  \fBTack\fR
              -needs to send a request to the terminal and wait for its reply.
              -Many terminals will respond with an ACK when they receive an ENQ.
              -This is the preferred method since the sequence is short.
              -ANSI/VT-100 style terminals can mimic this handshake with the
              -escape sequence that requests 'primary device attributes'.
              -
              -   ESC [ c
              -
              -The terminal will respond with a sequence like:
              -
              -   ESC [ ? 1 ; 0 c
              -
              -\fBTack\fR assumes that (u9) is the enquire sequence and that (u8) is the
              -acknowledge string.  A VT-100 style terminal could set u9=\\E[c
              -and u8=\\E[?1;0c.
              -Acknowledge strings fall into two categories. 
              -1) Strings with a unique terminating character and,
              -2) strings of fixed length.
              -The acknowledge string for the VT-100 is of the first type since
              -it always ends with the letter 'c'.  Some Tektronics terminals
              -have fixed length acknowledge strings.  \fBTack\fR supports both
              -types of strings by scanning for the terminating character until
              -the length of the expected acknowledge string has arrived.
              -(u8) should be set to some typical acknowledge that will be
              -returned when (u9) is sent.
              -.PP
              -\fBTack\fR will test this sequence before running any of the pad
              -tests or the function key tests.  \fBTack\fR will ask you the following:
              -
              -    Hit lower case g to start testing...
              -
              -After it sends this message it will send the enquire string.
              -It will then read characters from the terminal until it sees the
              -letter g.
              -.PP
              -.SS Testing and Repairing Pad Timings
              -.PP
              -The pad timings in distributed terminfo entries are often incorrect.  One
              -major motivation for this program is to make it relatively easy to tune these
              -timings.
              -.PP
              -You can verify and edit the pad timings for a terminal with
              -the `test string capabilities'
              -function (this is also part of the `normal test sequence' function).
              -.PP
              -The key to determining pad times is to find out the effective baud rate of
              -the terminal.  The effective baud rate determines the number of characters
              -per second that the terminal can accept without either handshaking or
              -losing data.  This rate is frequently less than the nominal cps rate on the
              -RS-232 line.
              -.PP
              -\fBTack\fR uses the effective baud rate to judge the duration of the test and
              -how much a particular escape sequence will perturb the terminal.
              -.PP
              -Each pad test has two associated variables that can be tweaked to help verify
              -the correctness of the pad timings.  One is the pad test length.  The other is
              -the pad multiplier, which is used if the pad prefix includes `*'.  In curses
              -use, it is often the first parameter of the capability (if there is one).
              -For a capability like (dch) or (il) this will be the number of character
              -positions or lines affected, respectively.
              -.PP
              -\fBTack\fR will run the pad tests and display the results to the terminal.
              -On capabilities that have multipliers \fBtack\fR will not tell you
              -if the pad needs the multiplier or not.  You must make this decision
              -yourself by rerunning the test with a different multiplier.
              -If the padding changes in proportion to the multiplier than the
              -multiplier is required.  If the multiplier has little or no effect on
              -the suggested padding then the multiplier is not needed.
              -Some capabilities will take several runs to get a good feel for
              -the correct values.  You may wish to make the test longer
              -to get more accurate results.  System load will also effect the
              -results (a heavily loaded system will not stress the
              -terminal as much, possibly leading to pad timings that are too short).
              -.PP
              -.SH NOTE
              -The tests done at the beginning of the program are assumed to be correct later
              -in the code.  In particular, \fBtack\fR displays the number of lines and
              -columns indicated in the terminfo entry as part of its initial output.
              -If these values are wrong a large number of tests will fail or give incorrect
              -results.
              -.SH FILES
              -.TP 12
              -tack.log
              -If logging is enabled then all characters written to the terminal
              -will also be written to the log file.  This gives you the ability
              -to see how the tests were performed.  This feature is disabled by default.
              -.TP 12
              -.I "term"
              -If you make changes to the terminfo entry \fBtack\fR will save
              -the new terminfo to a file.  The file will have the same name
              -as the terminal name.
              -.SH SEE ALSO
              -\fBterminfo\fR(\*n), \fBncurses\fR(3X), \fBtic\fR(1M), \fBinfocmp\fR(1M).
              -You should also have the documentation supplied by the terminal
              -manufacturer.
              -.SH BUGS
              -If the screen size is incorrect, many of the tests will fail.
              -.SH AUTHOR
              -Concept, design, and original implementation by
              -Daniel Weaver .  Portions of the code and
              -documentation are by Eric S. Raymond .
              -.\"#
              -.\"# The following sets edit modes for GNU EMACS
              -.\"# Local Variables:
              -.\"# mode:nroff
              -.\"# fill-column:79
              -.\"# End:
              diff -Naur ncurses-5.6.orig/tack/tack.c ncurses-5.6/tack/tack.c
              --- ncurses-5.6.orig/tack/tack.c	2005-09-17 15:49:16.000000000 -0400
              +++ ncurses-5.6/tack/tack.c	1969-12-31 19:00:00.000000000 -0500
              @@ -1,603 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -#include 
              -
              -MODULE_ID("$Id: tack.c,v 1.4 2005/09/17 19:49:16 tom Exp $")
              -
              -/*
              -   This program is designed to test terminfo, not curses.  Therefore
              -   I have used as little of curses as possible.
              -
              -   Pads associated with the following capabilities are used to set
              -   delay times in the handler:  (cr), (ind), (cub1), (ff), (tab).
              -
              -   I use the (nxon) capability to set the tty handler with/without
              -   xon/xoff.  If (smxon)/(rmxon) is defined I will change the terminal
              -   too.
              -
              -   (xon) inhibits the sending of delay characters in putp().
              -   If the terminal is defined with no padding then the (xon) boolean
              -   is a don't care.  In this case I recommend that it be reset.
              - */
              -
              -/*****************************************************************************
              - *
              - * Option processing
              - *
              - *****************************************************************************/
              -
              -/* options and modes */
              -int debug_level;		/* debugging level */
              -int translate_mode;		/* translate tab, bs, cr, lf, ff */
              -int scan_mode;			/* use scan codes */
              -int char_mask;			/* either 0xFF else 0x7F, eight bit data mask */
              -int select_delay_type;		/* set handler delays for  */
              -int select_xon_xoff;		/* TTY driver XON/XOFF mode select */
              -int hex_out;			/* Display output in hex */
              -int send_reset_init;		/* Send the reset and initialization strings */
              -FILE *log_fp;			/* Terminal logfile */
              -
              -/*****************************************************************************
              - *
              - * Menu definitions
              - *
              - *****************************************************************************/
              -
              -static void tools_hex_echo(struct test_list *, int *, int *);
              -static void tools_debug(struct test_list *, int *, int *);
              -
              -static char hex_echo_menu_entry[80];
              -
              -static struct test_list tools_test_list[] = {
              -	{0, 0, 0, 0, "s) ANSI status reports", tools_status, 0},
              -	{0, 0, 0, 0, "g) ANSI SGR modes (bold, underline, reverse)", tools_sgr, 0},
              -	{0, 0, 0, 0, "c) ANSI character sets", tools_charset, 0},
              -	{0, 0, 0, 0, hex_echo_menu_entry, tools_hex_echo, 0},
              -	{0, 0, 0, 0, "e) echo tool", tools_report, 0},
              -	{1, 0, 0, 0, "r) reply tool", tools_report, 0},
              -	{0, 0, 0, 0, "p) performance testing", 0, &sync_menu},
              -	{0, 0, 0, 0, "i) send reset and init", menu_reset_init, 0},
              -	{0, 0, "u8) (u9", 0, "u) test ENQ/ACK handshake", sync_handshake, 0},
              -	{0, 0, 0, 0, "d) change debug level", tools_debug, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -static struct test_menu tools_menu = {
              -	0, 'q', 0, "Tools Menu", "tools",
              -	0, 0, tools_test_list, 0, 0, 0
              -};
              -
              -static void tty_width(struct test_list *, int *, int *);
              -static void tty_delay(struct test_list *, int *, int *);
              -static void tty_xon(struct test_list *, int *, int *);
              -static void tty_trans(struct test_list *, int *, int *);
              -static void tty_show_state(struct test_menu *);
              -
              -static char tty_width_menu[80];
              -static char tty_delay_menu[80];
              -static char tty_xon_menu[80];
              -static char tty_trans_menu[80];
              -static char enable_xon_xoff[] = {"x) enable xon/xoff"};
              -static char disable_xon_xoff[] = {"x) disable xon/xoff"};
              -
              -static struct test_list tty_test_list[] = {
              -	{0, 0, 0, 0, tty_width_menu, tty_width, 0},
              -	{0, 0, 0, 0, tty_delay_menu, tty_delay, 0},
              -	{0, 0, 0, 0, tty_xon_menu, tty_xon, 0},
              -	{0, 0, 0, 0, tty_trans_menu, tty_trans, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -static struct test_menu tty_menu = {
              -	0, 'q', 0, "Terminal and driver configuration",
              -	"tty", 0,
              -	tty_show_state, tty_test_list, 0, 0, 0
              -};
              -
              -struct test_menu edit_menu = {
              -	0, 'q', 0, "Edit terminfo menu",
              -	"edit", 0,
              -	0, edit_test_list, 0, 0, 0
              -};
              -
              -static struct test_menu mode_menu = {
              -	0, 'n', 0, "Test modes and glitches:",
              -	"mode", "n) run standard tests",
              -	0, mode_test_list, 0, 0, 0
              -};
              -
              -static struct test_menu acs_menu = {
              -	0, 'n', 0,
              -	"Test alternate character set and graphics rendition:",
              -	"acs", "n) run standard tests",
              -	0, acs_test_list, 0, 0, 0
              -};
              -
              -static struct test_menu color_menu = {
              -	0, 'n', 0,
              -	"Test color:",
              -	"color", "n) run standard tests",
              -	0, color_test_list, 0, 0, 0
              -};
              -
              -static struct test_menu crum_menu = {
              -	0, 'n', 0,
              -	"Test cursor movement:",
              -	"move", "n) run standard tests",
              -	0, crum_test_list, 0, 0, 0
              -};
              -
              -static struct test_menu funkey_menu = {
              -	0, 'n', 0,
              -	"Test function keys:",
              -	"fkey", "n) run standard tests",
              -	sync_test, funkey_test_list, 0, 0, 0
              -};
              -
              -static struct test_menu printer_menu = {
              -	0, 'n', 0,
              -	"Test printer:",
              -	"printer", "n) run standard tests",
              -	0, printer_test_list, 0, 0, 0
              -};
              -
              -static void pad_gen(struct test_list *, int *, int *);
              -
              -static struct test_menu pad_menu = {
              -	0, 'n', 0,
              -	"Test padding and string capabilities:",
              -	"pad", "n) run standard tests",
              -	sync_test, pad_test_list, 0, 0, 0
              -};
              -
              -static struct test_list normal_test_list[] = {
              -	{0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu},
              -	{0, 0, 0, 0, "i) send reset and init", menu_reset_init, 0},
              -	{MENU_NEXT, 0, 0, 0, "x) test modes and glitches", 0, &mode_menu},
              -	{MENU_NEXT, 0, 0, 0, "a) test alternate character set and graphic rendition", 0, &acs_menu},
              -	{MENU_NEXT, 0, 0, 0, "c) test color", 0, &color_menu},
              -	{MENU_NEXT, 0, 0, 0, "m) test cursor movement", 0, &crum_menu},
              -	{MENU_NEXT, 0, 0, 0, "f) test function keys", 0, &funkey_menu},
              -	{MENU_NEXT, 0, 0, 0, "p) test padding and string capabilities", 0, &pad_menu},
              -	{0, 0, 0, 0, "P) test printer", 0, &printer_menu},
              -	{MENU_MENU, 0, 0, 0, "/) test a specific capability", 0, 0},
              -	{0, 0, 0, 0, "t) auto generate pad delays", pad_gen, &pad_menu},
              -	{0, 0, "u8) (u9", 0, 0, sync_handshake, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -
              -static struct test_menu normal_menu = {
              -	0, 'n', 0, "Main test menu",
              -	"test", "n) run standard tests",
              -	0, normal_test_list, 0, 0, 0
              -};
              -
              -static void start_tools(struct test_list *, int *, int *);
              -static void start_modes(struct test_list *, int *, int *);
              -static void start_basic(struct test_list *, int *, int *);
              -static void start_log(struct test_list *, int *, int *);
              -
              -static char logging_menu_entry[80] = "l) start logging";
              -
              -static struct test_list start_test_list[] = {
              -	{0, 0, 0, 0, "b) display basic information", start_basic, 0},
              -	{0, 0, 0, 0, "m) change modes", start_modes, 0},
              -	{0, 0, 0, 0, "t) tools", start_tools, 0},
              -	{MENU_COMPLETE, 0, 0, 0, "n) begin testing", 0, &normal_menu},
              -	{0, 0, 0, 0, logging_menu_entry, start_log, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -	
              -
              -static struct test_menu start_menu = {
              -	0, 'n', 0, "Main Menu", "tack", 0,
              -	0, start_test_list, 0, 0, 0
              -};
              -
              -static struct test_list write_terminfo_list[] = {
              -	{0, 0, 0, 0, "w) write the current terminfo to a file", save_info, 0},
              -	{MENU_LAST, 0, 0, 0, 0, 0, 0}
              -};
              -
              -/*****************************************************************************
              - *
              - * Menu command interpretation.
              - *
              - *****************************************************************************/
              -
              -/*
              -**	tools_hex_echo(testlist, state, ch)
              -**
              -**	Flip the hex echo flag.
              -*/
              -static void
              -tools_hex_echo(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (hex_out) {
              -		hex_out = FALSE;
              -		strcpy(hex_echo_menu_entry,
              -			"h) enable hex output on echo tool");
              -	} else {
              -		hex_out = TRUE;
              -		strcpy(hex_echo_menu_entry,
              -			"h) disable hex output on echo tool");
              -	}
              -}
              -
              -/*
              -**	tools_debug(testlist, state, ch)
              -**
              -**	Change the debug level.
              -*/
              -static void
              -tools_debug(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	char buf[32];
              -
              -	ptext("Enter a new value: ");
              -	read_string(buf, sizeof(buf));
              -	if (buf[0]) {
              -		sscanf(buf, "%d", &debug_level);
              -	}
              -	sprintf(temp, "Debug level is now %d", debug_level);
              -	ptext(temp);
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	start_tools(testlist, state, ch)
              -**
              -**	Run the generic test tools
              -*/
              -static void
              -start_tools(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (hex_out) {
              -		strcpy(hex_echo_menu_entry,
              -			"h) disable hex output on echo tool");
              -	} else {
              -		strcpy(hex_echo_menu_entry,
              -			"h) enable hex output on echo tool");
              -	}
              -	menu_display(&tools_menu, 0);
              -}
              -
              -/*
              -**	tty_show_state()
              -**
              -**	Display the current state on the tty driver settings
              -*/
              -static void
              -tty_show_state(
              -	struct test_menu *menu GCC_UNUSED)
              -{
              -	put_crlf();
              -	(void) sprintf(temp,
              -		"Accepting %d bits, UNIX delays %d, XON/XOFF %sabled, speed %u, translate %s, scan-code mode %s.",
              -		(char_mask == ALLOW_PARITY) ? 8 : 7,
              -		select_delay_type,
              -		select_xon_xoff ? "en" : "dis",
              -		tty_baud_rate,
              -		translate_mode ? "on" : "off",
              -		scan_mode ? "on" : "off");
              -	ptextln(temp);
              -	put_crlf();
              -}
              -
              -/*
              -**	tty_width(testlist, state, ch)
              -**
              -**	Change the character width
              -*/
              -static void
              -tty_width(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (char_mask == STRIP_PARITY) {
              -		char_mask = ALLOW_PARITY;
              -		strcpy(tty_width_menu, "7) treat terminal as 7-bit");
              -	} else {
              -		char_mask = STRIP_PARITY;
              -		strcpy(tty_width_menu, "8) treat terminal as 8-bit");
              -	}
              -}
              -
              -/*
              -**	tty_delay(testlist, state, ch)
              -**
              -**	Change the delay for  in the TTY driver
              -*/
              -static void
              -tty_delay(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (select_delay_type) {
              -		select_delay_type = FALSE;
              -		strcpy(tty_delay_menu,
              -			"d) enable UNIX tty driver delays for ");
              -	} else {
              -		select_delay_type = TRUE;
              -		strcpy(tty_delay_menu,
              -			"d) disable UNIX tty driver delays for ");
              -	}
              -}
              -
              -/*
              -**	tty_xon(testlist, state, ch)
              -**
              -**	Change the XON/XOFF flags in the TTY driver
              -*/
              -static void
              -tty_xon(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (select_xon_xoff) {
              -		if (needs_xon_xoff) {
              -			ptextln("This terminal is marked as needing XON/XOFF protocol with (nxon)");
              -		}
              -		if (exit_xon_mode) {
              -			tc_putp(exit_xon_mode);
              -		}
              -		xon_xoff = select_xon_xoff = FALSE;
              -		strcpy(tty_xon_menu, enable_xon_xoff);
              -	} else {
              -		if (enter_xon_mode) {
              -			tc_putp(enter_xon_mode);
              -		}
              -		xon_xoff = select_xon_xoff = TRUE;
              -		strcpy(tty_xon_menu, disable_xon_xoff);
              -	}
              -	tty_set();
              -}
              -
              -/*
              -**	tty_trans(testlist, state, ch)
              -**
              -**	Change the translation mode for special characters
              -*/
              -static void
              -tty_trans(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (translate_mode) {
              -		translate_mode = FALSE;
              -		strcpy(tty_trans_menu,
              -			"t) use terminfo values for \\b\\f\\n\\r\\t");
              -	} else {
              -		translate_mode = TRUE;
              -		strcpy(tty_trans_menu,
              -			"t) override terminfo values for \\b\\f\\n\\r\\t");
              -	}
              -}
              -
              -/*
              -**	pad_gen(testlist, state, ch)
              -**
              -**	Menu function for automatic pad generation
              -*/
              -static void
              -pad_gen(
              -	struct test_list *t,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	control_init();
              -	if (tty_can_sync == SYNC_NOT_TESTED) {
              -		verify_time();
              -	}
              -	auto_pad_mode = TRUE;
              -	menu_display(t->sub_menu, ch);
              -	auto_pad_mode = FALSE;
              -}
              -
              -/*
              -**	start_modes(testlist, state, ch)
              -**
              -**	Change the TTY modes
              -*/
              -static void
              -start_modes(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -
              -	if (select_delay_type) {
              -		strcpy(tty_delay_menu,
              -			"d) disable UNIX tty driver delays for ");
              -	} else {
              -		strcpy(tty_delay_menu,
              -			"d) enable UNIX tty driver delays for ");
              -	}
              -	if (char_mask == ALLOW_PARITY) {
              -		strcpy(tty_width_menu,
              -			"7) treat terminal as 7-bit");
              -	} else {
              -		strcpy(tty_width_menu,
              -			"8) treat terminal as 8-bit");
              -	}
              -	if (select_xon_xoff) {
              -		strcpy(tty_xon_menu, disable_xon_xoff);
              -	} else {
              -		strcpy(tty_xon_menu, enable_xon_xoff);
              -	}
              -	if (translate_mode) {
              -		strcpy(tty_trans_menu,
              -			"t) override terminfo values for \\b\\f\\n\\r\\t");
              -	} else {
              -		strcpy(tty_trans_menu,
              -			"t) use terminfo values for \\b\\f\\n\\r\\t");
              -	}
              -	menu_display(&tty_menu, 0);
              -	tty_set();
              -}
              -
              -/*
              -**	start_basic(testlist, state, ch)
              -**
              -**	Display basic terminal information
              -*/
              -static void
              -start_basic(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch)
              -{
              -	display_basic();
              -	*ch = REQUEST_PROMPT;
              -}
              -
              -/*
              -**	start_log(testlist, state, ch)
              -**
              -**	Start/stop in logging function
              -*/
              -static void
              -start_log(
              -	struct test_list *t GCC_UNUSED,
              -	int *state GCC_UNUSED,
              -	int *ch GCC_UNUSED)
              -{
              -	if (logging_menu_entry[5] == 'a') {
              -		ptextln("The log file will capture all characters sent to the terminal.");
              -		if ((log_fp = fopen("tack.log", "w"))) {
              -			ptextln("Start logging to file: tack.log");
              -			strcpy(logging_menu_entry, "l) stop logging");
              -		} else {
              -			ptextln("File open error: tack.log");
              -		}
              -	} else {
              -		if (log_fp) {
              -			fclose(log_fp);
              -			log_fp = 0;
              -		}
              -		ptextln("Terminal output logging stopped.");
              -		strcpy(logging_menu_entry, "l) start logging");
              -	}
              -}
              -
              -/*
              -**	show_usage()
              -**
              -**	Tell the user how its done.
              -*/
              -void
              -show_usage(
              -	char *name)
              -{
              -	(void) fprintf(stderr, "usage: %s [-itV] [term]\n", name);
              -}
              -
              -/*
              -**	print_version()
              -**
              -**	Print version and other useful information.
              -*/
              -void
              -print_version(void)
              -{
              -	printf("tack version %d.%02d\n", MAJOR_VERSION, MINOR_VERSION);
              -	printf("Copyright (C) 1997 Free Software Foundation, Inc.\n");
              -	printf("Tack comes with NO WARRANTY, to the extent permitted by law.\n");
              -	printf("You may redistribute copies of Tack under the terms of the\n");
              -	printf("GNU General Public License.  For more information about\n");
              -	printf("these matters, see the file named COPYING.\n");
              -}
              -
              -
              -/*****************************************************************************
              - *
              - * Main sequence
              - *
              - *****************************************************************************/
              -
              -int
              -main(int argc, char *argv[])
              -{
              -	int i, j;
              -	char *term_variable;
              -
              -	/* scan the option flags */
              -	send_reset_init = TRUE;
              -	translate_mode = FALSE;
              -	term_variable = getenv("TERM");
              -	tty_can_sync = SYNC_NOT_TESTED;
              -	for (i = 1; i < argc; i++) {
              -		if (argv[i][0] == '-') {
              -			for (j = 1; argv[i][j]; j++) {
              -				switch (argv[i][j]) {
              -				case 'V':
              -					print_version();
              -					return (1);
              -				case 'i':
              -					send_reset_init = FALSE;
              -					break;
              -				case 't':
              -					translate_mode = FALSE;
              -					break;
              -				default:
              -					show_usage(argv[0]);
              -					return (0);
              -				}
              -			}
              -		} else {
              -			term_variable = argv[i];
              -		}
              -	}
              -	(void) strcpy(tty_basename, term_variable);
              -
              -	curses_setup(argv[0]);
              -
              -	menu_can_scan(&normal_menu);	/* extract which caps can be tested */
              -	menu_display(&start_menu, 0);
              -
              -	if (user_modified()) {
              -		sprintf(temp, "Hit y to save changes to file: %s  ? ",
              -			tty_basename);
              -		ptext(temp);
              -		if (wait_here() == 'y') {
              -			save_info(write_terminfo_list, &i, &j);
              -		}
              -	}
              -
              -	put_str("\nTerminal test complete\n");
              -	bye_kids(0);
              -	return (0);
              -}
              diff -Naur ncurses-5.6.orig/tack/tack.h ncurses-5.6/tack/tack.h
              --- ncurses-5.6.orig/tack/tack.h	2006-11-25 18:45:00.000000000 -0500
              +++ ncurses-5.6/tack/tack.h	1969-12-31 19:00:00.000000000 -0500
              @@ -1,428 +0,0 @@
              -/*
              -** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
              -** 
              -** This file is part of TACK.
              -** 
              -** TACK is free software; you can redistribute it and/or modify
              -** it under the terms of the GNU General Public License as published by
              -** the Free Software Foundation; either version 2, or (at your option)
              -** any later version.
              -** 
              -** TACK is distributed in the hope that it will be useful,
              -** but WITHOUT ANY WARRANTY; without even the implied warranty of
              -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              -** GNU General Public License for more details.
              -** 
              -** You should have received a copy of the GNU General Public License
              -** along with TACK; see the file COPYING.  If not, write to
              -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
              -** Boston, MA 02110-1301, USA
              -*/
              -
              -/* $Id: tack.h,v 1.16 2006/11/25 23:45:00 tom Exp $ */
              -
              -#ifndef NCURSES_TACK_H_incl
              -#define NCURSES_TACK_H_incl 1
              -
              -/* terminfo action checker include file */
              -
              -#define MAJOR_VERSION 1
              -#define MINOR_VERSION 1
              -
              -#ifdef HAVE_CONFIG_H
              -#include 
              -#else
              -#define RETSIGTYPE void
              -#define GCC_UNUSED /*nothing*/
              -#define HAVE_GETTIMEOFDAY 1
              -#define HAVE_SELECT 1
              -#define HAVE_SYS_TIME_H 1
              -#define HAVE_SYS_TIME_SELECT 1
              -#endif
              -
              -#include 
              -#include 
              -#include 
              -#include 
              -#include 
              -
              -#include 
              -#include 
              -#include 
              -
              -#if USE_RCS_IDS
              -#define MODULE_ID(id) static const char Ident[] = id;
              -#else
              -#define MODULE_ID(id) /*nothing*/
              -#endif
              -
              -#if !HAVE_STRSTR
              -extern char *_nc_strstr(const char *, const char *);
              -#define strstr(h,n) _nc_strstr(h,n)
              -#endif
              -
              -#define CUR_TP      (&(cur_term->type))
              -#define MAX_STRINGS NUM_STRINGS(CUR_TP)
              -#define STR_NAME(n) ExtStrname(CUR_TP,n,strnames)
              -
              -#define UChar(c)    ((unsigned char)(c))
              -
              -extern FILE *log_fp;
              -extern FILE *debug_fp;
              -extern int debug_level;
              -extern char temp[];
              -extern char tty_basename[];
              -extern char tty_shortname[];
              -
              -#define SYNC_FAILED	0
              -#define SYNC_TESTED	1
              -#define SYNC_NOT_TESTED	2
              -#define SYNC_NEEDED	3
              -
              -extern int tty_can_sync;
              -extern int total_pads_sent;	/* count pad characters sent */
              -extern int total_caps_sent;	/* count caps sent */
              -extern int total_printing_characters; /* count printing characters sent */
              -extern int no_alarm_event;	/* TRUE if the alarm has not gone off yet */
              -extern unsigned long usec_run_time; /* length of last test in microseconds */
              -extern int raw_characters_sent;	/* Total output characters */
              -
              -/* Stopwatch event timers */
              -#define TIME_TEST 0
              -#define TIME_SYNC 1
              -#define TIME_FLUSH 2
              -#define MAX_TIMERS 3
              -
              -/* definitions for pad.c */
              -
              -#define EXIT_CONDITION (no_alarm_event && (tt_delay_used < tt_delay_max))
              -#define SLOW_TERMINAL_EXIT if (!test_complete && !EXIT_CONDITION) { break; }
              -#define CAP_NOT_FOUND if (auto_pad_mode) return
              -
              -extern char letters[26+1];
              -#define NEXT_LETTER letter = letters[letter_number =\
              -	letters[letter_number + 1] ? letter_number + 1 : 0]
              -
              -extern int test_complete;	/* counts number of tests completed */
              -extern char letter;
              -extern int letter_number;
              -extern int augment, repeats;
              -extern long char_sent;
              -extern const char *pad_repeat_test;	/* commands that force repeat */
              -
              -extern int replace_mode;
              -extern int char_count, line_count, expand_chars;
              -extern int can_go_home, can_clear_screen;
              -
              -extern int translate_mode, scan_mode;
              -extern int auto_pad_mode;		/* TRUE for auto time tests */
              -extern int char_mask;
              -extern int hex_out;			/* Display output in hex */
              -
              -/* Parity bit macros */
              -#define STRIP_PARITY 0x7f
              -#define ALLOW_PARITY 0xff
              -
              -/* select_delay_type:	0 -> reset all delays
              -			1 -> force long delays
              -			2 -> do not change the delays */
              -extern int select_delay_type;
              -
              -/* select_xon_xoff:	0 -> reset xon/xoff
              -			1 -> set xon/xoff
              -			2 -> do not change xon/xoff */
              -extern int select_xon_xoff;
              -
              -extern int tty_frame_size;
              -extern unsigned tty_baud_rate;
              -extern unsigned long tty_cps;	/* The number of characters per second */
              -extern int not_a_tty, nodelay_read;
              -extern int send_reset_init;
              -
              -/* definitions for stty_query() and initial_stty_query() */
              -#define TTY_CHAR_MODE	0
              -#define TTY_NOECHO	1
              -#define TTY_OUT_TRANS	2
              -#define TTY_8_BIT	3
              -#define TTY_XON_XOFF	4
              -
              -/* scan code definitions */
              -#define MAX_SCAN 256
              -
              -/* translate mode default strings */
              -struct default_string_list {
              -	const char *name;	/* terminfo name */
              -	const char *value;	/* value of default string */
              -	int index;		/* index into the strfname[] array */
              -};
              -
              -#define TM_last 8
              -extern struct default_string_list TM_string[TM_last];
              -
              -/* attribute structure definition */
              -struct mode_list {
              -	const char *name;
              -	const char *begin_mode;
              -	const char *end_mode;
              -	int number;
              -};
              -
              -extern const struct mode_list alt_modes[];
              -extern const int mode_map[];
              -
              -/* Test data base */
              -
              -#define FLAG_CAN_TEST	1
              -#define FLAG_TESTED	2
              -#define FLAG_LABEL	4
              -#define FLAG_FUNCTION_KEY	8
              -
              -/* caps under test data base */
              -
              -#define TT_MAX	8
              -#define MAX_CHANGES (TT_MAX+2)
              -
              -extern int tt_delay_max;	/* max number of milliseconds we can delay */
              -extern int tt_delay_used;	/* number of milliseconds consumed in delay */
              -extern const char *tt_cap[TT_MAX]; /* value of string */
              -extern int tt_affected[TT_MAX];	/* lines or columns effected (repetition
              -				   factor) */
              -extern int tt_count[TT_MAX];	/* Number of times sent */
              -extern int tt_delay[TT_MAX];	/* Number of milliseconds delay */
              -extern int ttp;			/* number of entries used */
              -
              -extern const char *tx_cap[TT_MAX]; /* value of string */
              -extern int tx_affected[TT_MAX];	/* lines or columns effected (repetition
              -				   factor) */
              -extern int tx_count[TT_MAX];	/* Number of times sent */
              -extern int tx_delay[TT_MAX];	/* Number of milliseconds delay */
              -extern int tx_index[TT_MAX];	/* String index */
              -extern int txp;			/* number of entries used */
              -extern int tx_characters;	/* printing characters sent by test */
              -extern unsigned long tx_cps;	/* characters per second */
              -
              -/*
              -	Menu control for tack.
              -*/
              -
              -struct test_results {
              -	struct test_results *next;	/* point to next entry */
              -	struct test_list *test;	/* Test which got these results */
              -	int reps;		/* repeat count */
              -	int delay;		/* delay times 10 */
              -};
              -
              -struct test_list {
              -	int flags;		/* Test description flags */
              -	int lines_needed;	/* Lines needed for test (0->no action) */
              -	const char *caps_done;	/* Caps shown in Done message */
              -	const char *caps_tested; /* Other caps also being tested */
              -	const char *menu_entry;	/* Menu entry text (optional) */
              -				/* Function that does testing */
              -	void (*test_procedure)(struct test_list *, int *, int *);
              -	struct test_menu *sub_menu;	/* Nested sub-menu */
              -};
              -
              -struct test_menu {
              -	int flags;		/* Menu feature flag */
              -	int default_action;	/* Default command if   entered */
              -	const char *menu_text;	/* Describe this test_menu */
              -	const char *menu_title;	/* Title for the menu */
              -	const char *ident;	/* short menu name */
              -	const char *standard_tests;	/* Standard test text */
              -				/* print current settings (optional) */
              -	void (*menu_function)(struct test_menu *);
              -	struct test_list *tests;	/* Pointer to the menu/function pairs */
              -	struct test_list *resume_tests;	/* Standard test resume point */
              -	int resume_state;	/* resume state of test group */
              -	int resume_char;	/* resume ch of test group */
              -};
              -
              -
              -/* menu flags */
              -#define MENU_100c	0x00001a00	/* Augment 100% of columns */
              -#define MENU_90c	0x00001900	/* Augment 90% of columns */
              -#define MENU_80c	0x00001800	/* Augment 80% of columns */
              -#define MENU_70c	0x00001700	/* Augment 70% of columns */
              -#define MENU_60c	0x00001600	/* Augment 60% of columns */
              -#define MENU_50c	0x00001500	/* Augment 50% of columns */
              -#define MENU_40c	0x00001400	/* Augment 40% of columns */
              -#define MENU_30c	0x00001300	/* Augment 30% of columns */
              -#define MENU_20c	0x00001200	/* Augment 20% of columns */
              -#define MENU_10c	0x00001100	/* Augment 10% of columns */
              -#define MENU_LM1	0x00002e00	/* Augment lines - 1 */
              -#define MENU_100l	0x00002a00	/* Augment 100% of lines */
              -#define MENU_90l	0x00002900	/* Augment 90% of lines */
              -#define MENU_50l	0x00002500	/* Augment 50% of lines */
              -#define MENU_lines	0x00002000	/* Augment of lines */
              -#define MENU_columns	0x00001000	/* Augment of columns */
              -#define MENU_LC_MASK	0x00003000	/* Augment mask for lines and columns */
              -#define MENU_1L		0x00002f00	/* Augment == one */
              -#define MENU_1C		0x00001f00	/* Augment == one */
              -#define MENU_ONE	0x00000f00	/* Augment == one */
              -#define MENU_ONE_MASK	0x00000f00	/* Augment == one mask */
              -#define MENU_REP_MASK	0x00003f00	/* Augment mask */
              -
              -#define MENU_CLEAR	0x00010000	/* clear screen */
              -#define MENU_INIT	0x00020000	/* Initialization function */
              -#define MENU_NEXT	0x00040000	/* Next test in sequence */
              -#define MENU_LAST	0x00080000	/* End of menu list */
              -#define MENU_STOP	0x00100000	/* Stop testing next-in-sequence */
              -#define MENU_COMPLETE	0x00200000	/* Test complete after this */
              -#define MENU_MENU	0x00400000	/* Pass the menu name not test name */
              -
              -#define REQUEST_PROMPT 256
              -
              -/* tack.c */
              -extern struct test_menu edit_menu;
              -extern void show_usage(char *);
              -extern void print_version(void);
              -
              -/* output.c */
              -extern char *expand(const char *);
              -extern char *expand_command(const char *);
              -extern char *expand_to(char *, int);
              -extern char *hex_expand_to(char *, int);
              -extern char *print_expand(char *);
              -extern int getchp(int);
              -extern int getnext(int);
              -extern int tc_putch(int);
              -extern int tc_putp(const char *);
              -extern int wait_here(void);
              -extern void go_home(void);
              -extern void home_down(void);
              -extern void maybe_wait(int);
              -extern void ptext(const char *);
              -extern void ptextln(const char *);
              -extern void put_clear(void);
              -extern void put_columns(const char *, int, int);
              -extern void put_cr(void);
              -extern void put_crlf(void);
              -extern void put_dec(char *, int);
              -extern void put_ind(void);
              -extern void put_lf(void);
              -extern void put_newlines(int);
              -extern void put_str(const char *);
              -extern void put_this(int);
              -extern void putchp(int);
              -extern void putln(const char *);
              -extern void read_string(char *, int);
              -extern void three_digit(char *, int);
              -extern void tt_putp(const char *);
              -extern void tt_putparm(NCURSES_CONST char *, int, int, int);
              -extern void tt_tputs(const char *, int);
              -
              -#define put_that(n) put_this((int) (n))
              -
              -/* control.c */
              -extern struct test_list color_test_list[];
              -extern char *liberated(char *);
              -extern char txt_longer_augment[80];
              -extern char txt_longer_test_time[80];
              -extern char txt_shorter_augment[80];
              -extern char txt_shorter_test_time[80];
              -extern int msec_cost(const char *const, int);
              -extern int skip_pad_test(struct test_list *, int *, int *, const char *);
              -extern int sliding_scale(int, int, unsigned long);
              -extern int still_testing(void);
              -extern long event_time(int);
              -extern void control_init(void);
              -extern void dump_test_stats(struct test_list *, int *, int *);
              -extern void event_start(int);
              -extern void longer_augment(struct test_list *, int *, int *);
              -extern void longer_test_time(struct test_list *, int *, int *);
              -extern void pad_test_shutdown(struct test_list *, int);
              -extern void pad_test_startup(int);
              -extern void page_loop(void);
              -extern void set_augment_txt(void);
              -extern void shorter_augment(struct test_list *, int *, int *);
              -extern void shorter_test_time(struct test_list *, int *, int *);
              -
              -/* charset.c */
              -extern struct test_list acs_test_list[];
              -extern void set_attr(int);
              -extern void eat_cookie(void);
              -extern void put_mode(char *);
              -
              -/* crum.c */
              -extern struct test_list crum_test_list[];
              -
              -/* ansi.c */
              -extern void tools_status(struct test_list *, int *, int *);
              -extern void tools_charset(struct test_list *, int *, int *);
              -extern void tools_sgr(struct test_list *, int *, int *);
              -
              -/* edit.c */
              -extern struct test_menu change_pad_menu;
              -extern struct test_list edit_test_list[];
              -extern char *get_string_cap_byname(const char *, const char **);
              -extern int cap_match(const char *names, const char *cap);
              -extern int get_string_cap_byvalue(const char *);
              -extern int user_modified(void);
              -extern void can_test(const char *, int);
              -extern void cap_index(const char *, int *);
              -extern void edit_init(void);
              -extern void save_info(struct test_list *, int *, int *);
              -extern void show_report(struct test_list *, int *, int *);
              -
              -/* fun.c */
              -extern struct test_list funkey_test_list[];
              -extern struct test_list printer_test_list[];
              -extern void enter_key(const char *, char *, char *);
              -extern int tty_meta_prep(void);
              -extern void tools_report(struct test_list *, int *, int *);
              -
              -/* init.c */
              -extern void reset_init(void);
              -extern void display_basic(void);
              -extern void put_name(const char *, const char *);
              -extern void charset_can_test(void);
              -extern void curses_setup(char *);
              -extern void bye_kids(int);
              -
              -/* scan.c */
              -extern char **scan_up, **scan_down, **scan_name;
              -extern int scan_key(void);
              -extern unsigned scan_max;	/* length of longest scan code */
              -extern unsigned *scan_tested, *scan_length;
              -extern void scan_init(char *fn);
              -
              -/* sysdep.c */
              -extern int initial_stty_query(int);
              -extern int stty_query(int);
              -extern void ignoresig(void);
              -extern void read_key(char *, int);
              -extern void set_alarm_clock(int);
              -extern void spin_flush(void);
              -extern void tty_init(void);
              -extern void tty_raw(int, int);
              -extern void tty_reset(void);
              -extern void tty_set(void);
              -
              -/* menu.c */
              -extern char prompt_string[80];	/* menu prompt storage */
              -extern int subtest_menu(struct test_list *, int *, int *);
              -extern struct test_list *augment_test;
              -extern void generic_done_message(struct test_list *, int *, int *);
              -extern void menu_can_scan(const struct test_menu *);
              -extern void menu_clear_screen(struct test_list *, int *, int *);
              -extern void menu_display(struct test_menu *, int *);
              -extern void menu_prompt(void);
              -extern void menu_reset_init(struct test_list *, int *, int *);
              -extern void pad_done_message(struct test_list *, int *, int *);
              -
              -/* modes.c */
              -extern struct test_list mode_test_list[];
              -
              -/* pad.c */
              -extern struct test_list pad_test_list[];
              -
              -/* sync.c */
              -extern struct test_menu sync_menu;
              -extern int tty_sync_error(void);
              -extern void flush_input(void);
              -extern void sync_handshake(struct test_list *, int *, int *);
              -extern void sync_test(struct test_menu *);
              -extern void verify_time(void);
              -
              -#endif /* NCURSES_TACK_H_incl */
              diff -Naur ncurses-5.6.orig/test/Makefile.in ncurses-5.6/test/Makefile.in
              --- ncurses-5.6.orig/test/Makefile.in	2006-10-21 18:56:03.000000000 -0400
              +++ ncurses-5.6/test/Makefile.in	2007-12-21 00:02:36.000000000 -0500
              @@ -1,6 +1,6 @@
              -# $Id: Makefile.in,v 1.92 2006/10/21 22:56:03 tom Exp $
              +# $Id: Makefile.in,v 1.97 2007/04/28 15:28:28 tom Exp $
               ##############################################################################
              -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
              +# Copyright (c) 1998-2006,2007 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"), #
              @@ -77,7 +77,7 @@
               MATH_LIB	= @MATH_LIB@
               
               LD		= @LD@
              -LINK		= @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS)
              +LINK		= @LINK_TESTS@ $(LIBTOOL_LINK) $(CFLAGS)
               
               LDFLAGS		= @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@
               
              @@ -87,16 +87,18 @@
               LDFLAGS_PROFILE	= $(LDFLAGS) $(CFLAGS_PROFILE)
               LDFLAGS_SHARED	= $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
               
              +TEST_ARGS	= @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ 
              +
               # use these for linking with all of the libraries
              -LIBS_DEFAULT	= @TEST_ARGS@ @LIBS@ $(MATH_LIB)
              +LIBS_DEFAULT	= $(TEST_ARGS) @LIBS@ $(MATH_LIB)
               LDFLAGS_DEFAULT	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_DEFAULT)
               
               # use these for linking with the (n)curses library
              -LIBS_CURSES	= `echo "@TEST_ARGS@ @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(MATH_LIB)
              +LIBS_CURSES	= `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(MATH_LIB)
               LDFLAGS_CURSES	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES)
               
               # use these for linking with the tinfo library if we have it, or curses library if not
              -LIBS_TINFO	= @TINFO_ARGS@ @LIBS@ $(MATH_LIB)
              +LIBS_TINFO	= @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LIBS@ $(MATH_LIB)
               LDFLAGS_TINFO	= $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
               
               LINT		= @LINT@
              diff -Naur ncurses-5.6.orig/test/README ncurses-5.6/test/README
              --- ncurses-5.6.orig/test/README	2006-11-04 20:10:56.000000000 -0500
              +++ ncurses-5.6/test/README	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               -------------------------------------------------------------------------------
              --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.               --
              +-- Copyright (c) 1998-2006,2007 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             --
              @@ -25,7 +25,7 @@
               -- sale, use or other dealings in this Software without prior written        --
               -- authorization.                                                            --
               -------------------------------------------------------------------------------
              --- $Id: README,v 1.28 2006/11/05 01:10:56 tom Exp $
              +-- $Id: README,v 1.35 2007/08/18 23:12:24 tom Exp $
               -------------------------------------------------------------------------------
               
               The programs in this directory are designed to test your newest toy :-)
              @@ -210,27 +210,27 @@
               libncurses:
               ----------
               BC				-
              -COLORS				test: echochar ncurses xmas
              -COLOR_PAIR			test: background blue bs cardfile demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
              -COLOR_PAIRS			test: echochar ncurses newdemo
              -COLS				test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field firework foldkeys hashtest ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm
              +COLORS				test: echochar ncurses savescreen xmas
              +COLOR_PAIR			test: background blue bs cardfile demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
              +COLOR_PAIRS			test: echochar ncurses newdemo savescreen
              +COLS				test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar edit_field firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
               ESCDELAY			lib: ncurses
              -LINES				test: cardfile demo_defkey demo_keyok demo_menus edit_field firework hanoi hashtest ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm xmas
              +LINES				test: cardfile demo_defkey demo_keyok demo_menus demo_panels echochar edit_field firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
               PAIR_NUMBER			test: ncurses
               PC				lib: ncurses
               SP				lib: ncurses
               TABSIZE				lib: menu
               UP				-
               acs_map				test: gdc ins_wide inserts knight movewindow ncurses newdemo testcurs
              -add_wch				test: ncurses
              +add_wch				test: demo_panels ncurses
               add_wchnstr			test: ncurses
               add_wchstr			test: view
              -addch				test: blue bs ditto echochar hashtest ncurses testaddch view worm
              +addch				test: blue bs ditto echochar hashtest ncurses savescreen testaddch view worm
               addchnstr			-
               addchstr			-
               addnstr				-
               addnwstr			-
              -addstr				test: blue bs cardfile gdc hanoi lrtest ncurses
              +addstr				test: blue bs cardfile gdc hanoi lrtest ncurses savescreen
               addwstr				test: ncurses
               assume_default_colors		test: ncurses
               attr_get			test: ncurses
              @@ -241,20 +241,20 @@
               attron				test: bs echochar filter gdc ncurses
               attrset				test: bs firework gdc hanoi ncurses rain tclock testaddch testcurs
               baudrate			lib: ncurses
              -beep				test: blue bs cardfile chgat demo_forms demo_menus edit_field hanoi ins_wide inserts knight movewindow ncurses tclock testcurs view xmas
              -bkgd				test: background cardfile demo_forms ncurses tclock view
              +beep				test: blue bs cardfile chgat demo_forms demo_menus demo_panels edit_field hanoi inch_wide inchs ins_wide inserts knight movewindow ncurses savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view xmas
              +bkgd				test: background cardfile demo_forms ncurses savescreen tclock view
               bkgdset				test: background ncurses testaddch
               bkgrnd				test: ncurses
               bkgrndset			test: ncurses
              -boolcodes			progs: dump_entry
              -boolfnames			progs: dump_entry
              -boolnames			progs: dump_entry infocmp
              +boolcodes			test: test_arrays progs: dump_entry
              +boolfnames			test: test_arrays progs: dump_entry
              +boolnames			test: test_arrays progs: dump_entry infocmp
               border				-
               border_set			-
              -box				test: cardfile chgat demo_forms demo_menus edit_field ins_wide inserts lrtest ncurses newdemo redraw testcurs
              +box				test: cardfile chgat demo_forms demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts lrtest ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
               box_set				test: ncurses
               can_change_color		test: ncurses
              -cbreak				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto filter firework foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses newdemo tclock testcurs view worm xmas
              +cbreak				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
               chgat				test: chgat
               clear				test: blue bs gdc ncurses testcurs xmas
               clearok				test: bs knight
              @@ -263,26 +263,26 @@
               color_content			test: ncurses
               color_set			test: color_set ncurses
               copywin				test: ncurses testcurs
              -cur_term			test: dots echochar lrtest progs: clear tic tput tset
              -curs_set			test: echochar firework gdc hanoi lrtest ncurses newdemo rain tclock testcurs worm xmas
              -curscr				test: edit_field knight lrtest ncurses tclock view
              +cur_term			test: dots dots_mvcur lrtest progs: clear tput tset
              +curs_set			test: echochar firework gdc hanoi lrtest ncurses newdemo rain savescreen tclock testcurs worm xmas
              +curscr				test: demo_panels edit_field knight lrtest ncurses savescreen tclock view
               curses_version			test: ncurses progs: infocmp tic toe tput tset
               def_prog_mode			test: bs ncurses
               def_shell_mode			lib: ncurses
               define_key			test: demo_altkeys demo_defkey foldkeys
               del_curterm			lib: ncurses
              -delay_output			-
              +delay_output			test: newdemo
               delch				-
               deleteln			-
              -delscreen			-
              -delwin				test: cardfile chgat demo_forms demo_menus edit_field ins_wide inserts movewindow ncurses newdemo redraw testcurs
              -derwin				test: cardfile chgat demo_forms demo_menus ins_wide inserts movewindow ncurses
              -doupdate			test: cardfile demo_menus edit_field ins_wide inserts knight movewindow ncurses redraw
              +delscreen			test: dots_mvcur
              +delwin				test: cardfile chgat demo_forms demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              +derwin				test: cardfile chgat demo_forms demo_menus inch_wide inchs ins_wide inserts movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
              +doupdate			test: cardfile demo_menus demo_panels edit_field ins_wide inserts knight movewindow ncurses redraw savescreen test_get_wstr test_getstr
               dupwin				test: edit_field
              -echo				test: bs hanoi ncurses testcurs testscanw
              +echo				test: bs hanoi ncurses test_get_wstr test_getstr testcurs testscanw
               echo_wchar			test: ncurses
               echochar			test: echochar ncurses
              -endwin				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto echochar filter firework firstlast foldkeys gdc hanoi hashtest ins_wide inserts keynames knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
              +endwin				test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto dots_mvcur echochar filter firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
               erase				test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses tclock testcurs
               erasechar			lib: ncurses
               erasewchar			-
              @@ -290,45 +290,46 @@
               flash				test: cardfile lrtest ncurses tclock testcurs
               flushinp			test: ncurses newdemo testcurs
               get_wch				-
              -get_wstr			-
              -getbegx				test: chgat demo_menus movewindow ncurses newdemo redraw testcurs
              -getbegy				test: chgat demo_menus movewindow ncurses newdemo redraw testcurs
              +get_wstr			test: test_get_wstr
              +getattrs			-
              +getbegx				test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw testcurs
              +getbegy				test: chgat demo_menus demo_panels movewindow ncurses newdemo redraw testcurs
               getbkgd				test: ncurses
               getbkgrnd			test: ncurses
               getcchar			test: ncurses view
              -getch				test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest rain tclock testaddch testcurs view worm xmas
              -getcurx				test: bs chgat demo_altkeys demo_defkey foldkeys movewindow ncurses redraw testcurs
              -getcury				test: bs chgat demo_altkeys demo_defkey edit_field foldkeys movewindow ncurses redraw testcurs
              -getmaxx				test: chgat movewindow ncurses newdemo redraw testcurs
              -getmaxy				test: chgat demo_forms movewindow ncurses newdemo redraw testcurs
              +getch				test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest rain savescreen tclock testaddch testcurs view worm xmas
              +getcurx				test: bs chgat demo_altkeys demo_defkey demo_panels foldkeys movewindow ncurses redraw savescreen test_get_wstr test_getstr testcurs
              +getcury				test: bs chgat demo_altkeys demo_defkey demo_panels edit_field foldkeys movewindow ncurses redraw savescreen testcurs
              +getmaxx				test: chgat demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              +getmaxy				test: chgat demo_forms demo_panels inch_wide inchs movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
               getmouse			test: bs knight movewindow ncurses
              -getn_wstr			-
              -getnstr				test: filter ncurses
              +getn_wstr			test: test_get_wstr
              +getnstr				test: filter ncurses test_getstr
               getparx				test: movewindow
               getpary				test: movewindow
              -getstr				-
              +getstr				test: test_getstr
               getwin				test: ncurses
               halfdelay			test: view
              -has_colors			test: background bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testcurs view worm xmas
              +has_colors			test: background bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testcurs view worm xmas
               has_ic				test: lrtest
               has_il				lib: ncurses
               has_key				lib: ncurses
               hline				test: gdc ncurses
               hline_set			-
              -idcok				-
              -idlok				test: ncurses testscanw view
              -immedok				-
              -in_wch				-
              -in_wchnstr			-
              -in_wchstr			-
              -inch				-
              -inchnstr			-
              -inchstr				-
              +idcok				test: test_opaque
              +idlok				test: ncurses test_opaque testscanw view
              +immedok				test: test_opaque
              +in_wch				test: inch_wide
              +in_wchnstr			test: inch_wide
              +in_wchstr			test: inch_wide
              +inch				test: inchs
              +inchnstr			test: inchs
              +inchstr				test: inchs
               init_color			test: ncurses
              -init_pair			test: background blue bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
              -initscr				test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus echochar firework firstlast gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
              -innstr				-
              -innwstr				-
              +init_pair			test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
              +initscr				test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar firework firstlast gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
              +innstr				test: test_instr
              +innwstr				test: test_inwstr
               ins_nwstr			test: ins_wide
               ins_wch				test: ins_wide
               ins_wstr			test: ins_wide
              @@ -337,29 +338,39 @@
               insertln			-
               insnstr				test: inserts
               insstr				test: inserts
              -instr				-
              +instr				test: test_instr
               intrflush			test: demo_forms movewindow
              -inwstr				-
              +inwstr				test: test_inwstr
              +is_cleared			test: test_opaque
              +is_idcok			test: test_opaque
              +is_idlok			test: test_opaque
              +is_immedok			test: test_opaque
              +is_keypad			test: ncurses test_opaque
              +is_leaveok			test: test_opaque
               is_linetouched			lib: form
              +is_nodelay			test: test_opaque
              +is_notimeout			test: test_opaque
              +is_scrollok			test: ncurses test_opaque
              +is_syncok			test: test_opaque
               is_term_resized			-
               is_wintouched			lib: ncurses
               isendwin			-
               key_defined			test: demo_defkey foldkeys
              -key_name			test: ncurses
              +key_name			test: key_names ncurses
               keybound			test: demo_altkeys demo_defkey
               keyname				test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw testcurs view progs: tic
               keyok				test: demo_keyok foldkeys
              -keypad				test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field filter firework foldkeys hashtest ins_wide inserts keynames knight lrtest movewindow ncurses redraw tclock testcurs testscanw view
              +keypad				test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field filter firework foldkeys hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view
               killchar			lib: ncurses
               killwchar			-
              -leaveok				test: hanoi
              +leaveok				test: hanoi test_opaque
               longname			test: testcurs progs: tput
               mcprint				-
               meta				test: ncurses
               mouse_trafo			-
               mouseinterval			-
              -mousemask			test: bs demo_menus knight movewindow ncurses
              -move				test: blue bs cardfile chgat demo_altkeys demo_menus echochar foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses testscanw view worm xmas
              +mousemask			test: bs demo_forms demo_menus knight movewindow ncurses
              +move				test: blue bs cardfile chgat demo_altkeys demo_menus echochar foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses savescreen test_get_wstr test_getstr test_instr test_inwstr testscanw view worm xmas
               mvadd_wch			test: ncurses
               mvadd_wchnstr			-
               mvadd_wchstr			-
              @@ -371,112 +382,112 @@
               mvaddstr			test: bs demo_forms gdc hanoi knight ncurses rain tclock testcurs xmas
               mvaddwstr			-
               mvchgat				test: chgat
              -mvcur				test: redraw
              +mvcur				test: dots_mvcur redraw
               mvdelch				-
               mvderwin			test: movewindow
               mvget_wch			-
              -mvget_wstr			-
              +mvget_wstr			test: test_get_wstr
               mvgetch				-
              -mvgetn_wstr			-
              -mvgetnstr			-
              -mvgetstr			-
              +mvgetn_wstr			test: test_get_wstr
              +mvgetnstr			test: test_getstr
              +mvgetstr			test: test_getstr
               mvhline				test: ncurses
               mvhline_set			test: ncurses
              -mvin_wch			-
              -mvin_wchnstr			-
              -mvin_wchstr			-
              -mvinch				-
              -mvinchnstr			test: gdc
              -mvinchstr			-
              -mvinnstr			-
              -mvinnwstr			-
              +mvin_wch			test: inch_wide
              +mvin_wchnstr			test: inch_wide
              +mvin_wchstr			test: inch_wide
              +mvinch				test: inchs
              +mvinchnstr			test: gdc inchs
              +mvinchstr			test: inchs
              +mvinnstr			test: test_instr
              +mvinnwstr			test: test_inwstr
               mvins_nwstr			test: ins_wide
               mvins_wch			test: ins_wide
               mvins_wstr			test: ins_wide
               mvinsch				test: ins_wide inserts
               mvinsnstr			test: inserts
               mvinsstr			test: inserts
              -mvinstr				-
              -mvinwstr			-
              +mvinstr				test: test_instr
              +mvinwstr			test: test_inwstr
               mvprintw			test: bs demo_menus firework hanoi ncurses tclock view
               mvscanw				-
               mvvline				test: ncurses
               mvvline_set			test: ncurses
               mvwadd_wch			-
               mvwadd_wchnstr			lib: form
              -mvwadd_wchstr			-
              +mvwadd_wchstr			test: inch_wide
               mvwaddch			test: movewindow newdemo testcurs xmas
               mvwaddchnstr			-
              -mvwaddchstr			-
              +mvwaddchstr			test: inchs
               mvwaddnstr			test: newdemo testcurs
               mvwaddnwstr			-
              -mvwaddstr			test: firstlast ins_wide inserts knight ncurses newdemo testcurs xmas
              -mvwaddwstr			-
              +mvwaddstr			test: firstlast ins_wide inserts knight ncurses newdemo test_instr testcurs xmas
              +mvwaddwstr			test: test_inwstr
               mvwchgat			test: chgat
               mvwdelch			test: ncurses
               mvwget_wch			-
              -mvwget_wstr			-
              -mvwgetch			-
              -mvwgetn_wstr			-
              -mvwgetnstr			-
              -mvwgetstr			-
              +mvwget_wstr			test: test_get_wstr
              +mvwgetch			test: inch_wide inchs test_get_wstr test_getstr test_instr test_inwstr test_opaque
              +mvwgetn_wstr			test: test_get_wstr
              +mvwgetnstr			test: test_getstr
              +mvwgetstr			test: test_getstr
               mvwhline			test: movewindow
               mvwhline_set			-
               mvwin				test: cardfile demo_menus movewindow testcurs xmas
              -mvwin_wch			-
              -mvwin_wchnstr			lib: form
              -mvwin_wchstr			-
              -mvwinch				test: newdemo testcurs
              -mvwinchnstr			-
              -mvwinchstr			-
              -mvwinnstr			test: testcurs
              -mvwinnwstr			-
              +mvwin_wch			test: inch_wide
              +mvwin_wchnstr			test: inch_wide
              +mvwin_wchstr			test: inch_wide
              +mvwinch				test: inchs newdemo testcurs
              +mvwinchnstr			test: inchs
              +mvwinchstr			test: inchs
              +mvwinnstr			test: test_instr testcurs
              +mvwinnwstr			test: test_inwstr
               mvwins_nwstr			test: ins_wide
               mvwins_wch			test: ins_wide
               mvwins_wstr			test: ins_wide
               mvwinsch			test: ins_wide inserts
               mvwinsnstr			test: inserts
               mvwinsstr			test: inserts testcurs
              -mvwinstr			-
              -mvwinwstr			-
              -mvwprintw			test: chgat ncurses testcurs
              +mvwinstr			test: test_instr
              +mvwinwstr			test: test_inwstr
              +mvwprintw			test: chgat demo_panels inch_wide inchs ncurses test_instr test_inwstr testcurs
               mvwscanw			test: testcurs
               mvwvline			test: ins_wide inserts movewindow
               mvwvline_set			-
              -napms				test: dots echochar firework gdc hanoi lrtest ncurses newdemo railroad rain tclock testcurs view worm xmas progs: tset
              +napms				test: demo_panels dots dots_mvcur echochar firework gdc hanoi lrtest ncurses railroad rain tclock test_opaque testcurs view worm xmas progs: tset
               newpad				test: edit_field ncurses testcurs
               newscr				lib: ncurses
              -newterm				test: demo_altkeys ditto filter foldkeys gdc keynames
              -newwin				test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus edit_field firstlast ins_wide inserts knight movewindow ncurses newdemo redraw testcurs xmas
              +newterm				test: demo_altkeys ditto dots_mvcur filter foldkeys gdc keynames
              +newwin				test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field firstlast inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs xmas
               nl				test: demo_forms ncurses rain testcurs
               nocbreak			test: testcurs
              -nodelay				test: firework gdc lrtest ncurses newdemo rain tclock view xmas
              -noecho				test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto firework firstlast foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses rain redraw tclock testcurs view worm xmas
              +nodelay				test: firework gdc lrtest ncurses newdemo rain tclock test_opaque view xmas
              +noecho				test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
               nofilter			-
               nonl				test: bs demo_forms hashtest movewindow ncurses view worm xmas
               noqiflush			-
               noraw				test: demo_forms demo_menus ncurses testcurs
              -notimeout			-
              -numcodes			progs: dump_entry
              -numfnames			progs: dump_entry
              -numnames			progs: dump_entry infocmp
              +notimeout			test: test_opaque
              +numcodes			test: test_arrays progs: dump_entry
              +numfnames			test: test_arrays progs: dump_entry
              +numnames			test: test_arrays progs: dump_entry infocmp
               ospeed				progs: tset
               overlay				test: ncurses testcurs xmas
              -overwrite			test: ncurses
              +overwrite			test: ncurses savescreen
               pair_content			test: background color_set
               pecho_wchar			-
               pechochar			-
               pnoutrefresh			test: edit_field ncurses
               prefresh			test: testcurs
              -printw				test: background blue bs color_set demo_altkeys demo_defkey demo_keyok demo_menus filter foldkeys ncurses testcurs testscanw view
              +printw				test: background blue bs color_set demo_altkeys demo_defkey demo_keyok demo_menus filter foldkeys ncurses savescreen testcurs testscanw view
               putp				progs: tput
               putwin				test: ncurses
               qiflush				-
               raw				test: demo_forms ncurses redraw testcurs
               redrawwin			test: redraw
              -refresh				test: blue bs demo_defkey demo_forms demo_keyok demo_menus ditto echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses tclock testcurs view worm xmas
              +refresh				test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view worm xmas
               reset_prog_mode			test: filter ncurses
              -reset_shell_mode		test: bs filter
              +reset_shell_mode		test: bs filter savescreen
               resetty				-
               resize_term			test: view
               resizeterm			lib: ncurses
              @@ -484,16 +495,16 @@
               ripoffline			test: demo_menus ncurses
               savetty				-
               scanw				test: testcurs testscanw
              -scr_dump			-
              -scr_init			-
              -scr_restore			-
              -scr_set				-
              -scrl				-
              +scr_dump			test: savescreen
              +scr_init			test: savescreen
              +scr_restore			test: savescreen
              +scr_set				test: savescreen
              +scrl				test: view
               scroll				test: testcurs
              -scrollok			test: demo_altkeys demo_defkey demo_keyok ditto foldkeys hashtest knight ncurses redraw testcurs testscanw view
              +scrollok			test: demo_altkeys demo_defkey demo_keyok demo_panels ditto foldkeys hashtest knight ncurses redraw test_opaque testcurs testscanw view
               set_curterm			lib: ncurses
               set_term			test: ditto
              -setcchar			test: ins_wide ncurses view
              +setcchar			test: demo_panels ins_wide ncurses view
               setscrreg			test: view
               setupterm			test: dots progs: clear tput tset
               slk_attr			-
              @@ -515,14 +526,14 @@
               slk_wset			test: ncurses
               standend			test: blue gdc ncurses worm
               standout			test: blue ncurses
              -start_color			test: background blue bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
              -stdscr				test: bs chgat demo_altkeys demo_forms demo_menus ditto filter firework foldkeys gdc hanoi hashtest ins_wide inserts keynames knight lrtest movewindow ncurses rain redraw tclock testcurs testscanw view xmas
              -strcodes			progs: dump_entry
              -strfnames			progs: dump_entry
              -strnames			test: foldkeys progs: dump_entry infocmp tic
              +start_color			test: background blue bs cardfile chgat color_set demo_forms demo_menus demo_panels echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain savescreen tclock testaddch testcurs view worm xmas
              +stdscr				test: bs chgat demo_altkeys demo_forms demo_menus demo_panels ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses rain redraw savescreen tclock test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view xmas
              +strcodes			test: test_arrays progs: dump_entry
              +strfnames			test: test_arrays progs: dump_entry
              +strnames			test: foldkeys test_arrays progs: dump_entry infocmp tic
               subpad				test: testcurs
               subwin				test: movewindow ncurses newdemo testcurs
              -syncok				-
              +syncok				test: test_opaque
               term_attrs			test: ncurses
               termattrs			test: ncurses testcurs
               termname			test: testcurs
              @@ -534,11 +545,11 @@
               tigetflag			progs: tput
               tigetnum			test: ncurses progs: tput
               tigetstr			test: blue demo_defkey foldkeys testcurs progs: tput
              -timeout				test: rain
              +timeout				test: rain savescreen
               touchline			test: chgat
              -touchwin			test: chgat demo_menus edit_field filter firstlast ins_wide inserts movewindow ncurses redraw xmas
              -tparm				test: dots progs: tic tput
              -tputs				test: dots railroad progs: clear tset
              +touchwin			test: chgat demo_menus edit_field filter firstlast inch_wide inchs ins_wide inserts movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
              +tparm				test: dots dots_mvcur progs: tic tput
              +tputs				test: dots dots_mvcur railroad progs: clear tset
               trace				test: demo_menus hanoi hashtest lrtest ncurses testcurs view worm
               ttytype				lib: ncurses
               typeahead			test: testcurs
              @@ -561,58 +572,60 @@
               vw_scanw			-
               vwprintw			test: movewindow
               vwscanw				lib: ncurses
              -wadd_wch			lib: ncurses
              +wadd_wch			test: inch_wide
               wadd_wchnstr			lib: form
               wadd_wchstr			-
              -waddch				test: demo_forms firstlast knight ncurses
              +waddch				test: demo_forms demo_panels firstlast inch_wide inchs knight ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque
               waddchnstr			lib: ncurses
               waddchstr			-
               waddnstr			lib: menu
               waddnwstr			test: ncurses
              -waddstr				test: chgat demo_forms edit_field firstlast ins_wide knight ncurses redraw testcurs
              -waddwstr			test: ins_wide
              +waddstr				test: chgat demo_forms demo_panels edit_field firstlast ins_wide knight ncurses redraw testcurs
              +waddwstr			test: ins_wide test_get_wstr
               wattr_get			-
               wattr_off			lib: ncurses
               wattr_on			lib: ncurses
               wattr_set			-
               wattroff			test: demo_forms ncurses testcurs xmas
               wattron				test: testcurs xmas
              -wattrset			test: demo_forms ncurses newdemo testcurs xmas
              +wattrset			test: demo_forms ncurses newdemo test_get_wstr test_getstr testcurs xmas
               wbkgd				test: cardfile demo_forms demo_menus ncurses newdemo testcurs
              -wbkgdset			test: ins_wide inserts ncurses
              +wbkgdset			test: demo_panels ins_wide inserts ncurses
               wbkgrnd				lib: ncurses
               wbkgrndset			lib: ncurses
               wborder				lib: ncurses
               wborder_set			lib: ncurses
              -wchgat				test: chgat view
              -wclear				test: ncurses testcurs
              -wclrtobot			test: firstlast ncurses testcurs
              -wclrtoeol			test: chgat demo_defkey demo_keyok firstlast ins_wide inserts knight ncurses testcurs
              +wchgat				test: chgat test_get_wstr test_getstr view
              +wclear				test: ncurses test_opaque testcurs
              +wclrtobot			test: firstlast inch_wide inchs ncurses test_instr test_inwstr testcurs
              +wclrtoeol			test: chgat demo_defkey demo_keyok demo_panels firstlast inch_wide inchs ins_wide inserts knight ncurses test_instr test_inwstr testcurs
               wcolor_set			lib: ncurses
               wcursyncup			lib: form
               wdelch				test: ncurses testcurs
               wdeleteln			test: testcurs
               wecho_wchar			lib: ncurses
               wechochar			lib: ncurses
              -wenclose			lib: menu
              -werase				test: cardfile demo_forms demo_menus edit_field firstlast knight ncurses newdemo testcurs xmas
              +wenclose			lib: form
              +werase				test: cardfile demo_forms demo_menus demo_panels edit_field firstlast knight ncurses newdemo test_get_wstr test_getstr test_opaque testcurs xmas
               wget_wch			test: ins_wide ncurses
              -wget_wstr			-
              +wget_wstr			test: test_get_wstr
               wgetbkgrnd			lib: ncurses
              -wgetch				test: cardfile chgat demo_defkey demo_keyok demo_menus edit_field gdc inserts knight movewindow ncurses newdemo redraw testcurs
              -wgetn_wstr			test: ncurses
              -wgetnstr			test: ncurses
              -wgetstr				-
              +wgetch				test: cardfile chgat demo_defkey demo_keyok demo_menus demo_panels edit_field gdc inserts knight movewindow ncurses newdemo redraw test_opaque testcurs
              +wgetn_wstr			test: ncurses test_get_wstr
              +wgetnstr			test: ncurses test_getstr
              +wgetparent			test: test_opaque
              +wgetscrreg			test: test_opaque
              +wgetstr				test: test_getstr
               whline				test: testcurs
               whline_set			lib: ncurses
              -win_wch				lib: form
              -win_wchnstr			lib: form
              -win_wchstr			-
              -winch				test: knight testcurs
              -winchnstr			lib: ncurses
              -winchstr			-
              -winnstr				test: demo_altkeys demo_defkey foldkeys
              -winnwstr			lib: ncurses
              +win_wch				test: inch_wide
              +win_wchnstr			test: inch_wide
              +win_wchstr			test: inch_wide
              +winch				test: inchs knight testcurs
              +winchnstr			test: inchs
              +winchstr			test: inchs
              +winnstr				test: demo_altkeys demo_defkey foldkeys test_instr
              +winnwstr			test: test_inwstr
               wins_nwstr			test: ins_wide
               wins_wch			test: ins_wide
               wins_wstr			test: ins_wide
              @@ -621,42 +634,42 @@
               winsertln			test: testcurs
               winsnstr			test: inserts
               winsstr				test: inserts
              -winstr				-
              -winwstr				lib: ncurses
              -wmouse_trafo			lib: menu
              -wmove				test: chgat demo_altkeys demo_defkey demo_keyok demo_menus firstlast foldkeys ins_wide inserts knight movewindow ncurses newdemo redraw testcurs
              -wnoutrefresh			test: demo_menus edit_field ins_wide inserts knight movewindow ncurses redraw
              -wprintw				test: chgat demo_defkey demo_forms demo_keyok demo_menus edit_field ins_wide inserts knight movewindow ncurses testcurs
              +winstr				test: test_instr
              +winwstr				test: test_inwstr
              +wmouse_trafo			lib: form
              +wmove				test: chgat demo_altkeys demo_defkey demo_keyok demo_menus demo_panels firstlast foldkeys inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
              +wnoutrefresh			test: demo_menus edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque
              +wprintw				test: chgat demo_defkey demo_forms demo_keyok demo_menus demo_panels edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
               wredrawln			test: redraw
              -wrefresh			test: chgat demo_forms demo_keyok demo_menus edit_field firstlast knight lrtest movewindow ncurses newdemo redraw tclock testcurs view xmas
              +wrefresh			test: chgat demo_forms demo_keyok demo_menus demo_panels edit_field firstlast knight lrtest movewindow ncurses newdemo redraw savescreen tclock testcurs view xmas
               wresize				test: cardfile ncurses
               wscanw				test: testcurs
              -wscrl				test: ncurses testcurs view
              +wscrl				test: ncurses testcurs
               wsetscrreg			test: ncurses testcurs
              -wstandend			test: xmas
              -wstandout			test: xmas
              +wstandend			test: test_opaque xmas
              +wstandout			test: test_opaque xmas
               wsyncdown			test: movewindow
               wsyncup				lib: form
               wtimeout			test: ncurses
               wtouchln			lib: ncurses
              -wunctrl				-
              +wunctrl				lib: ncurses
               wvline				test: testcurs
               wvline_set			lib: ncurses
               
               libpanel:
               --------
              -bottom_panel			test: ncurses
              -del_panel			test: ncurses
              -hide_panel			test: ncurses
              -move_panel			test: ncurses
              -new_panel			test: cardfile ncurses
              -panel_above			-
              -panel_below			-
              -panel_hidden			-
              -panel_userptr			test: ncurses
              -panel_window			test: cardfile ncurses
              -replace_panel			-
              -set_panel_userptr		test: ncurses
              -show_panel			test: ncurses
              -top_panel			test: cardfile ncurses
              -update_panels			test: cardfile ncurses
              +bottom_panel			test: demo_panels ncurses
              +del_panel			test: demo_panels ncurses
              +hide_panel			test: demo_panels ncurses
              +move_panel			test: demo_panels ncurses
              +new_panel			test: cardfile demo_panels ncurses
              +panel_above			test: demo_panels
              +panel_below			test: demo_panels
              +panel_hidden			test: demo_panels
              +panel_userptr			test: demo_panels ncurses
              +panel_window			test: cardfile demo_panels ncurses
              +replace_panel			test: demo_panels
              +set_panel_userptr		test: demo_panels ncurses
              +show_panel			test: demo_panels ncurses
              +top_panel			test: cardfile demo_panels ncurses
              +update_panels			test: cardfile demo_panels ncurses
              diff -Naur ncurses-5.6.orig/test/aclocal.m4 ncurses-5.6/test/aclocal.m4
              --- ncurses-5.6.orig/test/aclocal.m4	2006-12-02 19:10:15.000000000 -0500
              +++ ncurses-5.6/test/aclocal.m4	2007-12-21 00:02:36.000000000 -0500
              @@ -26,7 +26,7 @@
               dnl authorization.                                                           *
               dnl***************************************************************************
               dnl
              -dnl $Id: aclocal.m4,v 1.17 2006/12/03 00:10:15 tom Exp $
              +dnl $Id: aclocal.m4,v 1.19 2007/06/09 20:01:31 tom Exp $
               dnl
               dnl Author: Thomas E. Dickey
               dnl
              @@ -230,6 +230,12 @@
               fi
               ])dnl
               dnl ---------------------------------------------------------------------------
              +dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
              +dnl --------------
              +dnl Allow user to disable a normally-on option.
              +AC_DEFUN([CF_ARG_DISABLE],
              +[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
              +dnl ---------------------------------------------------------------------------
               dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
               dnl -------------
               dnl Allow user to enable a normally-off option.
              @@ -537,6 +543,43 @@
               dnl "dirname" is not portable, so we fake it with a shell script.
               AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
               dnl ---------------------------------------------------------------------------
              +dnl CF_DISABLE_ECHO version: 10 updated: 2003/04/17 22:27:11
              +dnl ---------------
              +dnl You can always use "make -n" to see the actual options, but it's hard to
              +dnl pick out/analyze warning messages when the compile-line is long.
              +dnl
              +dnl Sets:
              +dnl	ECHO_LT - symbol to control if libtool is verbose
              +dnl	ECHO_LD - symbol to prefix "cc -o" lines
              +dnl	RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
              +dnl	SHOW_CC - symbol to put before explicit "cc -c" lines
              +dnl	ECHO_CC - symbol to put before any "cc" line
              +dnl
              +AC_DEFUN([CF_DISABLE_ECHO],[
              +AC_MSG_CHECKING(if you want to see long compiling messages)
              +CF_ARG_DISABLE(echo,
              +	[  --disable-echo          display "compiling" commands],
              +	[
              +    ECHO_LT='--silent'
              +    ECHO_LD='@echo linking [$]@;'
              +    RULE_CC='	@echo compiling [$]<'
              +    SHOW_CC='	@echo compiling [$]@'
              +    ECHO_CC='@'
              +],[
              +    ECHO_LT=''
              +    ECHO_LD=''
              +    RULE_CC='# compiling'
              +    SHOW_CC='# compiling'
              +    ECHO_CC=''
              +])
              +AC_MSG_RESULT($enableval)
              +AC_SUBST(ECHO_LT)
              +AC_SUBST(ECHO_LD)
              +AC_SUBST(RULE_CC)
              +AC_SUBST(SHOW_CC)
              +AC_SUBST(ECHO_CC)
              +])dnl
              +dnl ---------------------------------------------------------------------------
               dnl CF_ENABLE_WARNINGS version: 3 updated: 2003/05/24 14:24:29
               dnl ------------------
               dnl Configure-option to enable gcc warnings
              @@ -606,7 +649,7 @@
               ])
               ])dnl
               dnl ---------------------------------------------------------------------------
              -dnl CF_FUNC_CURSES_VERSION version: 3 updated: 2003/05/17 22:19:02
              +dnl CF_FUNC_CURSES_VERSION version: 4 updated: 2007/04/28 09:15:55
               dnl ----------------------
               dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.
               dnl It's a character string "SVR4", not documented.
              @@ -619,7 +662,7 @@
               {
               	char temp[1024];
               	sprintf(temp, "%s\n", curses_version());
              -	exit(0);
              +	${cf_cv_main_return-return}(0);
               }]
               ,[cf_cv_func_curses_version=yes]
               ,[cf_cv_func_curses_version=no]
              @@ -1155,7 +1198,7 @@
               AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
               ])dnl
               dnl ---------------------------------------------------------------------------
              -dnl CF_NCURSES_VERSION version: 11 updated: 2003/11/06 19:59:57
              +dnl CF_NCURSES_VERSION version: 12 updated: 2007/04/28 09:15:55
               dnl ------------------
               dnl Check for the version of ncurses, to aid in reporting bugs, etc.
               dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS.  We don't use
              @@ -1186,7 +1229,7 @@
               	make an error
               # endif
               #endif
              -	exit(0);
              +	${cf_cv_main_return-return}(0);
               }],[
               	cf_cv_ncurses_version=`cat $cf_tempfile`],,[
               
              @@ -1442,6 +1485,41 @@
               		-e 's/-[[UD]]$3\(=[[^ 	]]*\)\?[$]//g'`
               ])dnl
               dnl ---------------------------------------------------------------------------
              +dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12
              +dnl ---------------
              +dnl signal handler, but there are some gcc depedencies in that recommendation.
              +dnl Try anyway.
              +AC_DEFUN([CF_SIG_ATOMIC_T],
              +[
              +AC_MSG_CHECKING(for signal global datatype)
              +AC_CACHE_VAL(cf_cv_sig_atomic_t,[
              +	for cf_type in \
              +		"volatile sig_atomic_t" \
              +		"sig_atomic_t" \
              +		"int"
              +	do
              +	AC_TRY_COMPILE([
              +#include 
              +#include 
              +#include 
              +
              +extern $cf_type x;
              +$cf_type x;
              +static void handler(int sig)
              +{
              +	x = 5;
              +}],
              +		[signal(SIGINT, handler);
              +		 x = 1],
              +		[cf_cv_sig_atomic_t=$cf_type],
              +		[cf_cv_sig_atomic_t=no])
              +		test "$cf_cv_sig_atomic_t" != no && break
              +	done
              +	])
              +AC_MSG_RESULT($cf_cv_sig_atomic_t)
              +test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t)
              +])dnl
              +dnl ---------------------------------------------------------------------------
               dnl CF_SUBDIR_PATH version: 4 updated: 2006/11/18 17:13:19
               dnl --------------
               dnl Construct a search-list for a nonstandard header/lib-file
              @@ -1630,7 +1708,7 @@
               	[cf_cv_curses_dir=no])
               ])dnl
               dnl ---------------------------------------------------------------------------
              -dnl CF_XOPEN_SOURCE version: 24 updated: 2006/04/02 16:41:09
              +dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38
               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,
              @@ -1664,7 +1742,7 @@
               irix[[56]].*) #(vi
               	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
               	;;
              -linux*|gnu*) #(vi
              +linux*|gnu*|k*bsd*-gnu) #(vi
               	CF_GNU_SOURCE
               	;;
               mirbsd*) #(vi
              diff -Naur ncurses-5.6.orig/test/bs.c ncurses-5.6/test/bs.c
              --- ncurses-5.6.orig/test/bs.c	2006-05-20 11:38:52.000000000 -0400
              +++ ncurses-5.6/test/bs.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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 @@
                * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
                * v2.1 with ncurses mouse support, September 1995
                *
              - * $Id: bs.c,v 1.44 2006/05/20 15:38:52 tom Exp $
              + * $Id: bs.c,v 1.45 2007/04/07 17:13:11 tom Exp $
                */
               
               #include 
              @@ -459,7 +459,7 @@
               	do {
               	    c = getch();
               	} while
              -	    (!strchr("hjklrR", c) || c == FF);
              +	    (!(strchr("hjklrR", c) || c == FF));
               
               	if (c == FF) {
               	    (void) clearok(stdscr, TRUE);
              diff -Naur ncurses-5.6.orig/test/cardfile.c ncurses-5.6/test/cardfile.c
              --- ncurses-5.6.orig/test/cardfile.c	2006-12-09 19:30:09.000000000 -0500
              +++ ncurses-5.6/test/cardfile.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1999-2004,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1999-2006,2007 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            *
              @@ -29,7 +29,7 @@
               /*
                * Author: Thomas E. Dickey
                *
              - * $Id: cardfile.c,v 1.28 2006/12/10 00:30:09 tom Exp $
              + * $Id: cardfile.c,v 1.32 2007/08/11 16:34:27 tom Exp $
                *
                * File format: text beginning in column 1 is a title; other text is content.
                */
              @@ -71,7 +71,7 @@
               #if !HAVE_STRDUP
               #define strdup my_strdup
               static char *
              -strdup(char *s)
              +strdup(const char *s)
               {
                   char *p = (char *) malloc(strlen(s) + 1);
                   if (p)
              @@ -136,13 +136,15 @@
               	if ((offset = strlen(card->content)) != 0) {
               	    total += 1 + offset;
               	    card->content = (char *) realloc(card->content, total + 1);
              -	    strcpy(card->content + offset++, " ");
              +	    if (card->content)
              +		strcpy(card->content + offset++, " ");
               	} else {
               	    if (card->content != 0)
               		free(card->content);
               	    card->content = (char *) malloc(total + 1);
               	}
              -	strcpy(card->content + offset, content);
              +	if (card->content)
              +	    strcpy(card->content + offset, content);
                   }
               }
               
              @@ -306,8 +308,8 @@
               	return (MY_CTRL_N);
                   case CTRL('P'):
               	return (MY_CTRL_P);
              -    case CTRL('Q'):
              -    case 033:
              +    case QUIT:
              +    case ESCAPE:
               	return (MY_CTRL_Q);
               
                   case KEY_BACKSPACE:
              @@ -568,7 +570,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((n = getopt(argc, argv, "c")) != EOF) {
              +    while ((n = getopt(argc, argv, "c")) != -1) {
               	switch (n) {
               	case 'c':
               	    try_color = TRUE;
              diff -Naur ncurses-5.6.orig/test/chgat.c ncurses-5.6/test/chgat.c
              --- ncurses-5.6.orig/test/chgat.c	2006-07-15 18:48:27.000000000 -0400
              +++ ncurses-5.6/test/chgat.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              + * Copyright (c) 2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: chgat.c,v 1.5 2006/07/15 22:48:27 tom Exp $
              + * $Id: chgat.c,v 1.7 2007/06/30 17:52:17 tom Exp $
                *
                * test-driver for chgat/wchgat/mvchgat/mvwchgat
                */
              @@ -47,25 +47,26 @@
               typedef struct {
                   unsigned c;
                   unsigned v;
              -    int pair, attr;
              +    int pair;
              +    unsigned attr;
                   int count;
                   int ch;
              -    char *c_msg;
              -    char *v_msg;
              +    const char *c_msg;
              +    const char *v_msg;
                   int y_val;
                   int x_val;
                   int y_beg, x_beg;
                   int y_max, x_max;
               } STATUS;
               
              -static char *
              +static const char *
               color_params(unsigned state, int *pair)
               {
                   /* *INDENT-OFF* */
                   static struct {
               	int pair;
               	int fg, bg;
              -	char *msg;
              +	const char *msg;
                   } table[] = {
               	{ 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
               	{ 1, COLOR_RED,     COLOR_BLACK,   "red/black" },
              @@ -74,7 +75,7 @@
                   /* *INDENT-ON* */
               
                   static bool first = TRUE;
              -    char *result = 0;
              +    const char *result = 0;
               
                   if (has_colors()) {
               	if (first) {
              @@ -93,13 +94,13 @@
                   return result;
               }
               
              -static char *
              -video_params(unsigned state, int *attr)
              +static const char *
              +video_params(unsigned state, unsigned *attr)
               {
                   /* *INDENT-OFF* */
                   static struct {
              -	int attr;
              -	char *msg;
              +	unsigned attr;
              +	const char *msg;
                   } table[] = {
               	{ A_NORMAL,	"normal" },
               	{ A_BOLD,	"bold" },
              @@ -109,7 +110,7 @@
                   };
                   /* *INDENT-ON* */
               
              -    char *result = 0;
              +    const char *result = 0;
               
                   if (state < SIZEOF(table)) {
               	*attr = table[state].attr;
              diff -Naur ncurses-5.6.orig/test/configure ncurses-5.6/test/configure
              --- ncurses-5.6.orig/test/configure	2006-12-02 19:10:59.000000000 -0500
              +++ ncurses-5.6/test/configure	2007-12-21 00:02:36.000000000 -0500
              @@ -183,6 +183,7 @@
               EOF
               cat <<\EOF
               --enable and --with options recognized:
              +  --disable-echo          display "compiling" commands
                 --enable-warnings       test: turn on gcc compiler warnings
                 --with-curses-dir=DIR   directory in which (n)curses is installed
                 --with-5lib             use SunOS sysv-libraries
              @@ -535,7 +536,7 @@
               # Uses ac_ vars as temps to allow command line to override cache and checks.
               # --without-x overrides everything else, but does not touch the cache.
               echo $ac_n "checking for X""... $ac_c" 1>&6
              -echo "configure:539: checking for X" >&5
              +echo "configure:540: checking for X" >&5
               
               
               # Check whether --with-x or --without-x was given.
              @@ -598,12 +599,12 @@
               
                 # First, try using that file with no special directory specified.
               cat > conftest.$ac_ext <
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 rm -rf conftest*
              @@ -672,14 +673,14 @@
                 ac_save_LIBS="$LIBS"
                 LIBS="-l$x_direct_test_library $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 LIBS="$ac_save_LIBS"
               # We can link X programs with no special library path.
              @@ -802,7 +803,7 @@
               fi
               
               echo $ac_n "checking host system type""... $ac_c" 1>&6
              -echo "configure:806: checking host system type" >&5
              +echo "configure:807: checking host system type" >&5
               
               host_alias=$host
               case "$host_alias" in
              @@ -850,7 +851,7 @@
               
               
               echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
              -echo "configure:854: checking whether ${MAKE-make} sets \${MAKE}" >&5
              +echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
               set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -879,7 +880,7 @@
               # Extract the first word of "gcc", so it can be a program name with args.
               set dummy gcc; ac_word=$2
               echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              -echo "configure:883: checking for $ac_word" >&5
              +echo "configure:884: checking for $ac_word" >&5
               if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -909,7 +910,7 @@
                 # Extract the first word of "cc", so it can be a program name with args.
               set dummy cc; ac_word=$2
               echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              -echo "configure:913: checking for $ac_word" >&5
              +echo "configure:914: checking for $ac_word" >&5
               if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -960,7 +961,7 @@
                     # Extract the first word of "cl", so it can be a program name with args.
               set dummy cl; ac_word=$2
               echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              -echo "configure:964: checking for $ac_word" >&5
              +echo "configure:965: checking for $ac_word" >&5
               if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -992,7 +993,7 @@
               fi
               
               echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
              -echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
              +echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
               
               ac_ext=c
               # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
              @@ -1003,12 +1004,12 @@
               
               cat > conftest.$ac_ext << EOF
               
              -#line 1007 "configure"
              +#line 1008 "configure"
               #include "confdefs.h"
               
               main(){return(0);}
               EOF
              -if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 ac_cv_prog_cc_works=yes
                 # If we can't run a trivial program, we are probably using a cross compiler.
                 if (./conftest; exit) 2>/dev/null; then
              @@ -1034,12 +1035,12 @@
                 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
               fi
               echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
              -echo "configure:1038: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
              +echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
               echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
               cross_compiling=$ac_cv_prog_cc_cross
               
               echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
              -echo "configure:1043: checking whether we are using GNU C" >&5
              +echo "configure:1044: checking whether we are using GNU C" >&5
               if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -1048,7 +1049,7 @@
                 yes;
               #endif
               EOF
              -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
              +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
                 ac_cv_prog_gcc=yes
               else
                 ac_cv_prog_gcc=no
              @@ -1067,7 +1068,7 @@
               ac_save_CFLAGS="$CFLAGS"
               CFLAGS=
               echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
              -echo "configure:1071: checking whether ${CC-cc} accepts -g" >&5
              +echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
               if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -1099,7 +1100,7 @@
               fi
               
               echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
              -echo "configure:1103: checking how to run the C preprocessor" >&5
              +echo "configure:1104: checking how to run the C preprocessor" >&5
               # On Suns, sometimes $CPP names a directory.
               if test -n "$CPP" && test -d "$CPP"; then
                 CPP=
              @@ -1114,13 +1115,13 @@
                 # On the NeXT, cc -E runs the code through the compiler's parser,
                 # not just through cpp.
                 cat > conftest.$ac_ext <
               Syntax Error
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 :
              @@ -1131,13 +1132,13 @@
                 rm -rf conftest*
                 CPP="${CC-cc} -E -traditional-cpp"
                 cat > conftest.$ac_ext <
               Syntax Error
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 :
              @@ -1148,13 +1149,13 @@
                 rm -rf conftest*
                 CPP="${CC-cc} -nologo -E"
                 cat > conftest.$ac_ext <
               Syntax Error
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:1158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 :
              @@ -1183,7 +1184,7 @@
               # Extract the first word of "$ac_prog", so it can be a program name with args.
               set dummy $ac_prog; ac_word=$2
               echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              -echo "configure:1187: checking for $ac_word" >&5
              +echo "configure:1188: checking for $ac_word" >&5
               if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -1219,15 +1220,15 @@
               DFT_DEP_SUFFIX=""			
               DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`	
               DFT_UPR_MODEL="NORMAL"			
              -ECHO_LINK='@ echo linking $@ ... ;'	
               LD="ld"					
               LDFLAGS_SHARED=""			
              +LDFLAGS_STATIC=""			
               LD_MODEL=""				
               LD_SHARED_OPTS=""			
               LIBTOOL=""				
               LIB_CLEAN=""				
               LIB_COMPILE=""				
              -LIB_LINK=""				
              +LIB_LINK='${CC}'			
               LINK_TESTS=""				
               LINT=lint				
               LINT_OPTS=""				
              @@ -1243,12 +1244,12 @@
               cf_cv_libtype=
               
               echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
              -echo "configure:1247: checking for Cygwin environment" >&5
              +echo "configure:1248: checking for Cygwin environment" >&5
               if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 ac_cv_cygwin=yes
               else
              @@ -1276,19 +1277,19 @@
               CYGWIN=
               test "$ac_cv_cygwin" = yes && CYGWIN=yes
               echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
              -echo "configure:1280: checking for mingw32 environment" >&5
              +echo "configure:1281: checking for mingw32 environment" >&5
               if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 ac_cv_mingw32=yes
               else
              @@ -1307,7 +1308,7 @@
               
               
               echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
              -echo "configure:1311: checking for executable suffix" >&5
              +echo "configure:1312: checking for executable suffix" >&5
               if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -1317,7 +1318,7 @@
                 rm -f conftest*
                 echo 'int main () { return 0; }' > conftest.$ac_ext
                 ac_cv_exeext=
              -  if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
              +  if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
                   for file in conftest.*; do
                     case $file in
                     *.c | *.o | *.obj) ;;
              @@ -1338,13 +1339,13 @@
               ac_exeext=$EXEEXT
               
               echo $ac_n "checking for object suffix""... $ac_c" 1>&6
              -echo "configure:1342: checking for object suffix" >&5
              +echo "configure:1343: checking for object suffix" >&5
               if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 rm -f conftest*
               echo 'int i = 1;' > conftest.$ac_ext
              -if { (eval echo configure:1348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 for ac_file in conftest.*; do
                   case $ac_file in
                   *.c) ;;
              @@ -1364,7 +1365,7 @@
               
               
               echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
              -echo "configure:1368: checking for ${CC-cc} option to accept ANSI C" >&5
              +echo "configure:1369: checking for ${CC-cc} option to accept ANSI C" >&5
               if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -1460,7 +1461,7 @@
               
               
               	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_ansi_cc="$cf_arg"; break
               else
              @@ -1584,175 +1585,6 @@
               fi
               
               
              -
              -GCC_VERSION=none
              -if test "$GCC" = yes ; then
              -	echo $ac_n "checking version of $CC""... $ac_c" 1>&6
              -echo "configure:1592: checking version of $CC" >&5
              -	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
              -	test -z "$GCC_VERSION" && GCC_VERSION=unknown
              -	echo "$ac_t""$GCC_VERSION" 1>&6
              -fi
              -
              -
              -if ( test "$GCC" = yes || test "$GXX" = yes )
              -then
              -echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
              -echo "configure:1602: checking if you want to turn on gcc warnings" >&5
              -
              -# Check whether --enable-warnings or --disable-warnings was given.
              -if test "${enable_warnings+set}" = set; then
              -  enableval="$enable_warnings"
              -  test "$enableval" != yes && enableval=no
              -  if test "$enableval" != "no" ; then
              -    with_warnings=yes 
              -  else
              -    with_warnings=no
              -  fi
              -else
              -  enableval=no 
              -  with_warnings=no
              -  
              -fi
              -
              -echo "$ac_t""$with_warnings" 1>&6
              -if test "$with_warnings" = "yes"
              -then
              -	
              -
              -
              -INTEL_COMPILER=no
              -
              -if test "$GCC" = yes ; then
              -	case $host_os in
              -	linux*|gnu*)
              -		echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
              -echo "configure:1631: checking if this is really Intel C compiler" >&5
              -		cf_save_CFLAGS="$CFLAGS"
              -		CFLAGS="$CFLAGS -no-gcc"
              -		cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              -  rm -rf conftest*
              -  INTEL_COMPILER=yes
              -cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
              -
              -else
              -  echo "configure: failed program was:" >&5
              -  cat conftest.$ac_ext >&5
              -fi
              -rm -f conftest*
              -		CFLAGS="$cf_save_CFLAGS"
              -		echo "$ac_t""$INTEL_COMPILER" 1>&6
              -		;;
              -	esac
              -fi
              -
              -
              -cat > conftest.$ac_ext <&6
              -echo "configure:1684: checking for $CC warning options" >&5
              -	cf_save_CFLAGS="$CFLAGS"
              -	EXTRA_CFLAGS="-Wall"
              -	for cf_opt in  \
              -		wd1419 \
              -		wd1682 \
              -		wd1683 \
              -		wd1684 \
              -		wd193 \
              -		wd279 \
              -		wd593 \
              -		wd810 \
              -		wd869 \
              -		wd981
              -	do
              -		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              -		if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              -			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              -			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              -		fi
              -	done
              -	CFLAGS="$cf_save_CFLAGS"
              -
              -elif test "$GCC" = yes
              -then
              -	echo "checking for $CC warning options" 1>&6
              -echo "configure:1710: checking for $CC warning options" >&5
              -	cf_save_CFLAGS="$CFLAGS"
              -	EXTRA_CFLAGS="-W -Wall"
              -	cf_warn_CONST=""
              -	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
              -	for cf_opt in \
              -		Wbad-function-cast \
              -		Wcast-align \
              -		Wcast-qual \
              -		Winline \
              -		Wmissing-declarations \
              -		Wmissing-prototypes \
              -		Wnested-externs \
              -		Wpointer-arith \
              -		Wshadow \
              -		Wstrict-prototypes \
              -		Wundef $cf_warn_CONST 
              -	do
              -		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              -		if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              -			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              -			case $cf_opt in #(vi
              -			Wcast-qual) #(vi
              -				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
              -				;;
              -			Winline) #(vi
              -				case $GCC_VERSION in
              -				3.3*)
              -					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
              -
              -					continue;;
              -				esac
              -				;;
              -			esac
              -			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              -		fi
              -	done
              -	CFLAGS="$cf_save_CFLAGS"
              -fi
              -rm -f conftest*
              -
              -
              -
              -fi
              -fi
              -
              -
               if test "$GCC" = yes
               then
               cat > conftest.i <&6
              -echo "configure:1776: checking for $CC __attribute__ directives" >&5
              +echo "configure:1608: checking for $CC __attribute__ directives" >&5
               cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +		if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
               			test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
               			cat conftest.h >>confdefs.h
               		fi
              @@ -1825,7 +1657,7 @@
               
               
               echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
              -echo "configure:1829: checking if $CC -U and -D options work together" >&5
              +echo "configure:1661: checking if $CC -U and -D options work together" >&5
               if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -1833,7 +1665,7 @@
               	cf_save_CPPFLAGS="$CPPFLAGS"
               	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
               	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 
               	cf_cv_cc_u_d_options=yes
              @@ -1890,16 +1722,16 @@
               irix[56].*) #(vi
               	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
               	;;
              -linux*|gnu*) #(vi
              +linux*|gnu*|k*bsd*-gnu) #(vi
               	
               echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
              -echo "configure:1897: checking if we must define _GNU_SOURCE" >&5
              +echo "configure:1729: checking if we must define _GNU_SOURCE" >&5
               if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 
               cat > conftest.$ac_ext <
               int main() {
              @@ -1909,7 +1741,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:1913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_gnu_source=no
               else
              @@ -1919,7 +1751,7 @@
                 cf_save="$CPPFLAGS"
               	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
               	 cat > conftest.$ac_ext <
               int main() {
              @@ -1929,7 +1761,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_gnu_source=no
               else
              @@ -1973,13 +1805,13 @@
               	;;
               *)
               	echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
              -echo "configure:1977: checking if we should define _XOPEN_SOURCE" >&5
              +echo "configure:1809: checking if we should define _XOPEN_SOURCE" >&5
               if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 
               	cat > conftest.$ac_ext <
               int main() {
              @@ -1989,7 +1821,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_xopen_source=no
               else
              @@ -1999,7 +1831,7 @@
                 cf_save="$CPPFLAGS"
               	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
               	 cat > conftest.$ac_ext <
               int main() {
              @@ -2009,7 +1841,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_xopen_source=no
               else
              @@ -2064,16 +1896,16 @@
               
               
               echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
              -echo "configure:2068: checking if we should define _POSIX_C_SOURCE" >&5
              +echo "configure:1900: checking if we should define _POSIX_C_SOURCE" >&5
               if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 
               	
              -echo "(line 2074) testing if the symbol is already defined go no further ..." 1>&5
              +echo "(line 1906) testing if the symbol is already defined go no further ..." 1>&5
               
               	cat > conftest.$ac_ext <
               int main() {
              @@ -2083,7 +1915,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_posix_c_source=no
               else
              @@ -2105,7 +1937,7 @@
               	 esac
               	 if test "$cf_want_posix_source" = yes ; then
               		cat > conftest.$ac_ext <
               int main() {
              @@ -2115,7 +1947,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -2126,15 +1958,15 @@
               rm -f conftest*
               	 fi
               	 
              -echo "(line 2130) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
              +echo "(line 1962) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
               
               	 CFLAGS="$cf_trim_CFLAGS"
               	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
               	 
              -echo "(line 2135) testing if the second compile does not leave our definition intact error ..." 1>&5
              +echo "(line 1967) testing if the second compile does not leave our definition intact error ..." 1>&5
               
               	 cat > conftest.$ac_ext <
               int main() {
              @@ -2144,7 +1976,7 @@
               #endif
               ; return 0; }
               EOF
              -if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -2178,6 +2010,347 @@
               	;;
               esac
               
              +echo $ac_n "checking for working const""... $ac_c" 1>&6
              +echo "configure:2015: checking for working const" >&5
              +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
              +  echo $ac_n "(cached) $ac_c" 1>&6
              +else
              +  cat > conftest.$ac_ext <j = 5;
              +}
              +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
              +  const int foo = 10;
              +}
              +
              +; return 0; }
              +EOF
              +if { (eval echo configure:2069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +  rm -rf conftest*
              +  ac_cv_c_const=yes
              +else
              +  echo "configure: failed program was:" >&5
              +  cat conftest.$ac_ext >&5
              +  rm -rf conftest*
              +  ac_cv_c_const=no
              +fi
              +rm -f conftest*
              +fi
              +
              +echo "$ac_t""$ac_cv_c_const" 1>&6
              +if test $ac_cv_c_const = no; then
              +  cat >> confdefs.h <<\EOF
              +#define const 
              +EOF
              +
              +fi
              +
              +
              +echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
              +echo "configure:2091: checking for signal global datatype" >&5
              +if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
              +  echo $ac_n "(cached) $ac_c" 1>&6
              +else
              +  
              +	for cf_type in \
              +		"volatile sig_atomic_t" \
              +		"sig_atomic_t" \
              +		"int"
              +	do
              +	cat > conftest.$ac_ext <
              +#include 
              +#include 
              +
              +extern $cf_type x;
              +$cf_type x;
              +static void handler(int sig)
              +{
              +	x = 5;
              +}
              +int main() {
              +signal(SIGINT, handler);
              +		 x = 1
              +; return 0; }
              +EOF
              +if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +  rm -rf conftest*
              +  cf_cv_sig_atomic_t=$cf_type
              +else
              +  echo "configure: failed program was:" >&5
              +  cat conftest.$ac_ext >&5
              +  rm -rf conftest*
              +  cf_cv_sig_atomic_t=no
              +fi
              +rm -f conftest*
              +		test "$cf_cv_sig_atomic_t" != no && break
              +	done
              +	
              +fi
              +
              +echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
              +test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <&6
              +echo "configure:2144: checking if you want to see long compiling messages" >&5
              +
              +# Check whether --enable-echo or --disable-echo was given.
              +if test "${enable_echo+set}" = set; then
              +  enableval="$enable_echo"
              +  test "$enableval" != no && enableval=yes
              +  if test "$enableval" != "yes" ; then
              +    
              +    ECHO_LT='--silent'
              +    ECHO_LD='@echo linking $@;'
              +    RULE_CC='	@echo compiling $<'
              +    SHOW_CC='	@echo compiling $@'
              +    ECHO_CC='@'
              + 
              +  else
              +    
              +    ECHO_LT=''
              +    ECHO_LD=''
              +    RULE_CC='# compiling'
              +    SHOW_CC='# compiling'
              +    ECHO_CC=''
              +
              +  fi
              +else
              +  enableval=yes 
              +  
              +    ECHO_LT=''
              +    ECHO_LD=''
              +    RULE_CC='# compiling'
              +    SHOW_CC='# compiling'
              +    ECHO_CC=''
              +
              +  
              +fi
              +
              +echo "$ac_t""$enableval" 1>&6
              +
              +
              +
              +
              +
              +
              +
              +
              +GCC_VERSION=none
              +if test "$GCC" = yes ; then
              +	echo $ac_n "checking version of $CC""... $ac_c" 1>&6
              +echo "configure:2191: checking version of $CC" >&5
              +	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
              +	test -z "$GCC_VERSION" && GCC_VERSION=unknown
              +	echo "$ac_t""$GCC_VERSION" 1>&6
              +fi
              +
              +
              +if ( test "$GCC" = yes || test "$GXX" = yes )
              +then
              +echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
              +echo "configure:2201: checking if you want to turn on gcc warnings" >&5
              +
              +# Check whether --enable-warnings or --disable-warnings was given.
              +if test "${enable_warnings+set}" = set; then
              +  enableval="$enable_warnings"
              +  test "$enableval" != yes && enableval=no
              +  if test "$enableval" != "no" ; then
              +    with_warnings=yes 
              +  else
              +    with_warnings=no
              +  fi
              +else
              +  enableval=no 
              +  with_warnings=no
              +  
              +fi
              +
              +echo "$ac_t""$with_warnings" 1>&6
              +if test "$with_warnings" = "yes"
              +then
              +	
              +
              +
              +INTEL_COMPILER=no
              +
              +if test "$GCC" = yes ; then
              +	case $host_os in
              +	linux*|gnu*)
              +		echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
              +echo "configure:2230: checking if this is really Intel C compiler" >&5
              +		cf_save_CFLAGS="$CFLAGS"
              +		CFLAGS="$CFLAGS -no-gcc"
              +		cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +  rm -rf conftest*
              +  INTEL_COMPILER=yes
              +cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
              +
              +else
              +  echo "configure: failed program was:" >&5
              +  cat conftest.$ac_ext >&5
              +fi
              +rm -f conftest*
              +		CFLAGS="$cf_save_CFLAGS"
              +		echo "$ac_t""$INTEL_COMPILER" 1>&6
              +		;;
              +	esac
              +fi
              +
              +
              +cat > conftest.$ac_ext <&6
              +echo "configure:2283: checking for $CC warning options" >&5
              +	cf_save_CFLAGS="$CFLAGS"
              +	EXTRA_CFLAGS="-Wall"
              +	for cf_opt in  \
              +		wd1419 \
              +		wd1682 \
              +		wd1683 \
              +		wd1684 \
              +		wd193 \
              +		wd279 \
              +		wd593 \
              +		wd810 \
              +		wd869 \
              +		wd981
              +	do
              +		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              +		if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              +			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              +		fi
              +	done
              +	CFLAGS="$cf_save_CFLAGS"
              +
              +elif test "$GCC" = yes
              +then
              +	echo "checking for $CC warning options" 1>&6
              +echo "configure:2309: checking for $CC warning options" >&5
              +	cf_save_CFLAGS="$CFLAGS"
              +	EXTRA_CFLAGS="-W -Wall"
              +	cf_warn_CONST=""
              +	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
              +	for cf_opt in \
              +		Wbad-function-cast \
              +		Wcast-align \
              +		Wcast-qual \
              +		Winline \
              +		Wmissing-declarations \
              +		Wmissing-prototypes \
              +		Wnested-externs \
              +		Wpointer-arith \
              +		Wshadow \
              +		Wstrict-prototypes \
              +		Wundef $cf_warn_CONST 
              +	do
              +		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
              +		if { (eval echo configure:2328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
              +			case $cf_opt in #(vi
              +			Wcast-qual) #(vi
              +				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
              +				;;
              +			Winline) #(vi
              +				case $GCC_VERSION in
              +				3.3*)
              +					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
              +
              +					continue;;
              +				esac
              +				;;
              +			esac
              +			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
              +		fi
              +	done
              +	CFLAGS="$cf_save_CFLAGS"
              +fi
              +rm -f conftest*
              +
              +
              +
              +fi
              +fi
              +
               
               
               
              @@ -2263,7 +2436,7 @@
               	
               
               echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
              -echo "configure:2267: checking for extra include directories" >&5
              +echo "configure:2440: checking for extra include directories" >&5
               if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -2288,7 +2461,7 @@
               
               
               echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
              -echo "configure:2292: checking if we have identified curses headers" >&5
              +echo "configure:2465: checking if we have identified curses headers" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -2301,14 +2474,14 @@
               	ncurses/ncurses.h
               do
               cat > conftest.$ac_ext <
               int main() {
               initscr(); tgoto("?", 0,0)
               ; return 0; }
               EOF
              -if { (eval echo configure:2312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:2485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_ncurses_header=$cf_header; break
               else
              @@ -2331,17 +2504,17 @@
               do
               ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
               echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
              -echo "configure:2335: checking for $ac_hdr" >&5
              +echo "configure:2508: checking for $ac_hdr" >&5
               if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 rm -rf conftest*
              @@ -2370,7 +2543,7 @@
               
               
               echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
              -echo "configure:2374: checking for terminfo header" >&5
              +echo "configure:2547: checking for terminfo header" >&5
               if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -2387,7 +2560,7 @@
               for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
               do
               cat > conftest.$ac_ext <
               #include <${cf_cv_ncurses_header-curses.h}>
              @@ -2397,7 +2570,7 @@
               int x = auto_left_margin
               ; return 0; }
               EOF
              -if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 
               	cf_cv_term_header="$cf_test"
              @@ -2446,7 +2619,7 @@
               
               	
               echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
              -echo "configure:2450: checking for ncurses version" >&5
              +echo "configure:2623: checking for ncurses version" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -2472,7 +2645,7 @@
               #endif
               EOF
               	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
              -	{ (eval echo configure:2476: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              +	{ (eval echo configure:2649: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
               	if test -f conftest.out ; then
               		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
               		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
              @@ -2481,7 +2654,7 @@
               
               else
                 cat > conftest.$ac_ext <
              @@ -2502,10 +2675,10 @@
               	make an error
               # endif
               #endif
              -	exit(0);
              +	${cf_cv_main_return-return}(0);
               }
               EOF
              -if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              +if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
               then
                 
               	cf_cv_ncurses_version=`cat $cf_tempfile`
              @@ -2529,16 +2702,16 @@
               	
               
               echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
              -echo "configure:2533: checking if we have identified curses libraries" >&5
              +echo "configure:2706: checking if we have identified curses libraries" >&5
               cat > conftest.$ac_ext <
               int main() {
               initscr(); tgoto("?", 0,0)
               ; return 0; }
               EOF
              -if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -2554,7 +2727,7 @@
               case $host_os in #(vi
               freebsd*) #(vi
               	echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
              -echo "configure:2558: checking for tgoto in -lmytinfo" >&5
              +echo "configure:2731: checking for tgoto in -lmytinfo" >&5
               ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -2562,7 +2735,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lmytinfo  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -2596,7 +2769,7 @@
               	;;
               hpux10.*) #(vi
               	echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
              -echo "configure:2600: checking for initscr in -lcur_colr" >&5
              +echo "configure:2773: checking for initscr in -lcur_colr" >&5
               ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -2604,7 +2777,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lcur_colr  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -2638,7 +2811,7 @@
                 echo "$ac_t""no" 1>&6
               
               	echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
              -echo "configure:2642: checking for initscr in -lHcurses" >&5
              +echo "configure:2815: checking for initscr in -lHcurses" >&5
               ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -2646,7 +2819,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lHcurses  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -2710,12 +2883,12 @@
               	# Check for library containing tgoto.  Do this before curses library
               	# because it may be needed to link the test-case for initscr.
               	echo $ac_n "checking for tgoto""... $ac_c" 1>&6
              -echo "configure:2714: checking for tgoto" >&5
              +echo "configure:2887: checking for tgoto" >&5
               if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_tgoto=yes"
               else
              @@ -2759,7 +2932,7 @@
               		for cf_term_lib in $cf_check_list termcap termlib unknown
               		do
               			echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
              -echo "configure:2763: checking for tgoto in -l$cf_term_lib" >&5
              +echo "configure:2936: checking for tgoto in -l$cf_term_lib" >&5
               ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -2767,7 +2940,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-l$cf_term_lib  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -2808,7 +2981,7 @@
               	for cf_curs_lib in $cf_check_list xcurses jcurses unknown
               	do
               		echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
              -echo "configure:2812: checking for initscr in -l$cf_curs_lib" >&5
              +echo "configure:2985: checking for initscr in -l$cf_curs_lib" >&5
               ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -2816,7 +2989,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-l$cf_curs_lib  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -2853,16 +3026,16 @@
               	LIBS="-l$cf_curs_lib $cf_save_LIBS"
               	if test "$cf_term_lib" = unknown ; then
               		echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
              -echo "configure:2857: checking if we can link with $cf_curs_lib library" >&5
              +echo "configure:3030: checking if we can link with $cf_curs_lib library" >&5
               		cat > conftest.$ac_ext <
               int main() {
               initscr()
               ; return 0; }
               EOF
              -if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -2878,16 +3051,16 @@
               		:
               	elif test "$cf_term_lib" != predefined ; then
               		echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
              -echo "configure:2882: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
              +echo "configure:3055: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
               		cat > conftest.$ac_ext <
               int main() {
               initscr(); tgoto((char *)0, 0, 0);
               ; return 0; }
               EOF
              -if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_result=no
               else
              @@ -2897,14 +3070,14 @@
                 
               			LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
               			cat > conftest.$ac_ext <
               int main() {
               initscr()
               ; return 0; }
               EOF
              -if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -2934,7 +3107,7 @@
               CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
               
               echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
              -echo "configure:2938: checking for $cf_ncuhdr_root header in include-path" >&5
              +echo "configure:3111: checking for $cf_ncuhdr_root header in include-path" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -2945,7 +3118,7 @@
               	do
               		
               	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_ncurses_h=$cf_header
               	
              @@ -2992,7 +3165,7 @@
               else
               
               echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
              -echo "configure:2996: checking for $cf_ncuhdr_root include-path" >&5
              +echo "configure:3169: checking for $cf_ncuhdr_root include-path" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -3087,14 +3260,14 @@
               				cf_save_CPPFLAGS="$CPPFLAGS"
               				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
               				cat > conftest.$ac_ext <
               int main() {
               printf("Hello")
               ; return 0; }
               EOF
              -if { (eval echo configure:3098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -3121,7 +3294,7 @@
               		do
               			
               	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_ncurses_h2=$cf_header
               	
              @@ -3189,14 +3362,14 @@
               				cf_save_CPPFLAGS="$CPPFLAGS"
               				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
               				cat > conftest.$ac_ext <
               int main() {
               printf("Hello")
               ; return 0; }
               EOF
              -if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:3373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -3249,7 +3422,7 @@
               
               
               echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
              -echo "configure:3253: checking for terminfo header" >&5
              +echo "configure:3426: checking for terminfo header" >&5
               if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -3266,7 +3439,7 @@
               for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
               do
               cat > conftest.$ac_ext <
               #include <${cf_cv_ncurses_header-curses.h}>
              @@ -3276,7 +3449,7 @@
               int x = auto_left_margin
               ; return 0; }
               EOF
              -if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:3453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 
               	cf_cv_term_header="$cf_test"
              @@ -3331,7 +3504,7 @@
               
               
               echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
              -echo "configure:3335: checking for ncurses version" >&5
              +echo "configure:3508: checking for ncurses version" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -3357,7 +3530,7 @@
               #endif
               EOF
               	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
              -	{ (eval echo configure:3361: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              +	{ (eval echo configure:3534: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
               	if test -f conftest.out ; then
               		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
               		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
              @@ -3366,7 +3539,7 @@
               
               else
                 cat > conftest.$ac_ext <
              @@ -3387,10 +3560,10 @@
               	make an error
               # endif
               #endif
              -	exit(0);
              +	${cf_cv_main_return-return}(0);
               }
               EOF
              -if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              +if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
               then
                 
               	cf_cv_ncurses_version=`cat $cf_tempfile`
              @@ -3421,7 +3594,7 @@
               cf_ncurses_LIBS=""
               cf_ncurses_SAVE="$LIBS"
               echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
              -echo "configure:3425: checking for Gpm_Open in -lgpm" >&5
              +echo "configure:3598: checking for Gpm_Open in -lgpm" >&5
               ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -3429,7 +3602,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lgpm  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -3456,7 +3629,7 @@
               if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
                 echo "$ac_t""yes" 1>&6
                 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
              -echo "configure:3460: checking for initscr in -lgpm" >&5
              +echo "configure:3633: checking for initscr in -lgpm" >&5
               ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -3464,7 +3637,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lgpm  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -3507,7 +3680,7 @@
               	# version of ncurses (but it should do no harm, since it's static).
               	if test "$cf_nculib_root" = ncurses ; then
               		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
              -echo "configure:3511: checking for tgoto in -lmytinfo" >&5
              +echo "configure:3684: checking for tgoto in -lmytinfo" >&5
               ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -3515,7 +3688,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lmytinfo  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -3560,12 +3733,12 @@
               	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
               	cf_libdir=""
               	echo $ac_n "checking for initscr""... $ac_c" 1>&6
              -echo "configure:3564: checking for initscr" >&5
              +echo "configure:3737: checking for initscr" >&5
               if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_initscr=yes"
               else
              @@ -3608,17 +3781,17 @@
               
               		cf_save_LIBS="$LIBS"
               		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
              -echo "configure:3612: checking for initscr in -l$cf_nculib_root" >&5
              +echo "configure:3785: checking for initscr in -l$cf_nculib_root" >&5
               		LIBS="-l$cf_nculib_root $LIBS"
               		cat > conftest.$ac_ext <
               int main() {
               initscr()
               ; return 0; }
               EOF
              -if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 echo "$ac_t""yes" 1>&6
               			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              @@ -3687,17 +3860,17 @@
               			for cf_libdir in $cf_search
               			do
               				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
              -echo "configure:3691: checking for -l$cf_nculib_root in $cf_libdir" >&5
              +echo "configure:3864: checking for -l$cf_nculib_root in $cf_libdir" >&5
               				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
               				cat > conftest.$ac_ext <
               int main() {
               initscr()
               ; return 0; }
               EOF
              -if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 echo "$ac_t""yes" 1>&6
               			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              @@ -3728,7 +3901,7 @@
               
               if test -n "$cf_ncurses_LIBS" ; then
               	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
              -echo "configure:3732: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
              +echo "configure:3905: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
               	cf_ncurses_SAVE="$LIBS"
               	for p in $cf_ncurses_LIBS ; do
               		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
              @@ -3737,14 +3910,14 @@
               		fi
               	done
               	cat > conftest.$ac_ext <
               int main() {
               initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
               ; return 0; }
               EOF
              -if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 echo "$ac_t""yes" 1>&6
               else
              @@ -3770,14 +3943,14 @@
               	cf_cv_libtype=w
               	
               echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
              -echo "configure:3774: checking for multibyte character support" >&5
              +echo "configure:3947: checking for multibyte character support" >&5
               if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 
               	cf_save_LIBS="$LIBS"
               	cat > conftest.$ac_ext <
              @@ -3785,7 +3958,7 @@
               putwc(0,0);
               ; return 0; }
               EOF
              -if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_cv_utf8_lib=yes
               else
              @@ -3794,7 +3967,7 @@
                 rm -rf conftest*
                 LIBS="-lutf8 $LIBS"
               	 cat > conftest.$ac_ext <
              @@ -3802,7 +3975,7 @@
               putwc(0,0);
               ; return 0; }
               EOF
              -if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_cv_utf8_lib=add-on
               else
              @@ -3839,7 +4012,7 @@
               CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
               
               echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
              -echo "configure:3843: checking for $cf_ncuhdr_root header in include-path" >&5
              +echo "configure:4016: checking for $cf_ncuhdr_root header in include-path" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -3850,7 +4023,7 @@
               	do
               		
               	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_ncurses_h=$cf_header
               	
              @@ -3905,7 +4078,7 @@
               else
               
               echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
              -echo "configure:3909: checking for $cf_ncuhdr_root include-path" >&5
              +echo "configure:4082: checking for $cf_ncuhdr_root include-path" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -4000,14 +4173,14 @@
               				cf_save_CPPFLAGS="$CPPFLAGS"
               				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
               				cat > conftest.$ac_ext <
               int main() {
               printf("Hello")
               ; return 0; }
               EOF
              -if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -4034,7 +4207,7 @@
               		do
               			
               	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_ncurses_h2=$cf_header
               	
              @@ -4102,14 +4275,14 @@
               				cf_save_CPPFLAGS="$CPPFLAGS"
               				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
               				cat > conftest.$ac_ext <
               int main() {
               printf("Hello")
               ; return 0; }
               EOF
              -if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:4286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -4162,7 +4335,7 @@
               
               
               echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
              -echo "configure:4166: checking for terminfo header" >&5
              +echo "configure:4339: checking for terminfo header" >&5
               if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -4179,7 +4352,7 @@
               for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
               do
               cat > conftest.$ac_ext <
               #include <${cf_cv_ncurses_header-curses.h}>
              @@ -4189,7 +4362,7 @@
               int x = auto_left_margin
               ; return 0; }
               EOF
              -if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:4366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 
               	cf_cv_term_header="$cf_test"
              @@ -4244,7 +4417,7 @@
               
               
               echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
              -echo "configure:4248: checking for ncurses version" >&5
              +echo "configure:4421: checking for ncurses version" >&5
               if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -4270,7 +4443,7 @@
               #endif
               EOF
               	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
              -	{ (eval echo configure:4274: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
              +	{ (eval echo configure:4447: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
               	if test -f conftest.out ; then
               		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
               		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
              @@ -4279,7 +4452,7 @@
               
               else
                 cat > conftest.$ac_ext <
              @@ -4300,10 +4473,10 @@
               	make an error
               # endif
               #endif
              -	exit(0);
              +	${cf_cv_main_return-return}(0);
               }
               EOF
              -if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              +if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
               then
                 
               	cf_cv_ncurses_version=`cat $cf_tempfile`
              @@ -4334,7 +4507,7 @@
               cf_ncurses_LIBS=""
               cf_ncurses_SAVE="$LIBS"
               echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
              -echo "configure:4338: checking for Gpm_Open in -lgpm" >&5
              +echo "configure:4511: checking for Gpm_Open in -lgpm" >&5
               ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -4342,7 +4515,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lgpm  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -4369,7 +4542,7 @@
               if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
                 echo "$ac_t""yes" 1>&6
                 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
              -echo "configure:4373: checking for initscr in -lgpm" >&5
              +echo "configure:4546: checking for initscr in -lgpm" >&5
               ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -4377,7 +4550,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lgpm  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -4420,7 +4593,7 @@
               	# version of ncurses (but it should do no harm, since it's static).
               	if test "$cf_nculib_root" = ncurses ; then
               		echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
              -echo "configure:4424: checking for tgoto in -lmytinfo" >&5
              +echo "configure:4597: checking for tgoto in -lmytinfo" >&5
               ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -4428,7 +4601,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lmytinfo  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -4473,12 +4646,12 @@
               	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
               	cf_libdir=""
               	echo $ac_n "checking for initscr""... $ac_c" 1>&6
              -echo "configure:4477: checking for initscr" >&5
              +echo "configure:4650: checking for initscr" >&5
               if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_initscr=yes"
               else
              @@ -4521,17 +4694,17 @@
               
               		cf_save_LIBS="$LIBS"
               		echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
              -echo "configure:4525: checking for initscr in -l$cf_nculib_root" >&5
              +echo "configure:4698: checking for initscr in -l$cf_nculib_root" >&5
               		LIBS="-l$cf_nculib_root $LIBS"
               		cat > conftest.$ac_ext <
               int main() {
               initscr()
               ; return 0; }
               EOF
              -if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 echo "$ac_t""yes" 1>&6
               			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              @@ -4600,17 +4773,17 @@
               			for cf_libdir in $cf_search
               			do
               				echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
              -echo "configure:4604: checking for -l$cf_nculib_root in $cf_libdir" >&5
              +echo "configure:4777: checking for -l$cf_nculib_root in $cf_libdir" >&5
               				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
               				cat > conftest.$ac_ext <
               int main() {
               initscr()
               ; return 0; }
               EOF
              -if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 echo "$ac_t""yes" 1>&6
               			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
              @@ -4641,7 +4814,7 @@
               
               if test -n "$cf_ncurses_LIBS" ; then
               	echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
              -echo "configure:4645: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
              +echo "configure:4818: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
               	cf_ncurses_SAVE="$LIBS"
               	for p in $cf_ncurses_LIBS ; do
               		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
              @@ -4650,14 +4823,14 @@
               		fi
               	done
               	cat > conftest.$ac_ext <
               int main() {
               initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
               ; return 0; }
               EOF
              -if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 echo "$ac_t""yes" 1>&6
               else
              @@ -4700,17 +4873,17 @@
                   case "`(uname -sr) 2>/dev/null`" in
                   "SunOS 5"*)
                     echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
              -echo "configure:4704: checking whether -R must be followed by a space" >&5
              +echo "configure:4877: checking whether -R must be followed by a space" >&5
                     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
                     cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 ac_R_nospace=yes
               else
              @@ -4726,14 +4899,14 @@
                     else
               	LIBS="$ac_xsave_LIBS -R $x_libraries"
               	cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 ac_R_space=yes
               else
              @@ -4765,7 +4938,7 @@
                   # libraries were built with DECnet support.  And karl@cs.umb.edu says
                   # the Alpha needs dnet_stub (dnet does not exist).
                   echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
              -echo "configure:4769: checking for dnet_ntoa in -ldnet" >&5
              +echo "configure:4942: checking for dnet_ntoa in -ldnet" >&5
               ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -4773,7 +4946,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-ldnet  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -4806,7 +4979,7 @@
               
                   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
                     echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
              -echo "configure:4810: checking for dnet_ntoa in -ldnet_stub" >&5
              +echo "configure:4983: checking for dnet_ntoa in -ldnet_stub" >&5
               ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -4814,7 +4987,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-ldnet_stub  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -4854,12 +5027,12 @@
                   # The nsl library prevents programs from opening the X display
                   # on Irix 5.2, according to dickey@clark.net.
                   echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
              -echo "configure:4858: checking for gethostbyname" >&5
              +echo "configure:5031: checking for gethostbyname" >&5
               if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_gethostbyname=yes"
               else
              @@ -4903,7 +5076,7 @@
               
                   if test $ac_cv_func_gethostbyname = no; then
                     echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
              -echo "configure:4907: checking for gethostbyname in -lnsl" >&5
              +echo "configure:5080: checking for gethostbyname in -lnsl" >&5
               ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -4911,7 +5084,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lnsl  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -4952,12 +5125,12 @@
                   # -lsocket must be given before -lnsl if both are needed.
                   # We assume that if connect needs -lnsl, so does gethostbyname.
                   echo $ac_n "checking for connect""... $ac_c" 1>&6
              -echo "configure:4956: checking for connect" >&5
              +echo "configure:5129: checking for connect" >&5
               if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_connect=yes"
               else
              @@ -5001,7 +5174,7 @@
               
                   if test $ac_cv_func_connect = no; then
                     echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
              -echo "configure:5005: checking for connect in -lsocket" >&5
              +echo "configure:5178: checking for connect in -lsocket" >&5
               ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5009,7 +5182,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5044,12 +5217,12 @@
               
                   # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
                   echo $ac_n "checking for remove""... $ac_c" 1>&6
              -echo "configure:5048: checking for remove" >&5
              +echo "configure:5221: checking for remove" >&5
               if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_remove=yes"
               else
              @@ -5093,7 +5266,7 @@
               
                   if test $ac_cv_func_remove = no; then
                     echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
              -echo "configure:5097: checking for remove in -lposix" >&5
              +echo "configure:5270: checking for remove in -lposix" >&5
               ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5101,7 +5274,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lposix  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5136,12 +5309,12 @@
               
                   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
                   echo $ac_n "checking for shmat""... $ac_c" 1>&6
              -echo "configure:5140: checking for shmat" >&5
              +echo "configure:5313: checking for shmat" >&5
               if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_shmat=yes"
               else
              @@ -5185,7 +5358,7 @@
               
                   if test $ac_cv_func_shmat = no; then
                     echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
              -echo "configure:5189: checking for shmat in -lipc" >&5
              +echo "configure:5362: checking for shmat in -lipc" >&5
               ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5193,7 +5366,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lipc  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5237,7 +5410,7 @@
                 # libraries we check for below, so use a different variable.
                 #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
                 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
              -echo "configure:5241: checking for IceConnectionNumber in -lICE" >&5
              +echo "configure:5414: checking for IceConnectionNumber in -lICE" >&5
               ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5245,7 +5418,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lICE $X_EXTRA_LIBS $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5371,14 +5544,14 @@
               
               if test "$cf_check_cflags" != "$CFLAGS" ; then
               cat > conftest.$ac_ext <
               int main() {
               printf("Hello world");
               ; return 0; }
               EOF
              -if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -5397,12 +5570,12 @@
               
               
               echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
              -echo "configure:5401: checking for XOpenDisplay" >&5
              +echo "configure:5574: checking for XOpenDisplay" >&5
               if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_XOpenDisplay=yes"
               else
              @@ -5444,7 +5617,7 @@
                 echo "$ac_t""no" 1>&6
               
               echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
              -echo "configure:5448: checking for XOpenDisplay in -lX11" >&5
              +echo "configure:5621: checking for XOpenDisplay in -lX11" >&5
               ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5452,7 +5625,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5487,12 +5660,12 @@
               
               
               echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
              -echo "configure:5491: checking for XtAppInitialize" >&5
              +echo "configure:5664: checking for XtAppInitialize" >&5
               if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_XtAppInitialize=yes"
               else
              @@ -5534,7 +5707,7 @@
                 echo "$ac_t""no" 1>&6
               
               echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
              -echo "configure:5538: checking for XtAppInitialize in -lXt" >&5
              +echo "configure:5711: checking for XtAppInitialize in -lXt" >&5
               ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5542,7 +5715,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5591,7 +5764,7 @@
               cf_x_athena=${cf_x_athena-Xaw}
               
               echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
              -echo "configure:5595: checking if you want to link with Xaw 3d library" >&5
              +echo "configure:5768: checking if you want to link with Xaw 3d library" >&5
               withval=
               
               # Check whether --with-Xaw3d or --without-Xaw3d was given.
              @@ -5608,7 +5781,7 @@
               fi
               
               echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
              -echo "configure:5612: checking if you want to link with neXT Athena library" >&5
              +echo "configure:5785: checking if you want to link with neXT Athena library" >&5
               withval=
               
               # Check whether --with-neXtaw or --without-neXtaw was given.
              @@ -5625,7 +5798,7 @@
               fi
               
               echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
              -echo "configure:5629: checking if you want to link with Athena-Plus library" >&5
              +echo "configure:5802: checking if you want to link with Athena-Plus library" >&5
               withval=
               
               # Check whether --with-XawPlus or --without-XawPlus was given.
              @@ -5642,7 +5815,7 @@
               fi
               
               echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
              -echo "configure:5646: checking for XextCreateExtension in -lXext" >&5
              +echo "configure:5819: checking for XextCreateExtension in -lXext" >&5
               ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5650,7 +5823,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lXext  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -5700,13 +5873,13 @@
               		if test $cf_path != default ; then
               			CPPFLAGS="-I$cf_path/include $cf_save"
               			echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
              -echo "configure:5704: checking for $cf_test in $cf_path" >&5
              +echo "configure:5877: checking for $cf_test in $cf_path" >&5
               		else
               			echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
              -echo "configure:5707: checking for $cf_test" >&5
              +echo "configure:5880: checking for $cf_test" >&5
               		fi
               		cat > conftest.$ac_ext <
              @@ -5715,7 +5888,7 @@
               
               ; return 0; }
               EOF
              -if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:5892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -5762,21 +5935,21 @@
               			if test $cf_path != default ; then
               				LIBS="-L$cf_path/lib $cf_lib $LIBS"
               				echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
              -echo "configure:5766: checking for $cf_lib in $cf_path" >&5
              +echo "configure:5939: checking for $cf_lib in $cf_path" >&5
               			else
               				LIBS="$cf_lib $LIBS"
               				echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
              -echo "configure:5770: checking for $cf_test in $cf_lib" >&5
              +echo "configure:5943: checking for $cf_test in $cf_lib" >&5
               			fi
               			cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -5817,7 +5990,7 @@
               # Extract the first word of "$ac_prog", so it can be a program name with args.
               set dummy $ac_prog; ac_word=$2
               echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
              -echo "configure:5821: checking for $ac_word" >&5
              +echo "configure:5994: checking for $ac_word" >&5
               if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -5946,14 +6119,14 @@
               
               if test "$cf_check_cflags" != "$CFLAGS" ; then
               cat > conftest.$ac_ext <
               int main() {
               printf("Hello world");
               ; return 0; }
               EOF
              -if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 :
               else
                 echo "configure: failed program was:" >&5
              @@ -5971,7 +6144,7 @@
               fi
               
               echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
              -echo "configure:5975: checking for XOpenDisplay in -lX11" >&5
              +echo "configure:6148: checking for XOpenDisplay in -lX11" >&5
               ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -5979,7 +6152,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -6011,14 +6184,14 @@
               fi
               
               echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
              -echo "configure:6015: checking for XCurses library" >&5
              +echo "configure:6188: checking for XCurses library" >&5
               if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 
               LIBS="-lXCurses $LIBS"
               cat > conftest.$ac_ext <
              @@ -6028,7 +6201,7 @@
               XCursesExit();
               ; return 0; }
               EOF
              -if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_cv_lib_XCurses=yes
               else
              @@ -6073,7 +6246,7 @@
               *)
               	# look for curses-related libraries
               	echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
              -echo "configure:6077: checking for new_panel in -lpanel$cf_cv_libtype" >&5
              +echo "configure:6250: checking for new_panel in -lpanel$cf_cv_libtype" >&5
               ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -6081,7 +6254,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lpanel$cf_cv_libtype  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -6120,7 +6293,7 @@
               fi
               
               	echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
              -echo "configure:6124: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
              +echo "configure:6297: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
               ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -6128,7 +6301,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lmenu$cf_cv_libtype  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -6167,7 +6340,7 @@
               fi
               
               	echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
              -echo "configure:6171: checking for form_driver in -lform$cf_cv_libtype" >&5
              +echo "configure:6344: checking for form_driver in -lform$cf_cv_libtype" >&5
               ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
               if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
              @@ -6175,7 +6348,7 @@
                 ac_save_LIBS="$LIBS"
               LIBS="-lform$cf_cv_libtype  $LIBS"
               cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_lib_$ac_lib_var=yes"
               else
              @@ -6225,17 +6398,17 @@
               do
               ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
               echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
              -echo "configure:6229: checking for $ac_hdr" >&5
              +echo "configure:6402: checking for $ac_hdr" >&5
               if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:6239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:6412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 rm -rf conftest*
              @@ -6265,12 +6438,12 @@
               esac
               
               echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
              -echo "configure:6269: checking return type of signal handlers" >&5
              +echo "configure:6442: checking return type of signal handlers" >&5
               if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <
               #include 
              @@ -6287,7 +6460,7 @@
               int i;
               ; return 0; }
               EOF
              -if { (eval echo configure:6291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:6464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 ac_cv_type_signal=void
               else
              @@ -6307,12 +6480,12 @@
               
               
               echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
              -echo "configure:6311: checking for ANSI C header files" >&5
              +echo "configure:6484: checking for ANSI C header files" >&5
               if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <
               #include 
              @@ -6320,7 +6493,7 @@
               #include 
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:6324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:6497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 rm -rf conftest*
              @@ -6337,7 +6510,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 <
               EOF
              @@ -6355,7 +6528,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 <
               EOF
              @@ -6376,7 +6549,7 @@
                 :
               else
                 cat > conftest.$ac_ext <
               #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
              @@ -6387,7 +6560,7 @@
               exit (0); }
               
               EOF
              -if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              +if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
               then
                 :
               else
              @@ -6411,12 +6584,12 @@
               fi
               
               echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
              -echo "configure:6415: checking whether time.h and sys/time.h may both be included" >&5
              +echo "configure:6588: checking whether time.h and sys/time.h may both be included" >&5
               if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <
               #include 
              @@ -6425,7 +6598,7 @@
               struct tm *tp;
               ; return 0; }
               EOF
              -if { (eval echo configure:6429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:6602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 ac_cv_header_time=yes
               else
              @@ -6458,17 +6631,17 @@
               do
               ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
               echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
              -echo "configure:6462: checking for $ac_hdr" >&5
              +echo "configure:6635: checking for $ac_hdr" >&5
               if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <
               EOF
               ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
              -{ (eval echo configure:6472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
              +{ (eval echo configure:6645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
               ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
               if test -z "$ac_err"; then
                 rm -rf conftest*
              @@ -6529,12 +6702,12 @@
               
               do
               echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
              -echo "configure:6533: checking for $ac_func" >&5
              +echo "configure:6706: checking for $ac_func" >&5
               if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 eval "ac_cv_func_$ac_func=yes"
               else
              @@ -6582,8 +6755,14 @@
               done
               
               
              +echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
              +echo "configure:6760: checking for ncurses extended functions" >&5
              +if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
              +  echo $ac_n "(cached) $ac_c" 1>&6
              +else
              +  
               cat > conftest.$ac_ext <
              @@ -6601,30 +6780,81 @@
               	(void) use_default_colors ();
               	(void) use_extended_names (0);
               	(void) wresize (0, 0, 0);
              -	
               ; return 0; }
               EOF
              -if { (eval echo configure:6608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
              -  cat >> confdefs.h <<\EOF
              +  cf_cv_ncurses_ext_funcs=yes
              +else
              +  echo "configure: failed program was:" >&5
              +  cat conftest.$ac_ext >&5
              +  rm -rf conftest*
              +  cf_cv_ncurses_ext_funcs=no
              +fi
              +rm -f conftest*
              +
              +fi
              +
              +echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
              +test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
               #define NCURSES_EXT_FUNCS 1
               EOF
               
              +
              +echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
              +echo "configure:6806: checking for wide-character functions" >&5
              +if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
              +  echo $ac_n "(cached) $ac_c" 1>&6
              +else
              +  
              +cat > conftest.$ac_ext <
              +int main() {
              +
              +	static wchar_t src_wchar[2];
              +	static cchar_t dst_cchar;
              +	setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
              +	
              +; return 0; }
              +EOF
              +if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +  rm -rf conftest*
              +  cf_cv_widechar_funcs=yes
               else
                 echo "configure: failed program was:" >&5
                 cat conftest.$ac_ext >&5
              +  rm -rf conftest*
              +  cf_cv_widechar_funcs=no
               fi
               rm -f conftest*
               
              +fi
              +
              +echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
              +if test "$cf_cv_widechar_funcs" != no ; then
              +	cat >> confdefs.h <<\EOF
              +#define USE_WIDEC_SUPPORT 1
              +EOF
              +
              +else
              +	cat >> confdefs.h <<\EOF
              +#define USE_WIDEC_SUPPORT 0
              +EOF
              +
              +fi
              +
               
               echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
              -echo "configure:6622: checking if sys/time.h works with sys/select.h" >&5
              +echo "configure:6852: checking if sys/time.h works with sys/select.h" >&5
               if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
                 
               cat > conftest.$ac_ext <
              @@ -6639,7 +6869,7 @@
               
               ; return 0; }
               EOF
              -if { (eval echo configure:6643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_cv_sys_time_select=yes
               else
              @@ -6660,7 +6890,7 @@
               
               
               echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
              -echo "configure:6664: checking for function curses_version" >&5
              +echo "configure:6894: checking for function curses_version" >&5
               if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -6669,7 +6899,7 @@
                 cf_cv_func_curses_version=unknown
               else
                 cat > conftest.$ac_ext <
              @@ -6677,11 +6907,11 @@
               {
               	char temp[1024];
               	sprintf(temp, "%s\n", curses_version());
              -	exit(0);
              +	${cf_cv_main_return-return}(0);
               }
               
               EOF
              -if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
              +if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
               then
                 cf_cv_func_curses_version=yes
               
              @@ -6706,7 +6936,7 @@
               
               
               echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
              -echo "configure:6710: checking for alternate character set array" >&5
              +echo "configure:6940: checking for alternate character set array" >&5
               if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -6715,7 +6945,7 @@
               for name in acs_map _acs_map __acs_map _nc_acs_map
               do
               cat > conftest.$ac_ext <
              @@ -6726,7 +6956,7 @@
               
               ; return 0; }
               EOF
              -if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_cv_curses_acs_map=$name; break
               else
              @@ -6747,7 +6977,7 @@
               
               
               echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
              -echo "configure:6751: checking for wide alternate character set array" >&5
              +echo "configure:6981: checking for wide alternate character set array" >&5
               if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
                 echo $ac_n "(cached) $ac_c" 1>&6
               else
              @@ -6756,7 +6986,7 @@
               	for name in wacs_map _wacs_map __wacs_map _nc_wacs
               	do
               	cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              +if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
                 rm -rf conftest*
                 cf_cv_curses_wacs_map=$name
               	 break
              @@ -6783,9 +7013,9 @@
               
               
               echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
              -echo "configure:6787: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
              +echo "configure:7017: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
               cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:7032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -6826,9 +7056,9 @@
               
               
               echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
              -echo "configure:6830: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
              +echo "configure:7060: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
               cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
              +if { (eval echo configure:7075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
                 rm -rf conftest*
                 cf_result=yes
               else
              @@ -7018,9 +7248,9 @@
               s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
               s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
               s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
              -s%@ECHO_LINK@%$ECHO_LINK%g
               s%@LD@%$LD%g
               s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
              +s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
               s%@LD_MODEL@%$LD_MODEL%g
               s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
               s%@LIBTOOL@%$LIBTOOL%g
              @@ -7040,6 +7270,11 @@
               s%@EXEEXT@%$EXEEXT%g
               s%@OBJEXT@%$OBJEXT%g
               s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
              +s%@ECHO_LT@%$ECHO_LT%g
              +s%@ECHO_LD@%$ECHO_LD%g
              +s%@RULE_CC@%$RULE_CC%g
              +s%@SHOW_CC@%$SHOW_CC%g
              +s%@ECHO_CC@%$ECHO_CC%g
               s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
               s%@X_CFLAGS@%$X_CFLAGS%g
               s%@X_PRE_LIBS@%$X_PRE_LIBS%g
              @@ -7247,6 +7482,7 @@
               # Extra initialization commands, if any
               
               AWK="$AWK"
              +ECHO_LD="$ECHO_LD"
               
               EOF
               cat >> $CONFIG_STATUS <<\EOF
              @@ -7258,7 +7494,7 @@
               	if test ! -d $srcdir/$cf_dir; then
               		continue
               	elif test -f $srcdir/$cf_dir/programs; then
              -		$AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
              +		$AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
               	fi
               done
               
              diff -Naur ncurses-5.6.orig/test/configure.in ncurses-5.6/test/configure.in
              --- ncurses-5.6.orig/test/configure.in	2006-07-15 14:54:07.000000000 -0400
              +++ ncurses-5.6/test/configure.in	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               dnl***************************************************************************
              -dnl Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
              +dnl Copyright (c) 1998-2006,2007 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,7 +28,7 @@
               dnl
               dnl Author: Thomas E. Dickey 1996, etc.
               dnl
              -dnl $Id: configure.in,v 1.58 2006/07/15 18:54:07 tom Exp $
              +dnl $Id: configure.in,v 1.63 2007/06/09 20:02:57 tom Exp $
               dnl This is a simple configuration-script for the ncurses test programs that
               dnl allows the test-directory to be separately configured against a reference
               dnl system (i.e., sysvr4 curses)
              @@ -58,15 +58,15 @@
               DFT_DEP_SUFFIX=""			AC_SUBST(DFT_DEP_SUFFIX)
               DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`	AC_SUBST(DFT_OBJ_SUBDIR)
               DFT_UPR_MODEL="NORMAL"			AC_SUBST(DFT_UPR_MODEL)
              -ECHO_LINK='@ echo linking $@ ... ;'	AC_SUBST(ECHO_LINK)
               LD="ld"					AC_SUBST(LD)
               LDFLAGS_SHARED=""			AC_SUBST(LDFLAGS_SHARED)
              +LDFLAGS_STATIC=""			AC_SUBST(LDFLAGS_STATIC)
               LD_MODEL=""				AC_SUBST(LD_MODEL)
               LD_SHARED_OPTS=""			AC_SUBST(LD_SHARED_OPTS)
               LIBTOOL=""				AC_SUBST(LIBTOOL)
               LIB_CLEAN=""				AC_SUBST(LIB_CLEAN)
               LIB_COMPILE=""				AC_SUBST(LIB_COMPILE)
              -LIB_LINK=""				AC_SUBST(LIB_LINK)
              +LIB_LINK='${CC}'			AC_SUBST(LIB_LINK)
               LINK_TESTS=""				AC_SUBST(LINK_TESTS)
               LINT=lint				AC_SUBST(LINT)
               LINT_OPTS=""				AC_SUBST(LINT_OPTS)
              @@ -85,9 +85,13 @@
               AC_OBJEXT
               
               CF_ANSI_CC_REQD
              -CF_ENABLE_WARNINGS
               CF_GCC_ATTRIBUTES
               CF_XOPEN_SOURCE
              +AC_C_CONST
              +CF_SIG_ATOMIC_T
              +
              +CF_DISABLE_ECHO
              +CF_ENABLE_WARNINGS
               
               CF_WITH_CURSES_DIR
               
              @@ -206,6 +210,7 @@
               wresize \
               )
               
              +AC_CACHE_CHECK(for ncurses extended functions,cf_cv_ncurses_ext_funcs,[
               AC_TRY_LINK([
               #include <${cf_cv_ncurses_header-curses.h}>],
               [
              @@ -220,8 +225,28 @@
               	(void) resizeterm (0, 0);
               	(void) use_default_colors ();
               	(void) use_extended_names (0);
              -	(void) wresize (0, 0, 0);
              -	],[AC_DEFINE(NCURSES_EXT_FUNCS)])
              +	(void) wresize (0, 0, 0);],
              +	[cf_cv_ncurses_ext_funcs=yes],
              +	[cf_cv_ncurses_ext_funcs=no])
              +])
              +test "$cf_cv_ncurses_ext_funcs" != no && AC_DEFINE(NCURSES_EXT_FUNCS)
              +
              +AC_CACHE_CHECK(for wide-character functions,cf_cv_widechar_funcs,[
              +AC_TRY_LINK([
              +#include <${cf_cv_ncurses_header-curses.h}>],
              +[
              +	static wchar_t src_wchar[2];
              +	static cchar_t dst_cchar;
              +	setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
              +	],
              +	[cf_cv_widechar_funcs=yes],
              +	[cf_cv_widechar_funcs=no])
              +])
              +if test "$cf_cv_widechar_funcs" != no ; then
              +	AC_DEFINE(USE_WIDEC_SUPPORT,1)
              +else
              +	AC_DEFINE(USE_WIDEC_SUPPORT,0)
              +fi
               
               CF_SYS_TIME_SELECT
               CF_FUNC_CURSES_VERSION
              @@ -236,7 +261,7 @@
               dnl ---------------------------------------------------------------------------
               
               AC_OUTPUT(Makefile,[
              -CF_PRG_RULES([$srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK"], .)
              +CF_PRG_RULES([$srcdir/mk-test.awk ECHO_LINK="$ECHO_LD"], .)
               	cat >>Makefile < 0) {
               	wprintw(win, "%s was bound to %s\n", vis_string, keyname(rc));
              diff -Naur ncurses-5.6.orig/test/demo_forms.c ncurses-5.6/test/demo_forms.c
              --- ncurses-5.6.orig/test/demo_forms.c	2006-12-09 19:30:24.000000000 -0500
              +++ ncurses-5.6/test/demo_forms.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2003-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 2003-2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: demo_forms.c,v 1.22 2006/12/10 00:30:24 tom Exp $
              + * $Id: demo_forms.c,v 1.24 2007/07/21 17:45:09 tom Exp $
                *
                * Demonstrate a variety of functions from the form library.
                * Thomas Dickey - 2003/4/26
              @@ -322,6 +322,10 @@
                   int pg;
                   WINDOW *also;
               
              +#ifdef NCURSES_MOUSE_VERSION
              +    mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
              +#endif
              +
                   help_edit_field();
               
                   mvaddstr(4, 57, "Forms Entry Test");
              @@ -423,6 +427,10 @@
               	free_field(f[c]);
                   noraw();
                   nl();
              +
              +#ifdef NCURSES_MOUSE_VERSION
              +    mousemask(0, (mmask_t *) 0);
              +#endif
               }
               
               static void
              @@ -451,7 +459,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((ch = getopt(argc, argv, "dj:m:o:t:")) != EOF) {
              +    while ((ch = getopt(argc, argv, "dj:m:o:t:")) != -1) {
               	switch (ch) {
               	case 'd':
               	    d_option = TRUE;
              diff -Naur ncurses-5.6.orig/test/demo_menus.c ncurses-5.6/test/demo_menus.c
              --- ncurses-5.6.orig/test/demo_menus.c	2006-06-17 13:39:37.000000000 -0400
              +++ ncurses-5.6/test/demo_menus.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2005,2006 Free Software Foundation, Inc.                   *
              + * Copyright (c) 2005-2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: demo_menus.c,v 1.20 2006/06/17 17:39:37 tom Exp $
              + * $Id: demo_menus.c,v 1.21 2007/07/21 17:45:09 tom Exp $
                *
                * Demonstrate a variety of functions from the menu library.
                * Thomas Dickey - 2005/4/9
              @@ -834,7 +834,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != EOF) {
              +    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != -1) {
               	switch (c) {
               #if HAVE_RIPOFFLINE
               	case 'f':
              diff -Naur ncurses-5.6.orig/test/demo_panels.c ncurses-5.6/test/demo_panels.c
              --- ncurses-5.6.orig/test/demo_panels.c	2006-04-01 14:08:03.000000000 -0500
              +++ ncurses-5.6/test/demo_panels.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2003,2006 Free Software Foundation, Inc.                   *
              + * Copyright (c) 2007 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            *
              @@ -26,17 +26,10 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: demo_panels.c,v 1.2 2006/04/01 19:08:03 tom Exp $
              + * $Id: demo_panels.c,v 1.28 2007/08/11 16:34:49 tom Exp $
                *
                * Demonstrate a variety of functions from the panel library.
              - * Thomas Dickey - 2003/4/26
                */
              -/*
              -panel_above			-
              -panel_below			-
              -panel_hidden			-
              -replace_panel			-
              -*/
               
               #include 
               
              @@ -44,11 +37,771 @@
               
               #include 
               
              +#define LAST_POS '@'
              +#define TEMP_POS '>'
              +
              +typedef void (*InitPanel) (void);
              +typedef void (*FillPanel) (PANEL *);
              +
              +static bool use_colors = FALSE;
              +static bool unboxed = FALSE;
              +static FILE *log_in;
              +static FILE *log_out;
              +
              +static void
              +close_input(void)
              +{
              +    if (log_in != 0) {
              +	fclose(log_in);
              +	log_in = 0;
              +    }
              +}
              +
              +static void
              +close_output(void)
              +{
              +    if (log_out != 0) {
              +	fclose(log_out);
              +	log_out = 0;
              +    }
              +}
              +
              +static WINDOW *
              +statusline(void)
              +{
              +    WINDOW *result = stdscr;
              +
              +    wmove(result, LINES - 1, 0);
              +    wclrtoeol(result);
              +    return result;
              +}
              +
              +static void
              +pflush(void)
              +{
              +    update_panels();
              +    doupdate();
              +}
              +
              +static void
              +saywhat(NCURSES_CONST char *text)
              +{
              +    WINDOW *win = statusline();
              +    if (text != 0 && *text != '\0') {
              +	waddstr(win, text);
              +	waddstr(win, "; ");
              +    }
              +    waddstr(win, "press any key to continue");
              +}
              +
              +static void
              +show_position(NCURSES_CONST char *text,
              +	      NCURSES_CONST char *also,
              +	      int which,
              +	      int ypos,
              +	      int xpos)
              +{
              +    WINDOW *win = statusline();
              +
              +    wprintw(win, "%s for panel %d now %d,%d%s", text, which, ypos, xpos, also);
              +    wmove(stdscr, ypos, xpos);
              +}
              +
              +static int
              +get_position(NCURSES_CONST char *text,
              +	     NCURSES_CONST char *also,
              +	     int which,
              +	     int *xpos,
              +	     int *ypos)
              +{
              +    int result = 0;
              +    int x1, y1;
              +    char cmd;
              +    WINDOW *win;
              +
              +    getyx(stdscr, y1, x1);
              +    win = statusline();
              +
              +    show_position(text, also, which, y1, x1);
              +
              +    if (log_in != 0) {
              +	if (fscanf(log_in, "%c%d,%d\n", &cmd, &y1, &x1) == 3) {
              +	    switch (cmd) {
              +	    case LAST_POS:
              +		result = 1;
              +		(void) wgetch(stdscr);
              +		break;
              +	    case TEMP_POS:
              +		result = 0;
              +		wrefresh(stdscr);
              +		napms(100);
              +		break;
              +	    default:
              +		result = -1;
              +		break;
              +	    }
              +	} else {
              +	    result = -1;
              +	}
              +    } else {
              +
              +	switch (wgetch(stdscr)) {
              +	case QUIT:
              +	case ESCAPE:
              +	case ERR:
              +	    result = -1;
              +	    break;
              +	case ' ':
              +	    result = 1;
              +	    break;
              +	case KEY_UP:
              +	    if (y1 > 0) {
              +		--y1;
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_DOWN:
              +	    if (y1 < getmaxy(stdscr)) {
              +		++y1;
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_LEFT:
              +	    if (x1 > 0) {
              +		--x1;
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_RIGHT:
              +	    if (x1 < getmaxx(stdscr)) {
              +		++x1;
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	}
              +    }
              +
              +    wmove(stdscr, y1, x1);
              +    *ypos = y1;
              +    *xpos = x1;
              +
              +    if (result >= 0) {
              +	if (log_out)
              +	    fprintf(log_out, "%c%d,%d\n",
              +		    ((result > 0)
              +		     ? LAST_POS
              +		     : TEMP_POS),
              +		    y1, x1);
              +    }
              +    return result;
              +}
              +
              +static PANEL *
              +mkpanel(short color, int rows, int cols, int tly, int tlx)
              +{
              +    WINDOW *win;
              +    PANEL *pan = 0;
              +    char *userdata = malloc(3);
              +
              +    if ((win = newwin(rows, cols, tly, tlx)) != 0) {
              +	keypad(win, TRUE);
              +	if ((pan = new_panel(win)) == 0) {
              +	    delwin(win);
              +	} else if (use_colors) {
              +	    short fg = ((color == COLOR_BLUE)
              +			? COLOR_WHITE
              +			: COLOR_BLACK);
              +	    short bg = color;
              +
              +	    init_pair(color, fg, bg);
              +	    wbkgdset(win, (chtype) (COLOR_PAIR(color) | ' '));
              +	} else if (!unboxed) {
              +	    wbkgdset(win, A_BOLD | ' ');
              +	}
              +    }
              +    sprintf(userdata, "p%d", color % 8);
              +    set_panel_userptr(pan, (NCURSES_CONST void *) userdata);
              +    return pan;
              +}
              +
              +static void
              +my_remove_panel(PANEL ** pans, int which)
              +{
              +    if (pans[which] != 0) {
              +	PANEL *pan = pans[which];
              +	WINDOW *win = panel_window(pan);
              +	char *user = (char *) panel_userptr(pan);
              +
              +	free(user);
              +	del_panel(pan);
              +	delwin(win);
              +
              +	pans[which] = 0;
              +    }
              +}
              +
              +#define MIN(a,b) ((a) < (b) ? (a) : (b))
              +#define ABS(a)   ((a) < 0 ? -(a) : (a))
              +
              +static void
              +my_create_panel(PANEL ** pans, int which, FillPanel myFill)
              +{
              +    PANEL *pan = 0;
              +    int code;
              +    int pair = which;
              +    short fg = (pair == COLOR_BLUE) ? COLOR_WHITE : COLOR_BLACK;
              +    short bg = pair;
              +    int x0, y0, x1, y1;
              +
              +    init_pair(pair, fg, bg);
              +
              +    /* remove the old panel, if any */
              +    my_remove_panel(pans, which);
              +
              +    /* get the position of one corner */
              +    wmove(stdscr, getmaxy(stdscr) / 2, getmaxx(stdscr) / 2);
              +    getyx(stdscr, y0, x0);
              +    while ((code = get_position("First corner", "", which, &x0, &y0)) == 0) {
              +	;
              +    }
              +
              +    if (code > 0) {
              +	char also[80];
              +	sprintf(also, " (first %d,%d)", y0, x0);
              +	/* get the position of the opposite corner */
              +	while ((code = get_position("Opposite corner",
              +				    also, which, &x1, &y1)) == 0) {
              +	    ;
              +	}
              +
              +	if (code > 0) {
              +	    int tly = MIN(y0, y1);
              +	    int tlx = MIN(x0, x1);
              +	    pan = mkpanel(pair, ABS(y1 - y0) + 1, ABS(x1 - x0) + 1, tly, tlx);
              +	    /* finish */
              +	    myFill(pan);
              +	    pans[which] = pan;
              +	    pflush();
              +	    wmove(stdscr, y1, x1);
              +	}
              +    }
              +}
              +
              +static void
              +my_move_panel(PANEL ** pans, int which, bool continuous)
              +{
              +    if (pans[which] != 0) {
              +	int code;
              +	int y0, x0;
              +	int y1, x1;
              +	WINDOW *win = panel_window(pans[which]);
              +	char also[80];
              +
              +	getbegyx(win, y0, x0);
              +	sprintf(also, " (start %d,%d)", y0, x0);
              +	wmove(stdscr, y0, x0);
              +	while ((code = get_position("Move panel", also, which, &x1, &y1)) == 0) {
              +	    if (continuous) {
              +		move_panel(pans[which], y1, x1);
              +		pflush();
              +	    }
              +	}
              +	if (code > 0) {
              +	    move_panel(pans[which], y1, x1);
              +	}
              +    }
              +}
              +
              +static void
              +my_resize_panel(PANEL ** pans, int which, FillPanel myFill)
              +{
              +    if (pans[which] != 0) {
              +	int code;
              +	int y0, x0;
              +	int y1, x1;
              +	WINDOW *win = panel_window(pans[which]);
              +	char also[80];
              +
              +	getbegyx(win, y0, x0);
              +	sprintf(also, " (start %d,%d)", y0, x0);
              +	wmove(stdscr, y0, x0);
              +	while ((code = get_position("Resize panel",
              +				    also, which, &x1, &y1)) == 0) {
              +	    ;
              +	}
              +	if (code > 0) {
              +	    WINDOW *next = newwin(ABS(y1 - y0) + 1,
              +				  ABS(x1 - x0) + 1,
              +				  MIN(y0, y1),
              +				  MIN(x0, x1));
              +	    if (next != 0) {
              +		keypad(next, TRUE);
              +		if (use_colors) {
              +		    wbkgdset(next, (chtype) (COLOR_PAIR(which) | ' '));
              +		} else if (!unboxed) {
              +		    wbkgdset(next, A_BOLD | ' ');
              +		}
              +		replace_panel(pans[which], next);
              +		myFill(pans[which]);
              +		delwin(win);
              +	    }
              +	}
              +    }
              +}
              +
              +static void
              +init_panel(void)
              +{
              +    register int y, x;
              +
              +    for (y = 0; y < LINES - 1; y++) {
              +	for (x = 0; x < COLS; x++)
              +	    wprintw(stdscr, "%d", (y + x) % 10);
              +    }
              +}
              +
              +static void
              +fill_panel(PANEL * pan)
              +{
              +    WINDOW *win = panel_window(pan);
              +    int num = ((const char *) panel_userptr(pan))[1];
              +    int y, x;
              +
              +    wmove(win, 1, 1);
              +    wprintw(win, "-pan%c-", num);
              +    wclrtoeol(win);
              +    box(win, 0, 0);
              +    for (y = 2; y < getmaxy(win) - 1; y++) {
              +	for (x = 1; x < getmaxx(win) - 1; x++) {
              +	    wmove(win, y, x);
              +	    waddch(win, UChar(num));
              +	}
              +    }
              +}
              +
              +static void
              +fill_unboxed(PANEL * pan)
              +{
              +    WINDOW *win = panel_window(pan);
              +    int num = ((const char *) panel_userptr(pan))[1];
              +    int y, x;
              +
              +    for (y = 0; y < getmaxy(win); y++) {
              +	for (x = 0; x < getmaxx(win); x++) {
              +	    wmove(win, y, x);
              +	    waddch(win, UChar(num));
              +	}
              +    }
              +}
              +
              +#if USE_WIDEC_SUPPORT
              +static void
              +make_fullwidth_digit(cchar_t *target, int digit)
              +{
              +    wchar_t source[2];
              +
              +    source[0] = digit + 0xff10;
              +    source[1] = 0;
              +    setcchar(target, source, A_NORMAL, 0, 0);
              +}
              +
              +static void
              +init_wide_panel(void)
              +{
              +    int digit;
              +    cchar_t temp[10];
              +
              +    for (digit = 0; digit < 10; ++digit)
              +	make_fullwidth_digit(&temp[digit], digit);
              +
              +    do {
              +	int y, x;
              +	getyx(stdscr, y, x);
              +	digit = (y + x / 2) % 10;
              +    } while (add_wch(&temp[digit]) != ERR);
              +}
              +
              +static void
              +fill_wide_panel(PANEL * pan)
              +{
              +    WINDOW *win = panel_window(pan);
              +    int num = ((const char *) panel_userptr(pan))[1];
              +    int y, x;
              +
              +    wmove(win, 1, 1);
              +    wprintw(win, "-pan%c-", num);
              +    wclrtoeol(win);
              +    box(win, 0, 0);
              +    for (y = 2; y < getmaxy(win) - 1; y++) {
              +	for (x = 1; x < getmaxx(win) - 1; x++) {
              +	    wmove(win, y, x);
              +	    waddch(win, UChar(num));
              +	}
              +    }
              +}
              +#endif
              +
              +#define MAX_PANELS 5
              +
              +static int
              +which_panel(PANEL * px[MAX_PANELS + 1], PANEL * pan)
              +{
              +    int result = 0;
              +    int j;
              +
              +    for (j = 1; j <= MAX_PANELS; ++j) {
              +	if (px[j] == pan) {
              +	    result = j;
              +	    break;
              +	}
              +    }
              +    return result;
              +}
              +
              +static void
              +show_panels(PANEL * px[MAX_PANELS + 1])
              +{
              +    static const char *help[] =
              +    {
              +	"",
              +	"Commands are letter/digit pairs.  Digits are the panel number.",
              +	"",
              +	"  b - put the panel on the bottom of the stack",
              +	"  c - create the panel",
              +	"  d - delete the panel",
              +	"  h - hide the panel",
              +	"  m - move the panel (M for continuous move)",
              +	"  r - resize the panel",
              +	"  s - show the panel",
              +	"  b - put the panel on the top of the stack"
              +    };
              +
              +    struct {
              +	bool valid;
              +	bool hidden;
              +	PANEL *above;
              +	PANEL *below;
              +    } table[MAX_PANELS + 1];
              +
              +    WINDOW *win;
              +    PANEL *pan;
              +    int j;
              +
              +    for (j = 1; j <= MAX_PANELS; ++j) {
              +	table[j].valid = (px[j] != 0);
              +	if (table[j].valid) {
              +	    table[j].hidden = panel_hidden(px[j]);
              +	    table[j].above = panel_above(px[j]);
              +	    table[j].below = panel_below(px[j]);
              +	}
              +    }
              +
              +    if ((win = newwin(LINES - 1, COLS, 0, 0)) != 0) {
              +	keypad(win, TRUE);
              +	if ((pan = new_panel(win)) != 0) {
              +	    werase(win);
              +	    mvwprintw(win, 0, 0, "Panels:\n");
              +	    for (j = 1; j <= MAX_PANELS; ++j) {
              +		if (table[j].valid) {
              +		    wprintw(win, " %d:", j);
              +		    if (table[j].hidden) {
              +			waddstr(win, " hidden");
              +		    } else {
              +			if (table[j].above) {
              +			    wprintw(win, " above %d",
              +				    which_panel(px, table[j].above));
              +			}
              +			if (table[j].below) {
              +			    wprintw(win, "%s below %d",
              +				    table[j].above ? "," : "",
              +				    which_panel(px, table[j].below));
              +			}
              +		    }
              +		    waddch(win, '\n');
              +		}
              +	    }
              +	    for (j = 0; j < (int) SIZEOF(help); ++j) {
              +		if (wprintw(win, "%s\n", help[j]) == ERR)
              +		    break;
              +	    }
              +	    wgetch(win);
              +	    del_panel(pan);
              +	    pflush();
              +	}
              +	delwin(win);
              +    }
              +}
              +
              +#define wrapper(func) \
              +static int my_##func(PANEL *pan) \
              +{ \
              +    int code = ERR; \
              +    if (pan != 0) { \
              +	code = func(pan); \
              +    } \
              +    return code; \
              +}
              +/* *INDENT-OFF* */
              +wrapper(bottom_panel)
              +wrapper(hide_panel)
              +wrapper(show_panel)
              +wrapper(top_panel)
              +/* *INDENT-ON* */
              +
              +static void
              +do_panel(PANEL * px[MAX_PANELS + 1],
              +	 NCURSES_CONST char *cmd,
              +	 FillPanel myFill)
              +{
              +    int which = cmd[1] - '0';
              +
              +    if (which < 1 || which > MAX_PANELS) {
              +	beep();
              +	return;
              +    }
              +
              +    if (log_in != 0) {
              +	pflush();
              +    }
              +
              +    saywhat(cmd);
              +    switch (*cmd) {
              +    case 'b':
              +	my_bottom_panel(px[which]);
              +	break;
              +    case 'c':
              +	my_create_panel(px, which, myFill);
              +	break;
              +    case 'd':
              +	my_remove_panel(px, which);
              +	break;
              +    case 'h':
              +	my_hide_panel(px[which]);
              +	break;
              +    case 'm':
              +	my_move_panel(px, which, FALSE);
              +	break;
              +    case 'M':
              +	my_move_panel(px, which, TRUE);
              +	break;
              +    case 'r':
              +	my_resize_panel(px, which, myFill);
              +	break;
              +    case 's':
              +	my_show_panel(px[which]);
              +	break;
              +    case 't':
              +	my_top_panel(px[which]);
              +	break;
              +    }
              +}
              +
              +static bool
              +ok_letter(int ch)
              +{
              +    return isalpha(UChar(ch)) && strchr("bcdhmMrst", ch) != 0;
              +}
              +
              +static bool
              +ok_digit(int ch)
              +{
              +    return isdigit(UChar(ch)) && (ch >= '1') && (ch - '0' <= MAX_PANELS);
              +}
              +
              +/*
              + * A command consists of one or more letter/digit pairs separated by a space.
              + * Digits are limited to 1..MAX_PANELS.
              + *
              + * End the command with a newline.  Reject other characters.
              + */
              +static bool
              +get_command(PANEL * px[MAX_PANELS + 1], char *buffer, int limit)
              +{
              +    int length = 0;
              +    int y0, x0;
              +    int c0, ch;
              +    WINDOW *win;
              +
              +    getyx(stdscr, y0, x0);
              +    win = statusline();
              +    waddstr(win, "Command:");
              +    buffer[length = 0] = '\0';
              +
              +    if (log_in != 0) {
              +	if (fgets(buffer, limit - 3, log_in) != 0) {
              +	    length = strlen(buffer);
              +	    while (length > 0 && isspace(buffer[length - 1]))
              +		buffer[--length] = '\0';
              +	    waddstr(win, buffer);
              +	} else {
              +	    close_input();
              +	}
              +	(void) wgetch(win);
              +    } else {
              +	c0 = 0;
              +	for (;;) {
              +	    ch = wgetch(win);
              +	    if (ch == ERR || ch == QUIT || ch == ESCAPE) {
              +		buffer[0] = '\0';
              +		break;
              +	    } else if (ch == CTRL('L')) {
              +		wrefresh(curscr);
              +	    } else if (ch == '\n' || ch == KEY_ENTER) {
              +		break;
              +	    } else if (ch == '?') {
              +		show_panels(px);
              +	    } else if (length + 3 < limit) {
              +		if (ch >= KEY_MIN) {
              +		    beep();
              +		} else if (ok_letter(UChar(ch))) {
              +		    if (isalpha(UChar(c0))) {
              +			beep();
              +		    } else if (isdigit(UChar(c0))) {
              +			wprintw(win, " %c", ch);
              +			buffer[length++] = ' ';
              +			buffer[length++] = c0 = ch;
              +		    } else {
              +			wprintw(win, "%c", ch);
              +			buffer[length++] = c0 = ch;
              +		    }
              +		} else if (ok_digit(ch)) {
              +		    if (isalpha(UChar(c0))) {
              +			wprintw(win, "%c", ch);
              +			buffer[length++] = c0 = ch;
              +		    } else {
              +			beep();
              +		    }
              +		} else if (ch == ' ') {
              +		    if (isdigit(UChar(c0))) {
              +			wprintw(win, "%c", ch);
              +			buffer[length++] = c0 = ch;
              +		    } else {
              +			beep();
              +		    }
              +		} else {
              +		    beep();
              +		}
              +	    } else {
              +		beep();
              +	    }
              +	}
              +    }
              +
              +    wmove(stdscr, y0, x0);
              +
              +    buffer[length] = '\0';
              +    if (log_out && length) {
              +	fprintf(log_out, "%s\n", buffer);
              +    }
              +    return (length != 0);
              +}
              +
              +static void
              +demo_panels(InitPanel myInit, FillPanel myFill)
              +{
              +    int itmp;
              +    PANEL *px[MAX_PANELS + 1];
              +    char buffer[BUFSIZ];
              +
              +    scrollok(stdscr, FALSE);	/* we don't want stdscr to scroll! */
              +    refresh();
              +
              +    myInit();
              +    memset(px, 0, sizeof(px));
              +
              +    while (get_command(px, buffer, sizeof(buffer))) {
              +	int limit = strlen(buffer);
              +	for (itmp = 0; itmp < limit; itmp += 3) {
              +	    do_panel(px, buffer + itmp, myFill);
              +	}
              +	pflush();
              +    }
              +#if NO_LEAKS
              +    for (itmp = 1; itmp <= MAX_PANELS; ++itmp) {
              +	my_remove_panel(px, itmp);
              +    }
              +#endif
              +}
              +
              +static void
              +usage(void)
              +{
              +    static const char *const tbl[] =
              +    {
              +	"Usage: demo_panels [options]"
              +	,""
              +	,"Options:"
              +	,"  -i file  read commands from file"
              +	,"  -o file  record commands in file"
              +	,"  -m       do not use colors"
              +#if USE_WIDEC_SUPPORT
              +	,"  -w       use wide-characters in panels and background"
              +#endif
              +	,"  -x       do not enclose panels in boxes"
              +    };
              +    size_t n;
              +    for (n = 0; n < SIZEOF(tbl); n++)
              +	fprintf(stderr, "%s\n", tbl[n]);
              +    ExitProgram(EXIT_FAILURE);
              +}
              +
               int
              -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              +main(int argc, char *argv[])
               {
              -    printf("Not implemented - demo for panel library\n");
              -    return EXIT_SUCCESS;
              +    int c;
              +    bool monochrome = FALSE;
              +    InitPanel myInit = init_panel;
              +    FillPanel myFill = fill_panel;
              +
              +    setlocale(LC_ALL, "");
              +
              +    while ((c = getopt(argc, argv, "i:o:mwx")) != -1) {
              +	switch (c) {
              +	case 'i':
              +	    log_in = fopen(optarg, "r");
              +	    break;
              +	case 'o':
              +	    log_out = fopen(optarg, "w");
              +	    break;
              +	case 'm':
              +	    monochrome = TRUE;
              +	    break;
              +#if USE_WIDEC_SUPPORT
              +	case 'w':
              +	    myInit = init_wide_panel;
              +	    myFill = fill_wide_panel;
              +	    break;
              +#endif
              +	case 'x':
              +	    unboxed = TRUE;
              +	    break;
              +	default:
              +	    usage();
              +	}
              +    }
              +    if (unboxed)
              +	myFill = fill_unboxed;
              +
              +    initscr();
              +    cbreak();
              +    noecho();
              +    keypad(stdscr, TRUE);
              +
              +    use_colors = monochrome ? FALSE : has_colors();
              +    if (use_colors)
              +	start_color();
              +
              +    demo_panels(myInit, myFill);
              +    endwin();
              +
              +    close_input();
              +    close_output();
              +
              +    ExitProgram(EXIT_SUCCESS);
               }
               #else
               int
              diff -Naur ncurses-5.6.orig/test/demo_termcap.c ncurses-5.6/test/demo_termcap.c
              --- ncurses-5.6.orig/test/demo_termcap.c	2006-05-06 15:06:36.000000000 -0400
              +++ ncurses-5.6/test/demo_termcap.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2005,2006 Free Software Foundation, Inc.                   *
              + * Copyright (c) 2005-2006,2007 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            *
              @@ -29,10 +29,11 @@
               /*
                * Author: Thomas E. Dickey
                *
              - * $Id: demo_termcap.c,v 1.5 2006/05/06 19:06:36 tom Exp $
              + * $Id: demo_termcap.c,v 1.6 2007/02/03 18:51:23 tom Exp $
                *
                * A simple demo of the termcap interface.
                */
              +#define USE_TINFO
               #include 
               
               #if HAVE_TGETENT
              diff -Naur ncurses-5.6.orig/test/ditto.c ncurses-5.6/test/ditto.c
              --- ncurses-5.6.orig/test/ditto.c	2005-04-16 12:35:49.000000000 -0400
              +++ ncurses-5.6/test/ditto.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2001,2005 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2005,2007 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            *
              @@ -29,7 +29,7 @@
               /*
                * Author: Thomas E. Dickey  1998
                *
              - * $Id: ditto.c,v 1.5 2005/04/16 16:35:49 tom Exp $
              + * $Id: ditto.c,v 1.8 2007/09/01 21:10:38 tom Exp $
                *
                * The program illustrates how to set up multiple screens from a single
                * program.  Invoke the program by specifying another terminal on the same
              @@ -72,19 +72,32 @@
               	errno = ENOTTY;
               	failed(path);
                   }
              -    fp = fopen(path, "a+");
              +    fp = fopen(path, "r+");
                   if (fp == 0)
               	failed(path);
                   printf("opened %s\n", path);
                   return fp;
               }
               
              +static void
              +show_ditto(DITTO * data, int count, int which, int ch)
              +{
              +    int n;
              +
              +    for (n = 0; n < count; n++) {
              +	set_term(data[n].screen);
              +	addch(UChar(ch));
              +	refresh();
              +    }
              +    set_term(data[which].screen);
              +}
              +
               int
               main(int argc GCC_UNUSED,
                    char *argv[]GCC_UNUSED)
               {
                   int j;
              -    int active_tty = 0;
              +    int count;
                   DITTO *data;
               
                   if (argc <= 1)
              @@ -105,7 +118,6 @@
                    * Set up the screens.
                    */
                   for (j = 0; j < argc; j++) {
              -	active_tty++;
               	data[j].screen = newterm((char *) 0,	/* assume $TERM is the same */
               				 data[j].output,
               				 data[j].input);
              @@ -114,25 +126,27 @@
               	cbreak();
               	noecho();
               	scrollok(stdscr, TRUE);
              +	nodelay(stdscr, TRUE);
                   }
               
                   /*
                    * Loop, reading characters from any of the inputs and writing to all
                    * of the screens.
                    */
              -    for (;;) {
              +    for (count = 0;; ++count) {
               	int ch;
              -	set_term(data[0].screen);
              +	int which = (count % argc);
              +
              +	set_term(data[which].screen);
              +	napms(20);
               	ch = getch();
              -	if (ch == ERR)
              +	if (ch == ERR) {
              +	    /* echochar('.'); */
               	    continue;
              -	if (ch == 4)
              -	    break;
              -	for (j = 0; j < argc; j++) {
              -	    set_term(data[j].screen);
              -	    addch(UChar(ch));
              -	    refresh();
               	}
              +	if (ch == CTRL('D'))
              +	    break;
              +	show_ditto(data, argc, which, ch);
                   }
               
                   /*
              diff -Naur ncurses-5.6.orig/test/dots.c ncurses-5.6/test/dots.c
              --- ncurses-5.6.orig/test/dots.c	2006-11-04 14:54:42.000000000 -0500
              +++ ncurses-5.6/test/dots.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1999-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1999-2006,2007 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            *
              @@ -29,10 +29,11 @@
               /*
                * Author: Thomas E. Dickey  1999
                *
              - * $Id: dots.c,v 1.15 2006/11/04 19:54:42 tom Exp $
              + * $Id: dots.c,v 1.16 2007/02/03 18:51:23 tom Exp $
                *
                * A simple demo of the terminfo interface.
                */
              +#define USE_TINFO
               #include 
               
               #if HAVE_SETUPTERM
              diff -Naur ncurses-5.6.orig/test/dots_mvcur.c ncurses-5.6/test/dots_mvcur.c
              --- ncurses-5.6.orig/test/dots_mvcur.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/dots_mvcur.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,171 @@
              +/****************************************************************************
              + * Copyright (c) 1999-2006,2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +
              +/*
              + * Author: Thomas E. Dickey - 2007
              + *
              + * $Id: dots_mvcur.c,v 1.1 2007/06/02 20:01:32 tom Exp $
              + *
              + * A simple demo of the terminfo interface, and mvcur.
              + */
              +#define USE_TINFO
              +#include 
              +
              +#if HAVE_SETUPTERM
              +
              +#include 
              +
              +#define valid(s) ((s != 0) && s != (char *)-1)
              +
              +static bool interrupted = FALSE;
              +static long total_chars = 0;
              +static time_t started;
              +
              +static int
              +outc(int c)
              +{
              +    if (interrupted) {
              +	char tmp = c;
              +	write(STDOUT_FILENO, &tmp, 1);
              +    } else {
              +	putc(c, stdout);
              +    }
              +    return 0;
              +}
              +
              +static bool
              +outs(char *s)
              +{
              +    if (valid(s)) {
              +	tputs(s, 1, outc);
              +	return TRUE;
              +    }
              +    return FALSE;
              +}
              +
              +static void
              +cleanup(void)
              +{
              +    outs(exit_attribute_mode);
              +    if (!outs(orig_colors))
              +	outs(orig_pair);
              +    outs(clear_screen);
              +    outs(cursor_normal);
              +
              +    printf("\n\n%ld total chars, rate %.2f/sec\n",
              +	   total_chars,
              +	   ((double) (total_chars) / (time((time_t *) 0) - started)));
              +}
              +
              +static void
              +onsig(int n GCC_UNUSED)
              +{
              +    interrupted = TRUE;
              +}
              +
              +static float
              +ranf(void)
              +{
              +    long r = (rand() & 077777);
              +    return ((float) r / 32768.);
              +}
              +
              +int
              +main(
              +	int argc GCC_UNUSED,
              +	char *argv[]GCC_UNUSED)
              +{
              +    int x0 = 1, y0 = 1;
              +    int x, y, z, p;
              +    float r;
              +    float c;
              +    SCREEN *sp;
              +
              +    CATCHALL(onsig);
              +
              +    srand((unsigned) time(0));
              +    sp = newterm((char *) 0, stdout, stdin);
              +    outs(clear_screen);
              +    outs(cursor_home);
              +    outs(cursor_invisible);
              +    if (max_colors > 1) {
              +	if (!valid(set_a_foreground)
              +	    || !valid(set_a_background)
              +	    || (!valid(orig_colors) && !valid(orig_pair)))
              +	    max_colors = -1;
              +    }
              +
              +    r = (float) (lines - 4);
              +    c = (float) (columns - 4);
              +    started = time((time_t *) 0);
              +
              +    while (!interrupted) {
              +	x = (int) (c * ranf()) + 2;
              +	y = (int) (r * ranf()) + 2;
              +	p = (ranf() > 0.9) ? '*' : ' ';
              +
              +	if (mvcur(y0, x0, y, x) != ERR) {
              +	    x0 = x;
              +	    y0 = y;
              +	}
              +
              +	if (max_colors > 0) {
              +	    z = (int) (ranf() * max_colors);
              +	    if (ranf() > 0.01) {
              +		tputs(tparm2(set_a_foreground, z), 1, outc);
              +	    } else {
              +		tputs(tparm2(set_a_background, z), 1, outc);
              +		napms(1);
              +	    }
              +	} else if (valid(exit_attribute_mode)
              +		   && valid(enter_reverse_mode)) {
              +	    if (ranf() <= 0.01) {
              +		outs((ranf() > 0.6)
              +		     ? enter_reverse_mode
              +		     : exit_attribute_mode);
              +		napms(1);
              +	    }
              +	}
              +	outc(p);
              +	fflush(stdout);
              +	++total_chars;
              +    }
              +    cleanup();
              +    endwin();
              +    delscreen(sp);
              +    ExitProgram(EXIT_SUCCESS);
              +}
              +#else
              +int
              +main(int argc GCC_UNUSED,
              +     char *argv[]GCC_UNUSED)
              +{
              +    fprintf(stderr, "This program requires terminfo\n");
              +    exit(EXIT_FAILURE);
              +}
              +#endif
              diff -Naur ncurses-5.6.orig/test/echochar.c ncurses-5.6/test/echochar.c
              --- ncurses-5.6.orig/test/echochar.c	2006-12-02 19:14:29.000000000 -0500
              +++ ncurses-5.6/test/echochar.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              + * Copyright (c) 2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: echochar.c,v 1.3 2006/12/03 00:14:29 tom Exp $
              + * $Id: echochar.c,v 1.5 2007/07/21 17:41:55 tom Exp $
                *
                * Demonstrate the echochar function (compare to dots.c).
                * Thomas Dickey - 2006/11/4
              @@ -89,7 +89,7 @@
                   int last_fg = 0;
                   int last_bg = 0;
               
              -    while ((ch = getopt(argc, argv, "r")) != EOF) {
              +    while ((ch = getopt(argc, argv, "r")) != -1) {
               	switch (ch) {
               	case 'r':
               	    opt_r = TRUE;
              @@ -107,7 +107,7 @@
                   if (use_colors) {
               	start_color();
               	if (COLOR_PAIRS > 0) {
              -	    my_pairs = calloc(COLOR_PAIRS, sizeof(*my_pairs));
              +	    my_pairs = calloc((unsigned) COLOR_PAIRS, sizeof(*my_pairs));
               	}
               	use_colors = (my_pairs != 0);
                   }
              @@ -146,10 +146,10 @@
               	    }
               	}
               	if (opt_r) {
              -	    addch(p);
              +	    addch(UChar(p));
               	    refresh();
               	} else {
              -	    echochar(p);
              +	    echochar(UChar(p));
               	}
               	++total_chars;
                   }
              diff -Naur ncurses-5.6.orig/test/gdc.c ncurses-5.6/test/gdc.c
              --- ncurses-5.6.orig/test/gdc.c	2006-05-20 11:37:44.000000000 -0400
              +++ ncurses-5.6/test/gdc.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -33,7 +33,7 @@
                * modified 10-18-89 for curses (jrl)
                * 10-18-89 added signal handling
                *
              - * $Id: gdc.c,v 1.28 2006/05/20 15:37:44 tom Exp $
              + * $Id: gdc.c,v 1.29 2007/07/21 17:45:09 tom Exp $
                */
               
               #include 
              @@ -171,7 +171,7 @@
               
                   CATCHALL(sighndl);
               
              -    while ((k = getopt(argc, argv, "sn")) != EOF) {
              +    while ((k = getopt(argc, argv, "sn")) != -1) {
               	switch (k) {
               	case 's':
               	    scrol = TRUE;
              diff -Naur ncurses-5.6.orig/test/hashtest.c ncurses-5.6/test/hashtest.c
              --- ncurses-5.6.orig/test/hashtest.c	2006-05-20 12:02:16.000000000 -0400
              +++ ncurses-5.6/test/hashtest.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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 @@
                *
                * Generate timing statistics for vertical-motion optimization.
                *
              - * $Id: hashtest.c,v 1.26 2006/05/20 16:02:16 tom Exp $
              + * $Id: hashtest.c,v 1.27 2007/07/21 17:45:09 tom Exp $
                */
               
               #ifdef TRACE
              @@ -190,7 +190,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((c = getopt(argc, argv, "cf:h:l:norsx")) != EOF) {
              +    while ((c = getopt(argc, argv, "cf:h:l:norsx")) != -1) {
               	switch (c) {
               	case 'c':
               	    continuous = TRUE;
              diff -Naur ncurses-5.6.orig/test/inch_wide.c ncurses-5.6/test/inch_wide.c
              --- ncurses-5.6.orig/test/inch_wide.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/inch_wide.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,279 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: inch_wide.c,v 1.6 2007/07/21 18:37:38 tom Exp $
              + */
              +/*
              +       int in_wch(cchar_t *wcval);
              +       int mvin_wch(int y, int x, cchar_t *wcval);
              +       int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval);
              +       int win_wch(WINDOW *win, cchar_t *wcval);
              +       int in_wchstr(cchar_t *wchstr);
              +       int in_wchnstr(cchar_t *wchstr, int n);
              +       int win_wchstr(WINDOW *win, cchar_t *wchstr);
              +       int win_wchnstr(WINDOW *win, cchar_t *wchstr, int n);
              +       int mvin_wchstr(int y, int x, cchar_t *wchstr);
              +       int mvin_wchnstr(int y, int x, cchar_t *wchstr, int n);
              +       int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wchstr);
              +       int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wchstr, int n);
              +*/
              +
              +#include 
              +
              +#if USE_WIDEC_SUPPORT
              +
              +#define BASE_Y 7
              +#define MAX_COLS 1024
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +static int
              +test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int j;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    int limit;
              +    cchar_t ch;
              +    cchar_t text[MAX_COLS];
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((j = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(j)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    while (!Quit(j = mvwgetch(txtwin, txt_y, txt_x))) {
              +	switch (j) {
              +	case KEY_DOWN:
              +	case 'j':
              +	    if (txt_y < getmaxy(txtwin) - 1)
              +		txt_y++;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_UP:
              +	case 'k':
              +	    if (txt_y > base_y)
              +		txt_y--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_LEFT:
              +	case 'h':
              +	    if (txt_x > 0)
              +		txt_x--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_RIGHT:
              +	case 'l':
              +	    if (txt_x < getmaxx(txtwin) - 1)
              +		txt_x++;
              +	    else
              +		beep();
              +	    break;
              +	case 'w':
              +	    test_inchs(level + 1, argv, chrwin, strwin);
              +	    if (txtbox != 0) {
              +		touchwin(txtbox);
              +		wnoutrefresh(txtbox);
              +	    } else {
              +		touchwin(txtwin);
              +		wnoutrefresh(txtwin);
              +	    }
              +	    break;
              +	default:
              +	    beep();
              +	    break;
              +	}
              +
              +	mvwprintw(chrwin, 0, 0, "char:");
              +	wclrtoeol(chrwin);
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (win_wch(txtwin, &ch) != ERR) {
              +		if (wadd_wch(chrwin, &ch) != ERR) {
              +		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              +			if (mvwin_wch(txtwin, txt_y, j, &ch) != ERR) {
              +			    if (wadd_wch(chrwin, &ch) == ERR) {
              +				break;
              +			    }
              +			} else {
              +			    break;
              +			}
              +		    }
              +		}
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +	    if (in_wch(&ch) != ERR) {
              +		if (wadd_wch(chrwin, &ch) != ERR) {
              +		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              +			if (mvin_wch(txt_y, j, &ch) != ERR) {
              +			    if (wadd_wch(chrwin, &ch) == ERR) {
              +				break;
              +			    }
              +			} else {
              +			    break;
              +			}
              +		    }
              +		}
              +	    }
              +	}
              +	wnoutrefresh(chrwin);
              +
              +	mvwprintw(strwin, 0, 0, "text:");
              +	wclrtobot(strwin);
              +
              +	limit = getmaxx(strwin) - 5;
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (win_wchstr(txtwin, text) != ERR) {
              +		mvwadd_wchstr(strwin, 0, 5, text);
              +	    }
              +
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (win_wchnstr(txtwin, text, limit) != ERR) {
              +		mvwadd_wchstr(strwin, 1, 5, text);
              +	    }
              +
              +	    if (mvwin_wchstr(txtwin, txt_y, txt_x, text) != ERR) {
              +		mvwadd_wchstr(strwin, 2, 5, text);
              +	    }
              +
              +	    if (mvwin_wchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) {
              +		mvwadd_wchstr(strwin, 3, 5, text);
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +	    if (in_wchstr(text) != ERR) {
              +		mvwadd_wchstr(strwin, 0, 5, text);
              +	    }
              +
              +	    move(txt_y, txt_x);
              +	    if (in_wchnstr(text, limit) != ERR) {
              +		mvwadd_wchstr(strwin, 1, 5, text);
              +	    }
              +
              +	    if (mvin_wchstr(txt_y, txt_x, text) != ERR) {
              +		mvwadd_wchstr(strwin, 2, 5, text);
              +	    }
              +
              +	    if (mvin_wchnstr(txt_y, txt_x, text, limit) != ERR) {
              +		mvwadd_wchstr(strwin, 3, 5, text);
              +	    }
              +	}
              +
              +	wnoutrefresh(strwin);
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *chrbox;
              +    WINDOW *chrwin;
              +    WINDOW *strwin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(chrbox, 0, 0);
              +    wnoutrefresh(chrbox);
              +
              +    chrwin = derwin(chrbox, 1, COLS - 2, 1, 1);
              +    strwin = derwin(chrbox, 4, COLS - 2, 2, 1);
              +
              +    test_inchs(1, argv, chrwin, strwin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              +#else
              +int
              +main(void)
              +{
              +    printf("This program requires the wide-ncurses library\n");
              +    ExitProgram(EXIT_FAILURE);
              +}
              +#endif
              diff -Naur ncurses-5.6.orig/test/inchs.c ncurses-5.6/test/inchs.c
              --- ncurses-5.6.orig/test/inchs.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/inchs.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,272 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: inchs.c,v 1.9 2007/07/21 19:01:43 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + */
              +/*
              +       chtype inch(void);
              +       chtype winch(WINDOW *win);
              +       chtype mvinch(int y, int x);
              +       chtype mvwinch(WINDOW *win, int y, int x);
              +       int inchstr(chtype *chstr);
              +       int inchnstr(chtype *chstr, int n);
              +       int winchstr(WINDOW *win, chtype *chstr);
              +       int winchnstr(WINDOW *win, chtype *chstr, int n);
              +       int mvinchstr(int y, int x, chtype *chstr);
              +       int mvinchnstr(int y, int x, chtype *chstr, int n);
              +       int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
              +       int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
              +*/
              +
              +#include 
              +
              +#define BASE_Y 7
              +#define MAX_COLS 1024
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +static int
              +test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int ch, j;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    int limit;
              +    chtype text[MAX_COLS];
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((j = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(j)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    while (!Quit(j = mvwgetch(txtwin, txt_y, txt_x))) {
              +	switch (j) {
              +	case KEY_DOWN:
              +	case 'j':
              +	    if (txt_y < getmaxy(txtwin) - 1)
              +		txt_y++;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_UP:
              +	case 'k':
              +	    if (txt_y > base_y)
              +		txt_y--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_LEFT:
              +	case 'h':
              +	    if (txt_x > 0)
              +		txt_x--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_RIGHT:
              +	case 'l':
              +	    if (txt_x < getmaxx(txtwin) - 1)
              +		txt_x++;
              +	    else
              +		beep();
              +	    break;
              +	case 'w':
              +	    test_inchs(level + 1, argv, chrwin, strwin);
              +	    if (txtbox != 0) {
              +		touchwin(txtbox);
              +		wnoutrefresh(txtbox);
              +	    } else {
              +		touchwin(txtwin);
              +		wnoutrefresh(txtwin);
              +	    }
              +	    break;
              +	default:
              +	    beep();
              +	    break;
              +	}
              +
              +	mvwprintw(chrwin, 0, 0, "char:");
              +	wclrtoeol(chrwin);
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +
              +	    if ((ch = winch(txtwin)) != ERR) {
              +		if (waddch(chrwin, (chtype) ch) != ERR) {
              +		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              +			if ((ch = mvwinch(txtwin, txt_y, j)) != ERR) {
              +			    if (waddch(chrwin, (chtype) ch) == ERR) {
              +				break;
              +			    }
              +			} else {
              +			    break;
              +			}
              +		    }
              +		}
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +
              +	    if ((ch = inch()) != ERR) {
              +		if (waddch(chrwin, (chtype) ch) != ERR) {
              +		    for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
              +			if ((ch = mvinch(txt_y, j)) != ERR) {
              +			    if (waddch(chrwin, (chtype) ch) == ERR) {
              +				break;
              +			    }
              +			} else {
              +			    break;
              +			}
              +		    }
              +		}
              +	    }
              +	}
              +	wnoutrefresh(chrwin);
              +
              +	mvwprintw(strwin, 0, 0, "text:");
              +	wclrtobot(strwin);
              +
              +	limit = getmaxx(strwin) - 5;
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (winchstr(txtwin, text) != ERR) {
              +		mvwaddchstr(strwin, 0, 5, text);
              +	    }
              +
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (winchnstr(txtwin, text, limit) != ERR) {
              +		mvwaddchstr(strwin, 1, 5, text);
              +	    }
              +
              +	    if (mvwinchstr(txtwin, txt_y, txt_x, text) != ERR) {
              +		mvwaddchstr(strwin, 2, 5, text);
              +	    }
              +
              +	    if (mvwinchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) {
              +		mvwaddchstr(strwin, 3, 5, text);
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +	    if (inchstr(text) != ERR) {
              +		mvwaddchstr(strwin, 0, 5, text);
              +	    }
              +
              +	    move(txt_y, txt_x);
              +	    if (inchnstr(text, limit) != ERR) {
              +		mvwaddchstr(strwin, 1, 5, text);
              +	    }
              +
              +	    if (mvinchstr(txt_y, txt_x, text) != ERR) {
              +		mvwaddchstr(strwin, 2, 5, text);
              +	    }
              +
              +	    if (mvinchnstr(txt_y, txt_x, text, limit) != ERR) {
              +		mvwaddchstr(strwin, 3, 5, text);
              +	    }
              +	}
              +
              +	wnoutrefresh(strwin);
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *chrbox;
              +    WINDOW *chrwin;
              +    WINDOW *strwin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(chrbox, 0, 0);
              +    wnoutrefresh(chrbox);
              +
              +    chrwin = derwin(chrbox, 1, COLS - 2, 1, 1);
              +    strwin = derwin(chrbox, 4, COLS - 2, 2, 1);
              +
              +    test_inchs(1, argv, chrwin, strwin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              diff -Naur ncurses-5.6.orig/test/ins_wide.c ncurses-5.6/test/ins_wide.c
              --- ncurses-5.6.orig/test/ins_wide.c	2006-04-01 14:08:03.000000000 -0500
              +++ ncurses-5.6/test/ins_wide.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 2002-2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: ins_wide.c,v 1.7 2006/04/01 19:08:03 tom Exp $
              + * $Id: ins_wide.c,v 1.9 2007/07/21 17:41:55 tom Exp $
                *
                * Demonstrate the wins_wstr() and wins_wch functions.
                * Thomas Dickey - 2002/11/23
              @@ -55,7 +55,7 @@
               #define WInsNStr   wins_nwstr
               #define WInsStr    wins_wstr
               
              -#define TABSIZE 8
              +#define MY_TABSIZE 8
               
               typedef enum {
                   oDefault = 0,
              @@ -123,7 +123,7 @@
               		--result;
               	    break;
               	case '\t':
              -	    result += (TABSIZE - (result % TABSIZE));
              +	    result += (MY_TABSIZE - (result % MY_TABSIZE));
               	    break;
               	case '\177':
               	    result += 2;
              @@ -225,7 +225,7 @@
                   WINDOW *look = 0;
                   WINDOW *work = 0;
                   WINDOW *show = 0;
              -    int margin = (2 * TABSIZE) - 1;
              +    int margin = (2 * MY_TABSIZE) - 1;
                   Options option = ((m_opt ? oMove : oDefault)
               		      | ((w_opt || (level > 0)) ? oWindow : oDefault));
               
              @@ -255,7 +255,7 @@
                   }
                   keypad(work, TRUE);
               
              -    for (col = margin + 1; col < COLS; col += TABSIZE)
              +    for (col = margin + 1; col < COLS; col += MY_TABSIZE)
               	mvwvline(work, row, col, '.', limit - 2);
               
                   mvwvline(work, row, margin, ACS_VLINE, limit - 2);
              @@ -490,7 +490,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((ch = getopt(argc, argv, "mn:w")) != EOF) {
              +    while ((ch = getopt(argc, argv, "mn:w")) != -1) {
               	switch (ch) {
               	case 'm':
               	    m_opt = TRUE;
              diff -Naur ncurses-5.6.orig/test/inserts.c ncurses-5.6/test/inserts.c
              --- ncurses-5.6.orig/test/inserts.c	2006-10-14 16:43:46.000000000 -0400
              +++ ncurses-5.6/test/inserts.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2002-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 2002-2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: inserts.c,v 1.15 2006/10/14 20:43:46 tom Exp $
              + * $Id: inserts.c,v 1.18 2007/07/21 17:41:55 tom Exp $
                *
                * Demonstrate the winsstr() and winsch functions.
                * Thomas Dickey - 2002/10/19
              @@ -50,7 +50,7 @@
               #define MvWInsCh   mvwinsch
               #define WInsCh     winsch
               
              -#define TABSIZE 8
              +#define MY_TABSIZE 8
               
               typedef enum {
                   oDefault = 0,
              @@ -116,7 +116,7 @@
               		--result;
               	    break;
               	case '\t':
              -	    result += (TABSIZE - (result % TABSIZE));
              +	    result += (MY_TABSIZE - (result % MY_TABSIZE));
               	    break;
               	case '\177':
               	    result += 2;
              @@ -147,7 +147,7 @@
                   WINDOW *look = 0;
                   WINDOW *work = 0;
                   WINDOW *show = 0;
              -    int margin = (2 * TABSIZE) - 1;
              +    int margin = (2 * MY_TABSIZE) - 1;
                   Options option = (Options) ((unsigned) (m_opt
               					    ? oMove
               					    : oDefault)
              @@ -181,7 +181,7 @@
                   }
                   keypad(work, TRUE);
               
              -    for (col = margin + 1; col < COLS; col += TABSIZE)
              +    for (col = margin + 1; col < COLS; col += MY_TABSIZE)
               	mvwvline(work, row, col, '.', limit - 2);
               
                   mvwvline(work, row, margin, ACS_VLINE, limit - 2);
              @@ -405,7 +405,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((ch = getopt(argc, argv, "mn:w")) != EOF) {
              +    while ((ch = getopt(argc, argv, "mn:w")) != -1) {
               	switch (ch) {
               	case 'm':
               	    m_opt = TRUE;
              diff -Naur ncurses-5.6.orig/test/key_names.c ncurses-5.6/test/key_names.c
              --- ncurses-5.6.orig/test/key_names.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/key_names.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,56 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: key_names.c,v 1.2 2007/06/09 22:32:34 tom Exp $
              + */
              +
              +#include 
              +
              +#if USE_WIDEC_SUPPORT
              +
              +int
              +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              +{
              +    int n;
              +
              +    setlocale(LC_ALL, "");
              +    for (n = -1; n < KEY_MAX + 512; n++) {
              +	const char *result = key_name(n);
              +	if (result != 0)
              +	    printf("%d(%5o):%s\n", n, n, result);
              +    }
              +    ExitProgram(EXIT_SUCCESS);
              +}
              +#else
              +int
              +main(void)
              +{
              +    printf("This program requires the wide-ncurses library\n");
              +    ExitProgram(EXIT_FAILURE);
              +}
              +#endif
              diff -Naur ncurses-5.6.orig/test/mk-test.awk ncurses-5.6/test/mk-test.awk
              --- ncurses-5.6.orig/test/mk-test.awk	2006-10-21 18:56:50.000000000 -0400
              +++ ncurses-5.6/test/mk-test.awk	2007-12-21 00:02:36.000000000 -0500
              @@ -1,6 +1,6 @@
              -# $Id: mk-test.awk,v 1.4 2006/10/21 22:56:50 tom Exp $
              +# $Id: mk-test.awk,v 1.5 2007/01/20 21:28:47 tom Exp $
               ##############################################################################
              -# Copyright (c) 2006 Free Software Foundation, Inc.                          #
              +# Copyright (c) 2006,2007 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"), #
              @@ -34,7 +34,13 @@
               		first = 1;
               		count = 0;
               	}
              -!/^#/	{
              +/^#/	{
              +		next;
              +	}
              +/^$/	{
              +		next;
              +	}
              +	{
               		if (first) {
               			print "# generated by mk-test.awk\n";
               			first = 0;
              diff -Naur ncurses-5.6.orig/test/modules ncurses-5.6/test/modules
              --- ncurses-5.6.orig/test/modules	2006-11-04 13:56:08.000000000 -0500
              +++ ncurses-5.6/test/modules	2007-12-21 00:02:36.000000000 -0500
              @@ -1,7 +1,6 @@
              -# Test-Program modules
              -# $Id: modules,v 1.28 2006/11/04 18:56:08 tom Exp $
              +# $Id: modules,v 1.36 2007/08/18 17:57:08 tom Exp $
               ##############################################################################
              -# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.                #
              +# Copyright (c) 1998-2006,2007 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 +27,9 @@
               # authorization.                                                             #
               ##############################################################################
               #
              -# Author: Thomas E. Dickey 1997-on
              +# Author: Thomas E. Dickey	1997-on
               #
              +# Test-Program modules
               
               @ base
               background	progs		$(srcdir)	$(HEADER_DEPS)
              @@ -40,13 +40,14 @@
               color_set	progs		$(srcdir)	$(HEADER_DEPS)
               demo_altkeys	progs		$(srcdir)	$(HEADER_DEPS)
               demo_defkey	progs		$(srcdir)	$(HEADER_DEPS)
              -demo_keyok	progs		$(srcdir)	$(HEADER_DEPS)
               demo_forms	progs		$(srcdir)	$(HEADER_DEPS)	../include/form.h $(srcdir)/edit_field.h
              +demo_keyok	progs		$(srcdir)	$(HEADER_DEPS)
               demo_menus	progs		$(srcdir)	$(HEADER_DEPS)	../include/menu.h
               demo_panels	progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h
               demo_termcap	progs		$(srcdir)	$(HEADER_DEPS)
               ditto		progs		$(srcdir)	$(HEADER_DEPS)
               dots		progs		$(srcdir)	$(HEADER_DEPS)
              +dots_mvcur	progs		$(srcdir)	$(HEADER_DEPS)
               echochar	progs		$(srcdir)	$(HEADER_DEPS)
               edit_field	progs		$(srcdir)	$(HEADER_DEPS)	$(srcdir)/edit_field.h
               filter		progs		$(srcdir)	$(HEADER_DEPS)	../include/form.h
              @@ -56,22 +57,33 @@
               gdc		progs		$(srcdir)	$(HEADER_DEPS)
               hanoi		progs		$(srcdir)	$(HEADER_DEPS)
               hashtest	progs		$(srcdir)	$(HEADER_DEPS)
              +inch_wide	progs		$(srcdir)	$(HEADER_DEPS)
              +inchs		progs		$(srcdir)	$(HEADER_DEPS)
               ins_wide	progs		$(srcdir)	$(HEADER_DEPS)
               inserts		progs		$(srcdir)	$(HEADER_DEPS)
              +key_names	progs		$(srcdir)	$(HEADER_DEPS)
               keynames	progs		$(srcdir)	$(HEADER_DEPS)
               knight		progs		$(srcdir)	$(HEADER_DEPS)
               lrtest		progs		$(srcdir)	$(HEADER_DEPS)
              -ncurses		progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h ../include/menu.h ../include/form.h
               movewindow	progs		$(srcdir)	$(HEADER_DEPS)
              +ncurses		progs		$(srcdir)	$(HEADER_DEPS)	../include/panel.h ../include/menu.h ../include/form.h
               newdemo		progs		$(srcdir)	$(HEADER_DEPS)
               railroad	progs		$(srcdir)	$(HEADER_DEPS)
               rain		progs		$(srcdir)	$(HEADER_DEPS)
               redraw		progs		$(srcdir)	$(HEADER_DEPS)
               savescreen	progs		$(srcdir)	$(HEADER_DEPS)
               tclock		progs		$(srcdir)	$(HEADER_DEPS)
              +test_arrays	progs		$(srcdir)	$(HEADER_DEPS)
              +test_get_wstr	progs		$(srcdir)	$(HEADER_DEPS)
              +test_getstr	progs		$(srcdir)	$(HEADER_DEPS)
              +test_instr	progs		$(srcdir)	$(HEADER_DEPS)
              +test_inwstr	progs		$(srcdir)	$(HEADER_DEPS)
              +test_opaque	progs		$(srcdir)	$(HEADER_DEPS)
               testaddch	progs		$(srcdir)	$(HEADER_DEPS)
               testcurs	progs		$(srcdir)	$(HEADER_DEPS)
               testscanw	progs		$(srcdir)	$(HEADER_DEPS)
               view		progs		$(srcdir)	$(HEADER_DEPS)
               worm		progs		$(srcdir)	$(HEADER_DEPS)
               xmas		progs		$(srcdir)	$(HEADER_DEPS)
              +
              +# vile:makemode
              diff -Naur ncurses-5.6.orig/test/movewindow.c ncurses-5.6/test/movewindow.c
              --- ncurses-5.6.orig/test/movewindow.c	2006-06-17 13:43:22.000000000 -0400
              +++ ncurses-5.6/test/movewindow.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              + * Copyright (c) 2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: movewindow.c,v 1.19 2006/06/17 17:43:22 tom Exp $
              + * $Id: movewindow.c,v 1.20 2007/01/06 23:28:53 tom Exp $
                *
                * Demonstrate move functions for windows and derived windows from the curses
                * library.
              @@ -63,14 +63,14 @@
                   WINDOW *child;		/* the actual value */
               } FRAME;
               
              -static void head_line(char *fmt,...) GCC_PRINTFLIKE(1, 2);
              -static void tail_line(char *fmt,...) GCC_PRINTFLIKE(1, 2);
              +static void head_line(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
              +static void tail_line(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
               
               static unsigned num_windows;
               static FRAME *all_windows;
               
               static void
              -message(int lineno, char *fmt, va_list argp)
              +message(int lineno, const char *fmt, va_list argp)
               {
                   int y, x;
               
              @@ -93,7 +93,7 @@
               }
               
               static void
              -head_line(char *fmt,...)
              +head_line(const char *fmt,...)
               {
                   va_list argp;
               
              @@ -103,7 +103,7 @@
               }
               
               static void
              -tail_line(char *fmt,...)
              +tail_line(const char *fmt,...)
               {
                   va_list argp;
               
              @@ -511,7 +511,7 @@
                   /* *INDENT-OFF* */
                   static struct {
               	int	key;
              -	char *	msg;
              +	const char * msg;
                   } help[] = {
               	{ '?',		"Show this screen" },
               	{ 'b',		"Draw a box inside the current window" },
              diff -Naur ncurses-5.6.orig/test/ncurses.c ncurses-5.6/test/ncurses.c
              --- ncurses-5.6.orig/test/ncurses.c	2006-12-09 19:13:15.000000000 -0500
              +++ ncurses-5.6/test/ncurses.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -40,7 +40,7 @@
                  Author: Eric S. Raymond  1993
                          Thomas E. Dickey (beginning revision 1.27 in 1996).
               
              -$Id: ncurses.c,v 1.280 2006/12/10 00:13:15 tom Exp $
              +$Id: ncurses.c,v 1.292 2007/07/21 17:41:55 tom Exp $
               
               ***************************************************************************/
               
              @@ -955,11 +955,11 @@
               		for (n = 0; (wchar_buf[n] = wint_buf[n]) != 0; ++n) ;
               		if ((temp = wcstos(wchar_buf)) != 0) {
               		    wprintw(win, "I saw %d characters:\n\t`%s'.",
              -			    wcslen(wchar_buf), temp);
              +			    (int) wcslen(wchar_buf), temp);
               		    free(temp);
               		} else {
               		    wprintw(win, "I saw %d characters (cannot convert).",
              -			    wcslen(wchar_buf));
              +			    (int) wcslen(wchar_buf));
               		}
               	    }
               	    wclrtoeol(win);
              @@ -3124,7 +3124,7 @@
               /* *INDENT-OFF* */
               static struct {
                   attr_t attr;
              -    char *name;
              +    const char *name;
               } attrs_to_cycle[] = {
                   { A_NORMAL,		"normal" },
                   { A_BOLD,		"bold" },
              @@ -3379,12 +3379,14 @@
                   WINDOW *wind;
               };
               
              -#ifdef NCURSES_VERSION
              -#define keypad_active(win) (win)->_use_keypad
              -#define scroll_active(win) (win)->_scroll
              +#if defined(NCURSES_VERSION)
              +#if NCURSES_VERSION_PATCH < 20070331
              +#define is_keypad(win)   (win)->_use_keypad
              +#define is_scrollok(win) (win)->_scroll
              +#endif
               #else
              -#define keypad_active(win) FALSE
              -#define scroll_active(win) FALSE
              +#define is_keypad(win)   FALSE
              +#define is_scrollok(win) FALSE
               #endif
               
               /* We need to know if these flags are actually set, so don't look in FRAME.
              @@ -3395,14 +3397,16 @@
               HaveKeypad(FRAME * curp)
               {
                   WINDOW *win = (curp ? curp->wind : stdscr);
              -    return keypad_active(win);
              +    (void) win;
              +    return is_keypad(win);
               }
               
               static bool
               HaveScroll(FRAME * curp)
               {
                   WINDOW *win = (curp ? curp->wind : stdscr);
              -    return scroll_active(win);
              +    (void) win;
              +    return is_scrollok(win);
               }
               
               static void
              @@ -3945,7 +3949,11 @@
               {
                   wmove(stdscr, LINES - 1, 0);
                   wclrtoeol(stdscr);
              -    waddstr(stdscr, text);
              +    if (text != 0 && *text != '\0') {
              +	waddstr(stdscr, text);
              +	waddstr(stdscr, "; ");
              +    }
              +    waddstr(stdscr, "press any key to continue");
               }				/* end of saywhat */
               
               /*+-------------------------------------------------------------------------
              @@ -3998,6 +4006,17 @@
               	fill_panel(win)
               --------------------------------------------------------------------------*/
               static void
              +init_panel(void)
              +{
              +    register int y, x;
              +
              +    for (y = 0; y < LINES - 1; y++) {
              +	for (x = 0; x < COLS; x++)
              +	    wprintw(stdscr, "%d", (y + x) % 10);
              +    }
              +}
              +
              +static void
               fill_panel(PANEL * pan)
               {
                   WINDOW *win = panel_window(pan);
              @@ -4014,217 +4033,214 @@
               	    waddch(win, UChar(num));
               	}
                   }
              -}				/* end of fill_panel */
              +}
               
              +#if USE_WIDEC_SUPPORT
               static void
              -demo_panels(void)
              +make_fullwidth_digit(cchar_t *target, int digit)
               {
              -    int itmp;
              -    register int y, x;
              +    wchar_t source[2];
               
              -    refresh();
              +    source[0] = digit + 0xff10;
              +    source[1] = 0;
              +    setcchar(target, source, A_NORMAL, 0, 0);
              +}
               
              -    for (y = 0; y < LINES - 1; y++) {
              -	for (x = 0; x < COLS; x++)
              -	    wprintw(stdscr, "%d", (y + x) % 10);
              -    }
              -    for (y = 0; y < 5; y++) {
              -	PANEL *p1;
              -	PANEL *p2;
              -	PANEL *p3;
              -	PANEL *p4;
              -	PANEL *p5;
              -
              -	p1 = mkpanel(COLOR_RED,
              -		     LINES / 2 - 2,
              -		     COLS / 8 + 1,
              -		     0,
              -		     0);
              -	set_panel_userptr(p1, (NCURSES_CONST void *) "p1");
              -
              -	p2 = mkpanel(COLOR_GREEN,
              -		     LINES / 2 + 1,
              -		     COLS / 7,
              -		     LINES / 4,
              -		     COLS / 10);
              -	set_panel_userptr(p2, (NCURSES_CONST void *) "p2");
              -
              -	p3 = mkpanel(COLOR_YELLOW,
              -		     LINES / 4,
              -		     COLS / 10,
              -		     LINES / 2,
              -		     COLS / 9);
              -	set_panel_userptr(p3, (NCURSES_CONST void *) "p3");
              -
              -	p4 = mkpanel(COLOR_BLUE,
              -		     LINES / 2 - 2,
              -		     COLS / 8,
              -		     LINES / 2 - 2,
              -		     COLS / 3);
              -	set_panel_userptr(p4, (NCURSES_CONST void *) "p4");
              -
              -	p5 = mkpanel(COLOR_MAGENTA,
              -		     LINES / 2 - 2,
              -		     COLS / 8,
              -		     LINES / 2,
              -		     COLS / 2 - 2);
              -	set_panel_userptr(p5, (NCURSES_CONST void *) "p5");
              -
              -	fill_panel(p1);
              -	fill_panel(p2);
              -	fill_panel(p3);
              -	fill_panel(p4);
              -	fill_panel(p5);
              -	hide_panel(p4);
              -	hide_panel(p5);
              -	pflush();
              -	saywhat("press any key to continue");
              -	wait_a_while(nap_msec);
              +static void
              +init_wide_panel(void)
              +{
              +    int digit;
              +    cchar_t temp[10];
               
              -	saywhat("h3 s1 s2 s4 s5; press any key to continue");
              -	move_panel(p1, 0, 0);
              -	hide_panel(p3);
              -	show_panel(p1);
              -	show_panel(p2);
              -	show_panel(p4);
              -	show_panel(p5);
              -	pflush();
              -	wait_a_while(nap_msec);
              +    for (digit = 0; digit < 10; ++digit)
              +	make_fullwidth_digit(&temp[digit], digit);
               
              -	saywhat("s1; press any key to continue");
              -	show_panel(p1);
              -	pflush();
              -	wait_a_while(nap_msec);
              +    do {
              +	int y, x;
              +	getyx(stdscr, y, x);
              +	digit = (y + x / 2) % 10;
              +    } while (add_wch(&temp[digit]) != ERR);
              +}
               
              -	saywhat("s2; press any key to continue");
              -	show_panel(p2);
              -	pflush();
              -	wait_a_while(nap_msec);
              +static void
              +fill_wide_panel(PANEL * pan)
              +{
              +    WINDOW *win = panel_window(pan);
              +    int num = ((const char *) panel_userptr(pan))[1];
              +    int y, x;
               
              -	saywhat("m2; press any key to continue");
              -	move_panel(p2, LINES / 3 + 1, COLS / 8);
              -	pflush();
              -	wait_a_while(nap_msec);
              +    wmove(win, 1, 1);
              +    wprintw(win, "-pan%c-", num);
              +    wclrtoeol(win);
              +    box(win, 0, 0);
              +    for (y = 2; y < getmaxy(win) - 1; y++) {
              +	for (x = 1; x < getmaxx(win) - 1; x++) {
              +	    wmove(win, y, x);
              +	    waddch(win, UChar(num));
              +	}
              +    }
              +}
              +#endif
               
              -	saywhat("s3;");
              -	show_panel(p3);
              -	pflush();
              -	wait_a_while(nap_msec);
              +#define MAX_PANELS 5
               
              -	saywhat("m3; press any key to continue");
              -	move_panel(p3, LINES / 4 + 1, COLS / 15);
              -	pflush();
              -	wait_a_while(nap_msec);
              +static void
              +canned_panel(PANEL * px[MAX_PANELS + 1], NCURSES_CONST char *cmd)
              +{
              +    int which = cmd[1] - '0';
               
              -	saywhat("b3; press any key to continue");
              -	bottom_panel(p3);
              -	pflush();
              -	wait_a_while(nap_msec);
              +    saywhat(cmd);
              +    switch (*cmd) {
              +    case 'h':
              +	hide_panel(px[which]);
              +	break;
              +    case 's':
              +	show_panel(px[which]);
              +	break;
              +    case 't':
              +	top_panel(px[which]);
              +	break;
              +    case 'b':
              +	bottom_panel(px[which]);
              +	break;
              +    case 'd':
              +	rmpanel(px[which]);
              +	break;
              +    }
              +    pflush();
              +    wait_a_while(nap_msec);
              +}
               
              -	saywhat("s4; press any key to continue");
              -	show_panel(p4);
              -	pflush();
              -	wait_a_while(nap_msec);
              +static void
              +demo_panels(void (*InitPanel) (void), void (*FillPanel) (PANEL *))
              +{
              +    int count;
              +    int itmp;
              +    PANEL *px[MAX_PANELS + 1];
               
              -	saywhat("s5; press any key to continue");
              -	show_panel(p5);
              -	pflush();
              -	wait_a_while(nap_msec);
              +    scrollok(stdscr, FALSE);	/* we don't want stdscr to scroll! */
              +    refresh();
               
              -	saywhat("t3; press any key to continue");
              -	top_panel(p3);
              -	pflush();
              -	wait_a_while(nap_msec);
              +    InitPanel();
              +    for (count = 0; count < 5; count++) {
              +	px[1] = mkpanel(COLOR_RED,
              +			LINES / 2 - 2,
              +			COLS / 8 + 1,
              +			0,
              +			0);
              +	set_panel_userptr(px[1], (NCURSES_CONST void *) "p1");
              +
              +	px[2] = mkpanel(COLOR_GREEN,
              +			LINES / 2 + 1,
              +			COLS / 7,
              +			LINES / 4,
              +			COLS / 10);
              +	set_panel_userptr(px[2], (NCURSES_CONST void *) "p2");
              +
              +	px[3] = mkpanel(COLOR_YELLOW,
              +			LINES / 4,
              +			COLS / 10,
              +			LINES / 2,
              +			COLS / 9);
              +	set_panel_userptr(px[3], (NCURSES_CONST void *) "p3");
              +
              +	px[4] = mkpanel(COLOR_BLUE,
              +			LINES / 2 - 2,
              +			COLS / 8,
              +			LINES / 2 - 2,
              +			COLS / 3);
              +	set_panel_userptr(px[4], (NCURSES_CONST void *) "p4");
              +
              +	px[5] = mkpanel(COLOR_MAGENTA,
              +			LINES / 2 - 2,
              +			COLS / 8,
              +			LINES / 2,
              +			COLS / 2 - 2);
              +	set_panel_userptr(px[5], (NCURSES_CONST void *) "p5");
              +
              +	FillPanel(px[1]);
              +	FillPanel(px[2]);
              +	FillPanel(px[3]);
              +	FillPanel(px[4]);
              +	FillPanel(px[5]);
               
              -	saywhat("t1; press any key to continue");
              -	top_panel(p1);
              +	hide_panel(px[4]);
              +	hide_panel(px[5]);
               	pflush();
              +	saywhat("");
               	wait_a_while(nap_msec);
               
              -	saywhat("t2; press any key to continue");
              -	top_panel(p2);
              +	saywhat("h3 s1 s2 s4 s5");
              +	move_panel(px[1], 0, 0);
              +	hide_panel(px[3]);
              +	show_panel(px[1]);
              +	show_panel(px[2]);
              +	show_panel(px[4]);
              +	show_panel(px[5]);
               	pflush();
               	wait_a_while(nap_msec);
               
              -	saywhat("t3; press any key to continue");
              -	top_panel(p3);
              +	canned_panel(px, "s1");
              +	canned_panel(px, "s2");
              +
              +	saywhat("m2");
              +	move_panel(px[2], LINES / 3 + 1, COLS / 8);
               	pflush();
               	wait_a_while(nap_msec);
               
              -	saywhat("t4; press any key to continue");
              -	top_panel(p4);
              +	canned_panel(px, "s3");
              +
              +	saywhat("m3");
              +	move_panel(px[3], LINES / 4 + 1, COLS / 15);
               	pflush();
               	wait_a_while(nap_msec);
               
              +	canned_panel(px, "b3");
              +	canned_panel(px, "s4");
              +	canned_panel(px, "s5");
              +	canned_panel(px, "t3");
              +	canned_panel(px, "t1");
              +	canned_panel(px, "t2");
              +	canned_panel(px, "t3");
              +	canned_panel(px, "t4");
              +
               	for (itmp = 0; itmp < 6; itmp++) {
              -	    WINDOW *w4 = panel_window(p4);
              -	    WINDOW *w5 = panel_window(p5);
              +	    WINDOW *w4 = panel_window(px[4]);
              +	    WINDOW *w5 = panel_window(px[5]);
               
              -	    saywhat("m4; press any key to continue");
              +	    saywhat("m4");
               	    wmove(w4, LINES / 8, 1);
               	    waddstr(w4, mod[itmp]);
              -	    move_panel(p4, LINES / 6, itmp * (COLS / 8));
              +	    move_panel(px[4], LINES / 6, itmp * (COLS / 8));
               	    wmove(w5, LINES / 6, 1);
               	    waddstr(w5, mod[itmp]);
               	    pflush();
               	    wait_a_while(nap_msec);
               
              -	    saywhat("m5; press any key to continue");
              +	    saywhat("m5");
               	    wmove(w4, LINES / 6, 1);
               	    waddstr(w4, mod[itmp]);
              -	    move_panel(p5, LINES / 3 - 1, (itmp * 10) + 6);
              +	    move_panel(px[5], LINES / 3 - 1, (itmp * 10) + 6);
               	    wmove(w5, LINES / 8, 1);
               	    waddstr(w5, mod[itmp]);
               	    pflush();
               	    wait_a_while(nap_msec);
               	}
               
              -	saywhat("m4; press any key to continue");
              -	move_panel(p4, LINES / 6, itmp * (COLS / 8));
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("t5; press any key to continue");
              -	top_panel(p5);
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("t2; press any key to continue");
              -	top_panel(p2);
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("t1; press any key to continue");
              -	top_panel(p1);
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("d2; press any key to continue");
              -	rmpanel(p2);
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("h3; press any key to continue");
              -	hide_panel(p3);
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("d1; press any key to continue");
              -	rmpanel(p1);
              -	pflush();
              -	wait_a_while(nap_msec);
              -
              -	saywhat("d4; press any key to continue");
              -	rmpanel(p4);
              +	saywhat("m4");
              +	move_panel(px[4], LINES / 6, itmp * (COLS / 8));
               	pflush();
               	wait_a_while(nap_msec);
               
              -	saywhat("d5; press any key to continue");
              -	rmpanel(p5);
              -	pflush();
              -
              -	rmpanel(p3);
              -	pflush();
              +	canned_panel(px, "t5");
              +	canned_panel(px, "t2");
              +	canned_panel(px, "t1");
              +	canned_panel(px, "d2");
              +	canned_panel(px, "h3");
              +	canned_panel(px, "d1");
              +	canned_panel(px, "d4");
              +	canned_panel(px, "d5");
              +	canned_panel(px, "d3");
               
               	wait_a_while(nap_msec);
               	if (nap_msec == 1)
              @@ -5389,6 +5405,10 @@
                   int finished = 0, c;
                   unsigned n = 0;
               
              +#ifdef NCURSES_MOUSE_VERSION
              +    mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
              +#endif
              +
                   move(18, 0);
                   addstr("Defined edit/traversal keys:   ^Q/ESC- exit form\n");
                   addstr("^N   -- go to next field       ^P  -- go to previous field\n");
              @@ -5462,6 +5482,10 @@
                   free_fieldtype(fty_passwd);
                   noraw();
                   nl();
              +
              +#ifdef NCURSES_MOUSE_VERSION
              +    mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
              +#endif
               }
               #endif /* USE_LIBFORM */
               
              @@ -5884,7 +5908,13 @@
               
               #if USE_LIBPANEL
                   case 'o':
              -	demo_panels();
              +	demo_panels(init_panel, fill_panel);
              +	break;
              +#endif
              +
              +#if USE_WIDEC_SUPPORT
              +    case 'O':
              +	demo_panels(init_wide_panel, fill_wide_panel);
               	break;
               #endif
               
              @@ -6052,9 +6082,12 @@
               #endif
               #if USE_LIBPANEL
               	(void) puts("o = exercise panels library");
              +#if USE_WIDEC_SUPPORT
              +	(void) puts("O = exercise panels with wide-characters");
              +#endif
              +#endif
               	(void) puts("p = exercise pad features");
               	(void) puts("q = quit");
              -#endif
               #if USE_LIBFORM
               	(void) puts("r = exercise forms code");
               #endif
              @@ -6143,7 +6176,7 @@
               
                   setlocale(LC_ALL, "");
               
              -    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != EOF) {
              +    while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != -1) {
               	switch (c) {
               #ifdef NCURSES_VERSION
               	case 'a':
              diff -Naur ncurses-5.6.orig/test/programs ncurses-5.6/test/programs
              --- ncurses-5.6.orig/test/programs	2006-11-04 13:56:49.000000000 -0500
              +++ ncurses-5.6/test/programs	2007-12-21 00:02:36.000000000 -0500
              @@ -1,6 +1,6 @@
              -# $Id: programs,v 1.5 2006/11/04 18:56:49 tom Exp $
              +# $Id: programs,v 1.13 2007/08/18 17:57:00 tom Exp $
               ##############################################################################
              -# Copyright (c) 2006 Free Software Foundation, Inc.                          #
              +# Copyright (c) 2006,2007 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"), #
              @@ -45,6 +45,7 @@
               demo_termcap	$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	demo_termcap
               ditto		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	ditto
               dots		$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	dots
              +dots_mvcur	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	dots_mvcur
               echochar	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	echochar
               filter		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	filter
               firework	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	firework
              @@ -53,8 +54,11 @@
               gdc		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	gdc
               hanoi		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	hanoi
               hashtest	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	hashtest
              +inch_wide	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inch_wide
              +inchs		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inchs
               ins_wide	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	ins_wide
               inserts		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	inserts
              +key_names	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	key_names
               keynames	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	keynames
               knight		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	knight
               lrtest		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	lrtest
              @@ -66,9 +70,17 @@
               redraw		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	redraw
               savescreen	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	savescreen
               tclock		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	tclock
              +test_arrays	$(LDFLAGS_TINFO)	$(LOCAL_LIBS)	test_arrays
              +test_get_wstr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_get_wstr
              +test_getstr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_getstr
              +test_instr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_instr
              +test_inwstr	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_inwstr
              +test_opaque	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	test_opaque
               testaddch	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	testaddch
               testcurs	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	testcurs
               testscanw	$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	testscanw
               view		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	view
               worm		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	worm
               xmas		$(LDFLAGS_CURSES)	$(LOCAL_LIBS)	xmas
              +
              +# vile:makemode
              diff -Naur ncurses-5.6.orig/test/railroad.c ncurses-5.6/test/railroad.c
              --- ncurses-5.6.orig/test/railroad.c	2006-05-20 12:02:04.000000000 -0400
              +++ ncurses-5.6/test/railroad.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2000-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 2000-2006,2007 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            *
              @@ -29,10 +29,11 @@
               /*
                * Author: Thomas E. Dickey - 2000
                *
              - * $Id: railroad.c,v 1.14 2006/05/20 16:02:04 tom Exp $
              + * $Id: railroad.c,v 1.15 2007/02/03 18:51:23 tom Exp $
                *
                * A simple demo of the termcap interface.
                */
              +#define USE_TINFO
               #include 
               
               #if HAVE_TGETENT
              diff -Naur ncurses-5.6.orig/test/redraw.c ncurses-5.6/test/redraw.c
              --- ncurses-5.6.orig/test/redraw.c	2006-11-04 18:20:27.000000000 -0500
              +++ ncurses-5.6/test/redraw.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              + * Copyright (c) 2006,2007 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            *
              @@ -26,7 +26,7 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: redraw.c,v 1.3 2006/11/04 23:20:27 tom Exp $
              + * $Id: redraw.c,v 1.4 2007/06/30 17:55:06 tom Exp $
                *
                * Demonstrate the redrawwin() and wredrawln() functions.
                * Thomas Dickey - 2006/11/4
              @@ -148,7 +148,7 @@
               	    if (ch > KEY_MIN) {
               		waddstr(win, keyname(ch));
               	    } else {
              -		waddstr(win, unctrl(ch));
              +		waddstr(win, unctrl(UChar(ch)));
               	    }
               	    break;
               	}
              diff -Naur ncurses-5.6.orig/test/savescreen.c ncurses-5.6/test/savescreen.c
              --- ncurses-5.6.orig/test/savescreen.c	2006-04-01 14:08:03.000000000 -0500
              +++ ncurses-5.6/test/savescreen.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 2006 Free Software Foundation, Inc.                        *
              + * Copyright (c) 2007 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            *
              @@ -26,23 +26,291 @@
                * authorization.                                                           *
                ****************************************************************************/
               /*
              - * $Id: savescreen.c,v 1.2 2006/04/01 19:08:03 tom Exp $
              + * $Id: savescreen.c,v 1.10 2007/07/21 17:57:37 tom Exp $
                *
                * Demonstrate save/restore functions from the curses library.
              - * Thomas Dickey - 2006/2/11
              + * Thomas Dickey - 2007/7/14
                */
              -/*
              -scr_dump			-
              -scr_init			-
              -scr_restore			-
              -scr_set				-
              -*/
               
               #include 
               
              +#if TIME_WITH_SYS_TIME
              +# include 
              +# include 
              +#else
              +# if HAVE_SYS_TIME_H
              +#  include 
              +# else
              +#  include 
              +# endif
              +#endif
              +
              +static bool use_init = FALSE;
              +
              +static void
              +setup_next(void)
              +{
              +    curs_set(1);
              +    reset_shell_mode();
              +}
              +
              +static void
              +cleanup(char *files[])
              +{
              +    int n;
              +
              +    for (n = 0; files[n] != 0; ++n) {
              +	unlink(files[n]);
              +    }
              +}
              +
              +static int
              +load_screen(char *filename)
              +{
              +    int result;
              +
              +    if (use_init) {
              +	if ((result = scr_init(filename)) != ERR)
              +	    result = scr_restore(filename);
              +    } else {
              +	result = scr_set(filename);
              +    }
              +    return result;
              +}
              +
              +/*
              + * scr_restore() or scr_set() operates on curscr.  If we read a character using
              + * getch() that will refresh stdscr, wiping out the result.  To avoid that,
              + * copy the data back from curscr to stdscr.
              + */
              +static void
              +after_load(void)
              +{
              +    overwrite(curscr, stdscr);
              +    doupdate();
              +}
              +
              +static void
              +show_what(int which, int last)
              +{
              +    int y, x;
              +    time_t now = time((time_t *) 0);
              +
              +    getyx(stdscr, y, x);
              +
              +    move(0, 0);
              +    printw("Saved %d of %d - %s", which, last + 1, ctime(&now));
              +
              +    move(y, x);
              +
              +    refresh();
              +}
              +
              +static int
              +get_command(int which, int last)
              +{
              +    int ch;
              +
              +    timeout(100);
              +
              +    do {
              +	show_what(which, last);
              +	ch = getch();
              +    } while (ch == ERR);
              +
              +    return ch;
              +}
              +
              +static void
              +usage(void)
              +{
              +    static const char *msg[] =
              +    {
              +	"Usage: savescreen [-r] files",
              +	"",
              +	"Options:",
              +	" -i  use scr_init/scr_restore rather than scr_set",
              +	" -r  replay the screen-dump files"
              +    };
              +    unsigned n;
              +    for (n = 0; n < SIZEOF(msg); ++n) {
              +	fprintf(stderr, "%s\n", msg[n]);
              +    }
              +    ExitProgram(EXIT_FAILURE);
              +}
              +
               int
              -main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              +main(int argc, char *argv[])
               {
              -    printf("Not implemented - demo for screen save/restore\n");
              -    return EXIT_SUCCESS;
              +    int ch;
              +    int which = 0;
              +    int last;
              +    bool replaying = FALSE;
              +    bool done = FALSE;
              +    char **files;
              +
              +    while ((ch = getopt(argc, argv, "ir")) != -1) {
              +	switch (ch) {
              +	case 'i':
              +	    use_init = TRUE;
              +	    break;
              +	case 'r':
              +	    replaying = TRUE;
              +	    break;
              +	default:
              +	    usage();
              +	    break;
              +	}
              +    }
              +
              +    initscr();
              +    cbreak();
              +    noecho();
              +    keypad(stdscr, TRUE);
              +    curs_set(0);
              +    if (has_colors()) {
              +	start_color();
              +	for (ch = 0; ch < COLOR_PAIRS; ++ch) {
              +	    short pair = ch % COLOR_PAIRS;
              +	    init_pair(pair, COLOR_WHITE, ch % COLORS);
              +	}
              +    }
              +
              +    files = argv + optind;
              +    last = argc - optind - 1;
              +    if (replaying) {
              +
              +	/*
              +	 * Use the last file as the initial/current screen.
              +	 */
              +	if (last < 0) {
              +	    endwin();
              +	    printf("No screen-dumps given\n");
              +	    ExitProgram(EXIT_FAILURE);
              +	}
              +
              +	which = last;
              +	if (load_screen(files[which]) == ERR) {
              +	    endwin();
              +	    printf("Cannot load screen-dump %s\n", files[which]);
              +	    ExitProgram(EXIT_FAILURE);
              +	}
              +	after_load();
              +
              +	while (!done && (ch = getch()) != ERR) {
              +	    switch (ch) {
              +	    case 'n':
              +		/*
              +		 * If we got a "next" here, skip to the final screen before
              +		 * moving to the next process.
              +		 */
              +		setup_next();
              +		which = last;
              +		done = TRUE;
              +		break;
              +	    case 'q':
              +		endwin();
              +		cleanup(files);
              +		done = TRUE;
              +		break;
              +	    case KEY_BACKSPACE:
              +	    case '\b':
              +		if (--which < 0)
              +		    which = last;
              +		break;
              +	    case ' ':
              +		if (++which > last)
              +		    which = 0;
              +		break;
              +	    default:
              +		beep();
              +		continue;
              +	    }
              +
              +	    if (ch == 'q') {
              +		;
              +	    } else if (scr_restore(files[which]) == ERR) {
              +		endwin();
              +		printf("Cannot load screen-dump %s\n", files[which]);
              +		cleanup(files);
              +		ExitProgram(EXIT_FAILURE);
              +	    } else {
              +		wrefresh(curscr);
              +	    }
              +	}
              +    } else {
              +	int y;
              +	int x;
              +
              +	move(2, 0);
              +	printw("Use h,j,k,l or arrows to move around the screen\n");
              +	printw("Press 'q' to quit, ' ' to dump a screen\n");
              +	printw("When the last screen has been dumped, press 'n' to run the\n");
              +	printw("screen-loader.  That allows only 'q', backspace and ' ' for\n");
              +	printw("stepping through the dumped/restored screens.\n");
              +	getyx(stdscr, y, x);
              +
              +	while (!done) {
              +	    switch (ch = get_command(which, last)) {
              +	    case 'n':
              +		setup_next();
              +		done = TRUE;
              +		break;
              +	    case 'q':
              +		endwin();
              +		cleanup(files);
              +		done = TRUE;
              +		break;
              +	    case ' ':
              +		if (files[which] != 0) {
              +		    show_what(which + 1, last);
              +		    if (scr_dump(files[which]) == ERR) {
              +			endwin();
              +			printf("Cannot write screen-dump %s\n", files[which]);
              +			cleanup(files);
              +			done = TRUE;
              +			break;
              +		    }
              +		    ++which;
              +		    if (has_colors()) {
              +			short pair = which % COLOR_PAIRS;
              +			bkgd(COLOR_PAIR(pair));
              +		    }
              +		} else {
              +		    beep();
              +		}
              +		break;
              +	    case KEY_LEFT:
              +	    case 'h':
              +		if (--x < 0)
              +		    x = COLS - 1;
              +		break;
              +	    case KEY_DOWN:
              +	    case 'j':
              +		if (++y >= LINES)
              +		    y = 1;
              +		break;
              +	    case KEY_UP:
              +	    case 'k':
              +		if (--y < 1)
              +		    y = LINES - 1;
              +		break;
              +	    case KEY_RIGHT:
              +	    case 'l':
              +		if (++x >= COLS)
              +		    x = 0;
              +		break;
              +	    }
              +	    if (!done) {
              +		time_t now = time((time_t *) 0);
              +
              +		move(0, 0);
              +		addstr(ctime(&now));
              +		move(y, x);
              +		addch('#' | A_REVERSE);
              +		move(y, x);
              +	    }
              +	}
              +    }
              +    ExitProgram(EXIT_SUCCESS);
               }
              diff -Naur ncurses-5.6.orig/test/savescreen.sh ncurses-5.6/test/savescreen.sh
              --- ncurses-5.6.orig/test/savescreen.sh	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/savescreen.sh	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,55 @@
              +#!/bin/sh
              +##############################################################################
              +# Copyright (c) 2007 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"), #
              +# to deal in the Software without restriction, including without limitation  #
              +# the rights to use, copy, modify, merge, publish, distribute, distribute    #
              +# with modifications, sublicense, and/or sell copies of the Software, and to #
              +# permit persons to whom the Software is furnished to do so, subject to the  #
              +# following conditions:                                                      #
              +#                                                                            #
              +# The above copyright notice and this permission notice shall be included in #
              +# all copies or substantial portions of the Software.                        #
              +#                                                                            #
              +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
              +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
              +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
              +# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
              +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
              +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
              +# DEALINGS IN THE SOFTWARE.                                                  #
              +#                                                                            #
              +# Except as contained in this notice, the name(s) of the above copyright     #
              +# holders shall not be used in advertising or otherwise to promote the sale, #
              +# use or other dealings in this Software without prior written               #
              +# authorization.                                                             #
              +##############################################################################
              +# $Id: savescreen.sh,v 1.3 2007/07/14 21:50:26 tom Exp $
              +#
              +# Use this script to exercise "savescreen".
              +# It starts by generating a series of temporary-filenames, which are passed
              +# to the test-program.  Loop as long as the first file named exists.
              +PARAMS=
              +NFILES=4
              +PREFIX=savescreen-$$
              +n=0
              +BEGINS=$PREFIX-$n.tmp
              +while test $n != $NFILES
              +do
              +	LATEST=$PREFIX-$n.tmp
              +	PARAMS="$PARAMS $LATEST"
              +	n=`expr $n + 1`
              +done
              +
              +./savescreen $PARAMS
              +if test -f $BEGINS
              +then
              +	while test -f $BEGINS
              +	do
              +		./savescreen -r $PARAMS
              +	done
              +else
              +	echo "No screens were saved"
              +fi
              diff -Naur ncurses-5.6.orig/test/test.priv.h ncurses-5.6/test/test.priv.h
              --- ncurses-5.6.orig/test/test.priv.h	2006-07-15 14:27:24.000000000 -0400
              +++ ncurses-5.6/test/test.priv.h	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -29,7 +29,7 @@
               /****************************************************************************
                *  Author: Thomas E. Dickey                    1996-on                     *
                ****************************************************************************/
              -/* $Id: test.priv.h,v 1.63 2006/07/15 18:27:24 tom Exp $ */
              +/* $Id: test.priv.h,v 1.68 2007/06/30 17:53:09 tom Exp $ */
               
               #ifndef __TEST_PRIV_H
               #define __TEST_PRIV_H 1
              @@ -309,7 +309,7 @@
               
               #ifndef HAVE_TYPE_ATTR_T
               #if !USE_WIDEC_SUPPORT
              -#define attr_t long
              +#define attr_t chtype
               #endif
               #endif
               
              @@ -320,6 +320,10 @@
               #define NCURSES_CH_T cchar_t
               #endif
               
              +#ifndef NCURSES_OPAQUE
              +#define NCURSES_OPAQUE 0
              +#endif
              +
               #ifndef CCHARW_MAX
               #define CCHARW_MAX 5
               #endif
              @@ -404,6 +408,10 @@
               
               #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H
               #include 
              +#if HAVE_NC_FREEALL && defined(USE_TINFO)
              +#undef ExitProgram
              +#define ExitProgram(code) _nc_free_tinfo(code)
              +#endif
               #else
               #define typeMalloc(type,n) (type *) malloc((n) * sizeof(type))
               #define typeRealloc(type,n,p) (type *) realloc(p, (n) * sizeof(type))
              diff -Naur ncurses-5.6.orig/test/test_arrays.c ncurses-5.6/test/test_arrays.c
              --- ncurses-5.6.orig/test/test_arrays.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/test_arrays.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,79 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: test_arrays.c,v 1.2 2007/09/01 20:11:57 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + *
              + * Demonstrate the public arrays from the terminfo library.
              +
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
              +extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
              +
              + */
              +
              +#define USE_TINFO
              +#include 
              +
              +#define DUMP(name) dump_array(#name, name)
              +
              +static void
              +dump_array(const char *name, NCURSES_CONST char *const *list)
              +{
              +    int n;
              +
              +    printf("%s:\n", name);
              +    for (n = 0; list[n] != 0; ++n) {
              +	printf("%5d:%s\n", n, list[n]);
              +    }
              +}
              +
              +int
              +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
              +{
              +    DUMP(boolnames);
              +    DUMP(boolcodes);
              +    DUMP(boolfnames);
              +
              +    DUMP(numnames);
              +    DUMP(numcodes);
              +    DUMP(numfnames);
              +
              +    DUMP(strnames);
              +    DUMP(strcodes);
              +    DUMP(strfnames);
              +
              +    ExitProgram(EXIT_SUCCESS);
              +}
              diff -Naur ncurses-5.6.orig/test/test_get_wstr.c ncurses-5.6/test/test_get_wstr.c
              --- ncurses-5.6.orig/test/test_get_wstr.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/test_get_wstr.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,361 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: test_get_wstr.c,v 1.5 2007/08/11 17:01:43 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + *
              + * Demonstrate the get_wstr functions from the curses library.
              +
              +       int get_wstr(wint_t *wstr);
              +       int getn_wstr(wint_t *wstr, int n);
              +       int wget_wstr(WINDOW *win, wint_t *wstr);
              +       int wgetn_wstr(WINDOW *win, wint_t *wstr, int n);
              +       int mvget_wstr(int y, int x, wint_t *wstr);
              +       int mvgetn_wstr(int y, int x, wint_t *wstr, int n);
              +       int mvwget_wstr(WINDOW *win, int y, int x, wint_t *wstr);
              +       int mvwgetn_wstr(WINDOW *win, int y, int x, wint_t *wstr, int n);
              + */
              +
              +#include 
              +
              +#if USE_WIDEC_SUPPORT
              +
              +#define BASE_Y 6
              +#define MAX_COLS 1024
              +
              +typedef enum {
              +    eGetStr = 0,
              +    eGetNStr,
              +    eMvGetStr,
              +    eMvGetNStr,
              +    eMaxFlavor
              +} Flavors;
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +static int
              +Remainder(WINDOW *txtwin)
              +{
              +    int result = getmaxx(txtwin) - getcurx(txtwin);
              +    return (result > 0) ? result : 0;
              +}
              +
              +/*
              + * Show a highlighted line in the place where input will happen.
              + */
              +static void
              +ShowPrompt(WINDOW *txtwin, int limit)
              +{
              +    wchgat(txtwin, limit, A_REVERSE, 0, NULL);
              +    wnoutrefresh(txtwin);
              +}
              +
              +static void
              +MovePrompt(WINDOW *txtwin, int limit, int y, int x)
              +{
              +    wchgat(txtwin, Remainder(txtwin), A_NORMAL, 0, NULL);
              +    wmove(txtwin, y, x);
              +    ShowPrompt(txtwin, limit);
              +}
              +
              +static int
              +ShowFlavor(WINDOW *strwin, WINDOW *txtwin, int flavor, int limit)
              +{
              +    const char *name = "?";
              +    bool limited = FALSE;
              +    bool wins = (txtwin != stdscr);
              +    int result;
              +
              +    switch (flavor) {
              +    case eGetStr:
              +	name = wins ? "wget_wstr" : "get_wstr";
              +	break;
              +    case eGetNStr:
              +	limited = TRUE;
              +	name = wins ? "wgetn_wstr" : "getn_wstr";
              +	break;
              +    case eMvGetStr:
              +	name = wins ? "mvwget_wstr" : "mvget_wstr";
              +	break;
              +    case eMvGetNStr:
              +	limited = TRUE;
              +	name = wins ? "mvwgetn_wstr" : "mvgetn_wstr";
              +	break;
              +    case eMaxFlavor:
              +	break;
              +    }
              +
              +    wmove(strwin, 0, 0);
              +    werase(strwin);
              +
              +    if (limited) {
              +	wprintw(strwin, "%s(%d):", name, limit);
              +    } else {
              +	wprintw(strwin, "%s:", name);
              +    }
              +    result = limited ? limit : Remainder(txtwin);
              +    ShowPrompt(txtwin, result);
              +
              +    wnoutrefresh(strwin);
              +    return result;
              +}
              +
              +static int
              +test_get_wstr(int level, char **argv, WINDOW *strwin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int ch;
              +    int rc;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    int flavor = 0;
              +    int limit = getmaxx(strwin) - 5;
              +    int actual;
              +    wint_t buffer[MAX_COLS];
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((ch = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(ch)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    wmove(txtwin, txt_y, txt_x);
              +    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              +    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              +	switch (ch) {
              +	case KEY_DOWN:
              +	case 'j':
              +	    if (txt_y < getmaxy(txtwin) - 1) {
              +		MovePrompt(txtwin, actual, ++txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_UP:
              +	case 'k':
              +	    if (txt_y > base_y) {
              +		MovePrompt(txtwin, actual, --txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_LEFT:
              +	case 'h':
              +	    if (txt_x > 0) {
              +		MovePrompt(txtwin, actual, txt_y, --txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_RIGHT:
              +	case 'l':
              +	    if (txt_x < getmaxx(txtwin) - 1) {
              +		MovePrompt(txtwin, actual, txt_y, ++txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case 'w':
              +	    test_get_wstr(level + 1, argv, strwin);
              +	    if (txtbox != 0) {
              +		touchwin(txtbox);
              +		wnoutrefresh(txtbox);
              +	    } else {
              +		touchwin(txtwin);
              +		wnoutrefresh(txtwin);
              +	    }
              +	    break;
              +
              +	case '-':
              +	    if (limit > 0) {
              +		actual = ShowFlavor(strwin, txtwin, flavor, --limit);
              +		MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case '+':
              +	    actual = ShowFlavor(strwin, txtwin, flavor, ++limit);
              +	    MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    break;
              +
              +	case '<':
              +	    if (flavor > 0) {
              +		actual = ShowFlavor(strwin, txtwin, --flavor, limit);
              +		MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case '>':
              +	    if (flavor + 1 < eMaxFlavor) {
              +		actual = ShowFlavor(strwin, txtwin, ++flavor, limit);
              +		MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case ':':
              +	    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              +	    *buffer = '\0';
              +	    rc = ERR;
              +	    echo();
              +	    wattrset(txtwin, A_REVERSE);
              +	    switch (flavor) {
              +	    case eGetStr:
              +		if (txtwin != stdscr) {
              +		    wmove(txtwin, txt_y, txt_x);
              +		    rc = wget_wstr(txtwin, buffer);
              +		} else {
              +		    move(txt_y, txt_x);
              +		    rc = get_wstr(buffer);
              +		}
              +		break;
              +	    case eGetNStr:
              +		if (txtwin != stdscr) {
              +		    wmove(txtwin, txt_y, txt_x);
              +		    rc = wgetn_wstr(txtwin, buffer, limit);
              +		} else {
              +		    move(txt_y, txt_x);
              +		    rc = getn_wstr(buffer, limit);
              +		}
              +		break;
              +	    case eMvGetStr:
              +		if (txtwin != stdscr) {
              +		    rc = mvwget_wstr(txtwin, txt_y, txt_x, buffer);
              +		} else {
              +		    rc = mvget_wstr(txt_y, txt_x, buffer);
              +		}
              +		break;
              +	    case eMvGetNStr:
              +		if (txtwin != stdscr) {
              +		    rc = mvwgetn_wstr(txtwin, txt_y, txt_x, buffer, limit);
              +		} else {
              +		    rc = mvgetn_wstr(txt_y, txt_x, buffer, limit);
              +		}
              +		break;
              +	    case eMaxFlavor:
              +		break;
              +	    }
              +	    noecho();
              +	    wattrset(txtwin, A_NORMAL);
              +	    wprintw(strwin, "%d", rc);
              +	    waddwstr(strwin, (wchar_t *) buffer);
              +	    wnoutrefresh(strwin);
              +	    break;
              +	default:
              +	    beep();
              +	    break;
              +	}
              +	doupdate();
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *chrbox;
              +    WINDOW *strwin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(chrbox, 0, 0);
              +    wnoutrefresh(chrbox);
              +
              +    strwin = derwin(chrbox, 4, COLS - 2, 1, 1);
              +
              +    test_get_wstr(1, argv, strwin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              +#else
              +int
              +main(void)
              +{
              +    printf("This program requires the wide-ncurses library\n");
              +    ExitProgram(EXIT_FAILURE);
              +}
              +#endif
              diff -Naur ncurses-5.6.orig/test/test_getstr.c ncurses-5.6/test/test_getstr.c
              --- ncurses-5.6.orig/test/test_getstr.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/test_getstr.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,351 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: test_getstr.c,v 1.7 2007/08/11 16:56:25 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + *
              + * Demonstrate the getstr functions from the curses library.
              +
              +       int getstr(char *str);
              +       int getnstr(char *str, int n);
              +       int wgetstr(WINDOW *win, char *str);
              +       int wgetnstr(WINDOW *win, char *str, int n);
              +       int mvgetstr(int y, int x, char *str);
              +       int mvwgetstr(WINDOW *win, int y, int x, char *str);
              +       int mvgetnstr(int y, int x, char *str, int n);
              +       int mvwgetnstr(WINDOW *, int y, int x, char *str, int n);
              + */
              +
              +#include 
              +
              +#define BASE_Y 6
              +#define MAX_COLS 1024
              +
              +typedef enum {
              +    eGetStr = 0,
              +    eGetNStr,
              +    eMvGetStr,
              +    eMvGetNStr,
              +    eMaxFlavor
              +} Flavors;
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +static int
              +Remainder(WINDOW *txtwin)
              +{
              +    int result = getmaxx(txtwin) - getcurx(txtwin);
              +    return (result > 0) ? result : 0;
              +}
              +
              +/*
              + * Show a highlighted line in the place where input will happen.
              + */
              +static void
              +ShowPrompt(WINDOW *txtwin, int limit)
              +{
              +    wchgat(txtwin, limit, A_REVERSE, 0, NULL);
              +    wnoutrefresh(txtwin);
              +}
              +
              +static void
              +MovePrompt(WINDOW *txtwin, int limit, int y, int x)
              +{
              +    wchgat(txtwin, Remainder(txtwin), A_NORMAL, 0, NULL);
              +    wmove(txtwin, y, x);
              +    ShowPrompt(txtwin, limit);
              +}
              +
              +static int
              +ShowFlavor(WINDOW *strwin, WINDOW *txtwin, int flavor, int limit)
              +{
              +    const char *name = "?";
              +    bool limited = FALSE;
              +    bool wins = (txtwin != stdscr);
              +    int result;
              +
              +    switch (flavor) {
              +    case eGetStr:
              +	name = wins ? "wgetstr" : "getstr";
              +	break;
              +    case eGetNStr:
              +	limited = TRUE;
              +	name = wins ? "wgetnstr" : "getnstr";
              +	break;
              +    case eMvGetStr:
              +	name = wins ? "mvwgetstr" : "mvgetstr";
              +	break;
              +    case eMvGetNStr:
              +	limited = TRUE;
              +	name = wins ? "mvwgetnstr" : "mvgetnstr";
              +	break;
              +    case eMaxFlavor:
              +	break;
              +    }
              +
              +    wmove(strwin, 0, 0);
              +    werase(strwin);
              +
              +    if (limited) {
              +	wprintw(strwin, "%s(%d):", name, limit);
              +    } else {
              +	wprintw(strwin, "%s:", name);
              +    }
              +    result = limited ? limit : Remainder(txtwin);
              +    ShowPrompt(txtwin, result);
              +
              +    wnoutrefresh(strwin);
              +    return result;
              +}
              +
              +static int
              +test_getstr(int level, char **argv, WINDOW *strwin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int ch;
              +    int rc;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    int flavor = 0;
              +    int limit = getmaxx(strwin) - 5;
              +    int actual;
              +
              +    char buffer[MAX_COLS];
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((ch = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(ch)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    wmove(txtwin, txt_y, txt_x);
              +    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              +    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              +	switch (ch) {
              +	case KEY_DOWN:
              +	case 'j':
              +	    if (txt_y < getmaxy(txtwin) - 1) {
              +		MovePrompt(txtwin, actual, ++txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_UP:
              +	case 'k':
              +	    if (txt_y > base_y) {
              +		MovePrompt(txtwin, actual, --txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_LEFT:
              +	case 'h':
              +	    if (txt_x > 0) {
              +		MovePrompt(txtwin, actual, txt_y, --txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case KEY_RIGHT:
              +	case 'l':
              +	    if (txt_x < getmaxx(txtwin) - 1) {
              +		MovePrompt(txtwin, actual, txt_y, ++txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case 'w':
              +	    test_getstr(level + 1, argv, strwin);
              +	    if (txtbox != 0) {
              +		touchwin(txtbox);
              +		wnoutrefresh(txtbox);
              +	    } else {
              +		touchwin(txtwin);
              +		wnoutrefresh(txtwin);
              +	    }
              +	    break;
              +
              +	case '-':
              +	    if (limit > 0) {
              +		actual = ShowFlavor(strwin, txtwin, flavor, --limit);
              +		MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case '+':
              +	    actual = ShowFlavor(strwin, txtwin, flavor, ++limit);
              +	    MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    break;
              +
              +	case '<':
              +	    if (flavor > 0) {
              +		actual = ShowFlavor(strwin, txtwin, --flavor, limit);
              +		MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case '>':
              +	    if (flavor + 1 < eMaxFlavor) {
              +		actual = ShowFlavor(strwin, txtwin, ++flavor, limit);
              +		MovePrompt(txtwin, actual, txt_y, txt_x);
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +
              +	case ':':
              +	    actual = ShowFlavor(strwin, txtwin, flavor, limit);
              +	    *buffer = '\0';
              +	    rc = ERR;
              +	    echo();
              +	    wattrset(txtwin, A_REVERSE);
              +	    switch (flavor) {
              +	    case eGetStr:
              +		if (txtwin != stdscr) {
              +		    wmove(txtwin, txt_y, txt_x);
              +		    rc = wgetstr(txtwin, buffer);
              +		} else {
              +		    move(txt_y, txt_x);
              +		    rc = getstr(buffer);
              +		}
              +		break;
              +	    case eGetNStr:
              +		if (txtwin != stdscr) {
              +		    wmove(txtwin, txt_y, txt_x);
              +		    rc = wgetnstr(txtwin, buffer, limit);
              +		} else {
              +		    move(txt_y, txt_x);
              +		    rc = getnstr(buffer, limit);
              +		}
              +		break;
              +	    case eMvGetStr:
              +		if (txtwin != stdscr) {
              +		    rc = mvwgetstr(txtwin, txt_y, txt_x, buffer);
              +		} else {
              +		    rc = mvgetstr(txt_y, txt_x, buffer);
              +		}
              +		break;
              +	    case eMvGetNStr:
              +		if (txtwin != stdscr) {
              +		    rc = mvwgetnstr(txtwin, txt_y, txt_x, buffer, limit);
              +		} else {
              +		    rc = mvgetnstr(txt_y, txt_x, buffer, limit);
              +		}
              +		break;
              +	    case eMaxFlavor:
              +		break;
              +	    }
              +	    noecho();
              +	    wattrset(txtwin, A_NORMAL);
              +	    wprintw(strwin, "%d:%s", rc, buffer);
              +	    wnoutrefresh(strwin);
              +	    break;
              +	default:
              +	    beep();
              +	    break;
              +	}
              +	doupdate();
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *chrbox;
              +    WINDOW *strwin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(chrbox, 0, 0);
              +    wnoutrefresh(chrbox);
              +
              +    strwin = derwin(chrbox, 4, COLS - 2, 1, 1);
              +
              +    test_getstr(1, argv, strwin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              diff -Naur ncurses-5.6.orig/test/test_instr.c ncurses-5.6/test/test_instr.c
              --- ncurses-5.6.orig/test/test_instr.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/test_instr.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,260 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: test_instr.c,v 1.4 2007/07/21 19:38:04 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + *
              + * Demonstrate the instr functions from the curses library.
              +
              +       int instr(char *str);
              +       int innstr(char *str, int n);
              +       int winstr(WINDOW *win, char *str);
              +       int winnstr(WINDOW *win, char *str, int n);
              +       int mvinstr(int y, int x, char *str);
              +       int mvinnstr(int y, int x, char *str, int n);
              +       int mvwinstr(WINDOW *win, int y, int x, char *str);
              +       int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);
              + */
              +
              +#include 
              +
              +#define BASE_Y 6
              +#define MAX_COLS 1024
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +static void
              +show_1st(WINDOW *win, int line, char *buffer)
              +{
              +    mvwaddstr(win, line, 5, buffer);
              +}
              +
              +static void
              +showmore(WINDOW *win, int line, char *buffer)
              +{
              +    wmove(win, line, 0);
              +    wclrtoeol(win);
              +    show_1st(win, line, buffer);
              +}
              +
              +static int
              +test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int ch;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    int limit = getmaxx(strwin) - 5;
              +
              +    char buffer[MAX_COLS];
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((ch = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(ch)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              +	switch (ch) {
              +	case KEY_DOWN:
              +	case 'j':
              +	    if (txt_y < getmaxy(txtwin) - 1)
              +		txt_y++;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_UP:
              +	case 'k':
              +	    if (txt_y > base_y)
              +		txt_y--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_LEFT:
              +	case 'h':
              +	    if (txt_x > 0)
              +		txt_x--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_RIGHT:
              +	case 'l':
              +	    if (txt_x < getmaxx(txtwin) - 1)
              +		txt_x++;
              +	    else
              +		beep();
              +	    break;
              +	case 'w':
              +	    test_inchs(level + 1, argv, chrwin, strwin);
              +	    if (txtbox != 0) {
              +		touchwin(txtbox);
              +		wnoutrefresh(txtbox);
              +	    } else {
              +		touchwin(txtwin);
              +		wnoutrefresh(txtwin);
              +	    }
              +	    break;
              +	case '-':
              +	    if (limit > 0) {
              +		--limit;
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case '+':
              +	    ++limit;
              +	    break;
              +	default:
              +	    beep();
              +	    break;
              +	}
              +
              +	mvwprintw(chrwin, 0, 0, "line:");
              +	wclrtoeol(chrwin);
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +
              +	    if (winstr(txtwin, buffer) != ERR) {
              +		show_1st(chrwin, 0, buffer);
              +	    }
              +	    if (mvwinstr(txtwin, txt_y, txt_x, buffer) != ERR) {
              +		showmore(chrwin, 1, buffer);
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +
              +	    if (instr(buffer) != ERR) {
              +		show_1st(chrwin, 0, buffer);
              +	    }
              +	    if (mvinstr(txt_y, txt_x, buffer) != ERR) {
              +		showmore(chrwin, 1, buffer);
              +	    }
              +	}
              +	wnoutrefresh(chrwin);
              +
              +	mvwprintw(strwin, 0, 0, "%4d:", limit);
              +	wclrtobot(strwin);
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (winnstr(txtwin, buffer, limit) != ERR) {
              +		show_1st(strwin, 0, buffer);
              +	    }
              +
              +	    if (mvwinnstr(txtwin, txt_y, txt_x, buffer, limit) != ERR) {
              +		showmore(strwin, 1, buffer);
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +	    if (innstr(buffer, limit) != ERR) {
              +		show_1st(strwin, 0, buffer);
              +	    }
              +
              +	    if (mvinnstr(txt_y, txt_x, buffer, limit) != ERR) {
              +		showmore(strwin, 1, buffer);
              +	    }
              +	}
              +
              +	wnoutrefresh(strwin);
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *chrbox;
              +    WINDOW *chrwin;
              +    WINDOW *strwin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(chrbox, 0, 0);
              +    wnoutrefresh(chrbox);
              +
              +    chrwin = derwin(chrbox, 2, COLS - 2, 1, 1);
              +    strwin = derwin(chrbox, 2, COLS - 2, 3, 1);
              +
              +    test_inchs(1, argv, chrwin, strwin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              diff -Naur ncurses-5.6.orig/test/test_inwstr.c ncurses-5.6/test/test_inwstr.c
              --- ncurses-5.6.orig/test/test_inwstr.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/test_inwstr.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,269 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: test_inwstr.c,v 1.3 2007/07/21 22:47:42 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + *
              + * Demonstrate the inwstr functions from the curses library.
              +
              +       int inwstr(wchar_t *str);
              +       int innwstr(wchar_t *str, int n);
              +       int winwstr(WINDOW *win, wchar_t *str);
              +       int winnwstr(WINDOW *win, wchar_t *str, int n);
              +       int mvinwstr(int y, int x, wchar_t *str);
              +       int mvinnwstr(int y, int x, wchar_t *str, int n);
              +       int mvwinwstr(WINDOW *win, int y, int x, wchar_t *str);
              +       int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *str, int n);
              + */
              +
              +#include 
              +
              +#if USE_WIDEC_SUPPORT
              +
              +#define BASE_Y 6
              +#define MAX_COLS 1024
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == ERR || ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +static void
              +show_1st(WINDOW *win, int line, wchar_t *buffer)
              +{
              +    mvwaddwstr(win, line, 5, buffer);
              +}
              +
              +static void
              +showmore(WINDOW *win, int line, wchar_t *buffer)
              +{
              +    wmove(win, line, 0);
              +    wclrtoeol(win);
              +    show_1st(win, line, buffer);
              +}
              +
              +static int
              +test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int ch;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    int limit = getmaxx(strwin) - 5;
              +    wchar_t buffer[MAX_COLS];
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((ch = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(ch)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
              +	switch (ch) {
              +	case KEY_DOWN:
              +	case 'j':
              +	    if (txt_y < getmaxy(txtwin) - 1)
              +		txt_y++;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_UP:
              +	case 'k':
              +	    if (txt_y > base_y)
              +		txt_y--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_LEFT:
              +	case 'h':
              +	    if (txt_x > 0)
              +		txt_x--;
              +	    else
              +		beep();
              +	    break;
              +	case KEY_RIGHT:
              +	case 'l':
              +	    if (txt_x < getmaxx(txtwin) - 1)
              +		txt_x++;
              +	    else
              +		beep();
              +	    break;
              +	case 'w':
              +	    test_inchs(level + 1, argv, chrwin, strwin);
              +	    if (txtbox != 0) {
              +		touchwin(txtbox);
              +		wnoutrefresh(txtbox);
              +	    } else {
              +		touchwin(txtwin);
              +		wnoutrefresh(txtwin);
              +	    }
              +	    break;
              +	case '-':
              +	    if (limit > 0) {
              +		--limit;
              +	    } else {
              +		beep();
              +	    }
              +	    break;
              +	case '+':
              +	    ++limit;
              +	    break;
              +	default:
              +	    beep();
              +	    break;
              +	}
              +
              +	mvwprintw(chrwin, 0, 0, "line:");
              +	wclrtoeol(chrwin);
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +
              +	    if (winwstr(txtwin, buffer) != ERR) {
              +		show_1st(chrwin, 0, buffer);
              +	    }
              +	    if (mvwinwstr(txtwin, txt_y, txt_x, buffer) != ERR) {
              +		showmore(chrwin, 1, buffer);
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +
              +	    if (inwstr(buffer) != ERR) {
              +		show_1st(chrwin, 0, buffer);
              +	    }
              +	    if (mvinwstr(txt_y, txt_x, buffer) != ERR) {
              +		showmore(chrwin, 1, buffer);
              +	    }
              +	}
              +	wnoutrefresh(chrwin);
              +
              +	mvwprintw(strwin, 0, 0, "%4d:", limit);
              +	wclrtobot(strwin);
              +
              +	if (txtwin != stdscr) {
              +	    wmove(txtwin, txt_y, txt_x);
              +	    if (winnwstr(txtwin, buffer, limit) != ERR) {
              +		show_1st(strwin, 0, buffer);
              +	    }
              +
              +	    if (mvwinnwstr(txtwin, txt_y, txt_x, buffer, limit) != ERR) {
              +		showmore(strwin, 1, buffer);
              +	    }
              +	} else {
              +	    move(txt_y, txt_x);
              +	    if (innwstr(buffer, limit) != ERR) {
              +		show_1st(strwin, 0, buffer);
              +	    }
              +
              +	    if (mvinnwstr(txt_y, txt_x, buffer, limit) != ERR) {
              +		showmore(strwin, 1, buffer);
              +	    }
              +	}
              +
              +	wnoutrefresh(strwin);
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *chrbox;
              +    WINDOW *chrwin;
              +    WINDOW *strwin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    chrbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(chrbox, 0, 0);
              +    wnoutrefresh(chrbox);
              +
              +    chrwin = derwin(chrbox, 2, COLS - 2, 1, 1);
              +    strwin = derwin(chrbox, 2, COLS - 2, 3, 1);
              +
              +    test_inchs(1, argv, chrwin, strwin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              +#else
              +int
              +main(void)
              +{
              +    printf("This program requires the wide-ncurses library\n");
              +    ExitProgram(EXIT_FAILURE);
              +}
              +#endif
              diff -Naur ncurses-5.6.orig/test/test_opaque.c ncurses-5.6/test/test_opaque.c
              --- ncurses-5.6.orig/test/test_opaque.c	1969-12-31 19:00:00.000000000 -0500
              +++ ncurses-5.6/test/test_opaque.c	2007-12-21 00:02:36.000000000 -0500
              @@ -0,0 +1,421 @@
              +/****************************************************************************
              + * Copyright (c) 2007 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"), to deal in the Software without restriction, including      *
              + * without limitation the rights to use, copy, modify, merge, publish,      *
              + * distribute, distribute with modifications, sublicense, and/or sell       *
              + * copies of the Software, and to permit persons to whom the Software is    *
              + * furnished to do so, subject to the following conditions:                 *
              + *                                                                          *
              + * The above copyright notice and this permission notice shall be included  *
              + * in all copies or substantial portions of the Software.                   *
              + *                                                                          *
              + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
              + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
              + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
              + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
              + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
              + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
              + * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
              + *                                                                          *
              + * Except as contained in this notice, the name(s) of the above copyright   *
              + * holders shall not be used in advertising or otherwise to promote the     *
              + * sale, use or other dealings in this Software without prior written       *
              + * authorization.                                                           *
              + ****************************************************************************/
              +/*
              + * $Id: test_opaque.c,v 1.4 2007/08/18 17:51:51 tom Exp $
              + *
              + * Author: Thomas E Dickey
              + *
              + * Demonstrate the opaque functions from the curses library.
              +
              +       WINDOW * wgetparent (const WINDOW *);
              +       bool is_cleared(const WINDOW *win);
              +       bool is_idcok(const WINDOW *win);
              +       bool is_idlok(const WINDOW *win);
              +       bool is_immedok(const WINDOW *win);
              +       bool is_keypad(const WINDOW *win);
              +       bool is_leaveok(const WINDOW *win);
              +       bool is_nodelay(const WINDOW *win);
              +       bool is_notimeout(const WINDOW *win);
              +       bool is_scrollok(const WINDOW *win);
              +       bool is_syncok(const WINDOW *win);
              +       int wgetscrreg (const WINDOW *, int *, int *);
              + */
              +
              +#include 
              +
              +#define BASE_Y 6
              +#define MAX_COLS 1024
              +
              +static bool
              +Quit(int ch)
              +{
              +    return (ch == 'q' || ch == QUIT || ch == ESCAPE);
              +}
              +
              +typedef bool(*BoolOpaque) (WINDOW *, int);
              +
              +static bool
              +test_opaque_cleared(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	if (mode)
              +	    wclear(win);
              +    }
              +    return is_cleared(win);
              +}
              +
              +static bool
              +test_opaque_idcok(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	idcok(win, mode);
              +    }
              +    return is_idcok(win);
              +}
              +
              +static bool
              +test_opaque_idlok(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	idlok(win, mode);
              +    }
              +    return is_idlok(win);
              +}
              +
              +static bool
              +test_opaque_immedok(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	immedok(win, mode);
              +    }
              +    return is_immedok(win);
              +}
              +
              +static bool
              +test_opaque_keypad(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	keypad(win, mode);
              +    }
              +    return is_keypad(win);
              +}
              +
              +static bool
              +test_opaque_leaveok(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	leaveok(win, mode);
              +    }
              +    return is_leaveok(win);
              +}
              +
              +static bool
              +test_opaque_nodelay(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	nodelay(win, mode);
              +    }
              +    return is_nodelay(win);
              +}
              +
              +static bool
              +test_opaque_notimeout(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	notimeout(win, mode);
              +    }
              +    return is_notimeout(win);
              +}
              +
              +static bool
              +test_opaque_scrollok(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	scrollok(win, mode);
              +    }
              +    return is_scrollok(win);
              +}
              +
              +static bool
              +test_opaque_syncok(WINDOW *win, int mode)
              +{
              +    if (mode >= 0) {
              +	syncok(win, mode);
              +    }
              +    return is_syncok(win);
              +}
              +
              +static int
              +status_y(WINDOW *stswin, int cell)
              +{
              +    return (cell % getmaxy(stswin));
              +}
              +
              +static int
              +status_x(WINDOW *stswin, int cell)
              +{
              +    return (15 * (cell / getmaxy(stswin)));
              +}
              +
              +static void
              +to_keyword(WINDOW *stswin, int cell)
              +{
              +    wmove(stswin, status_y(stswin, cell), status_x(stswin, cell));
              +}
              +
              +static void
              +to_result(WINDOW *stswin, int cell, bool before)
              +{
              +    int y = status_y(stswin, cell);
              +    int x = status_x(stswin, cell) + 11;
              +    if (!before)
              +	++x;
              +    wmove(stswin, y, x);
              +}
              +
              +static void
              +show_keyword(WINDOW *stswin, int cell, int active, const char *name)
              +{
              +    to_keyword(stswin, cell);
              +    if (active == cell)
              +	wstandout(stswin);
              +    wprintw(stswin, "%s:", name);
              +    if (active == cell)
              +	wstandend(stswin);
              +}
              +/* *INDENT-OFF* */
              +static struct {
              +    const char *name;
              +    BoolOpaque func;
              +} bool_funcs[] = {
              +    { "cleared",   test_opaque_cleared },
              +    { "idcok",     test_opaque_idcok },
              +    { "idlok",     test_opaque_idlok },
              +    { "immedok",   test_opaque_immedok },
              +    { "keypad",    test_opaque_keypad },
              +    { "leaveok",   test_opaque_leaveok },
              +    { "nodelay",   test_opaque_nodelay },
              +    { "notimeout", test_opaque_notimeout },
              +    { "scrollok",  test_opaque_scrollok },
              +    { "syncok",    test_opaque_syncok }
              +};
              +/* *INDENT-ON* */
              +
              +/*
              + * Display and/or allow update for the properties accessed in the opaque
              + * window.  Some may change state after refreshing the window, so we
              + * distinguish between them using the 'before' parameter.
              + */
              +static int
              +show_opaque(WINDOW *stswin, WINDOW *txtwin, bool before, int active)
              +{
              +    int n;
              +    int top, bottom;
              +
              +    if (before) {
              +	werase(stswin);
              +    }
              +    for (n = 0; n < (int) SIZEOF(bool_funcs); ++n) {
              +	show_keyword(stswin, n, active, bool_funcs[n].name);
              +
              +	to_result(stswin, n, before);
              +	wprintw(stswin, "%c", bool_funcs[n].func(txtwin, -1) ? 'T' : 'F');
              +    }
              +
              +    show_keyword(stswin, n, active, "wgetparent");
              +    to_result(stswin, n, TRUE);
              +    wprintw(stswin, "%p", wgetparent(txtwin));
              +
              +    ++n;
              +    show_keyword(stswin, n, active, "wgetscrreg");
              +    to_result(stswin, n, TRUE);
              +    if (wgetscrreg(txtwin, &top, &bottom) == OK)
              +	wprintw(stswin, "%d,%d", top, bottom);
              +
              +    wnoutrefresh(stswin);
              +    return active;
              +}
              +
              +static int
              +test_opaque(int level, char **argv, WINDOW *stswin)
              +{
              +    WINDOW *txtbox = 0;
              +    WINDOW *txtwin = 0;
              +    FILE *fp;
              +    int ch;
              +    int txt_x = 0, txt_y = 0;
              +    int base_y;
              +    bool in_status = FALSE;
              +    int active = 0;
              +
              +    if (argv[level] == 0) {
              +	beep();
              +	return FALSE;
              +    }
              +
              +    if (level > 1) {
              +	txtbox = newwin(LINES - BASE_Y, COLS - level, BASE_Y, level);
              +	box(txtbox, 0, 0);
              +	wnoutrefresh(txtbox);
              +
              +	txtwin = derwin(txtbox,
              +			getmaxy(txtbox) - 2,
              +			getmaxx(txtbox) - 2,
              +			1, 1);
              +	base_y = 0;
              +    } else {
              +	txtwin = stdscr;
              +	base_y = BASE_Y;
              +    }
              +
              +    keypad(txtwin, TRUE);	/* enable keyboard mapping */
              +    (void) cbreak();		/* take input chars one at a time, no wait for \n */
              +    (void) noecho();		/* don't echo input */
              +
              +    txt_y = base_y;
              +    txt_x = 0;
              +    wmove(txtwin, txt_y, txt_x);
              +
              +    if ((fp = fopen(argv[level], "r")) != 0) {
              +	while ((ch = fgetc(fp)) != EOF) {
              +	    if (waddch(txtwin, UChar(ch)) != OK) {
              +		break;
              +	    }
              +	}
              +	fclose(fp);
              +    } else {
              +	wprintw(txtwin, "Cannot open:\n%s", argv[1]);
              +    }
              +
              +    for (;;) {
              +	if (in_status) {
              +	    to_keyword(stswin, active);
              +
              +	    ch = wgetch(stswin);
              +	    show_opaque(stswin, txtwin, TRUE, active);
              +	    if (Quit(ch))
              +		break;
              +
              +	    switch (ch) {
              +	    case '\t':
              +		in_status = FALSE;
              +		break;
              +	    case KEY_DOWN:
              +	    case 'j':
              +		if (active < (int) SIZEOF(bool_funcs) - 1)
              +		    active++;
              +		else
              +		    beep();
              +		break;
              +	    case KEY_UP:
              +	    case 'k':
              +		if (active > 0)
              +		    active--;
              +		else
              +		    beep();
              +		break;
              +	    case ' ':
              +		bool_funcs[active].func(txtwin,
              +									 !bool_funcs[active].func(txtwin, -1));
              +		break;
              +	    default:
              +		beep();
              +		break;
              +	    }
              +	    show_opaque(stswin, txtwin, FALSE, in_status ? active : -1);
              +	} else {
              +	    ch = mvwgetch(txtwin, txt_y, txt_x);
              +	    show_opaque(stswin, txtwin, TRUE, -1);
              +	    if (Quit(ch))
              +		break;
              +
              +	    switch (ch) {
              +	    case '\t':
              +		in_status = TRUE;
              +		break;
              +	    case KEY_DOWN:
              +	    case 'j':
              +		if (txt_y < getmaxy(txtwin) - 1)
              +		    txt_y++;
              +		else
              +		    beep();
              +		break;
              +	    case KEY_UP:
              +	    case 'k':
              +		if (txt_y > base_y)
              +		    txt_y--;
              +		else
              +		    beep();
              +		break;
              +	    case KEY_LEFT:
              +	    case 'h':
              +		if (txt_x > 0)
              +		    txt_x--;
              +		else
              +		    beep();
              +		break;
              +	    case KEY_RIGHT:
              +	    case 'l':
              +		if (txt_x < getmaxx(txtwin) - 1)
              +		    txt_x++;
              +		else
              +		    beep();
              +		break;
              +	    case 'w':
              +		test_opaque(level + 1, argv, stswin);
              +		if (txtbox != 0) {
              +		    touchwin(txtbox);
              +		    wnoutrefresh(txtbox);
              +		} else {
              +		    touchwin(txtwin);
              +		    wnoutrefresh(txtwin);
              +		}
              +		break;
              +	    default:
              +		beep();
              +		napms(100);
              +		break;
              +	    }
              +
              +	    show_opaque(stswin, txtwin, FALSE, -1);
              +	}
              +    }
              +    if (level > 1) {
              +	delwin(txtwin);
              +	delwin(txtbox);
              +    }
              +    return TRUE;
              +}
              +
              +int
              +main(int argc, char *argv[])
              +{
              +    WINDOW *stsbox;
              +    WINDOW *stswin;
              +
              +    setlocale(LC_ALL, "");
              +
              +    if (argc < 2) {
              +	fprintf(stderr, "usage: %s file\n", argv[0]);
              +	return EXIT_FAILURE;
              +    }
              +
              +    initscr();
              +
              +    stsbox = derwin(stdscr, BASE_Y, COLS, 0, 0);
              +    box(stsbox, 0, 0);
              +    wnoutrefresh(stsbox);
              +
              +    stswin = derwin(stsbox, BASE_Y - 2, COLS - 2, 1, 1);
              +    keypad(stswin, TRUE);
              +
              +    test_opaque(1, argv, stswin);
              +
              +    endwin();
              +    ExitProgram(EXIT_SUCCESS);
              +}
              diff -Naur ncurses-5.6.orig/test/view.c ncurses-5.6/test/view.c
              --- ncurses-5.6.orig/test/view.c	2006-05-20 11:37:03.000000000 -0400
              +++ ncurses-5.6/test/view.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -50,7 +50,7 @@
                * scroll operation worked, and the refresh() code only had to do a
                * partial repaint.
                *
              - * $Id: view.c,v 1.64 2006/05/20 15:37:03 tom Exp $
              + * $Id: view.c,v 1.66 2007/07/21 17:41:55 tom Exp $
                */
               
               #include 
              @@ -229,7 +229,7 @@
                   (void) signal(SIGINT, finish);	/* arrange interrupts to terminate */
               #endif
               
              -    while ((i = getopt(argc, argv, "cin:rtT:")) != EOF) {
              +    while ((i = getopt(argc, argv, "cin:rtT:")) != -1) {
               	switch (i) {
               	case 'c':
               	    try_color = TRUE;
              @@ -374,7 +374,7 @@
               		    lptr++;
               		else
               		    break;
              -	    wscrl(stdscr, lptr - olptr);
              +	    scrl(lptr - olptr);
               	    break;
               
               	case KEY_UP:
              @@ -385,7 +385,7 @@
               		    lptr--;
               		else
               		    break;
              -	    wscrl(stdscr, lptr - olptr);
              +	    scrl(lptr - olptr);
               	    break;
               
               	case 'h':
              diff -Naur ncurses-5.6.orig/test/worm.c ncurses-5.6/test/worm.c
              --- ncurses-5.6.orig/test/worm.c	2006-07-01 18:57:24.000000000 -0400
              +++ ncurses-5.6/test/worm.c	2007-12-21 00:02:36.000000000 -0500
              @@ -1,5 +1,5 @@
               /****************************************************************************
              - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
              + * Copyright (c) 1998-2006,2007 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            *
              @@ -61,11 +61,15 @@
                 traces will be dumped.  The program stops and waits for one character of
                 input at the beginning and end of the interval.
               
              -  $Id: worm.c,v 1.41 2006/07/01 22:57:24 tom Exp $
              +  $Id: worm.c,v 1.49 2007/09/29 17:35:57 tom Exp $
               */
               
               #include 
               
              +#ifdef USE_PTHREADS
              +#include 
              +#endif
              +
               static chtype flavor[] =
               {
                   'O', '*', '#', '$', '%', '0', '@',
              @@ -77,17 +81,27 @@
               {
                   -1, 0, 1, 1, 1, 0, -1, -1
               };
              -static struct worm {
              -    int orientation, head;
              -    short *xpos, *ypos;
              -} worm[40];
              +
              +typedef struct worm {
              +    int orientation;
              +    int head;
              +    short *xpos;
              +    short *ypos;
              +    chtype attrs;
              +#ifdef USE_PTHREADS
              +    pthread_t thread;
              +#endif
              +} WORM;
              +
              +static WORM worm[40];
              +static short **refs;
               
               static const char *field;
               static int length = 16, number = 3;
               static chtype trail = ' ';
               
               #ifdef TRACE
              -static int generation, trace_start, trace_end, singlestep;
              +static int generation, trace_start, trace_end;
               #endif /* TRACE */
               /* *INDENT-OFF* */
               static const struct options {
              @@ -200,15 +214,147 @@
                   return ((float) r / 32768.);
               }
               
              +static int
              +draw_worm(WINDOW *win, void *data)
              +{
              +    WORM *w = (WORM *) data;
              +    const struct options *op;
              +
              +    int x;
              +    int y;
              +    int h;
              +
              +    int bottom = LINES - 1;
              +    int last = COLS - 1;
              +
              +    bool done = FALSE;
              +
              +    if ((x = w->xpos[h = w->head]) < 0) {
              +	wmove(win, y = w->ypos[h] = bottom, x = w->xpos[h] = 0);
              +	waddch(win, w->attrs);
              +	refs[y][x]++;
              +    } else {
              +	y = w->ypos[h];
              +    }
              +
              +    if (x > last)
              +	x = last;
              +    if (y > bottom)
              +	y = bottom;
              +
              +    if (++h == length)
              +	h = 0;
              +
              +    if (w->xpos[w->head = h] >= 0) {
              +	int x1, y1;
              +	x1 = w->xpos[h];
              +	y1 = w->ypos[h];
              +	if (y1 < LINES
              +	    && x1 < COLS
              +	    && --refs[y1][x1] == 0) {
              +	    wmove(win, y1, x1);
              +	    waddch(win, trail);
              +	}
              +    }
              +
              +    op = &(x == 0
              +	   ? (y == 0
              +	      ? upleft
              +	      : (y == bottom
              +		 ? lowleft
              +		 : left))
              +	   : (x == last
              +	      ? (y == 0
              +		 ? upright
              +		 : (y == bottom
              +		    ? lowright
              +		    : right))
              +	      : (y == 0
              +		 ? upper
              +		 : (y == bottom
              +		    ? lower
              +		    : normal))))[w->orientation];
              +
              +    switch (op->nopts) {
              +    case 0:
              +	done = TRUE;
              +	break;
              +    case 1:
              +	w->orientation = op->opts[0];
              +	break;
              +    default:
              +	w->orientation = op->opts[(int) (ranf() * (float) op->nopts)];
              +	break;
              +    }
              +
              +    if (!done) {
              +	x += xinc[w->orientation];
              +	y += yinc[w->orientation];
              +	wmove(win, y, x);
              +
              +	if (y < 0)
              +	    y = 0;
              +	waddch(win, w->attrs);
              +
              +	w->ypos[h] = y;
              +	w->xpos[h] = x;
              +	refs[y][x]++;
              +    }
              +
              +    return done;
              +}
              +
              +#if !defined(NCURSES_VERSION_PATCH) || (NCURSES_VERSION_PATCH < 20070915)
              +static int
              +use_window(WINDOW *win, int (*func) (WINDOW *, void *), void *data)
              +{
              +    return func(win, data);
              +}
              +#endif
              +
              +#ifdef USE_PTHREADS
              +static void *
              +start_worm(void *arg)
              +{
              +    for (;;) {
              +	napms(20);
              +	use_window(stdscr, draw_worm, arg);
              +    }
              +    return NULL;
              +}
              +#endif
              +
              +static bool
              +draw_all_worms(void)
              +{
              +    bool done = FALSE;
              +    int n;
              +    struct worm *w;
              +
              +#ifdef USE_PTHREADS
              +    static bool first = TRUE;
              +    if (first) {
              +	first = FALSE;
              +	for (n = 0, w = &worm[0]; n < number; n++, w++) {
              +	    int rc;
              +	    rc = pthread_create(&(w->thread), NULL, start_worm, w);
              +	}
              +    }
              +#else
              +    for (n = 0, w = &worm[0]; n < number; n++, w++) {
              +	if (use_window(stdscr, draw_worm, w))
              +	    done = TRUE;
              +    }
              +#endif
              +    return done;
              +}
              +
               int
               main(int argc, char *argv[])
               {
              -    short **ref;
                   int x, y;
                   int n;
                   struct worm *w;
              -    const struct options *op;
              -    int h;
                   short *ip;
                   int last, bottom;
                   bool done = FALSE;
              @@ -244,9 +390,6 @@
               	    trail = '.';
               	    break;
               #ifdef TRACE
              -	case 'S':
              -	    singlestep = TRUE;
              -	    break;
               	case 'T':
               	    trace_start = atoi(argv[++x]);
               	    trace_end = atoi(argv[++x]);
              @@ -297,21 +440,24 @@
                   }
               #endif /* A_COLOR */
               
              -    ref = typeMalloc(short *, LINES);
              +    refs = typeMalloc(short *, LINES);
                   for (y = 0; y < LINES; y++) {
              -	ref[y] = typeMalloc(short, COLS);
              +	refs[y] = typeMalloc(short, COLS);
               	for (x = 0; x < COLS; x++) {
              -	    ref[y][x] = 0;
              +	    refs[y][x] = 0;
               	}
                   }
               
               #ifdef BADCORNER
                   /* if addressing the lower right corner doesn't work in your curses */
              -    ref[bottom][last] = 1;
              +    refs[bottom][last] = 1;
               #endif /* BADCORNER */
               
                   for (n = number, w = &worm[0]; --n >= 0; w++) {
              -	w->orientation = w->head = 0;
              +	w->attrs = flavor[n % SIZEOF(flavor)];
              +	w->orientation = 0;
              +	w->head = 0;
              +
               	if (!(ip = typeMalloc(short, (length + 1)))) {
               	    fprintf(stderr, "%s: out of memory\n", *argv);
               	    ExitProgram(EXIT_FAILURE);
              @@ -340,48 +486,43 @@
                   }
                   napms(10);
                   refresh();
              -#ifndef TRACE
                   nodelay(stdscr, TRUE);
              -#endif
               
                   while (!done) {
              -#ifdef TRACE
              -	if (trace_start || trace_end) {
              -	    if (generation == trace_start) {
              -		trace(TRACE_CALLS);
              -		getch();
              -	    } else if (generation == trace_end) {
              -		trace(0);
              -		getch();
              -	    }
              -
              -	    if (singlestep && generation > trace_start && generation < trace_end)
              -		getch();
              -
              -	    generation++;
              -	}
              -#else
               	int ch;
               
               	if ((ch = getch()) > 0) {
              +#ifdef TRACE
              +	    if (trace_start || trace_end) {
              +		if (generation == trace_start) {
              +		    trace(TRACE_CALLS);
              +		    getch();
              +		} else if (generation == trace_end) {
              +		    trace(0);
              +		    getch();
              +		}
              +
              +		generation++;
              +	    }
              +#endif
               #ifdef KEY_RESIZE
               	    if (ch == KEY_RESIZE) {
               		if (last != COLS - 1) {
               		    for (y = 0; y <= bottom; y++) {
              -			ref[y] = typeRealloc(short, COLS, ref[y]);
              +			refs[y] = typeRealloc(short, COLS, refs[y]);
               			for (x = last + 1; x < COLS; x++)
              -			    ref[y][x] = 0;
              +			    refs[y][x] = 0;
               		    }
               		    last = COLS - 1;
               		}
               		if (bottom != LINES - 1) {
               		    for (y = LINES; y <= bottom; y++)
              -			free(ref[y]);
              -		    ref = typeRealloc(short *, LINES, ref);
              +			free(refs[y]);
              +		    refs = typeRealloc(short *, LINES, refs);
               		    for (y = bottom + 1; y < LINES; y++) {
              -			ref[y] = typeMalloc(short, COLS);
              +			refs[y] = typeMalloc(short, COLS);
               			for (x = 0; x < COLS; x++)
              -			    ref[y][x] = 0;
              +			    refs[y][x] = 0;
               		    }
               		    bottom = LINES - 1;
               		}
              @@ -400,55 +541,8 @@
               		nodelay(stdscr, TRUE);
               	    }
               	}
              -#endif /* TRACE */
               
              -	for (n = 0, w = &worm[0]; n < number; n++, w++) {
              -	    if ((x = w->xpos[h = w->head]) < 0) {
              -		move(y = w->ypos[h] = bottom, x = w->xpos[h] = 0);
              -		addch(flavor[n % SIZEOF(flavor)]);
              -		ref[y][x]++;
              -	    } else {
              -		y = w->ypos[h];
              -	    }
              -	    if (x > last)
              -		x = last;
              -	    if (y > bottom)
              -		y = bottom;
              -	    if (++h == length)
              -		h = 0;
              -	    if (w->xpos[w->head = h] >= 0) {
              -		int x1, y1;
              -		x1 = w->xpos[h];
              -		y1 = w->ypos[h];
              -		if (y1 < LINES
              -		    && x1 < COLS
              -		    && --ref[y1][x1] == 0) {
              -		    move(y1, x1);
              -		    addch(trail);
              -		}
              -	    }
              -	    op = &(x == 0 ? (y == 0 ? upleft : (y == bottom ? lowleft :
              -						left)) :
              -		   (x == last ? (y == 0 ? upright : (y == bottom ? lowright :
              -						     right)) :
              -		    (y == 0 ? upper : (y == bottom ? lower : normal))))[w->orientation];
              -	    switch (op->nopts) {
              -	    case 0:
              -		done = TRUE;
              -		continue;
              -	    case 1:
              -		w->orientation = op->opts[0];
              -		break;
              -	    default:
              -		w->orientation = op->opts[(int) (ranf() * (float) op->nopts)];
              -	    }
              -	    move(y += yinc[w->orientation], x += xinc[w->orientation]);
              -
              -	    if (y < 0)
              -		y = 0;
              -	    addch(flavor[n % SIZEOF(flavor)]);
              -	    ref[w->ypos[h] = y][w->xpos[h] = x]++;
              -	}
              +	done = draw_all_worms();
               	napms(10);
               	refresh();
                   }
              @@ -456,9 +550,9 @@
                   cleanup();
               #ifdef NO_LEAKS
                   for (y = 0; y < LINES; y++) {
              -	free(ref[y]);
              +	free(refs[y]);
                   }
              -    free(ref);
              +    free(refs);
                   for (n = number, w = &worm[0]; --n >= 0; w++) {
               	free(w->xpos);
               	free(w->ypos);