ncurses 5.6 - patch 20071124

+ modify configure option --with-hashed-db to accept a parameter which
  is the install-prefix of a given Berkeley Database (prompted by
  pierre4d2 comments).
+ rewrite wrapper for wcrtomb(), making it work on Solaris.  This is
  used in the form library to determine the length of the buffer needed
  by field_buffer (report by Alfred Fung).
+ remove unneeded window-parameter from C++ binding for wresize (report
  by Chris Lee).
This commit is contained in:
Thomas E. Dickey 2007-11-25 02:05:21 +00:00
parent 40df80d8d3
commit c7bc3019ea
10 changed files with 585 additions and 230 deletions

10
INSTALL
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: INSTALL,v 1.120 2007/11/17 22:05:11 tom Exp $
-- $Id: INSTALL,v 1.121 2007/11/24 20:22:52 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@ -694,7 +694,7 @@ SUMMARY OF CONFIGURE OPTIONS:
See also --without-dlsym
--with-hashed-db
--with-hashed-db[=XXX]
Use a hashed database for storing terminfo data rather than storing
each compiled entry in a separate binary file within a directory
tree.
@ -709,6 +709,12 @@ SUMMARY OF CONFIGURE OPTIONS:
You cannot have a directory containing both hashed-database and
filesystem-based terminfo entries.
Use the parameter value to give the install-prefix used for the
datbase, e.g.,
--with-hashed-db=/usr/local/BigBase
to find the corresponding include- and lib-directories under the
given directory.
See also the --enable-getcap option.
--with-install-prefix=XXX

18
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1182 2007/11/17 23:43:07 tom Exp $
-- $Id: NEWS,v 1.1184 2007/11/25 00:04:31 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,16 @@ 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.
20071124
+ modify configure option --with-hashed-db to accept a parameter which
is the install-prefix of a given Berkeley Database (prompted by
pierre4d2 comments).
+ rewrite wrapper for wcrtomb(), making it work on Solaris. This is
used in the form library to determine the length of the buffer needed
by field_buffer (report by Alfred Fung).
+ remove unneeded window-parameter from C++ binding for wresize (report
by Chris Lee).
20071117
+ modify the support for filesystems which do not support mixed-case to
generate 2-character (hexadecimal) codes for the lower-level of the
@ -92,7 +102,7 @@ it is not possible to add this information.
+ add new functions to lib_trace.c to setup mutex's for the _tracef()
calls within the ncurses library.
+ for the reentrant model, move _nc_tputs_trace and _nc_outchars into
the SCREEN.
the SCREEN.
+ start modifying test/worm.c to provide threading demo (incomplete).
+ separated ifdef's for some BSD-related symbols in tset.c, to make
it compile on LynxOS (report by Greg Gemmer).
@ -231,7 +241,7 @@ it is not possible to add this information.
(discussion with Clive Nicolson).
+ add a modification of test/dots.c, i.e., test/dots_mvcur.c to
illustrate how to use mvcur().
+ modify wide-character flavor of SetAttr() to preserve the
+ modify wide-character flavor of SetAttr() to preserve the
WidecExt() value stored in the .attr field, e.g., in case it
is overwritten by chgat (report by Aleksi Torhamo).
+ correct buffer-size for _nc_viswbuf2n() (report by Aleksi Torhamo).
@ -301,7 +311,7 @@ it is not possible to add this information.
20070407
+ add man/curs_legacy.3x, man/curs_opaque.3x
+ fix acs_map binding for Ada95 when --enable-reentrant is used.
+ fix acs_map binding for Ada95 when --enable-reentrant is used.
+ add adacurses-config to the Ada95 install, based on version from
FreeBSD port, in turn by Juergen Pfeifer in 2000 (prompted by
comment on comp.lang.ada newsgroup).

161
aclocal.m4 vendored
View File

@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: aclocal.m4,v 1.436 2007/08/11 18:12:19 tom Exp $
dnl $Id: aclocal.m4,v 1.440 2007/11/25 00:58:01 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -166,6 +166,99 @@ fi
AC_SUBST(EXTRA_CPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADD_INCDIR version: 8 updated: 2007/07/30 19:22:58
dnl -------------
dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
dnl but old versions (and some misinstalled ones) need that. To make things
dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to
dnl the include-path).
AC_DEFUN([CF_ADD_INCDIR],
[
if test -n "$1" ; then
for cf_add_incdir in $1
do
while test $cf_add_incdir != /usr/include
do
if test -d $cf_add_incdir
then
cf_have_incdir=no
if test -n "$CFLAGS$CPPFLAGS" ; then
# a loop is needed to ensure we can add subdirs of existing dirs
for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
cf_have_incdir=yes; break
fi
done
fi
if test "$cf_have_incdir" = no ; then
if test "$cf_add_incdir" = /usr/local/include ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
AC_TRY_COMPILE([#include <stdio.h>],
[printf("Hello")],
[],
[cf_have_incdir=yes])
CPPFLAGS=$cf_save_CPPFLAGS
fi
fi
fi
if test "$cf_have_incdir" = no ; then
AC_VERBOSE(adding $cf_add_incdir to include-path)
ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
test "$cf_top_incdir" = "$cf_add_incdir" && break
cf_add_incdir="$cf_top_incdir"
else
break
fi
fi
done
done
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADD_LIBDIR version: 5 updated: 2007/07/30 19:12:03
dnl -------------
dnl Adds to the library-path
dnl
dnl Some machines have trouble with multiple -L options.
dnl
dnl $1 is the (list of) directory(s) to add
dnl $2 is the optional name of the variable to update (default LDFLAGS)
dnl
AC_DEFUN([CF_ADD_LIBDIR],
[
if test -n "$1" ; then
for cf_add_libdir in $1
do
if test $cf_add_libdir = /usr/lib ; then
:
elif test -d $cf_add_libdir
then
cf_have_libdir=no
if test -n "$LDFLAGS$LIBS" ; then
# a loop is needed to ensure we can add subdirs of existing dirs
for cf_test_libdir in $LDFLAGS $LIBS ; do
if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
cf_have_libdir=yes; break
fi
done
fi
if test "$cf_have_libdir" = no ; then
AC_VERBOSE(adding $cf_add_libdir to library-path)
ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"
fi
fi
done
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
@ -1559,11 +1652,24 @@ AC_LANG_RESTORE
AC_SUBST(EXTRA_CXXFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_HASHED_DB version: 1 updated: 2006/08/19 09:16:14
dnl CF_HASHED_DB version: 3 updated: 2007/11/24 17:43:37
dnl ------------
dnl Look for an instance of the Berkeley hashed database.
dnl
dnl $1 = optional parameter, to specify install-prefix for the database.
AC_DEFUN([CF_HASHED_DB],
[
ifelse([$1],,,[
case $1 in #(vi
yes|*able*) #(vi
;;
*)
if test -d "$1" ; then
CF_ADD_INCDIR($1/include)
CF_ADD_LIBDIR($1/lib)
fi
esac
])
AC_CHECK_HEADER(db.h,[
CF_HASHED_DB_VERSION
if test "$cf_cv_hashed_db_version" = unknown ; then
@ -3735,6 +3841,57 @@ define([CF_REMOVE_LIB],
$1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'`
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_RPATH_HACK version: 2 updated: 2007/11/24 19:09:03
dnl -------------
AC_DEFUN([CF_RPATH_HACK],
[
AC_REQUIRE([CF_SHARED_OPTS])
AC_MSG_CHECKING(for updated LDFLAGS)
if test -n "$LDFLAGS" ; then
AC_MSG_RESULT(maybe)
CF_VERBOSE(...checking LDFLAGS $LDFLAGS)
CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
case "$EXTRA_LDFLAGS" in #(vi
-Wl,-rpath,*) #(vi
cf_rpath_hack="-Wl,-rpath,"
;;
-R\ *)
cf_rpath_hack="-R "
;;
-R*)
cf_rpath_hack="-R"
;;
*)
cf_rpath_hack=
;;
esac
cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
do
CF_VERBOSE(Filtering $cf_rpath_src)
case $cf_rpath_src in #(vi
-L*) #(vi
if test "$cf_rpath_hack" = "-R " ; then
cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
else
cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
fi
CF_VERBOSE(...Filter $cf_rpath_tmp)
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
;;
*)
cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
;;
esac
done
LDFLAGS=$cf_rpath_dst
CF_VERBOSE(...checked LDFLAGS $LDFLAGS)
CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
else
AC_MSG_RESULT(no)
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SHARED_OPTS version: 46 updated: 2007/02/24 18:58:09
dnl --------------
dnl --------------

View File

@ -30,7 +30,7 @@
#ifndef NCURSES_CURSESW_H_incl
#define NCURSES_CURSESW_H_incl 1
// $Id: cursesw.h,v 1.45 2007/11/17 21:42:06 tom Exp $
// $Id: cursesw.h,v 1.46 2007/11/24 19:09:09 tom Exp $
#include <etip.h>
@ -1218,8 +1218,8 @@ public:
// Extended functions
// -------------------------------------------------------------------------
#ifdef NCURSES_EXT_FUNCS
int wresize(NCursesWindow& win, int newLines, int newColumns) {
return ::wresize(win.w, newLines, newColumns); }
int wresize(int newLines, int newColumns) {
return ::wresize(w, newLines, newColumns); }
#endif
// -------------------------------------------------------------------------

570
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.427 2007/11/18 00:52:38 tom Exp $
dnl $Id: configure.in,v 1.429 2007/11/24 22:42:43 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20020210)
AC_REVISION($Revision: 1.427 $)
AC_REVISION($Revision: 1.429 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -1244,7 +1244,7 @@ CF_FUNC_POLL
if test "$with_hashed_db" != no ; then
AC_DEFINE(USE_HASHED_DB)
CF_HASHED_DB
CF_HASHED_DB($with_hashed_db)
fi
dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
@ -1684,6 +1684,11 @@ AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${
### Now that we're done running tests, add the compiler-warnings, if any
CF_ADD_CFLAGS($EXTRA_CFLAGS)
### If we're building with rpath, try to link non-standard libs that way too.
if test "$DFT_LWR_MODEL" = "shared"; then
CF_RPATH_HACK
fi
### Define substitutions for header files to avoid name-pollution
CF_SUBST_IF(["$cf_cv_have_tcgetattr" = yes], HAVE_TCGETATTR, 1, 0)
CF_SUBST_IF(["$ac_cv_header_termio_h" = yes], HAVE_TERMIO_H, 1, 0)

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.616 2007/11/17 20:57:47 tom Exp $
# $Id: dist.mk,v 1.617 2007/11/24 18:44:07 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 = 5
NCURSES_MINOR = 6
NCURSES_PATCH = 20071117
NCURSES_PATCH = 20071124
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_driver.c,v 1.84 2007/10/13 19:26:54 tom Exp $")
MODULE_ID("$Id: frm_driver.c,v 1.85 2007/11/24 21:32:53 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@ -4459,10 +4459,7 @@ field_buffer(const FIELD *field, int buffer)
init_mb(state);
next = _nc_wcrtomb(0, data[n].chars[0], &state);
if (!isEILSEQ(next))
{
if (next != 0)
need += next;
}
need += next;
}
}

View File

@ -34,7 +34,7 @@
/*
* $Id: curses.priv.h,v 1.349 2007/11/17 23:33:18 tom Exp $
* $Id: curses.priv.h,v 1.351 2007/11/25 00:57:29 tom Exp $
*
* curses.priv.h
*
@ -946,7 +946,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#endif
#if USE_WIDEC_SUPPORT /* { */
#define isEILSEQ(status) ((status == (size_t)-1) && (errno == EILSEQ))
#define isEILSEQ(status) (((size_t)status == (size_t)-1) && (errno == EILSEQ))
#define init_mb(state) memset(&state, 0, sizeof(state))
@ -1530,11 +1530,7 @@ extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, NCURSES_SIZE
#endif
#if USE_WIDEC_SUPPORT && !defined(USE_TERMLIB)
#ifdef linux
extern NCURSES_EXPORT(size_t) _nc_wcrtomb (char *, wchar_t, mbstate_t *);
#else
#define _nc_wcrtomb(s,wc,ps) wcrtomb(s,wc,ps)
#endif
#endif
#if USE_SIZECHANGE

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2002-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 2002-2004,2007 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -39,26 +39,30 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_unget_wch.c,v 1.7 2004/12/05 01:21:31 tom Exp $")
MODULE_ID("$Id: lib_unget_wch.c,v 1.9 2007/11/25 00:57:00 tom Exp $")
#ifdef linux
/*
* glibc's wcrtomb() function is broken - does not return the proper value
* when target is null (noted for glibc 2.3.2). This is a workaround.
* Wrapper for wcrtomb() which obtains the length needed for the given
* wide-character 'source'.
*/
NCURSES_EXPORT(size_t)
_nc_wcrtomb(char *target, wchar_t source, mbstate_t * state)
{
int result;
if (target == 0) {
wchar_t temp[2];
const wchar_t *tempp = temp;
temp[0] = source;
temp[1] = 0;
return wcsrtombs(NULL, &tempp, 0, state);
result = wcsrtombs(NULL, &tempp, 0, state);
} else {
result = wcrtomb(target, source, state);
}
return wcrtomb(target, source, state);
if (!isEILSEQ(result) && (result == 0))
result = 1;
return result;
}
#endif
NCURSES_EXPORT(int)
unget_wch(const wchar_t wch)