ncurses 6.0 - patch 20150627
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 28 Jun 2015 01:06:27 +0000 (01:06 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 28 Jun 2015 01:06:27 +0000 (01:06 +0000)
+ modify configure script to remove deprecated ABI 5 symbols when
  building ABI 6.
+ add symbols _nc_Default_Field, _nc_Default_Form, _nc_has_mouse to
  map-files, but marked as deprecated so that they can easily be
  suppressed from ABI 6 builds (Debian #788610).
+ comment-out "screen.xterm" entry, and inherit screen.xterm-256color
  from xterm-new (report by Richard Birkett) -TD
+ modify read_entry.c to set the error-return to -1 if no terminal
  databases were found, as documented for setupterm.
+ add test_setupterm.c to demonstrate normal/error returns from the
  setupterm and restartterm functions.
+ amend cleanup change from 20110813 which removed redundant definition
  of ret_error, etc., from tinfo_driver.c, to account for the fact that
  it should return a bool rather than int (report/analysis by Johannes
  Schindelin).

31 files changed:
MANIFEST
NEWS
VERSION
aclocal.m4
configure
configure.in
dist.mk
misc/terminfo.src
ncurses/base/lib_restart.c
ncurses/curses.priv.h
ncurses/tinfo/lib_setup.c
ncurses/tinfo/read_entry.c
ncurses/tinfo/tinfo_driver.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.map
package/ncurses.spec
package/ncurses.sym
package/ncursest.map
package/ncursest.sym
package/ncursestw.map
package/ncursestw.sym
package/ncursesw.map
package/ncursesw.sym
test/README
test/modules
test/programs
test/test_setupterm.c [new file with mode: 0644]

index 5d6b1865491ad111e1c38fb32025e4905cbfdde5..5ffc508ad2478675301f3c3453255929e084bcc0 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./test/test_instr.c
 ./test/test_inwstr.c
 ./test/test_opaque.c
+./test/test_setupterm.c
 ./test/test_vid_puts.c
 ./test/test_vidputs.c
 ./test/testaddch.c
diff --git a/NEWS b/NEWS
index b489609b5986d9d267b4b8f1f341ef26a6cacfd4..8f50430aa86a745c93b722a69542f10c30b05636 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2441 2015/06/14 01:13:38 tom Exp $
+-- $Id: NEWS,v 1.2448 2015/06/27 23:12:23 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,23 @@ 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.
 
+20150627
+       + modify configure script to remove deprecated ABI 5 symbols when
+         building ABI 6.
+       + add symbols _nc_Default_Field, _nc_Default_Form, _nc_has_mouse to
+         map-files, but marked as deprecated so that they can easily be
+         suppressed from ABI 6 builds (Debian #788610).
+       + comment-out "screen.xterm" entry, and inherit screen.xterm-256color
+         from xterm-new (report by Richard Birkett) -TD
+       + modify read_entry.c to set the error-return to -1 if no terminal
+         databases were found, as documented for setupterm.
+       + add test_setupterm.c to demonstrate normal/error returns from the
+         setupterm and restartterm functions.
+       + amend cleanup change from 20110813 which removed redundant definition
+         of ret_error, etc., from tinfo_driver.c, to account for the fact that
+         it should return a bool rather than int (report/analysis by Johannes
+         Schindelin).
+
 20150613
        + fix overflow warning for OSX with lib_baudrate.c (cf: 20010630).
        + modify script used to generate map/sym files to mark 5.9.20150530 as
diff --git a/VERSION b/VERSION
index 875b64d32b133b532b6e4a149801d1770c2d93ef..dc1c3ea961ada54ce59aa1e01a96a016ed199af4 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20150613
+5:0:9  6.0     20150627
index c886b205e9b8b6aea37591c018b69126afa4bee0..c7b9e24e1a2651fcb18e14e4afa4a7970c842e90 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.758 2015/06/06 23:27:44 tom Exp $
+dnl $Id: aclocal.m4,v 1.759 2015/06/27 23:10:38 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -3228,7 +3228,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
        AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 81 updated: 2015/04/30 20:30:18
+dnl CF_LIB_RULES version: 82 updated: 2015/06/27 19:09:23
 dnl ------------
 dnl Append definitions and rules for the given models to the subdirectory
 dnl Makefiles, and the recursion rule for the top-level Makefile.  If the
@@ -3285,6 +3285,7 @@ do
                if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
                then
                        cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([[WT]]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
+                       cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
                fi
 
                if test "x$WILDCARD_SYMS" = xno
index d21f33afd90ed4507320bd93780d8f8f289c3f8b..ecf0f449068e6475e838ac3a30a4d05931b43a6f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.617 .
+# From configure.in Revision: 1.618 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by Autoconf 2.52.20141204.
 #
@@ -22275,19 +22275,10 @@ cf_filter_syms=no
 if test -n "$RESULTING_SYMS"
 then
        cf_filter_syms=$cf_dft_filter_syms
-       if test "$cf_filter_syms" = yes
-       then
-               test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
-
-echo "${as_me:-configure}:22282: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
+       test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
 
-               cf_filter_syms=yes
-       else
-               test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
+echo "${as_me:-configure}:22280: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
 
-echo "${as_me:-configure}:22288: testing will map symbols to default ABI ..." 1>&5
-
-       fi
 fi
 
 if test "x$WILDCARD_SYMS" = xno
@@ -22388,7 +22379,7 @@ DEFS=-DHAVE_CONFIG_H
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:22391: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:22382: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -22564,7 +22555,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:22567: error: ambiguous option: $1
+    { { echo "$as_me:22558: 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;}
@@ -22583,7 +22574,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:22586: error: unrecognized option: $1
+  -*) { { echo "$as_me:22577: 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;}
@@ -22701,7 +22692,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" ;;
-  *) { { echo "$as_me:22704: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:22695: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -23156,7 +23147,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:23159: creating $ac_file" >&5
+    { echo "$as_me:23150: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -23174,7 +23165,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:23177: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:23168: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -23187,7 +23178,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:23190: error: cannot find input file: $f" >&5
+           { { echo "$as_me:23181: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -23203,7 +23194,7 @@ cat >>$CONFIG_STATUS <<\EOF
       if test -n "$ac_seen"; then
         ac_used=`grep '@datarootdir@' $ac_item`
         if test -z "$ac_used"; then
-          { echo "$as_me:23206: WARNING: datarootdir was used implicitly but not set:
+          { echo "$as_me:23197: WARNING: datarootdir was used implicitly but not set:
 $ac_seen" >&5
 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
 $ac_seen" >&2;}
@@ -23212,7 +23203,7 @@ $ac_seen" >&2;}
       fi
       ac_seen=`grep '${datarootdir}' $ac_item`
       if test -n "$ac_seen"; then
-        { echo "$as_me:23215: WARNING: datarootdir was used explicitly but not set:
+        { echo "$as_me:23206: WARNING: datarootdir was used explicitly but not set:
 $ac_seen" >&5
 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
 $ac_seen" >&2;}
@@ -23249,7 +23240,7 @@ s,@INSTALL@,$ac_INSTALL,;t t
             ac_init=`egrep '[  ]*'$ac_name'[   ]*=' $ac_file`
             if test -z "$ac_init"; then
               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
-              { echo "$as_me:23252: WARNING: Variable $ac_name is used but was not set:
+              { echo "$as_me:23243: WARNING: Variable $ac_name is used but was not set:
 $ac_seen" >&5
 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
 $ac_seen" >&2;}
@@ -23260,7 +23251,7 @@ $ac_seen" >&2;}
     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
     if test -s $tmp/out; then
       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
-      { echo "$as_me:23263: WARNING: Some variables may not be substituted:
+      { echo "$as_me:23254: WARNING: Some variables may not be substituted:
 $ac_seen" >&5
 echo "$as_me: WARNING: Some variables may not be substituted:
 $ac_seen" >&2;}
@@ -23309,7 +23300,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:23312: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:23303: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -23320,7 +23311,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:23323: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:23314: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -23333,7 +23324,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:23336: error: cannot find input file: $f" >&5
+           { { echo "$as_me:23327: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -23391,7 +23382,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
-      { echo "$as_me:23394: $ac_file is unchanged" >&5
+      { echo "$as_me:23385: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -23494,6 +23485,7 @@ do
                if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
                then
                        cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
+                       cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
                fi
 
                if test "x$WILDCARD_SYMS" = xno
@@ -23728,7 +23720,7 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
                                (cygdll|msysdll|mingw)
                                        test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
 
-echo "${as_me:-configure}:23731: testing overriding CXX_MODEL to SHARED ..." 1>&5
+echo "${as_me:-configure}:23723: testing overriding CXX_MODEL to SHARED ..." 1>&5
 
                                        with_shared_cxx=yes
                                        ;;
index 00c44791a45152723a24f38df91261fc48b493ea..24181b9460e98126fec58f70d74235eb6044a5d5 100644 (file)
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.617 2015/06/06 21:29:03 tom Exp $
+dnl $Id: configure.in,v 1.618 2015/06/27 22:59:56 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.52.20030208)
-AC_REVISION($Revision: 1.617 $)
+AC_REVISION($Revision: 1.618 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -2160,13 +2160,7 @@ cf_filter_syms=no
 if test -n "$RESULTING_SYMS"
 then
        cf_filter_syms=$cf_dft_filter_syms
-       if test "$cf_filter_syms" = yes
-       then
-               CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
-               cf_filter_syms=yes
-       else
-               CF_VERBOSE(will map symbols to default ABI)
-       fi
+       CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
 fi
 
 if test "x$WILDCARD_SYMS" = xno
diff --git a/dist.mk b/dist.mk
index 2baa62a9c632ccb2af3226e6a7a7414b089d17a6..e6ed1c68a76bf2efd85eba49dc8c8c86d159ffd2 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1056 2015/06/13 10:39:10 tom Exp $
+# $Id: dist.mk,v 1.1057 2015/06/26 08:39:24 tom Exp $
 # 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 = 6
 NCURSES_MINOR = 0
-NCURSES_PATCH = 20150613
+NCURSES_PATCH = 20150627
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 6f2a41eb7fb52c1b2642d10e73c497919ccea124..c96aa0d6105aec4c7bcf043cebf888d4154c4cf6 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.545 $
-#      $Date: 2015/05/30 20:30:55 $
+#      $Revision: 1.546 $
+#      $Date: 2015/06/27 18:57:21 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -6013,7 +6013,7 @@ screen-256color-bce-s|GNU Screen with 256 colors using BCE and status line,
        bce, use=xterm+256setaf, use=screen-s,
 
 screen.xterm-256color|GNU Screen with xterm using 256 colors,
-       use=xterm+256setaf, use=screen.xterm,
+       use=xterm+256setaf, use=screen.xterm-new,
 
 screen.konsole-256color|GNU Screen with konsole using 256 colors,
        use=xterm+256setaf, use=screen.konsole,
@@ -6071,8 +6071,8 @@ screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm,
        invis@, kIC@, kNXT@, kPRV@, meml@, memu@,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;m,
        E3@, use=screen+italics, use=screen+fkeys, use=xterm-new,
-screen.xterm|screen for modern xterm,
-       use=screen.xterm-new,
+#:screen.xterm|screen for modern xterm,
+#:     use=screen.xterm-new,
 # xterm-r6 does not really support khome/kend unless it is propped up by
 # the translations resource.
 screen.xterm-r6|screen customized for X11R6 xterm,
@@ -23689,4 +23689,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      + remove spurious "%;" from st entry (report by Daniel Pitts) -TD
 #      + add vte-2014, update vte to use that -TD
 #
+# 2015-6-27
+#      + comment-out "screen.xterm" entry, and inherit screen.xterm-256color
+#        from xterm-new (report by Richard Birkett) -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index 3a3756e385e83dba0b9efdd5eff79dcdc64e50d6..5bfb0788266d0d89cafff7128b99f5fc412ec741 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2015 Free 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,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_restart.c,v 1.15 2012/12/08 20:40:06 tom Exp $")
+MODULE_ID("$Id: lib_restart.c,v 1.16 2015/06/27 18:12:15 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
@@ -54,6 +54,7 @@ NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
     TERMINAL *new_term = 0;
 #endif
 
+    START_TRACE();
     T((T_CALLED("restartterm(%p,%s,%d,%p)"),
        (void *) SP_PARM,
        termp,
@@ -110,6 +111,7 @@ NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
 NCURSES_EXPORT(int)
 restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
 {
+    START_TRACE();
     return NCURSES_SP_NAME(restartterm) (CURRENT_SCREEN, termp, filenum, errret);
 }
 #endif
index 66d15944e516c291d7762fbc9e2a6314f4a7104d..ec17d884c071c2d1db99ad6585856cbfcf94960c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2015 Free 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 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.546 2014/11/01 13:52:34 tom Exp $
+ * $Id: curses.priv.h,v 1.547 2015/06/27 01:22:16 tom Exp $
  *
  *     curses.priv.h
  *
@@ -1947,9 +1947,10 @@ extern NCURSES_EXPORT(void)   _nc_tinfo_cmdch(TERMINAL *, int);
 extern NCURSES_EXPORT(int)    _nc_ripoffline(int, int(*)(WINDOW*, int));
 
 /* lib_setup.c */
+#define SETUP_FAIL ERR
 #define ret_error(code, fmt, arg)      if (errret) {\
                                            *errret = code;\
-                                           returnCode(ERR);\
+                                           returnCode(SETUP_FAIL);\
                                        } else {\
                                            fprintf(stderr, fmt, arg);\
                                            exit(EXIT_FAILURE);\
@@ -1959,7 +1960,7 @@ extern NCURSES_EXPORT(int)    _nc_ripoffline(int, int(*)(WINDOW*, int));
 
 #define ret_error0(code, msg)          if (errret) {\
                                            *errret = code;\
-                                           returnCode(ERR);\
+                                           returnCode(SETUP_FAIL);\
                                        } else {\
                                            fprintf(stderr, msg);\
                                            exit(EXIT_FAILURE);\
index b0acc7bab8b3a8e82bb477e3831ccb03b5d2c3a0..0a0a1f5badb50acade9f406776c5a5708c82509b 100644 (file)
@@ -48,7 +48,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.162 2015/05/17 17:15:03 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.164 2015/06/27 18:10:55 tom Exp $")
 
 /****************************************************************************
  *
@@ -706,7 +706,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
            termp->Filedes = (short) Filedes;
            termp->_termname = strdup(tname);
        } else {
-           ret_error0(TGETENT_ERR,
+           ret_error0(errret ? *errret : TGETENT_ERR,
                       "Could not find any driver to handle this terminal.\n");
        }
 #else
@@ -865,5 +865,6 @@ _nc_setupterm(NCURSES_CONST char *tname,
 NCURSES_EXPORT(int)
 setupterm(NCURSES_CONST char *tname, int Filedes, int *errret)
 {
+    START_TRACE();
     return _nc_setupterm(tname, Filedes, errret, FALSE);
 }
index e5c26b5fa6f2415c7fbebaed3c992027aafae1bd..81fdc46c93b729c88c3926b16c3273610706bd86 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2015 Free 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,7 +41,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.128 2014/06/14 22:30:41 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.129 2015/06/27 16:16:40 tom Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
@@ -626,6 +626,7 @@ _nc_read_entry(const char *const name, char *const filename, TERMTYPE *const tp)
        const char *path;
 
        _nc_first_db(&state, &offset);
+       code = TGETENT_ERR;
        while ((path = _nc_next_db(&state, &offset)) != 0) {
            TR(TRACE_DATABASE, ("_nc_read_tic_entry path=%s, name=%s", path, name));
            code = _nc_read_tic_entry(filename, PATH_MAX, path, name, tp);
index a17accd358e543be61110f942c45e97d5f9a60c1..c6a1c22b66bfefd90c3645d0f43efcef5c2e5dd6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2008-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 2008-2014,2015 Free 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 @@
 # endif
 #endif
 
-MODULE_ID("$Id: tinfo_driver.c,v 1.39 2014/09/27 21:58:57 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.40 2015/06/27 01:20:41 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -113,6 +113,9 @@ drv_Name(TERMINAL_CONTROL_BLOCK * TCB)
     return "tinfo";
 }
 
+#undef SETUP_FAIL
+#define SETUP_FAIL FALSE
+
 static bool
 drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
 {
@@ -121,6 +124,7 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
     TERMINAL *termp;
     SCREEN *sp;
 
+    START_TRACE();
     T((T_CALLED("tinfo::drv_CanHandle(%p)"), TCB));
 
     assert(TCB != 0 && tname != 0);
@@ -1186,7 +1190,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
     if ((pthread_self) && (pthread_kill) && (pthread_equal))
        _nc_globals.read_thread = pthread_self();
 # endif
-    n = read(sp->_ifd, &c2, (size_t) 1);
+    n = (int) read(sp->_ifd, &c2, (size_t) 1);
 #if USE_PTHREADS_EINTR
     _nc_globals.read_thread = 0;
 #endif
index bb9aa4d8255709cabdc3bb2883be29852262514c..0ba6056f8bd530425bd47b3fee110621dfbaa872 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20150613) unstable; urgency=low
+ncurses6 (6.0+20150627) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Jun 2015 06:39:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 26 Jun 2015 04:39:24 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index bb9aa4d8255709cabdc3bb2883be29852262514c..0ba6056f8bd530425bd47b3fee110621dfbaa872 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20150613) unstable; urgency=low
+ncurses6 (6.0+20150627) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Jun 2015 06:39:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 26 Jun 2015 04:39:24 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index d346773e031d51a4b166207dcf5cfb110bd81ea2..a9db3e2d8a85148775849c2729daf70099f8af9d 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20150613) unstable; urgency=low
+ncurses6 (6.0+20150627) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Jun 2015 06:39:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 26 Jun 2015 04:39:24 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 4320e8cd673f5cc4b8f78164e66ed947fac85276..a447517833a99a9599a54ff58b143c978fed3f02 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.109 2015/06/13 10:39:10 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.110 2015/06/26 08:39:24 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2015"\r
-!define VERSION_MMDD  "0613"\r
+!define VERSION_MMDD  "0627"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 6756acb0a5d5a742771b9f812cc062b0523dcfee..60a5a1aa3ee9a99482f02d749e99383ba3417c9a 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20150613
+Release: 20150627
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 99e0fecc8a044198c2a801cfe327bd09c3f22971..a59484f8ecba8455b98973f5c42ec02f0593c64e 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncurses.map,v 1.33 2015/06/13 21:23:49 tom Exp $
+# $Id: ncurses.map,v 1.34 2015/06/27 22:28:50 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -73,7 +73,10 @@ NCURSES_5.0.19991023 {
                TYPE_IPV4;
                TYPE_NUMERIC;
                TYPE_REGEXP;
+               _nc_Default_Field;      # deprecated in ABI6
+               _nc_Default_Form;       # deprecated in ABI6
                _nc_free_and_exit;
+               _nc_has_mouse;  # deprecated in ABI6
                _nc_panelhook;
                _nc_ripoffline;
                addch;
@@ -470,9 +473,7 @@ NCURSES_5.0.19991023 {
                _nc_Connect_Items;
                _nc_Copy_Argument;
                _nc_Copy_Type;
-               _nc_Default_Field;
                _nc_Default_FieldType;
-               _nc_Default_Form;
                _nc_Default_Item;
                _nc_Default_Menu;
                _nc_Disconnect_Items;
@@ -497,7 +498,6 @@ NCURSES_5.0.19991023 {
                _nc_do_color;
                _nc_expanded;
                _nc_freewin;
-               _nc_has_mouse;
                _nc_hash_map;
                _nc_lib_traceatr;
                _nc_lib_tracedmp;
index 3f6e7df10e79bf6b24838a121a0b59aabd90ea51..323aaeb4972471893644e7d1d8295907a8dbcc84 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20150613
+Release: 20150627
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 6124a0593184ef89b725efd8151567eba374eb94..1e2cbf8cc16eebdd070682676be3303d25bd1cf3 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncurses.sym,v 1.22 2015/06/13 21:04:35 tom Exp $
+# $Id: ncurses.sym,v 1.23 2015/06/27 22:30:44 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -51,7 +51,7 @@
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-wgetch-events --with-hashed-db --with-termlib --with-ticlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --with-broken_linker --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.20150606)
+# Configure options (6.0.current)
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --with-broken_linker --with-hashed-db --with-termlib --with-trace
@@ -77,6 +77,8 @@ TYPE_IPV4
 TYPE_NUMERIC
 TYPE_REGEXP
 UP
+_nc_Default_Field
+_nc_Default_Form
 _nc_access
 _nc_add_to_try
 _nc_align_termtype
@@ -128,6 +130,7 @@ _nc_get_type
 _nc_getenv_num
 _nc_globals
 _nc_handle_sigwinch
+_nc_has_mouse
 _nc_head
 _nc_home_terminfo
 _nc_info_hash_table
index 4b50c78b122987826db2fa069b940cde18c435cf..eabdf0281af8cb24311ea33817a0ec8377383bcf 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursest.map,v 1.28 2015/06/13 22:19:28 tom Exp $
+# $Id: ncursest.map,v 1.29 2015/06/27 22:23:14 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -472,8 +472,11 @@ NCURSEST_5.7.20081102 {
                TYPE_REGEXP;
                _nc_COLORS;
                _nc_COLOR_PAIRS;
+               _nc_Default_Field;      # deprecated in ABI6
+               _nc_Default_Form;       # deprecated in ABI6
                _nc_ESCDELAY;
                _nc_free_and_exit;
+               _nc_has_mouse;  # deprecated in ABI6
                _nc_optimize_enable;
                _nc_panelhook;
                _nc_ripoffline;
@@ -903,9 +906,7 @@ NCURSEST_5.7.20081102 {
                _nc_Connect_Items;
                _nc_Copy_Argument;
                _nc_Copy_Type;
-               _nc_Default_Field;
                _nc_Default_FieldType;
-               _nc_Default_Form;
                _nc_Default_Item;
                _nc_Default_Menu;
                _nc_Disconnect_Items;
@@ -935,7 +936,6 @@ NCURSEST_5.7.20081102 {
                _nc_expanded;
                _nc_fifo_dump;
                _nc_freewin;
-               _nc_has_mouse;
                _nc_hash_map;
                _nc_insert_ch;
                _nc_linedump;
index 73498ef33b009edc7316452d269eab7601c70bf8..498f07a1b15517202b36fd55b41bcc10e7e4182c 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursest.sym,v 1.23 2015/06/13 21:13:29 tom Exp $
+# $Id: ncursest.sym,v 1.24 2015/06/27 22:30:00 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -35,7 +35,7 @@
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-weak-symbols --with-pthread --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --enable-wgetch-events --with-hashed-db --with-pthread --with-termlib --with-ticlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --with-broken_linker --with-pthread --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.20150606)
+# Configure options (6.0.current)
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --enable-weak-symbols --with-pthread --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --enable-weak-symbols --with-pthread --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-reentrant --enable-sp-funcs --enable-weak-symbols --with-pthread --with-termlib --with-trace
@@ -60,6 +60,8 @@ UP
 _nc_COLORS
 _nc_COLOR_PAIRS
 _nc_COLS
+_nc_Default_Field
+_nc_Default_Form
 _nc_ESCDELAY
 _nc_LINES
 _nc_TABSIZE
@@ -118,6 +120,7 @@ _nc_get_type
 _nc_getenv_num
 _nc_globals
 _nc_handle_sigwinch
+_nc_has_mouse
 _nc_head
 _nc_home_terminfo
 _nc_infotocap
index 7ddcbfe1225dcadb75fddb9cc35603f0e6aa451c..a2be0f7a3f01334f90bb19ccf4cd59b532a59efc 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursestw.map,v 1.29 2015/06/13 22:17:50 tom Exp $
+# $Id: ncursestw.map,v 1.30 2015/06/27 22:27:57 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -478,8 +478,11 @@ NCURSESTW_5.7.20081102 {
                TYPE_REGEXP;
                _nc_COLORS;
                _nc_COLOR_PAIRS;
+               _nc_Default_Field;      # deprecated in ABI6
+               _nc_Default_Form;       # deprecated in ABI6
                _nc_ESCDELAY;
                _nc_free_and_exit;
+               _nc_has_mouse;  # deprecated in ABI6
                _nc_optimize_enable;
                _nc_panelhook;
                _nc_ripoffline;
@@ -1008,9 +1011,7 @@ NCURSESTW_5.7.20081102 {
                _nc_Connect_Items;
                _nc_Copy_Argument;
                _nc_Copy_Type;
-               _nc_Default_Field;
                _nc_Default_FieldType;
-               _nc_Default_Form;
                _nc_Default_Item;
                _nc_Default_Menu;
                _nc_Disconnect_Items;
@@ -1042,7 +1043,6 @@ NCURSESTW_5.7.20081102 {
                _nc_expanded;
                _nc_fifo_dump;
                _nc_freewin;
-               _nc_has_mouse;
                _nc_hash_map;
                _nc_init_wacs;
                _nc_insert_ch;
index d0f5fbb59cd6198aec97c4b2a7eecc7ac99242ec..717ca864b0dd883323136af8a5a33a8a1c701e66 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursestw.sym,v 1.21 2015/06/13 21:18:19 tom Exp $
+# $Id: ncursestw.sym,v 1.22 2015/06/27 22:29:28 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -35,7 +35,7 @@
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --enable-wgetch-events --enable-widec --with-hashed-db --with-pthread --with-termlib --with-ticlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --enable-widec --with-broken_linker --with-pthread --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.20150606)
+# Configure options (6.0.current)
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-reentrant --enable-sp-funcs --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
@@ -60,6 +60,8 @@ UP
 _nc_COLORS
 _nc_COLOR_PAIRS
 _nc_COLS
+_nc_Default_Field
+_nc_Default_Form
 _nc_ESCDELAY
 _nc_LINES
 _nc_TABSIZE
@@ -118,6 +120,7 @@ _nc_get_type
 _nc_getenv_num
 _nc_globals
 _nc_handle_sigwinch
+_nc_has_mouse
 _nc_head
 _nc_home_terminfo
 _nc_infotocap
index f126b68010f3c73b62c7e89e1cac9f2c49bcc20c..d18776e8f1d4fc216f013cb9ad3ccaa19b835e20 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursesw.map,v 1.35 2015/06/13 23:07:40 tom Exp $
+# $Id: ncursesw.map,v 1.36 2015/06/27 22:26:52 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -476,7 +476,10 @@ NCURSESW_5.1.20000708 {
                TYPE_IPV4;
                TYPE_NUMERIC;
                TYPE_REGEXP;
+               _nc_Default_Field;      # deprecated in ABI6
+               _nc_Default_Form;       # deprecated in ABI6
                _nc_free_and_exit;
+               _nc_has_mouse;  # deprecated in ABI6
                _nc_panelhook;
                _nc_ripoffline;
                addch;
@@ -877,9 +880,7 @@ NCURSESW_5.1.20000708 {
                _nc_Connect_Items;
                _nc_Copy_Argument;
                _nc_Copy_Type;
-               _nc_Default_Field;
                _nc_Default_FieldType;
-               _nc_Default_Form;
                _nc_Default_Item;
                _nc_Default_Menu;
                _nc_Disconnect_Items;
@@ -904,7 +905,6 @@ NCURSESW_5.1.20000708 {
                _nc_do_color;
                _nc_expanded;
                _nc_freewin;
-               _nc_has_mouse;
                _nc_hash_map;
                _nc_make_oldhash;
                _nc_makenew;
index 96756bd1fc3d65d5a72c4fe358cdd46f443a9dcb..dfeba4f57aa7f91f07a78ae3f87543a80c8d6849 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursesw.sym,v 1.23 2015/06/13 21:09:14 tom Exp $
+# $Id: ncursesw.sym,v 1.24 2015/06/27 22:30:29 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -46,7 +46,7 @@
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-widec --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-wgetch-events --enable-widec --with-hashed-db --with-termlib --with-ticlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-widec --with-broken_linker --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.20150606)
+# Configure options (6.0.current)
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --enable-widec --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --enable-widec --with-termlib --with-trace
 #      --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-widec --with-broken_linker --with-hashed-db --with-termlib --with-trace
@@ -72,6 +72,8 @@ TYPE_IPV4
 TYPE_NUMERIC
 TYPE_REGEXP
 UP
+_nc_Default_Field
+_nc_Default_Form
 _nc_access
 _nc_add_to_try
 _nc_align_termtype
@@ -124,6 +126,7 @@ _nc_get_type
 _nc_getenv_num
 _nc_globals
 _nc_handle_sigwinch
+_nc_has_mouse
 _nc_head
 _nc_home_terminfo
 _nc_info_hash_table
index 91727d28c24d747142b416b201aff2e4573b754a..2043506f65e77253b3c98411c81a3a3ec482c4c8 100644 (file)
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: README,v 1.50 2015/05/02 20:47:29 tom Exp $
+-- $Id: README,v 1.51 2015/06/27 19:41:39 tom Exp $
 -------------------------------------------------------------------------------
 
 The programs in this directory are used to test and demonstrate ncurses.
@@ -73,6 +73,7 @@ to list the options.
 These programs provide examples of use, but do not comprise a complete set of
 tests.  Here is a list of library externals, noting those that are used:
 
+
 libform:
 -------
 TYPE_ALNUM                     test: demo_forms
@@ -525,7 +526,7 @@ new_prescr                  lib: ncurses
 newpad                         test: edit_field ncurses testcurs
 newpad_sp                      lib: ncurses
 newscr                         lib: ncurses
-newterm                                test: demo_altkeys ditto dots_mvcur filter foldkeys gdc key_names keynames
+newterm                                test: demo_altkeys ditto dots_mvcur filter foldkeys gdc key_names keynames test_setupterm
 newterm_sp                     -
 newwin                         test: cardfile chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto edit_field firstlast inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs xmas
 newwin_sp                      lib: ncurses
@@ -569,7 +570,7 @@ redrawwin                   test: redraw view
 refresh                                test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view xmas
 reset_prog_mode                        test: filter ncurses
 reset_prog_mode_sp             lib: ncurses
-reset_shell_mode               test: bs filter savescreen
+reset_shell_mode               test: bs filter savescreen test_setupterm
 reset_shell_mode_sp            lib: ncurses
 resetty                                -
 resetty_sp                     -
@@ -577,7 +578,7 @@ resize_term                 test: view
 resize_term_sp                 -
 resizeterm                     -
 resizeterm_sp                  lib: ncurses
-restartterm                    -
+restartterm                    test: test_setupterm
 restartterm_sp                 -
 ripoffline                     test: demo_menus ncurses
 ripoffline_sp                  -
@@ -603,7 +604,7 @@ set_tabsize_sp                      -
 set_term                       lib: ncurses
 setcchar                       test: demo_panels ins_wide ncurses test_add_wchstr test_addwstr view
 setscrreg                      test: view
-setupterm                      test: demo_terminfo dots test_vid_puts test_vidputs progs: clear tabs tput tset
+setupterm                      test: demo_terminfo dots test_setupterm test_vid_puts test_vidputs progs: clear tabs tput tset
 slk_attr                       -
 slk_attr_off                   -
 slk_attr_on                    -
@@ -701,11 +702,11 @@ use_window                        test: rain worm
 vid_attr                       test: test_vid_puts
 vid_attr_sp                    -
 vid_puts                       test: test_vid_puts
-vid_puts_sp                    -
+vid_puts_sp                    lib: ncurses
 vidattr                                test: test_vidputs
 vidattr_sp                     -
 vidputs                                test: test_vidputs
-vidputs_sp                     lib: ncurses
+vidputs_sp                     -
 vline                          test: gdc ncurses
 vline_set                      -
 vw_printw                      test: clip_printw
index b1ee5a0705bed855bae84a485ec93acf2b4c053e..e255c286bb155ac99a291b3089dd10f6d7d2f877 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.51 2014/06/21 15:28:46 tom Exp $
+# $Id: modules,v 1.52 2015/06/27 10:40:27 tom Exp $
 ##############################################################################
-# Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2014,2015 Free 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"), #
@@ -89,6 +89,7 @@ test_getstr   progs           $(srcdir)       $(HEADER_DEPS)
 test_instr     progs           $(srcdir)       $(HEADER_DEPS)
 test_inwstr    progs           $(srcdir)       $(HEADER_DEPS)
 test_opaque    progs           $(srcdir)       $(HEADER_DEPS)
+test_setupterm progs           $(srcdir)       $(HEADER_DEPS)
 test_vid_puts  progs           $(srcdir)       $(HEADER_DEPS)
 test_vidputs   progs           $(srcdir)       $(HEADER_DEPS)
 testaddch      progs           $(srcdir)       $(HEADER_DEPS)
index 1110ce5b7602a860835bb0522c0e626b37813703..94765e2b404530b33869b2eb55e3c963a426007e 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: programs,v 1.25 2014/06/21 15:28:49 tom Exp $
+# $Id: programs,v 1.26 2015/06/27 10:40:53 tom Exp $
 ##############################################################################
-# Copyright (c) 2006-2013,2014 Free Software Foundation, Inc.                #
+# Copyright (c) 2006-2014,2015 Free 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"), #
@@ -86,6 +86,7 @@ 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
+test_setupterm $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   test_setupterm
 test_vid_puts  $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   test_vid_puts
 test_vidputs   $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   test_vidputs
 testaddch      $(LDFLAGS_CURSES)       $(LOCAL_LIBS)   testaddch
diff --git a/test/test_setupterm.c b/test/test_setupterm.c
new file mode 100644 (file)
index 0000000..6d7e0e2
--- /dev/null
@@ -0,0 +1,210 @@
+/****************************************************************************
+ * Copyright (c) 2015 Free 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
+ *
+ * $Id: test_setupterm.c,v 1.8 2015/06/28 00:53:46 tom Exp $
+ *
+ * A simple demo of setupterm/restartterm.
+ */
+#include <test.priv.h>
+
+#if HAVE_TIGETSTR
+
+static bool a_opt = FALSE;
+static bool f_opt = FALSE;
+static bool n_opt = FALSE;
+static bool r_opt = FALSE;
+
+static void
+test_rc(NCURSES_CONST char *name, int actual_rc, int actual_err)
+{
+    int expect_rc = -1;
+    int expect_err = -1;
+
+    if (name == 0)
+       name = getenv("TERM");
+    if (name == 0)
+       name = "?";
+
+    switch (*name) {
+    case 'v':                  /* vt100 is normal */
+    case 'd':                  /* dumb has no special flags */
+       expect_rc = 0;
+       expect_err = 1;
+       break;
+    case 'l':                  /* lpr is hardcopy */
+       expect_err = 1;
+       break;
+    case 'u':                  /* unknown is generic */
+       expect_err = 0;
+       break;
+    default:
+       break;
+    }
+    if (n_opt) {
+       expect_rc = -1;
+       expect_err = -1;
+    }
+    printf("%s",
+          ((actual_rc == expect_rc && actual_err == expect_err)
+           ? "OK"
+           : "ERR"));
+    printf(" '%s'", name);
+    if (actual_rc == expect_rc) {
+       printf(" rc=%d", actual_rc);
+    } else {
+       printf(" rc=%d (%d)", actual_rc, expect_rc);
+    }
+    if (actual_err == expect_err) {
+       printf(" err=%d", actual_err);
+    } else {
+       printf(" err=%d (%d)", actual_err, expect_err);
+    }
+    printf("\n");
+}
+
+static void
+test_setupterm(NCURSES_CONST char *name)
+{
+    int rc;
+    int err = -99;
+
+    if (r_opt) {
+       rc = restartterm(name, 0, f_opt ? NULL : &err);
+    } else {
+       rc = setupterm(name, 0, f_opt ? NULL : &err);
+    }
+    test_rc(name, rc, err);
+}
+
+static void
+usage(void)
+{
+    static const char *msg[] =
+    {
+       "Usage: test_setupterm [options] [terminal]",
+       "",
+       "Demonstrate error-checking for setupterm and restartterm.",
+       "",
+       "Options:",
+       " -a       automatic test for each success/error code",
+       " -f       treat errors as fatal",
+       " -n       set environment to disable terminfo database, assuming",
+       "          the compiled-in paths for database also fail",
+       " -r       test restartterm rather than setupterm",
+    };
+    unsigned n;
+    for (n = 0; n < SIZEOF(msg); ++n) {
+       fprintf(stderr, "%s\n", msg[n]);
+    }
+    ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc, char *argv[])
+{
+    int n;
+
+    while ((n = getopt(argc, argv, "afnr")) != -1) {
+       switch (n) {
+       case 'a':
+           a_opt = TRUE;
+           break;
+       case 'f':
+           f_opt = TRUE;
+           break;
+       case 'n':
+           n_opt = TRUE;
+           break;
+       case 'r':
+           r_opt = TRUE;
+           break;
+       default:
+           usage();
+           break;
+       }
+    }
+
+    if (n_opt) {
+       static char none[][25] =
+       {
+           "HOME=/GUI",
+           "TERMINFO=/GUI",
+           "TERMINFO_DIRS=/GUI"
+       };
+       /*
+        * We can turn this off, but not on again, because ncurses caches the
+        * directory locations.
+        */
+       printf("** without database\n");
+       for (n = 0; n < 3; ++n)
+           putenv(none[n]);
+    } else {
+       printf("** with database\n");
+    }
+
+    /*
+     * The restartterm relies on an existing screen, so we make one here.
+     */
+    if (r_opt) {
+       newterm("ansi", stdout, stdin);
+       reset_shell_mode();
+    }
+
+    if (a_opt) {
+       static char predef[][9] =
+       {"vt100", "dumb", "lpr", "unknown", "none-such"};
+       if (optind < argc) {
+           usage();
+       }
+       for (n = 0; n < 4; ++n) {
+           test_setupterm(predef[n]);
+       }
+    } else {
+       if (optind < argc) {
+           for (n = optind; n < argc; ++n) {
+               test_setupterm(argv[n]);
+           }
+       } else {
+           test_setupterm(NULL);
+       }
+    }
+
+    ExitProgram(EXIT_SUCCESS);
+}
+
+#else /* !HAVE_TIGETSTR */
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+    printf("This program requires the terminfo functions such as tigetstr\n");
+    ExitProgram(EXIT_FAILURE);
+}
+#endif /* HAVE_TIGETSTR */