]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20110604
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 5 Jun 2011 01:01:53 +0000 (01:01 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 5 Jun 2011 01:01:53 +0000 (01:01 +0000)
+ fixes for MirBSD port:
  + set default prefix to /usr.
  + add support for shared libraries in configure script.
  + use S_ISREG and S_ISDIR consistently, with fallback definitions.
+ add a few more checks based on ncurses/link_test.
+ modify MKlib_gen.sh to handle sp-funcs renaming of NCURSES_OUTC type.

13 files changed:
Ada95/aclocal.m4
Ada95/configure
NEWS
aclocal.m4
configure
dist.mk
ncurses/base/MKlib_gen.sh
ncurses/base/keyok.c
ncurses/curses.priv.h
ncurses/tinfo/access.c
ncurses/tinfo/lib_napms.c
ncurses/tinfo/read_termcap.c
ncurses/tinfo/write_entry.c

index 6ada6649de85cdfcb9188dbb9a9cc4152093af82..3249c1a8b4aaa8dda11a1b6b020b2b218504609f 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.28 2011/05/29 00:01:27 tom Exp $
+dnl $Id: aclocal.m4,v 1.29 2011/06/05 00:44:26 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -529,7 +529,7 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CFG_DEFAULTS version: 7 updated: 2005/09/24 16:15:00
+dnl CF_CFG_DEFAULTS version: 8 updated: 2011/06/04 20:09:13
 dnl ---------------
 dnl Determine the default configuration into which we'll install ncurses.  This
 dnl can be overridden by the user's command-line options.  There's two items to
 dnl ---------------
 dnl Determine the default configuration into which we'll install ncurses.  This
 dnl can be overridden by the user's command-line options.  There's two items to
@@ -547,7 +547,7 @@ AC_MSG_CHECKING(for prefix)
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
-       openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
+       openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
@@ -1543,7 +1543,7 @@ ifdef([AC_FUNC_FSEEKO],[
 ])
 ])
 dnl ---------------------------------------------------------------------------
 ])
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05
+dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
@@ -1564,7 +1564,7 @@ irix*) #(vi
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
-openbsd[[2-9]].*) #(vi
+openbsd[[2-9]].*|mirbsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
@@ -2858,7 +2858,7 @@ define([CF_REMOVE_LIB],
 $1=`echo "$2" | sed -e 's/-l$3[[       ]]//g' -e 's/-l$3[$]//'`
 ])dnl
 dnl ---------------------------------------------------------------------------
 $1=`echo "$2" | sed -e 's/-l$3[[       ]]//g' -e 's/-l$3[$]//'`
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 65 updated: 2011/05/28 19:39:44
+dnl CF_SHARED_OPTS version: 66 updated: 2011/06/04 20:09:13
 dnl --------------
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
 dnl --------------
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
@@ -3023,7 +3023,7 @@ CF_EOF
                CF_SHARED_SONAME
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
                ;;
                CF_SHARED_SONAME
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
                ;;
-       openbsd[[2-9]].*) #(vi
+       openbsd[[2-9]].*|mirbsd*) #(vi
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
index 4c9eb6c3b684ba367e133cc916bedd57e824aa69..5516b357255ec77b1d38106b9a47a07ec8c993d5 100644 (file)
@@ -1140,7 +1140,7 @@ echo $ECHO_N "checking for prefix... $ECHO_C" >&6
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
-       openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
+       openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
@@ -7280,7 +7280,7 @@ irix*) #(vi
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
-openbsd[2-9].*) #(vi
+openbsd[2-9].*|mirbsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
@@ -7567,7 +7567,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
 
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
                ;;
 
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
                ;;
-       openbsd[2-9].*) #(vi
+       openbsd[2-9].*|mirbsd*) #(vi
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
diff --git a/NEWS b/NEWS
index 489b0ad2cf0bcf55c1089fc8680ad838d7a60cd8..7ea9f46ca29797bf871229f7c5751e884ead0ae5 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.1707 2011/05/28 23:45:28 tom Exp $
+-- $Id: NEWS,v 1.1709 2011/06/05 00:19:16 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,14 @@ 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.
 
+20110604
+       + fixes for MirBSD port:
+         + set default prefix to /usr.
+         + add support for shared libraries in configure script.
+         + use S_ISREG and S_ISDIR consistently, with fallback definitions.
+       + add a few more checks based on ncurses/link_test.
+       + modify MKlib_gen.sh to handle sp-funcs renaming of NCURSES_OUTC type.
+
 20110528
        + add case to CF_SHARED_OPTS for Interix (patch by Markus Duft).
        + used ncurses/link_test to check for behavior when the terminal has
 20110528
        + add case to CF_SHARED_OPTS for Interix (patch by Markus Duft).
        + used ncurses/link_test to check for behavior when the terminal has
index 391a6f0e3e0f34952a8e7f6dc90f8da2cd590717..d5a136cb864949d8e4731306e21d36927cdc83ae 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.557 2011/05/29 00:00:21 tom Exp $
+dnl $Id: aclocal.m4,v 1.558 2011/06/05 00:13:55 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -720,7 +720,7 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CFG_DEFAULTS version: 7 updated: 2005/09/24 16:15:00
+dnl CF_CFG_DEFAULTS version: 8 updated: 2011/06/04 20:09:13
 dnl ---------------
 dnl Determine the default configuration into which we'll install ncurses.  This
 dnl can be overridden by the user's command-line options.  There's two items to
 dnl ---------------
 dnl Determine the default configuration into which we'll install ncurses.  This
 dnl can be overridden by the user's command-line options.  There's two items to
@@ -738,7 +738,7 @@ AC_MSG_CHECKING(for prefix)
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
-       openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
+       openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
@@ -2721,7 +2721,7 @@ AC_SUBST(LDFLAGS_STATIC)
 AC_SUBST(LDFLAGS_SHARED)
 ])
 dnl ---------------------------------------------------------------------------
 AC_SUBST(LDFLAGS_SHARED)
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05
+dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
@@ -2742,7 +2742,7 @@ irix*) #(vi
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
-openbsd[[2-9]].*) #(vi
+openbsd[[2-9]].*|mirbsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
@@ -4759,7 +4759,7 @@ case $INSTALL in
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PROG_LDCONFIG version: 2 updated: 2008/12/13 14:08:40
+dnl CF_PROG_LDCONFIG version: 3 updated: 2011/06/04 20:09:13
 dnl ----------------
 dnl Check for ldconfig, needed to fixup shared libraries that would be built
 dnl and then used in the install.
 dnl ----------------
 dnl Check for ldconfig, needed to fixup shared libraries that would be built
 dnl and then used in the install.
@@ -4768,7 +4768,7 @@ if test "$cross_compiling" = yes ; then
   LDCONFIG=:
 else
 case "$cf_cv_system_name" in #(vi
   LDCONFIG=:
 else
 case "$cf_cv_system_name" in #(vi
-dragonfly*|freebsd*) #(vi
+dragonfly*|mirbsd*|freebsd*) #(vi
   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
   ;;
 *) LDPATH=$PATH:/sbin:/usr/sbin
   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
   ;;
 *) LDPATH=$PATH:/sbin:/usr/sbin
@@ -5034,7 +5034,7 @@ CF_VERBOSE(...checked $1 [$]$1)
 AC_SUBST(EXTRA_LDFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
 AC_SUBST(EXTRA_LDFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 65 updated: 2011/05/28 19:39:44
+dnl CF_SHARED_OPTS version: 66 updated: 2011/06/04 20:09:13
 dnl --------------
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
 dnl --------------
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
@@ -5199,7 +5199,7 @@ CF_EOF
                CF_SHARED_SONAME
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
                ;;
                CF_SHARED_SONAME
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
                ;;
-       openbsd[[2-9]].*) #(vi
+       openbsd[[2-9]].*|mirbsd*) #(vi
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
index 58db77c7239bfbbf03c5b9d13f4bc4cc0167424a..8318a09b10f86fbdcab68e3c0b82f37c3ae8d04e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1364,7 +1364,7 @@ echo $ECHO_N "checking for prefix... $ECHO_C" >&6
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
-       openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
+       openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
@@ -2696,7 +2696,7 @@ if test "$cross_compiling" = yes ; then
   LDCONFIG=:
 else
 case "$cf_cv_system_name" in #(vi
   LDCONFIG=:
 else
 case "$cf_cv_system_name" in #(vi
-dragonfly*|freebsd*) #(vi
+dragonfly*|mirbsd*|freebsd*) #(vi
   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
   ;;
 *) LDPATH=$PATH:/sbin:/usr/sbin
   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
   ;;
 *) LDPATH=$PATH:/sbin:/usr/sbin
@@ -5404,7 +5404,7 @@ irix*) #(vi
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 linux*|gnu*|k*bsd*-gnu) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
-openbsd[2-9].*) #(vi
+openbsd[2-9].*|mirbsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 freebsd*) #(vi
@@ -5691,7 +5691,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
 
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
                ;;
 
                MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
                ;;
-       openbsd[2-9].*) #(vi
+       openbsd[2-9].*|mirbsd*) #(vi
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
diff --git a/dist.mk b/dist.mk
index 2e6190b0914fa3b459111fb375f526cd6480e210..6c72c17c82ec88b3d61bf083ee6ce0b3b5501b56 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.818 2011/05/28 13:47:25 tom Exp $
+# $Id: dist.mk,v 1.819 2011/06/04 16:25:50 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 = 9
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20110528
+NCURSES_PATCH = 20110604
 
 # 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 684d86e1de76690a96ca561ecc2a9fc664fb151d..d8cc3c9751faa157d0c8cb8e16fbe4217703966b 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
-# ($Id: MKlib_gen.sh,v 1.45 2011/05/28 20:28:25 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.46 2011/06/04 19:14:08 tom Exp $)
 #
 ##############################################################################
 # Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.                #
 #
 ##############################################################################
 # Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.                #
@@ -437,7 +437,7 @@ END         {
                                        sub(/^\* /,"",value);
                                        gsub(/[[:alnum:]_]+ \* /,"",value);
                                        gsub(/ (const) /," ",value);
                                        sub(/^\* /,"",value);
                                        gsub(/[[:alnum:]_]+ \* /,"",value);
                                        gsub(/ (const) /," ",value);
-                                       gsub(/ (int|short|attr_t|chtype|wchar_t|NCURSES_BOOL|NCURSES_OUTC|va_list) /," ",value);
+                                       gsub(/ (int|short|attr_t|chtype|wchar_t|NCURSES_BOOL|NCURSES_OUTC|NCURSES_OUTC_sp|va_list) /," ",value);
                                        gsub(/ void /,"",value);
                                        sub(/^/,"call_",value);
                                        gsub(/ (a[[:digit:]]|z) /, " 0 ", value);
                                        gsub(/ void /,"",value);
                                        sub(/^/,"call_",value);
                                        gsub(/ (a[[:digit:]]|z) /, " 0 ", value);
@@ -457,6 +457,8 @@ cat >$TMP <<EOF
 #include <ncurses_cfg.h>
 #undef NCURSES_NOMACROS
 #include <curses.h>
 #include <ncurses_cfg.h>
 #undef NCURSES_NOMACROS
 #include <curses.h>
+#include <term.h>
+#include <unctrl.h>
 
 DECLARATIONS
 
 
 DECLARATIONS
 
index 0eacf49263001aa9c2b7388860605c8ad7d91baf..d700be491038d9c691d84ad9cc15cf859dac313e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2011 Free 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            *
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: keyok.c,v 1.10 2009/10/24 22:15:47 tom Exp $")
+MODULE_ID("$Id: keyok.c,v 1.11 2011/06/04 19:24:16 tom Exp $")
 
 /*
  * Enable (or disable) ncurses' interpretation of a keycode by adding (or
 
 /*
  * Enable (or disable) ncurses' interpretation of a keycode by adding (or
@@ -50,37 +50,41 @@ NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
 {
     int code = ERR;
 
 {
     int code = ERR;
 
-    T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
+    if (HasTerminal(SP_PARM)) {
+       T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
 #ifdef USE_TERM_DRIVER
 #ifdef USE_TERM_DRIVER
-    code = CallDriver_2(sp, kyOk, c, flag);
+       code = CallDriver_2(sp, kyOk, c, flag);
 #else
 #else
-    T((T_CALLED("keyok(%d,%d)"), c, flag));
-    if (c >= 0) {
-       int count = 0;
-       char *s;
-       unsigned ch = (unsigned) c;
+       T((T_CALLED("keyok(%d,%d)"), c, flag));
+       if (c >= 0) {
+           int count = 0;
+           char *s;
+           unsigned ch = (unsigned) c;
 
 
-       if (flag) {
-           while ((s = _nc_expand_try(SP_PARM->_key_ok, ch, &count, 0)) != 0
-                  && _nc_remove_key(&(SP_PARM->_key_ok), ch)) {
-               code = _nc_add_to_try(&(SP_PARM->_keytry), s, ch);
-               free(s);
-               count = 0;
-               if (code != OK)
-                   break;
-           }
-       } else {
-           while ((s = _nc_expand_try(SP_PARM->_keytry, ch, &count, 0)) != 0
-                  && _nc_remove_key(&(SP_PARM->_keytry), ch)) {
-               code = _nc_add_to_try(&(SP_PARM->_key_ok), s, ch);
-               free(s);
-               count = 0;
-               if (code != OK)
-                   break;
+           if (flag) {
+               while ((s = _nc_expand_try(SP_PARM->_key_ok, ch, &count, 0))
+                      != 0
+                      && _nc_remove_key(&(SP_PARM->_key_ok), ch)) {
+                   code = _nc_add_to_try(&(SP_PARM->_keytry), s, ch);
+                   free(s);
+                   count = 0;
+                   if (code != OK)
+                       break;
+               }
+           } else {
+               while ((s = _nc_expand_try(SP_PARM->_keytry, ch, &count, 0))
+                      != 0
+                      && _nc_remove_key(&(SP_PARM->_keytry), ch)) {
+                   code = _nc_add_to_try(&(SP_PARM->_key_ok), s, ch);
+                   free(s);
+                   count = 0;
+                   if (code != OK)
+                       break;
+               }
            }
        }
            }
        }
-    }
 #endif
 #endif
+    }
     returnCode(code);
 }
 
     returnCode(code);
 }
 
index 533fc73d7f659d6d584baa7d769e4c39b10a7224..2f49d23811c92d4845fcd960cb073691e8d1268e 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.478 2011/05/14 17:36:15 tom Exp $
+ * $Id: curses.priv.h,v 1.479 2011/06/04 23:14:09 tom Exp $
  *
  *     curses.priv.h
  *
  *
  *     curses.priv.h
  *
@@ -69,6 +69,7 @@ extern "C" {
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 
 #if HAVE_UNISTD_H
 #include <unistd.h>
 
 #if HAVE_UNISTD_H
 #include <unistd.h>
@@ -195,6 +196,18 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
 #define end_va_copy(dst)       /* nothing */
 #endif
 
 #define end_va_copy(dst)       /* nothing */
 #endif
 
+/*
+ * Either/both S_ISxxx and/or S_IFxxx are defined in sys/types.h; some systems
+ * lack one or the other.
+ */
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR)
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG)
+#endif
+
 /*
  * Scroll hints are useless when hashmap is used
  */
 /*
  * Scroll hints are useless when hashmap is used
  */
index b96898a63532021591666c8037a863e496719076..6c4df591784a074575d71c1727edd5fde7cd0354 100644 (file)
 #include <curses.priv.h>
 
 #include <ctype.h>
 #include <curses.priv.h>
 
 #include <ctype.h>
-#include <sys/stat.h>
 
 #include <tic.h>
 
 
 #include <tic.h>
 
-MODULE_ID("$Id: access.c,v 1.18 2011/05/28 23:05:12 tom Exp $")
+MODULE_ID("$Id: access.c,v 1.20 2011/06/05 00:48:00 tom Exp $")
 
 #ifdef __TANDEM
 #define ROOT_UID 65535
 
 #ifdef __TANDEM
 #define ROOT_UID 65535
@@ -150,7 +149,7 @@ _nc_is_dir_path(const char *path)
     struct stat sb;
 
     if (stat(path, &sb) == 0
     struct stat sb;
 
     if (stat(path, &sb) == 0
-       && (sb.st_mode & S_IFMT) == S_IFDIR) {
+       && S_ISDIR(sb.st_mode)) {
        result = TRUE;
     }
     return result;
        result = TRUE;
     }
     return result;
@@ -163,7 +162,7 @@ _nc_is_file_path(const char *path)
     struct stat sb;
 
     if (stat(path, &sb) == 0
     struct stat sb;
 
     if (stat(path, &sb) == 0
-       && (sb.st_mode & S_IFMT) == S_IFREG) {
+       && S_ISREG(sb.st_mode)) {
        result = TRUE;
     }
     return result;
        result = TRUE;
     }
     return result;
index 1e6abda10d0923e980709db9a9ca373e7be6bed4..50c9eb2e1b51e7b04ed2a53a127b70f7b6feb72a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2011 Free 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            *
 #endif
 #endif
 
 #endif
 #endif
 
-MODULE_ID("$Id: lib_napms.c,v 1.20 2009/11/07 20:37:30 tom Exp $")
+MODULE_ID("$Id: lib_napms.c,v 1.21 2011/06/04 19:24:16 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
 {
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
 {
-    (void) SP_PARM;
     T((T_CALLED("napms(%d)"), ms));
 
     T((T_CALLED("napms(%d)"), ms));
 
+    if (HasTerminal(SP_PARM)) {
 #ifdef USE_TERM_DRIVER
 #ifdef USE_TERM_DRIVER
-    CallDriver_1(SP_PARM, nap, ms);
+       CallDriver_1(SP_PARM, nap, ms);
 #else /* !USE_TERM_DRIVER */
 #if HAVE_NANOSLEEP
 #else /* !USE_TERM_DRIVER */
 #if HAVE_NANOSLEEP
-    {
-       struct timespec request, remaining;
-       request.tv_sec = ms / 1000;
-       request.tv_nsec = (ms % 1000) * 1000000;
-       while (nanosleep(&request, &remaining) == -1
-              && errno == EINTR) {
-           request = remaining;
+       {
+           struct timespec request, remaining;
+           request.tv_sec = ms / 1000;
+           request.tv_nsec = (ms % 1000) * 1000000;
+           while (nanosleep(&request, &remaining) == -1
+                  && errno == EINTR) {
+               request = remaining;
+           }
        }
        }
-    }
 #else
 #else
-    _nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0));
+       _nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0));
 #endif
 #endif /* !USE_TERM_DRIVER */
 
 #endif
 #endif /* !USE_TERM_DRIVER */
 
+    }
     returnCode(OK);
 }
 
     returnCode(OK);
 }
 
index b39a5bebaa472dba1223fa98341bcb0a87ae1d43..eac37fa3d5d164e6d4af0a21b7f3a8f491bc0ea5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 Free 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 <ctype.h>
 #include <sys/types.h>
 
 #include <ctype.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <tic.h>
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_termcap.c,v 1.74 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: read_termcap.c,v 1.76 2011/06/05 00:48:00 tom Exp $")
 
 #if !PURE_TERMINFO
 
 
 #if !PURE_TERMINFO
 
@@ -1063,7 +1062,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE *const tp)
     for (j = 0; j < filecount; j++) {
        bool omit = FALSE;
        if (stat(termpaths[j], &test_stat[j]) != 0
     for (j = 0; j < filecount; j++) {
        bool omit = FALSE;
        if (stat(termpaths[j], &test_stat[j]) != 0
-           || (test_stat[j].st_mode & S_IFMT) != S_IFREG) {
+           || !S_ISREG(test_stat[j].st_mode)) {
            omit = TRUE;
        } else {
            for (k = 0; k < j; k++) {
            omit = TRUE;
        } else {
            for (k = 0; k < j; k++) {
index a86c11267e931376f12c4c30fd270bfe3d191ee8..6d855e945d2d78762079529adc822b3e62cb68d5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 Free 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 <hashed_db.h>
 
 #include <curses.priv.h>
 #include <hashed_db.h>
 
-#include <sys/stat.h>
-
 #include <tic.h>
 
 #include <tic.h>
 
-#ifndef S_ISDIR
-#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR)
-#endif
-
 #if 1
 #define TRACE_OUT(p) DEBUG(2, p)
 #else
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
 #if 1
 #define TRACE_OUT(p) DEBUG(2, p)
 #else
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.78 2010/12/25 23:23:08 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.79 2011/06/05 00:46:26 tom Exp $")
 
 static int total_written;
 
 
 static int total_written;