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
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
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
])
])
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.
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
$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
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 "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
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
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"
-- 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
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
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
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
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
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.
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
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.
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
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
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 "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
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
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
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"
# 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
# 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)
#
# 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. #
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);
#include <ncurses_cfg.h>
#undef NCURSES_NOMACROS
#include <curses.h>
+#include <term.h>
+#include <unctrl.h>
DECLARATIONS
/****************************************************************************
- * 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 *
#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
{
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
- code = CallDriver_2(sp, kyOk, c, flag);
+ code = CallDriver_2(sp, kyOk, c, flag);
#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
+ }
returnCode(code);
}
****************************************************************************/
/*
- * $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
*
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#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
*/
#include <curses.priv.h>
#include <ctype.h>
-#include <sys/stat.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
struct stat sb;
if (stat(path, &sb) == 0
- && (sb.st_mode & S_IFMT) == S_IFDIR) {
+ && S_ISDIR(sb.st_mode)) {
result = TRUE;
}
return result;
struct stat sb;
if (stat(path, &sb) == 0
- && (sb.st_mode & S_IFMT) == S_IFREG) {
+ && S_ISREG(sb.st_mode)) {
result = TRUE;
}
return result;
/****************************************************************************
- * 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 *
#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)
{
- (void) SP_PARM;
T((T_CALLED("napms(%d)"), ms));
+ if (HasTerminal(SP_PARM)) {
#ifdef USE_TERM_DRIVER
- CallDriver_1(SP_PARM, nap, ms);
+ CallDriver_1(SP_PARM, nap, ms);
#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
- _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 */
+ }
returnCode(OK);
}
/****************************************************************************
- * 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 *
#include <ctype.h>
#include <sys/types.h>
-#include <sys/stat.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
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++) {
/****************************************************************************
- * 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 *
#include <curses.priv.h>
#include <hashed_db.h>
-#include <sys/stat.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
-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;