]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.6 - patch 20070407
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 8 Apr 2007 01:10:28 +0000 (01:10 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 8 Apr 2007 01:10:28 +0000 (01:10 +0000)
35 files changed:
Ada95/gen/Makefile.in
Ada95/gen/adacurses-config.in [new file with mode: 0644]
Ada95/gen/gen.c
MANIFEST
NEWS
c++/cursesmain.cc
c++/cursesp.h
c++/cursespad.cc
c++/cursesw.h
c++/demo.cc
c++/edit_cfg.sh
c++/etip.h.in
c++/internal.h
configure
configure.in
dist.mk
include/ncurses_defs
man/curs_getyx.3x
man/curs_legacy.3x [new file with mode: 0644]
man/curs_opaque.3x [new file with mode: 0644]
man/man_db.renames
man/ncurses.3x
ncurses/base/lib_addstr.c
ncurses/base/lib_color.c
ncurses/base/lib_overlay.c
ncurses/base/tries.c
ncurses/base/wresize.c
ncurses/tinfo/trim_sgr0.c
ncurses/trace/visbuf.c
progs/dump_entry.c
progs/infocmp.c
progs/tic.c
test/bs.c
test/cardfile.c
test/demo_defkey.c

index 8ffdbac19dd54f7b90d85b51d1b13f048d6450ef..82c7284ab7957b3e0b7fb1b6b753832f687e869f 100644 (file)
@@ -28,7 +28,7 @@
 #
 #  Author:  Juergen Pfeifer, 1996
 #
 #
 #  Author:  Juergen Pfeifer, 1996
 #
-#  $Id: Makefile.in,v 1.54 2007/03/31 21:53:14 tom Exp $
+#  $Id: Makefile.in,v 1.56 2007/04/07 21:45:46 tom Exp $
 #
 .SUFFIXES:
 
 #
 .SUFFIXES:
 
@@ -42,10 +42,13 @@ DESTDIR             = @DESTDIR@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
 srcdir         = @srcdir@
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
+bindir         = @bindir@
+
 ADA_INCLUDE    = $(DESTDIR)@ADA_INCLUDE@
 ADA_OBJECTS    = $(DESTDIR)@ADA_OBJECTS@
 
 INSTALL                = @INSTALL@
 ADA_INCLUDE    = $(DESTDIR)@ADA_INCLUDE@
 ADA_OBJECTS    = $(DESTDIR)@ADA_OBJECTS@
 
 INSTALL                = @INSTALL@
+INSTALL_PROG   = @INSTALL_PROGRAM@
 INSTALL_DATA   = @INSTALL_DATA@
 
 AWK            = @AWK@
 INSTALL_DATA   = @INSTALL_DATA@
 
 AWK            = @AWK@
@@ -78,6 +81,8 @@ RANLIB                = @RANLIB@
 M4             = m4
 M4FLAGS                =
 
 M4             = m4
 M4FLAGS                =
 
+ADACURSES_CONFIG = adacurses-config
+
 GENERATE       = ./gen$x '@DFT_ARG_SUFFIX@'
 DEL_ADAMODE    = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
 
 GENERATE       = ./gen$x '@DFT_ARG_SUFFIX@'
 DEL_ADAMODE    = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
 
@@ -162,7 +167,7 @@ sources:
 
 $(ADA_INCLUDE) \
 $(ADA_OBJECTS) :
 
 $(ADA_INCLUDE) \
 $(ADA_OBJECTS) :
-       $(top_srcdir)/mkinstalldirs $@
+       sh $(top_srcdir)/mkdirs.sh $@
 
 install \
 install.libs :: $(ADA_INCLUDE)
 
 install \
 install.libs :: $(ADA_INCLUDE)
@@ -180,6 +185,10 @@ install.libs :: $(ADA_OBJECTS)
        @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS)
        @-chmod u+x $(ADA_SRCDIR)/*.ali
 
        @$(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)
 uninstall \
 uninstall.libs ::
        @echo removing package $(ALIB) from $(ADA_INCLUDE)
@@ -190,6 +199,10 @@ uninstall.libs ::
        @echo removing package $(ALIB) from $(ADA_OBJECTS)
        -@cd $(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
 
        @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$x: gen.o
        @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
 
@@ -369,8 +382,8 @@ install.progs ::
 tags:
        ctags *.[ch]
 
 tags:
        ctags *.[ch]
 
-TAGS:
-       etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@      etags *.[ch]
 
 mostlyclean ::
        -rm -f a.out core gen$x *.o
 
 mostlyclean ::
        -rm -f a.out core gen$x *.o
@@ -384,7 +397,8 @@ clean :: mostlyclean
        -rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp
 
 distclean :: clean
        -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
 
 
 realclean :: distclean
 
diff --git a/Ada95/gen/adacurses-config.in b/Ada95/gen/adacurses-config.in
new file mode 100644 (file)
index 0000000..c88d85b
--- /dev/null
@@ -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 97aea3a36425183ef7bc2b0d3957f66ac43c61fb..86cfd0e11fb7fe781f11cc372752b9b8f3a7832f 100644 (file)
@@ -32,7 +32,7 @@
 
 /*
     Version Control
 
 /*
     Version Control
-    $Id: gen.c,v 1.46 2007/03/31 23:39:15 tom Exp $
+    $Id: gen.c,v 1.47 2007/04/07 22:29:23 tom Exp $
   --------------------------------------------------------------------------*/
 /*
   This program generates various record structures and constants from the
   --------------------------------------------------------------------------*/
 /*
   This program generates various record structures and constants from the
@@ -776,7 +776,8 @@ 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
   printf("   type C_ACS_Map is array (Character'Val (0) .. Character'Val (127))\n");
   printf("        of Attributed_Character;\n");
 #if USE_REENTRANT
-  printf("   function ACS_Map return C_ACS_Map;\n");
+  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, \"_nc_acs_map\");\n");
 #else
   printf("   ACS_Map : C_ACS_Map;\n");
index 35b23375354e633c15df9531b53f32da6a92c399..8743c63f1c71bb17e3023f5a77729c13ea70aa3a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4,6 +4,7 @@
 ./Ada95/README
 ./Ada95/TODO
 ./Ada95/gen/Makefile.in
 ./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
 ./Ada95/gen/gen.c
 ./Ada95/gen/html.m4
 ./Ada95/gen/normal.m4
 ./man/curs_instr.3x
 ./man/curs_inwstr.3x
 ./man/curs_kernel.3x
 ./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_mouse.3x
 ./man/curs_move.3x
+./man/curs_opaque.3x
 ./man/curs_outopts.3x
 ./man/curs_overlay.3x
 ./man/curs_pad.3x
 ./man/curs_outopts.3x
 ./man/curs_overlay.3x
 ./man/curs_pad.3x
diff --git a/NEWS b/NEWS
index ae34c501d72578dcf996612ea77e45f009f58963..0085579a5875cac84353754bdd22cf951e80542a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1109 2007/04/01 00:30:22 tom Exp $
+-- $Id: NEWS,v 1.1115 2007/04/07 23:08:57 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,44 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20060407
+       + 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).
 20070331
        + modify Ada95 binding to build with --enable-reentrant by wrapping
          global variables (bug: acs_map does not yet work).
index 7382600b986bd7db982d77d5c90b793d89bb71da..1f82d4ad84cedbcae2e4c109a5dc587dfae5f31a 100644 (file)
 #include "internal.h"
 #include "cursesapp.h"
 
 #include "internal.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursesmain.cc,v 1.13 2007/01/27 20:29:27 tom Exp $")
+#if CPP_HAS_TRY_CATCH && HAVE_IOSTREAM
+#include <iostream>
+#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 <locale.h>
 
 #if HAVE_LOCALE_H
 #include <locale.h>
@@ -62,8 +69,20 @@ int main(int argc, char* argv[])
 
     A->handleArgs(argc,argv);
     ::endwin();
 
     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();
     res = (*A)();
     ::endwin();
+#endif
 #if NO_LEAKS
     delete A;
     _nc_free_and_exit(res);
 #if NO_LEAKS
     delete A;
     _nc_free_and_exit(res);
index adb54455a1472ea2e6898b0af1c99f00369adb38..3d8828cb84e5386d3ed83d13e919fb6933df143e 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
 // * 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            *
  *                                                                          *
  * 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
 
 #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 <cursesw.h>
 
 
 #include <cursesw.h>
 
@@ -83,7 +83,7 @@ protected:
     return uptr->m_user;
   }
 
     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));
   {
     if (err==ERR)
       THROW(new NCursesPanelException (this, err));
index d875a815c74b70599357937bc8c8386a5174a7a2..3685c5e5b35fc4c4977a6130ba2703c7d238d546 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
 // * 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include "internal.h"
 
 
 #include "internal.h"
 
-#include <stdio.h>
+#include <etip.h>
+#include <cursesw.h>
 
 
-#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(),
 
 NCursesPad::NCursesPad(int nlines, int ncols)
   : NCursesWindow(),
index c275e6b61c408e19c9f8bb8cf5b0907fe2ab41ce..7e24c835f0929035ef6d0aff76a285dfa1813f75 100644 (file)
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
-// $Id: cursesw.h,v 1.43 2007/03/24 18:33:50 tom Exp $
-
-#include <stdarg.h>
-#include <stdio.h>
+// $Id: cursesw.h,v 1.44 2007/04/07 18:42:04 tom Exp $
 
 #include <etip.h>
 
 
 #include <etip.h>
 
index 1a436b5e2197354053d7385b8751d475013f4593..8fa19ad2652c0595d751fc1b1d990ff2cd539c61 100644 (file)
@@ -35,7 +35,7 @@
  *   Demo code for NCursesMenu and NCursesForm written by
  *   Juergen Pfeifer
  *
  *   Demo code for NCursesMenu and NCursesForm written by
  *   Juergen Pfeifer
  *
- * $Id: demo.cc,v 1.35 2007/01/27 20:28:51 tom Exp $
+ * $Id: demo.cc,v 1.36 2007/04/07 20:24:49 tom Exp $
  */
 
 #include "internal.h"
  */
 
 #include "internal.h"
@@ -55,30 +55,30 @@ class SillyDemo
   public:
   void run(int sleeptime) {
 
   public:
   void run(int sleeptime) {
 
-    NCursesPanel *std = new NCursesPanel();
+    NCursesPanel *mystd = new NCursesPanel();
 
     //  Make a few small demo panels
 
 
     //  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.
 
 
     //  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.
 
     //  Draw frames with titles around panels so that we can see where
     //  the panels are located.
@@ -98,56 +98,56 @@ class SillyDemo
     }
 
     //  A refresh to any valid panel updates all panels and refreshes
     }
 
     //  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.
 
     //  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;
     sleep(sleeptime);
 
     //  Show what happens when panels are deleted and moved.
 
     sleep(sleeptime);
     delete u;
-    std->refresh();
+    mystd->refresh();
 
     sleep(sleeptime);
     delete z;
 
     sleep(sleeptime);
     delete z;
-    std->refresh();
+    mystd->refresh();
 
     sleep(sleeptime);
     delete v;
 
     sleep(sleeptime);
     delete v;
-    std->refresh();
+    mystd->refresh();
 
     // show how it looks when a panel moves
     sleep(sleeptime);
 
     // 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;
 
     sleep(sleeptime);
     delete y;
-    std->refresh();
+    mystd->refresh();
 
     // show how it looks when you raise a panel
     sleep(sleeptime);
     w->top();
 
     // show how it looks when you raise a panel
     sleep(sleeptime);
     w->top();
-    std->refresh();
+    mystd->refresh();
 
     sleep(sleeptime);
     delete w;
 
     sleep(sleeptime);
     delete w;
-    std->refresh();
+    mystd->refresh();
 
     sleep(sleeptime);
     delete x;
 
 
     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);
 
     //  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 @@ public:
 
     F     = new NCursesFormField*[10];
     mft   = new MyFieldType('X');
 
     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);
 
     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();
 
     F[9]  = new NCursesFormField();
 
-    InitForm(F,TRUE,TRUE);
+    InitForm(F, TRUE, TRUE);
     boldframe();
 
     F[5]->set_fieldtype(*eft);
     boldframe();
 
     F[5]->set_fieldtype(*eft);
@@ -312,7 +312,7 @@ public:
     Soft_Label_Key_Set* S = new Soft_Label_Key_Set;
     for(int i=1; i <= S->labels(); i++) {
       char buf[8];
     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
     }
       (*S)[i] = buf;                                      // Text
       (*S)[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification
     }
@@ -336,9 +336,9 @@ public:
     const int PADSIZE  = 200;
     unsigned gridcount = 0;
 
     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++) {
 
     for (int i=0; i < PADSIZE; i++) {
       for (int j=0; j < PADSIZE; j++) {
@@ -357,7 +357,7 @@ public:
       }
     }
 
       }
     }
 
-    P.label("Pad Demo",NULL);
+    P.label("Pad Demo", NULL);
     FP();
     P.clear();
     return FALSE;
     FP();
     P.clear();
     return FALSE;
@@ -385,9 +385,9 @@ public:
   }
 
   bool action() {
   }
 
   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();
 
     w->box();
     w->refresh();
 
@@ -411,7 +411,7 @@ public:
 
     delete s;
     delete w;
 
     delete s;
     delete w;
-    delete std;
+    delete mystd;
     ::noecho();
     return FALSE;
   }
     ::noecho();
     return FALSE;
   }
@@ -444,10 +444,10 @@ public:
     I[6] = new QuitItem();
     I[7] = new NCursesMenuItem(); // Terminating empty item
 
     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();
   }
 
     P->show();
   }
 
@@ -474,7 +474,7 @@ public:
   virtual void On_Menu_Init()
   {
     NCursesWindow W(::stdscr);
   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);
     P->clrtoeol();
     for(int i=1; i<=count(); i++)
       P->addch('0' + i);
@@ -484,25 +484,25 @@ public:
 
   virtual void On_Menu_Termination()
   {
 
   virtual void On_Menu_Termination()
   {
-    P->move(0,0);
+    P->move(0, 0);
     P->clrtoeol();
     refresh();
   }
 
   virtual void On_Item_Init(NCursesMenuItem& item)
   {
     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->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->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->attroff(A_REVERSE);
-    P->printw("%1d",1+item.index());
+    P->printw("%1d", 1+item.index());
     refresh();
   }
 };
     refresh();
   }
 };
@@ -530,7 +530,7 @@ void TestApplication::init_labels(Soft_Label_Key_Set& S) const
 {
   for(int i=1; i <= S.labels(); i++) {
     char buf[8];
 {
   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
   }
     S[i] = buf;                                      // Text
     S[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification
   }
@@ -542,7 +542,7 @@ void TestApplication::title()
   const int len = ::strlen(titleText);
 
   titleWindow->bkgd(screen_titles());
   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();
 }
 
   titleWindow->noutrefresh();
 }
 
index f478d6ec79ba18e734ee1f446b095cbab96aabc9..9b2f2890e08212e08e2091db86fb668505e2f4ce 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #!/bin/sh
-# $Id: edit_cfg.sh,v 1.15 2007/01/27 18:51:04 tom Exp $
+# $Id: edit_cfg.sh,v 1.16 2007/04/07 19:08:49 tom Exp $
 ##############################################################################
 # Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.                #
 #                                                                            #
 ##############################################################################
 # Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -45,6 +45,7 @@ for name in \
        HAVE_BUILTIN_H \
        HAVE_GPP_BUILTIN_H \
        HAVE_GXX_BUILTIN_H \
        HAVE_BUILTIN_H \
        HAVE_GPP_BUILTIN_H \
        HAVE_GXX_BUILTIN_H \
+       HAVE_IOSTREAM \
        HAVE_TYPEINFO \
        HAVE_VALUES_H
 do
        HAVE_TYPEINFO \
        HAVE_VALUES_H
 do
index 8576d2e1910120de8bf25034683d8f67c0abe22b..8d5d05e0cca0bdc118b93ddec61fa9e9e35aef3d 100644 (file)
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: etip.h.in,v 1.34 2007/01/27 18:49:00 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
 
 #ifndef NCURSES_ETIP_H_incl
 #define NCURSES_ETIP_H_incl 1
 #define HAVE_GPP_BUILTIN_H 0
 #endif
 
 #define HAVE_GPP_BUILTIN_H 0
 #endif
 
+#ifndef HAVE_IOSTREAM
+#define HAVE_IOSTREAM 0
+#endif
+
 #ifndef HAVE_TYPEINFO
 #define HAVE_TYPEINFO 0
 #endif
 #ifndef HAVE_TYPEINFO
 #define HAVE_TYPEINFO 0
 #endif
@@ -323,30 +327,46 @@ public:
 };
 
 #if !((defined(__GNUG__) && defined(__EXCEPTIONS)) || defined(__SUNPRO_CC))
 };
 
 #if !((defined(__GNUG__) && defined(__EXCEPTIONS)) || defined(__SUNPRO_CC))
-#  include <iostream.h>
+#  if HAVE_IOSTREAM
+#     include <iostream>
+using std::cerr;
+using std::endl;
+#  else
+#     include <iostream.h>
+#  endif
    extern "C" void exit(int);
 #endif
 
 inline void THROW(const NCursesException *e) {
 #if defined(__GNUG__) && defined(__EXCEPTIONS)
 #  if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
    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
 #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
 #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
 #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 */
 
 #endif /* NCURSES_ETIP_H_incl */
index a14680cc504c35106fe719e33aafc873d6e0e44a..16495bcd2bbdc9bcee9939843a0275dedb602c1c 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
 // * 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: internal.h,v 1.13 2006/09/30 21:59:57 tom Exp $
+// $Id: internal.h,v 1.14 2007/04/07 18:44:17 tom Exp $
 
 #ifndef NCURSES_CPLUS_INTERNAL_H
 #define NCURSES_CPLUS_INTERNAL_H 1
 
 
 #ifndef NCURSES_CPLUS_INTERNAL_H
 #define NCURSES_CPLUS_INTERNAL_H 1
 
+#include <stdlib.h>
+
 #include <ncurses_cfg.h>
 
 #if USE_RCS_IDS
 #include <ncurses_cfg.h>
 
 #if USE_RCS_IDS
index b2eb941c27067ae178f21228a25a39ce2eced18c..5e7895e4725ca71fe1aa41069399be561a14c92f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# From configure.in Revision: 1.410 .
+# From configure.in Revision: 1.412 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by Autoconf 2.52.20061216.
 #
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by Autoconf 2.52.20061216.
 #
@@ -13973,7 +13973,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 ac_main_return=return
 
 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:13979: checking for $ac_header" >&5
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 echo "$as_me:13979: checking for $ac_header" >&5
@@ -15285,6 +15285,10 @@ if test -n "$ADA_SUBDIRS"; then
 
 fi
 
 
 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
 DIRS_TO_MAKE="lib"
 for cf_item in $cf_list_models
 do
@@ -15496,7 +15500,7 @@ DEFS=-DHAVE_CONFIG_H
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:15499: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:15503: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -15672,7 +15676,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:15675: error: ambiguous option: $1
+    { { echo "$as_me:15679: 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;}
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -15691,7 +15695,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:15694: error: unrecognized option: $1
+  -*) { { echo "$as_me:15698: 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;}
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -15787,7 +15791,7 @@ do
   "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" ;;
   "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:15790: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:15794: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -16164,7 +16168,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:16167: creating $ac_file" >&5
+    { echo "$as_me:16171: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -16182,7 +16186,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:16185: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:16189: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -16195,7 +16199,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:16198: error: cannot find input file: $f" >&5
+           { { echo "$as_me:16202: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -16261,7 +16265,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   * )   ac_file_in=$ac_file.in ;;
   esac
 
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:16264: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:16268: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -16272,7 +16276,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:16275: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:16279: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -16285,7 +16289,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:16288: error: cannot find input file: $f" >&5
+           { { echo "$as_me:16292: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -16343,7 +16347,7 @@ cat >>$CONFIG_STATUS <<\EOF
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
   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:16346: $ac_file is unchanged" >&5
+      { echo "$as_me:16350: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
index dc138c6eeefe6f8fb4b7cbe55cadd8b6f684557a..6cc9591d1588359bdf28e663096af875bf2590e4 100644 (file)
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.410 2007/03/24 23:12:57 tom Exp $
+dnl $Id: configure.in,v 1.412 2007/04/07 21:15:23 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)
 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.410 $)
+AC_REVISION($Revision: 1.412 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -1253,7 +1253,7 @@ if test -n "$CXX" ; then
                ;;
        esac
 
                ;;
        esac
 
-       AC_CHECK_HEADERS(typeinfo)
+       AC_CHECK_HEADERS(iostream typeinfo)
 
        CF_BOOL_DECL
        CF_BOOL_SIZE
 
        CF_BOOL_DECL
        CF_BOOL_SIZE
@@ -1616,6 +1616,11 @@ AC_DEFINE(HAVE_SLK_COLOR)
 ### with the appropriate compile-rules.
 
 CF_SRC_MODULES($modules_to_build)
 ### 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')
 CF_DIRS_TO_MAKE
 
 AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
diff --git a/dist.mk b/dist.mk
index d51360d934d8df1dd05f21052fc342ee54da1d78..5c5f3b5f77fc031700bdbdc77ae6faf5ed3da3e6 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.587 2007/04/01 00:32:37 tom Exp $
+# $Id: dist.mk,v 1.588 2007/04/07 17:04:04 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 6
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 6
-NCURSES_PATCH = 20070331
+NCURSES_PATCH = 20070407
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index f6828877fdc6743c629099c8eba0a841464c5b81..eddcbf2c70f08e710d2494fe6dda86254fdf8e29 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncurses_defs,v 1.32 2007/03/10 15:40:16 tom Exp $
+# $Id: ncurses_defs,v 1.33 2007/04/07 17:07:27 tom Exp $
 ##############################################################################
 # Copyright (c) 2000-2006,2007 Free Software Foundation, Inc.                #
 #                                                                            #
 ##############################################################################
 # Copyright (c) 2000-2006,2007 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -67,6 +67,7 @@ HAVE_GPM_H
 HAVE_GPP_BUILTIN_H
 HAVE_GXX_BUILTIN_H
 HAVE_HAS_KEY
 HAVE_GPP_BUILTIN_H
 HAVE_GXX_BUILTIN_H
 HAVE_HAS_KEY
+HAVE_IOSTREAM
 HAVE_ISASCII
 HAVE_ISSETUGID
 HAVE_LANGINFO_CODESET
 HAVE_ISASCII
 HAVE_ISSETUGID
 HAVE_LANGINFO_CODESET
index d83cce74db0f0f78c641cb690514eed3fc3c3b14..701b15d48ca66624fb8bb291f9d4f3945985c28b 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_getyx.3x,v 1.14 2007/03/17 20:22:45 tom Exp $
+.\" $Id: curs_getyx.3x,v 1.15 2007/04/07 23:21:34 tom Exp $
 .TH curs_getyx 3X ""
 .SH NAME
 \fBgetyx\fR,
 .TH curs_getyx 3X ""
 .SH NAME
 \fBgetyx\fR,
@@ -80,7 +80,8 @@ This implementation also provides
 \fBgetpary\fR
 for compatibility with older versions of curses.
 .SH SEE ALSO
 \fBgetpary\fR
 for compatibility with older versions of curses.
 .SH SEE ALSO
-\fBcurses\fR(3X)
+\fBcurses\fR(3X),
+\fBcurs_legacy\fR(3X)
 .\"#
 .\"# The following sets edit modes for GNU EMACS
 .\"# Local Variables:
 .\"#
 .\"# The following sets edit modes for GNU EMACS
 .\"# Local Variables:
diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x
new file mode 100644 (file)
index 0000000..251ae49
--- /dev/null
@@ -0,0 +1,93 @@
+.\"***************************************************************************
+.\" 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: curs_legacy.3x,v 1.1 2007/04/07 23:54:29 tom Exp $
+.TH curs_legacy 3X ""
+.SH NAME
+\fBgetbegx\fR,
+\fBgetbegy\fR,
+\fBgetcurx\fR,
+\fBgetcury\fR,
+\fBgetmaxx\fR,
+\fBgetmaxy\fR,
+\fBgetparx\fR,
+\fBgetpary\fR - get \fBcurses\fR cursor and window coordinates
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.sp
+\fBint getbegx(WINDOW *win);\fR
+.br
+\fBint getbegy(WINDOW *win);\fR
+.br
+\fBint getcurx(WINDOW *win);\fR
+.br
+\fBint getcury(WINDOW *win);\fR
+.br
+\fBint getmaxx(WINDOW *win);\fR
+.br
+\fBint getmaxy(WINDOW *win);\fR
+.br
+\fBint getparx(WINDOW *win);\fR
+.br
+\fBint getpary(WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+The \fBgetbegy\fR and \fBgetbegx\fR functions return the same
+data as \fBgetbegyx\fR.
+.PP
+The \fBgetcury\fR and \fBgetcurx\fR functions return the same
+data as \fBgetyx\fR.
+.PP
+The \fBgetmaxy\fR and \fBgetmaxx\fR functions return the same
+data as \fBgetmaxyx\fR.
+.PP
+The \fBgetpary\fR and \fBgetparx\fR functions return the same
+data as \fBgetparyx\fR.
+.SH RETURN VALUE
+These functions return an integer,
+or ERR if the window parameter is null.
+.SH NOTES
+All of these interfaces are provided as macros and functions.
+The macros are suppressed (and only the functions provided)
+when \fBNCURSES_OPAQUE\fR is defined.
+The standard forms such as \fBgetyx\fP must be implemented as macros,
+and (in this implementation) are defined in terms of the functions
+described here,
+to avoid reliance on internal details of the WINDOW structure.
+.SH PORTABILITY
+These functions were supported on Version 7, BSD or System V implementations.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_getyx\fR(3X),
+\fBcurs_opaque\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/curs_opaque.3x b/man/curs_opaque.3x
new file mode 100644 (file)
index 0000000..1f04fbf
--- /dev/null
@@ -0,0 +1,123 @@
+.\"***************************************************************************
+.\" 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: curs_opaque.3x,v 1.1 2007/04/07 23:19:40 tom Exp $
+.TH curs_opaque 3X ""
+.na
+.hy 0
+.SH NAME
+\fBis_cleared\fR,
+\fBis_idlok\fR,
+\fBis_idcok\fR,
+\fBis_immedok\fR,
+\fBis_keypad\fR,
+\fBis_leaveok\fR,
+\fBis_nodelay\fR,
+\fBis_timeout\fR,
+\fBis_scrollok\fR,
+\fBis_syncok\fR - \fBcurses\fR output options
+.ad
+.hy
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.sp
+\fBbool is_cleared (WINDOW *win);\fR
+.br
+\fBbool is_idcok (WINDOW *win);\fR
+.br
+\fBbool is_idlok (WINDOW *win);\fR
+.br
+\fBbool is_immedok (WINDOW *win);\fR
+.br
+\fBbool is_keypad (WINDOW *win);\fR
+.br
+\fBbool is_leaveok (WINDOW *win);\fR
+.br
+\fBbool is_nodelay (WINDOW *win);\fR
+.br
+\fBbool is_notimeout (WINDOW *win);\fR
+.br
+\fBbool is_scrollok (WINDOW *win);\fR
+.br
+\fBbool is_syncok (WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+This implementation provides functions which return properties
+set in the WINDOW structure, allowing it to be ``opaque'' if
+the symbol \fBNCURSES_OPAQUE\fR is defined:
+.TP 5
+\fBis_cleared\fR
+returns the value set in \fBclearok\fR
+.TP 5
+\fBis_idcok\fR
+returns the value set in \fBidcok\fR
+.TP 5
+\fBis_idlok\fR
+returns the value set in \fBidlok\fR
+.TP 5
+\fBis_immedok\fR
+returns the value set in \fBimmedok\fR
+.TP 5
+\fBis_keypad\fR
+returns the value set in \fBkeypad\fR
+.TP 5
+\fBis_leaveok\fR
+returns the value set in \fBleaveok\fR
+.TP 5
+\fBis_nodelay\fR
+returns the value set in \fBnodelay\fR
+.TP 5
+\fBis_notimeout\fR
+returns the value set in \fBnotimeout\fR
+.TP 5
+\fBis_scrollok\fR
+returns the value set in \fBscrollok\fR
+.TP 5
+\fBis_syncok\fR
+returns the value set in \fBsyncok\fR
+.RE
+.SH RETURN VALUE
+These functions all return TRUE or FALSE.
+.SH NOTES
+Both a macro and a function are provided for each name.
+.SH PORTABILITY
+These routines are specific to ncurses.
+They were not supported on Version 7, BSD or System V implementations.
+It is recommended that any code depending on ncurses extensions
+be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_inopts\fR(3X),
+\fBcurs_outopts\fR(3X),
+\fBcurs_window\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
index d2c602485fa4b0987b0c7a953f0bbae823962ac7..a84ae809892b77db67a5d23770b3fffca8be1b50 100644 (file)
@@ -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"), #
 #                                                                            #
 # 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.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: man_db.renames,v 0.38 2006/12/24 16:07:46 tom Exp $
+# $Id: man_db.renames,v 0.39 2007/04/07 23:06:31 tom Exp $
 # Manual-page renamings for the man_db program
 #
 # Files:
 # Manual-page renamings for the man_db program
 #
 # Files:
@@ -67,8 +67,10 @@ curs_insstr.3x                       insstr.3ncurses
 curs_instr.3x                  instr.3ncurses
 curs_inwstr.3x                 inwstr.3ncurses
 curs_kernel.3x                 kernel.3ncurses
 curs_instr.3x                  instr.3ncurses
 curs_inwstr.3x                 inwstr.3ncurses
 curs_kernel.3x                 kernel.3ncurses
+curs_legacy.3x                 legacy.3ncurses
 curs_mouse.3x                  mouse.3ncurses
 curs_move.3x                   move.3ncurses
 curs_mouse.3x                  mouse.3ncurses
 curs_move.3x                   move.3ncurses
+curs_opaque.3x                 opaque.3ncurses
 curs_outopts.3x                        outopts.3ncurses
 curs_overlay.3x                        overlay.3ncurses
 curs_pad.3x                    pad.3ncurses
 curs_outopts.3x                        outopts.3ncurses
 curs_overlay.3x                        overlay.3ncurses
 curs_pad.3x                    pad.3ncurses
index c3e017a85f542dfa9e0b1769a4db53e99eee967b..ebcaa40bb4e5333f8639364f9ed89e805cb62786 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: ncurses.3x,v 1.84 2007/03/17 20:30:11 tom Exp $
+.\" $Id: ncurses.3x,v 1.86 2007/04/07 23:08:08 tom Exp $
 .hy 0
 .TH ncurses 3X ""
 .ds n 5
 .hy 0
 .TH ncurses 3X ""
 .ds n 5
@@ -276,23 +276,23 @@ flushinp/\fBcurs_util\fR(3X)
 get_wch/\fBcurs_get_wch\fR(3X)
 get_wstr/\fBcurs_get_wstr\fR(3X)
 getattrs/\fBcurs_attr\fR(3X)
 get_wch/\fBcurs_get_wch\fR(3X)
 get_wstr/\fBcurs_get_wstr\fR(3X)
 getattrs/\fBcurs_attr\fR(3X)
-getbegx/\fBcurs_getyx\fR(3X)
-getbegy/\fBcurs_getyx\fR(3X)
+getbegx/\fBcurs_legacy\fR(3X)*
+getbegy/\fBcurs_legacy\fR(3X)*
 getbegyx/\fBcurs_getyx\fR(3X)
 getbkgd/\fBcurs_bkgd\fR(3X)
 getbkgrnd/\fBcurs_bkgrnd\fR(3X)
 getcchar/\fBcurs_getcchar\fR(3X)
 getch/\fBcurs_getch\fR(3X)
 getbegyx/\fBcurs_getyx\fR(3X)
 getbkgd/\fBcurs_bkgd\fR(3X)
 getbkgrnd/\fBcurs_bkgrnd\fR(3X)
 getcchar/\fBcurs_getcchar\fR(3X)
 getch/\fBcurs_getch\fR(3X)
-getcurx/\fBcurs_getyx\fR(3X)
-getcury/\fBcurs_getyx\fR(3X)
-getmaxx/\fBcurs_getyx\fR(3X)
-getmaxy/\fBcurs_getyx\fR(3X)
+getcurx/\fBcurs_legacy\fR(3X)*
+getcury/\fBcurs_legacy\fR(3X)*
+getmaxx/\fBcurs_legacy\fR(3X)*
+getmaxy/\fBcurs_legacy\fR(3X)*
 getmaxyx/\fBcurs_getyx\fR(3X)
 getmouse/\fBcurs_mouse\fR(3X)*
 getn_wstr/\fBcurs_get_wstr\fR(3X)
 getnstr/\fBcurs_getstr\fR(3X)
 getmaxyx/\fBcurs_getyx\fR(3X)
 getmouse/\fBcurs_mouse\fR(3X)*
 getn_wstr/\fBcurs_get_wstr\fR(3X)
 getnstr/\fBcurs_getstr\fR(3X)
-getparx/\fBcurs_getyx\fR(3X)
-getpary/\fBcurs_getyx\fR(3X)
+getparx/\fBcurs_legacy\fR(3X)*
+getpary/\fBcurs_legacy\fR(3X)*
 getparyx/\fBcurs_getyx\fR(3X)
 getstr/\fBcurs_getstr\fR(3X)
 getsyx/\fBcurs_kernel\fR(3X)
 getparyx/\fBcurs_getyx\fR(3X)
 getstr/\fBcurs_getstr\fR(3X)
 getsyx/\fBcurs_kernel\fR(3X)
@@ -330,7 +330,18 @@ insstr/\fBcurs_insstr\fR(3X)
 instr/\fBcurs_instr\fR(3X)
 intrflush/\fBcurs_inopts\fR(3X)
 inwstr/\fBcurs_inwstr\fR(3X)
 instr/\fBcurs_instr\fR(3X)
 intrflush/\fBcurs_inopts\fR(3X)
 inwstr/\fBcurs_inwstr\fR(3X)
+is_cleared/\fBcurs_opaque\fR(3X)*
+is_idcok/\fBcurs_opaque\fR(3X)*
+is_idlok/\fBcurs_opaque\fR(3X)*
+is_immedok/\fBcurs_opaque\fR(3X)*
+is_keypad/\fBcurs_opaque\fR(3X)*
+is_leaveok/\fBcurs_opaque\fR(3X)*
 is_linetouched/\fBcurs_touch\fR(3X)
 is_linetouched/\fBcurs_touch\fR(3X)
+is_nodelay/\fBcurs_opaque\fR(3X)*
+is_notimeout/\fBcurs_opaque\fR(3X)*
+is_scrollok/\fBcurs_opaque\fR(3X)*
+is_syncok/\fBcurs_opaque\fR(3X)*
+is_term_resized/\fBresizeterm\fR(3X)*
 is_wintouched/\fBcurs_touch\fR(3X)
 isendwin/\fBcurs_initscr\fR(3X)
 key_defined/\fBkey_defined\fR(3X)*
 is_wintouched/\fBcurs_touch\fR(3X)
 isendwin/\fBcurs_initscr\fR(3X)
 key_defined/\fBkey_defined\fR(3X)*
@@ -440,6 +451,7 @@ nl/\fBcurs_outopts\fR(3X)
 nocbreak/\fBcurs_inopts\fR(3X)
 nodelay/\fBcurs_inopts\fR(3X)
 noecho/\fBcurs_inopts\fR(3X)
 nocbreak/\fBcurs_inopts\fR(3X)
 nodelay/\fBcurs_inopts\fR(3X)
 noecho/\fBcurs_inopts\fR(3X)
+nofilter/\fBcurs_util\fR(3X)*
 nonl/\fBcurs_outopts\fR(3X)
 noqiflush/\fBcurs_inopts\fR(3X)
 noraw/\fBcurs_inopts\fR(3X)
 nonl/\fBcurs_outopts\fR(3X)
 noqiflush/\fBcurs_inopts\fR(3X)
 noraw/\fBcurs_inopts\fR(3X)
@@ -528,6 +540,7 @@ untouchwin/\fBcurs_touch\fR(3X)
 use_default_colors/\fBdefault_colors\fR(3X)*
 use_env/\fBcurs_util\fR(3X)
 use_extended_names/\fBcurs_extend\fR(3X)*
 use_default_colors/\fBdefault_colors\fR(3X)*
 use_env/\fBcurs_util\fR(3X)
 use_extended_names/\fBcurs_extend\fR(3X)*
+use_legacy_coding/\fBlegacy_coding\fR(3X)*
 vid_attr/\fBcurs_terminfo\fR(3X)
 vid_puts/\fBcurs_terminfo\fR(3X)
 vidattr/\fBcurs_terminfo\fR(3X)
 vid_attr/\fBcurs_terminfo\fR(3X)
 vid_puts/\fBcurs_terminfo\fR(3X)
 vidattr/\fBcurs_terminfo\fR(3X)
@@ -994,22 +1007,30 @@ A small number of local differences (that is, individual differences between
 the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR
 sections of the library man pages.
 .PP
 the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR
 sections of the library man pages.
 .PP
+This implementation also contains several extensions:
+.RS 5
+.PP
 The routine \fBhas_key\fR is not part of XPG4, nor is it present in SVr4.  See
 the \fBcurs_getch\fR(3X) manual page for details.
 .PP
 The routine \fBhas_key\fR is not part of XPG4, nor is it present in SVr4.  See
 the \fBcurs_getch\fR(3X) manual page for details.
 .PP
-The routine \fBslk_attr\fR is not part of XPG4, nor is it present in SVr4.  See
-the \fBcurs_slk\fR(3X) manual page for details.
+The routine \fBslk_attr\fR is not part of XPG4, nor is it present in SVr4.
+See the \fBcurs_slk\fR(3X) manual page for details.
 .PP
 The routines \fBgetmouse\fR, \fBmousemask\fR, \fBungetmouse\fR,
 \fBmouseinterval\fR, and \fBwenclose\fR relating to mouse interfacing are not
 .PP
 The routines \fBgetmouse\fR, \fBmousemask\fR, \fBungetmouse\fR,
 \fBmouseinterval\fR, and \fBwenclose\fR relating to mouse interfacing are not
-part of XPG4, nor are they present in SVr4.  See the \fBcurs_mouse\fR(3X)
-manual page for details.
+part of XPG4, nor are they present in SVr4.
+See the \fBcurs_mouse\fR(3X) manual page for details.
 .PP
 .PP
-The routine \fBmcprint\fR was not present in any previous curses
-implementation.  See the \fBcurs_print\fR(3X) manual page for details.
+The routine \fBmcprint\fR was not present in any previous curses implementation.
+See the \fBcurs_print\fR(3X) manual page for details.
 .PP
 .PP
-The routine \fBwresize\fR is not part of XPG4, nor is it present in SVr4.  See
-the \fBwresize\fR(3X) manual page for details.
+The routine \fBwresize\fR is not part of XPG4, nor is it present in SVr4.
+See the \fBwresize\fR(3X) manual page for details.
+.PP
+The WINDOW structure's internal details can be hidden from application
+programs.
+See \fBcurs_opaque\fR(3X) for the discussion of \fBis_scrollok\fR, etc.
+.RE
 .PP
 In historic curses versions, delays embedded in the capabilities \fBcr\fR,
 \fBind\fR, \fBcub1\fR, \fBff\fR and \fBtab\fR activated corresponding delay
 .PP
 In historic curses versions, delays embedded in the capabilities \fBcr\fR,
 \fBind\fR, \fBcub1\fR, \fBff\fR and \fBtab\fR activated corresponding delay
index b7a0b40ef948976a48e3340a431efdcbb57b4e58..7428f5206278faf1e37e519edb9e024a103f1ddb 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_addstr.c,v 1.46 2006/05/27 19:22:19 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.47 2007/04/07 17:13:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 waddnstr(WINDOW *win, const char *astr, int n)
 
 NCURSES_EXPORT(int)
 waddnstr(WINDOW *win, const char *astr, int n)
@@ -80,8 +80,7 @@ waddnstr(WINDOW *win, const char *astr, int n)
 NCURSES_EXPORT(int)
 waddchnstr(WINDOW *win, const chtype *astr, int n)
 {
 NCURSES_EXPORT(int)
 waddchnstr(WINDOW *win, const chtype *astr, int n)
 {
-    NCURSES_SIZE_T y = win->_cury;
-    NCURSES_SIZE_T x = win->_curx;
+    NCURSES_SIZE_T y, x;
     int code = OK;
     int i;
     struct ldat *line;
     int code = OK;
     int i;
     struct ldat *line;
@@ -91,6 +90,8 @@ waddchnstr(WINDOW *win, const chtype *astr, int n)
     if (!win)
        returnCode(ERR);
 
     if (!win)
        returnCode(ERR);
 
+    y = win->_cury;
+    x = win->_curx;
     if (n < 0) {
        const chtype *str;
        n = 0;
     if (n < 0) {
        const chtype *str;
        n = 0;
index ba2563c5e533d69072d000b8ed523d305a272dcf..9cae495436fecc4f3a3b80546e6a18d05fe4dbec 100644 (file)
@@ -42,7 +42,7 @@
 #include <term.h>
 #include <tic.h>
 
 #include <term.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_color.c,v 1.84 2007/03/10 19:20:15 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.85 2007/04/07 17:07:28 tom Exp $")
 
 /*
  * These should be screen structure members.  They need to be globals for
 
 /*
  * These should be screen structure members.  They need to be globals for
@@ -69,7 +69,10 @@ NCURSES_EXPORT_VAR(int) COLORS = 0;
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
+#define MAX_PALETTE    8
+
 #define OkColorHi(n)   (((n) < COLORS) && ((n) < max_colors))
 #define OkColorHi(n)   (((n) < COLORS) && ((n) < max_colors))
+#define InPalette(n)   ((n) >= 0 && (n) < MAX_PALETTE)
 
 /*
  * Given a RGB range of 0..1000, we'll normally set the individual values
 
 /*
  * Given a RGB range of 0..1000, we'll normally set the individual values
@@ -175,10 +178,10 @@ init_color_table(void)
 
     tp = (hue_lightness_saturation) ? hls_palette : cga_palette;
     for (n = 0; n < COLORS; n++) {
 
     tp = (hue_lightness_saturation) ? hls_palette : cga_palette;
     for (n = 0; n < COLORS; n++) {
-       if (n < 8) {
+       if (InPalette(n)) {
            SP->_color_table[n] = tp[n];
        } else {
            SP->_color_table[n] = tp[n];
        } else {
-           SP->_color_table[n] = tp[n % 8];
+           SP->_color_table[n] = tp[n % MAX_PALETTE];
            if (hue_lightness_saturation) {
                SP->_color_table[n].green = 100;
            } else {
            if (hue_lightness_saturation) {
                SP->_color_table[n].green = 100;
            } else {
@@ -382,7 +385,7 @@ init_pair(short pair, short f, short b)
     if (GET_SCREEN_PAIR(SP) == pair)
        SET_SCREEN_PAIR(SP, (chtype) (~0));     /* force attribute update */
 
     if (GET_SCREEN_PAIR(SP) == pair)
        SET_SCREEN_PAIR(SP, (chtype) (~0));     /* force attribute update */
 
-    if (initialize_pair) {
+    if (initialize_pair && InPalette(f) && InPalette(b)) {
        const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
 
        TR(TRACE_ATTRS,
        const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
 
        TR(TRACE_ATTRS,
index 9ecc45821591ec6c6ee025609feb53efa54522c5..22bd2f80ba72bb2d688072e42f3372bb684eda66 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_overlay.c,v 1.22 2006/10/14 20:43:31 tom Exp $")
+MODULE_ID("$Id: lib_overlay.c,v 1.23 2007/04/07 17:13:52 tom Exp $")
 
 static int
 overlap(const WINDOW *const s, WINDOW *const d, int const flag)
 
 static int
 overlap(const WINDOW *const s, WINDOW *const d, int const flag)
@@ -139,8 +139,8 @@ copywin(const WINDOW *src, WINDOW *dst,
 {
     int sx, sy, dx, dy;
     bool touched;
 {
     int sx, sy, dx, dy;
     bool touched;
-    attr_t bk = AttrOf(dst->_nc_bkgd);
-    attr_t mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0);
+    attr_t bk;
+    attr_t mask;
 
     T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
        src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
 
     T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
        src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
@@ -148,6 +148,9 @@ copywin(const WINDOW *src, WINDOW *dst,
     if (!src || !dst)
        returnCode(ERR);
 
     if (!src || !dst)
        returnCode(ERR);
 
+    bk = AttrOf(dst->_nc_bkgd);
+    mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0);
+
     /* make sure rectangle exists in source */
     if ((sminrow + dmaxrow - dminrow) > (src->_maxy + 1) ||
        (smincol + dmaxcol - dmincol) > (src->_maxx + 1)) {
     /* make sure rectangle exists in source */
     if ((sminrow + dmaxrow - dminrow) > (src->_maxy + 1) ||
        (smincol + dmaxcol - dmincol) > (src->_maxx + 1)) {
index a346decc96eaa9c45bc5536d64701f338aafd904..c00ef20b7d828ade9c44d75bfd6302d037f33495 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: tries.c,v 1.23 2006/12/30 16:26:54 tom Exp $")
+MODULE_ID("$Id: tries.c,v 1.24 2007/04/07 17:14:27 tom Exp $")
 
 /*
  * Expand a keycode into the string that it corresponds to, returning null if
 
 /*
  * Expand a keycode into the string that it corresponds to, returning null if
@@ -68,7 +68,7 @@ _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len)
        }
     }
     if (result != 0) {
        }
     }
     if (result != 0) {
-       if ((result[len] = ptr->ch) == 0)
+       if (ptr != 0 && (result[len] = ptr->ch) == 0)
            *((unsigned char *) (result + len)) = 128;
 #ifdef TRACE
        if (len == 0 && _nc_tracing != 0)
            *((unsigned char *) (result + len)) = 128;
 #ifdef TRACE
        if (len == 0 && _nc_tracing != 0)
index ca6336dc94b5d2d14a10d153a2c87190e9007075..604f7f9ae4f0405c7523f9695f9d175f0c2e653a 100644 (file)
@@ -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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: wresize.c,v 1.24 2006/10/14 20:43:31 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.25 2007/04/07 17:13:42 tom Exp $")
 
 static int
 cleanup_lines(struct ldat *data, int length)
 {
     while (--length >= 0)
 
 static int
 cleanup_lines(struct ldat *data, int length)
 {
     while (--length >= 0)
-       free(data->text);
+       free(data[length].text);
     free(data);
     return ERR;
 }
     free(data);
     return ERR;
 }
index 3ce18e070b060145581655895193549968d614de..80c8f77fbebe1f2eec543232fd17731c4c266e7c 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <tic.h>
 #include <term_entry.h>
 
 #include <tic.h>
 #include <term_entry.h>
 
-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->
 
 #undef CUR
 #define CUR tp->
@@ -247,9 +247,7 @@ _nc_trim_sgr0(TERMTYPE *tp)
        if (!rewrite_sgr(on, enter_alt_charset_mode)
            || !rewrite_sgr(off, exit_alt_charset_mode)
            || !rewrite_sgr(end, exit_alt_charset_mode)) {
        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(off);
-           FreeIfNeeded(end);
        } else if (similar_sgr(off, end)
                   && !similar_sgr(off, on)) {
            TR(TRACE_DATABASE, ("adjusting sgr(9:off) : %s", _nc_visbuf(off)));
        } 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 @@ _nc_trim_sgr0(TERMTYPE *tp)
             */
            free(off);
        }
             */
            free(off);
        }
-       free(end);
-       free(on);
+       FreeIfNeeded(end);
+       FreeIfNeeded(on);
     } else {
        /*
         * Possibly some applications are confused if sgr0 contains rmacs,
     } else {
        /*
         * Possibly some applications are confused if sgr0 contains rmacs,
index fd06af936df1cab8c08138dba4955e41381ca574..706dea0e450f1cab6d6580bf12651be24e1afcf5 100644 (file)
 #include <tic.h>
 #include <ctype.h>
 
 #include <tic.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: visbuf.c,v 1.22 2007/03/11 00:03:11 tom Exp $")
+MODULE_ID("$Id: visbuf.c,v 1.23 2007/04/07 19:25:28 tom Exp $")
 
 
+#ifdef TRACE
 static const char d_quote[] = {D_QUOTE, 0};
 static const char l_brace[] = {L_BRACE, 0};
 static const char r_brace[] = {R_BRACE, 0};
 static const char d_quote[] = {D_QUOTE, 0};
 static const char l_brace[] = {L_BRACE, 0};
 static const char r_brace[] = {R_BRACE, 0};
+#endif
 
 static char *
 _nc_vischar(char *tp, unsigned c)
 
 static char *
 _nc_vischar(char *tp, unsigned c)
index 0a3cb38059cde1d19800dfdaba101ea7a6868f73..2ae5380667bae7ecfeadd77c2852b9e019ada7ef 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <parametrized.h>      /* so is this */
 
 #include "termsort.c"          /* this C file is generated */
 #include <parametrized.h>      /* 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.80 2007/04/07 17:13:36 tom Exp $")
 
 #define INDENT                 8
 #define DISCARD(string) string = ABSENT_STRING
 
 #define INDENT                 8
 #define DISCARD(string) string = ABSENT_STRING
@@ -352,14 +352,17 @@ version_filter(PredType type, PredIdx idx)
        }
        break;
 
        }
        break;
 
+#define is_termcap(type) (idx < (int) sizeof(type##_from_termcap) && \
+                         type##_from_termcap[idx])
+
     case V_BSD:                /* BSD */
        switch (type) {
        case BOOLEAN:
     case V_BSD:                /* BSD */
        switch (type) {
        case BOOLEAN:
-           return bool_from_termcap[idx];
+           return is_termcap(bool);
        case NUMBER:
        case NUMBER:
-           return num_from_termcap[idx];
+           return is_termcap(num);
        case STRING:
        case STRING:
-           return str_from_termcap[idx];
+           return is_termcap(str);
        }
        break;
     }
        }
        break;
     }
@@ -788,11 +791,11 @@ fmt_entry(TERMTYPE *tterm,
      * Much more work should be done on this to support dumping termcaps.
      */
     if (tversion == V_HPUX) {
      * 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;
        }
            (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;
        }
            (void) sprintf(buffer, "memu=%s", memory_unlock);
            WRAP_CONCAT;
        }
index dbaf2377c2057f833201f820aeaedbdcfe535c58..e0ef1d2a88e8512e95682f4345f597a82739f5cd 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <dump_entry.h>
 
 
 #include <dump_entry.h>
 
-MODULE_ID("$Id: infocmp.c,v 1.87 2007/02/03 19:10:27 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.88 2007/04/07 17:07:30 tom Exp $")
 
 #define L_CURL "{"
 #define R_CURL "}"
 
 #define L_CURL "{"
 #define R_CURL "}"
@@ -1083,7 +1083,6 @@ dump_initializers(TERMTYPE *term)
            }
            *tp++ = '"';
            *tp = '\0';
            }
            *tp++ = '"';
            *tp = '\0';
-           size += (strlen(term->Strings[n]) + 1);
            (void) printf("static char %-20s[] = %s;\n",
                          string_variable(ExtStrname(term, n, strnames)), buf);
        }
            (void) printf("static char %-20s[] = %s;\n",
                          string_variable(ExtStrname(term, n, strnames)), buf);
        }
index 1b03f380725e589a181cb623a20daaa96f9f1424..ae6559ce2cc9c2e8238fd036bb2952f4581e4482 100644 (file)
@@ -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            *
  *                                                                          *
  * 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 <dump_entry.h>
 #include <transform.h>
 
 #include <dump_entry.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.131 2006/12/02 22:13:17 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.132 2007/04/07 17:14:27 tom Exp $")
 
 const char *_nc_progname = "tic";
 
 
 const char *_nc_progname = "tic";
 
@@ -353,11 +353,24 @@ open_input(const char *filename)
     return fp;
 }
 
     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 */
 /* Parse the "-e" option-value into a list of names */
-static const char **
+static char **
 make_namelist(char *src)
 {
 make_namelist(char *src)
 {
-    const char **dst = 0;
+    char **dst = 0;
 
     char *s, *base;
     unsigned pass, n, nn;
 
     char *s, *base;
     unsigned pass, n, nn;
@@ -374,11 +387,13 @@ make_namelist(char *src)
                if ((s = stripped(buffer)) != 0) {
                    if (dst != 0)
                        dst[nn] = s;
                if ((s = stripped(buffer)) != 0) {
                    if (dst != 0)
                        dst[nn] = s;
+                   else
+                       free(s);
                    nn++;
                }
            }
            if (pass == 1) {
                    nn++;
                }
            }
            if (pass == 1) {
-               dst = typeCalloc(const char *, nn + 1);
+               dst = typeCalloc(char *, nn + 1);
                rewind(fp);
            }
        }
                rewind(fp);
            }
        }
@@ -401,10 +416,10 @@ make_namelist(char *src)
                    break;
            }
            if (pass == 1)
                    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]);
        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 @@ make_namelist(char *src)
 }
 
 static bool
 }
 
 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;
 /* does entry in needle list match |-separated field in haystack? */
 {
     bool code = FALSE;
@@ -468,7 +483,7 @@ main(int argc, char *argv[])
     bool limited = TRUE;
     char *tversion = (char *) NULL;
     const char *source_file = "terminfo";
     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;
     char *outdir = (char *) NULL;
     bool check_only = FALSE;
     bool suppress_untranslatable = FALSE;
@@ -784,6 +799,9 @@ main(int argc, char *argv[])
        else
            fprintf(log_fp, "No entries written\n");
     }
        else
            fprintf(log_fp, "No entries written\n");
     }
+#if NO_LEAKS
+    free_namelist(namelst);
+#endif
     cleanup();
     ExitProgram(EXIT_SUCCESS);
 }
     cleanup();
     ExitProgram(EXIT_SUCCESS);
 }
index ce74f566f5a7bbf1969b49c7f113bc0ab631efd1..4330f902d7c180f253d0db03bb4729391b0b353d 100644 (file)
--- a/test/bs.c
+++ b/test/bs.c
@@ -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            *
  *                                                                          *
  * 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
  *
  * 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 <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -459,7 +459,7 @@ initgame(void)
        do {
            c = getch();
        } while
        do {
            c = getch();
        } while
-           (!strchr("hjklrR", c) || c == FF);
+           (!(strchr("hjklrR", c) || c == FF));
 
        if (c == FF) {
            (void) clearok(stdscr, TRUE);
 
        if (c == FF) {
            (void) clearok(stdscr, TRUE);
index 2985b2ed8f261718bc9fb83a29c8c4e35b913d52..04816949d3552d64c5986d75697f675757c255cf 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: cardfile.c,v 1.29 2007/03/10 19:16:45 tom Exp $
+ * $Id: cardfile.c,v 1.30 2007/04/07 17:07:34 tom Exp $
  *
  * File format: text beginning in column 1 is a title; other text is content.
  */
  *
  * File format: text beginning in column 1 is a title; other text is content.
  */
@@ -136,13 +136,15 @@ add_content(CARD * card, const char *content)
        if ((offset = strlen(card->content)) != 0) {
            total += 1 + offset;
            card->content = (char *) realloc(card->content, total + 1);
        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);
        }
        } 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);
     }
 }
 
     }
 }
 
index 7f70f8ac863932657485321b20b12cf93375c278..00c1cf300ebfed5fefb962c3c9f93b8b6cb26f0c 100644 (file)
@@ -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            *
  *                                                                          *
  * 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.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_defkey.c,v 1.16 2006/04/01 19:08:03 tom Exp $
+ * $Id: demo_defkey.c,v 1.17 2007/04/07 17:13:03 tom Exp $
  *
  * Demonstrate the define_key() function.
  * Thomas Dickey - 2002/11/23
  *
  * Demonstrate the define_key() function.
  * Thomas Dickey - 2002/11/23
@@ -143,13 +143,12 @@ really_define_key(WINDOW *win, const char *new_string, int code)
                code_name);
     }
     log_last_line(win);
                code_name);
     }
     log_last_line(win);
+
     if (vis_string != 0) {
        free(vis_string);
        vis_string = 0;
     }
 
     if (vis_string != 0) {
        free(vis_string);
        vis_string = 0;
     }
 
-    if (vis_string != 0)
-       free(vis_string);
     vis_string = visible(new_string);
     if ((rc = key_defined(new_string)) > 0) {
        wprintw(win, "%s was bound to %s\n", vis_string, keyname(rc));
     vis_string = visible(new_string);
     if ((rc = key_defined(new_string)) > 0) {
        wprintw(win, "%s was bound to %s\n", vis_string, keyname(rc));