ncurses 5.7 - patch 20090815

+ correct use of terminfo capabilities for initializing soft-keys,
  broken in 20090509 merging.
+ modify wgetch() to ensure it checks SIGWINCH when it gets an error
  in non-blocking mode (patch by Clemens Ladisch).
+ use PATH_SEPARATOR symbol when substituting into run_tic.sh, to
  help with builds on non-Unix platforms such as OS/2 EMX.
+ modify scripting for misc/run_tic.sh to test configure script's
  $cross_compiling variable directly rather than comparing host/build
  compiler names (prompted by comment in GenToo #249363).
+ fix configure script option --with-database, which was coded as an
  enable-type switch.
+ build-fixes for --srcdir (report by Frederic L W Meunier).
This commit is contained in:
Thomas E. Dickey 2009-08-16 00:18:43 +00:00
parent d27c5b45cc
commit bbb7fd3729
12 changed files with 80 additions and 50 deletions

16
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1417 2009/08/08 18:08:44 tom Exp $
-- $Id: NEWS,v 1.1421 2009/08/15 23:09:41 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,20 @@ 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.
20090815
+ correct use of terminfo capabilities for initializing soft-keys,
broken in 20090509 merging.
+ modify wgetch() to ensure it checks SIGWINCH when it gets an error
in non-blocking mode (patch by Clemens Ladisch).
+ use PATH_SEPARATOR symbol when substituting into run_tic.sh, to
help with builds on non-Unix platforms such as OS/2 EMX.
+ modify scripting for misc/run_tic.sh to test configure script's
$cross_compiling variable directly rather than comparing host/build
compiler names (prompted by comment in GenToo #249363).
+ fix configure script option --with-database, which was coded as an
enable-type switch.
+ build-fixes for --srcdir (report by Frederic L W Meunier).
20090808
+ separate _nc_find_entry() and _nc_find_type_entry() from
implementation details of hash function.

23
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Revision: 1.472 .
# From configure.in Revision: 1.473 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20081225.
#
@ -5693,9 +5693,9 @@ EOF
echo "$as_me:5693: checking which terminfo source-file will be installed" >&5
echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
# Check whether --enable-database or --disable-database was given.
if test "${enable_database+set}" = set; then
enableval="$enable_database"
# Check whether --with-database or --without-database was given.
if test "${with_database+set}" = set; then
withval="$with_database"
TERMINFO_SRC=$withval
fi;
echo "$as_me:5701: result: $TERMINFO_SRC" >&5
@ -17965,6 +17965,7 @@ s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
s,@cross_compiling@,$cross_compiling,;t t
CEOF
EOF
@ -18079,7 +18080,7 @@ done; }
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:18082: creating $ac_file" >&5
{ echo "$as_me:18083: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@ -18097,7 +18098,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:18100: error: cannot find input file: $f" >&5
test -f "$f" || { { echo "$as_me:18101: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@ -18110,7 +18111,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:18113: error: cannot find input file: $f" >&5
{ { echo "$as_me:18114: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@ -18176,7 +18177,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:18179: creating $ac_file" >&5
test x"$ac_file" != x- && { echo "$as_me:18180: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@ -18187,7 +18188,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:18190: error: cannot find input file: $f" >&5
test -f "$f" || { { echo "$as_me:18191: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@ -18200,7 +18201,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:18203: error: cannot find input file: $f" >&5
{ { echo "$as_me:18204: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@ -18258,7 +18259,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:18261: $ac_file is unchanged" >&5
{ echo "$as_me:18262: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \

View File

@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.472 2009/07/18 16:18:30 tom Exp $
dnl $Id: configure.in,v 1.473 2009/08/15 16:28:00 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.472 $)
AC_REVISION($Revision: 1.473 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -445,7 +445,7 @@ if test "$use_database" != no ; then
AC_DEFINE(USE_DATABASE)
AC_MSG_CHECKING(which terminfo source-file will be installed)
AC_ARG_ENABLE(database,
AC_ARG_WITH(database,
[ --with-database=XXX specify terminfo source to install],
[TERMINFO_SRC=$withval])
AC_MSG_RESULT($TERMINFO_SRC)
@ -1872,6 +1872,7 @@ else
MAKE_PC_FILES="#"
fi
AC_SUBST(MAKE_PC_FILES)
AC_SUBST(cross_compiling)
AC_OUTPUT( \
include/MKterm.h.awk \

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.714 2009/08/08 15:23:25 tom Exp $
# $Id: dist.mk,v 1.715 2009/08/10 20:48:14 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 = 7
NCURSES_PATCH = 20090808
NCURSES_PATCH = 20090815
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.36 2009/06/13 21:42:45 tom Exp $
# $Id: Makefile.in,v 1.37 2009/08/10 20:50:04 tom Exp $
##############################################################################
# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
# Copyright (c) 1998,2001,2009 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"), #
@ -64,6 +64,7 @@ TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@
CONFIG_SRC = \
MKterm.h.awk \
curses.head \
ncurses_dll.h \
termcap.h \
unctrl.h
@ -72,7 +73,6 @@ AUTO_SRC = \
curses.h \
hashsize.h \
ncurses_def.h \
ncurses_dll.h \
parametrized.h \
term.h

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.51 2009/02/07 18:17:17 Miroslav.Lichvar Exp $
# $Id: Makefile.in,v 1.52 2009/08/15 17:13:49 tom Exp $
##############################################################################
# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. #
# #
@ -57,9 +57,6 @@ bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
CC = @CC@
HOSTCC = @BUILD_CC@
tabsetdir = $(datadir)/tabset
ticdir = @TERMINFO@
ticfile = $(ticdir).db
@ -93,8 +90,7 @@ install.data : terminfo.tmp \
datadir=${datadir} \
ticdir=${ticdir} \
source=terminfo.tmp \
THIS_CC="$(CC)" \
THAT_CC="$(HOSTCC)" \
cross_compiling=@cross_compiling@ \
$(SHELL) ./run_tic.sh
@cd $(srcdir)/tabset && \
$(SHELL) -c 'for i in * ; do \

View File

@ -1,7 +1,7 @@
#!@SHELL@
# $Id: run_tic.in,v 1.23 2006/10/28 19:43:30 tom Exp $
# $Id: run_tic.in,v 1.24 2009/08/15 17:19:36 tom Exp $
##############################################################################
# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. #
# Copyright (c) 1998-2006,2009 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"), #
@ -28,7 +28,7 @@
# authorization. #
##############################################################################
#
# Author: Thomas E. Dickey 1996,2000
# Author: Thomas E. Dickey 1996-on
#
# This script is used to install terminfo.src using tic. We use a script
# because the path checking is too awkward to do in a makefile.
@ -52,8 +52,7 @@ echo '** Building terminfo database, please wait...'
: ${ticdir=@TERMINFO@}
: ${source=@TERMINFO_SRC@}
: ${LN_S="@LN_S@"}
: ${THAT_CC=cc}
: ${THIS_CC=cc}
: ${cross_compiling=no}
: ${ext_funcs=@NCURSES_EXT_FUNCS@}
test -z "${DESTDIR}" && DESTDIR=
@ -61,10 +60,10 @@ test -z "${DESTDIR}" && DESTDIR=
# Allow tic to run either from the install-path, or from the build-directory.
# Do not do this if we appear to be cross-compiling. In that case, we rely
# on the host's copy of tic to compile the terminfo database.
if test "$THAT_CC" = "$THIS_CC" ; then
if test "x$cross_compiling" = "xno" ; then
case "$PATH" in
:*) PATH=../progs:../lib:${DESTDIR}$bindir$PATH ;;
*) PATH=../progs:../lib:${DESTDIR}$bindir:$PATH ;;
@PATH_SEPARATOR@*) PATH=../progs@PATH_SEPARATOR@../lib@PATH_SEPARATOR@${DESTDIR}$bindir$PATH ;;
*) PATH=../progs@PATH_SEPARATOR@../lib@PATH_SEPARATOR@${DESTDIR}$bindir@PATH_SEPARATOR@$PATH ;;
esac
export PATH
SHLIB="sh $srcdir/shlib"

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.118 2009/08/08 17:42:06 tom Exp $
# $Id: Makefile.in,v 1.119 2009/08/10 09:06:37 tom Exp $
##############################################################################
# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. #
# #
@ -206,7 +206,7 @@ make_hash$(BUILD_EXEEXT) : \
../include/hashsize.h
$(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
./expanded.c : curses.priv.h $(serial)/MKexpanded.sh
./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
./comp_captab.c: \

View File

@ -42,7 +42,7 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_getch.c,v 1.106 2009/07/25 17:02:03 tom Exp $")
MODULE_ID("$Id: lib_getch.c,v 1.107 2009/08/15 20:41:24 Clemens.Ladisch Exp $")
#include <fifo_defs.h>
@ -110,9 +110,9 @@ NCURSES_SP_NAME(get_escdelay) (NCURSES_SP_DCL0)
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
get_escdelay (void)
get_escdelay(void)
{
return NCURSES_SP_NAME(get_escdelay)(CURRENT_SCREEN);
return NCURSES_SP_NAME(get_escdelay) (CURRENT_SCREEN);
}
#endif
#endif /* NCURSES_EXT_FUNCS */
@ -467,7 +467,7 @@ _nc_wgetch(WINDOW *win,
}
#endif
if (!rc) {
returnCode(ERR);
goto check_sigwinch;
}
}
/* else go on to read data available */
@ -529,6 +529,7 @@ _nc_wgetch(WINDOW *win,
}
if (ch == ERR) {
check_sigwinch:
#if USE_SIZECHANGE
if (_nc_handle_sigwinch(sp)) {
_nc_update_screensize(sp);

View File

@ -47,7 +47,19 @@
#define CUR SP_TERMTYPE
#endif
MODULE_ID("$Id: lib_slk.c,v 1.40 2009/07/19 00:34:07 tom Exp $")
MODULE_ID("$Id: lib_slk.c,v 1.42 2009/08/15 23:05:02 tom Exp $")
#ifdef USE_TERM_DRIVER
#define NumLabels InfoOf(SP_PARM).numlabels
#define NoColorVideo InfoOf(SP_PARM).nocolorvideo
#define LabelWidth InfoOf(SP_PARM).labelwidth
#define LabelHeight InfoOf(SP_PARM).labelheight
#else
#define NumLabels num_labels
#define NoColorVideo no_color_video
#define LabelWidth label_width
#define LabelHeight label_height
#endif
/*
* Free any memory related to soft labels, return an error.
@ -107,8 +119,9 @@ _nc_format_slks(NCURSES_SP_DCLx int cols)
x += max_length;
x += (i == 2 || i == 4) ? gap : 1;
}
} else
returnCode(slk_failed(NCURSES_SP_ARG));
} else {
return slk_failed(NCURSES_SP_ARG);
}
}
}
SP_PARM->_slk->dirty = TRUE;
@ -141,7 +154,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
term = TerminalOf(SP_PARM);
assert(term);
numlab = InfoOf(SP_PARM).numlabels;
numlab = NumLabels;
if (SP_PARM->_slk) { /* we did this already, so simply return */
returnCode(OK);
@ -158,7 +171,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
* with colors. In that case, we're still guaranteed that "reverse" would
* work.
*/
if ((InfoOf(SP_PARM).nocolorvideo & 1) == 0)
if ((NoColorVideo & 1) == 0)
SetAttr(SP_PARM->_slk->attr, A_STANDOUT);
else
SetAttr(SP_PARM->_slk->attr, A_REVERSE);
@ -167,7 +180,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
? numlab
: MAX_SKEY(SP_PARM->slk_format));
SP_PARM->_slk->maxlen = ((numlab > 0)
? InfoOf(SP_PARM).labelwidth * InfoOf(SP_PARM).labelheight
? LabelWidth * LabelHeight
: MAX_SKEY_LEN(SP_PARM->slk_format));
SP_PARM->_slk->labcnt = ((SP_PARM->_slk->maxlab < MAX_SKEY(SP_PARM->slk_format))
? MAX_SKEY(SP_PARM->slk_format)

View File

@ -43,7 +43,13 @@
#define CUR SP_TERMTYPE
#endif
MODULE_ID("$Id: lib_slkrefr.c,v 1.21 2009/06/06 20:26:17 tom Exp $")
MODULE_ID("$Id: lib_slkrefr.c,v 1.23 2009/08/15 23:08:28 tom Exp $")
#ifdef USE_TERM_DRIVER
#define NumLabels InfoOf(SP_PARM).numlabels
#else
#define NumLabels num_labels
#endif
/*
* Paint the info line for the PC style SLK emulation.
@ -81,7 +87,7 @@ slk_intern_refresh(SCREEN *sp)
slk = sp->_slk;
fmt = sp->slk_format;
numlab = InfoOf(sp).numlabels;
numlab = NumLabels;
if (slk->hidden)
return;

View File

@ -69,7 +69,7 @@
#define CUR SP_TERMTYPE
#endif
MODULE_ID("$Id: lib_vidattr.c,v 1.57 2009/05/23 20:46:28 tom Exp $")
MODULE_ID("$Id: lib_vidattr.c,v 1.58 2009/08/15 22:12:01 tom Exp $")
#define doPut(mode) \
TPUTS_TRACE(#mode); \
@ -344,7 +344,6 @@ NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0)
attrs = CallDriver(SP_PARM, conattr);
#else
T((T_CALLED("termattrs()")));
if (enter_alt_charset_mode)
attrs |= A_ALTCHARSET;