ncurses 5.7 - patch 20090314

+ modify scripts to generate ncurses*-config and pc-files to add
  dependency for tinfo library (patch by Charles Wilson).
+ improve comparison of program-names when checking for linked flavors
  such as "reset" by ignoring the executable suffix (reports by Charles
  Wilson, Samuel Thibault and Cedric Bretaudeau on Cygwin mailing
  list).
+ suppress configure check for static/dynamic linker flags for gcc on
  Solaris 10, since gcc is confused by absence of static libc, and
  does not switch back to dynamic mode before finishing the libraries
  (reports by Joel Bertrand, Alan Pae).
+ minor fixes to Intel compiler warning checks in configure script.
+ modify _nc_leaks_tinfo() so leak-checking in test/railroad.c works.
+ modify set_curterm() to make broken-linker configuration work with
  changes from 20090228 (report by Charles Wilson).
This commit is contained in:
Thomas E. Dickey 2009-03-15 01:02:54 +00:00
parent b94faec6aa
commit 684ea7a157
15 changed files with 818 additions and 685 deletions

View File

@ -953,6 +953,7 @@
./progs/tic.c
./progs/toe.c
./progs/tput.c
./progs/transform.c
./progs/tset.c
./tar-copy.sh
./test/Makefile.in

18
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1367 2009/02/28 22:38:03 tom Exp $
-- $Id: NEWS,v 1.1370 2009/03/14 20:40:10 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,22 @@ 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.
20090314
+ modify scripts to generate ncurses*-config and pc-files to add
dependency for tinfo library (patch by Charles Wilson).
+ improve comparison of program-names when checking for linked flavors
such as "reset" by ignoring the executable suffix (reports by Charles
Wilson, Samuel Thibault and Cedric Bretaudeau on Cygwin mailing
list).
+ suppress configure check for static/dynamic linker flags for gcc on
Solaris 10, since gcc is confused by absence of static libc, and
does not switch back to dynamic mode before finishing the libraries
(reports by Joel Bertrand, Alan Pae).
+ minor fixes to Intel compiler warning checks in configure script.
+ modify _nc_leaks_tinfo() so leak-checking in test/railroad.c works.
+ modify set_curterm() to make broken-linker configuration work with
changes from 20090228 (report by Charles Wilson).
20090228
+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+ modify declaration of cur_term when broken-linker is used, but

14
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.483 2009/02/07 19:12:17 tom Exp $
dnl $Id: aclocal.m4,v 1.484 2009/03/14 18:11:10 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -1486,7 +1486,7 @@ if test "$GCC" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_WARNINGS version: 23 updated: 2008/07/26 17:54:02
dnl CF_GCC_WARNINGS version: 24 updated: 2009/02/01 15:21:00
dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy:
@ -1519,7 +1519,6 @@ if test "$INTEL_COMPILER" = yes
then
# The "-wdXXX" options suppress warnings:
# remark #1419: external declaration in primary source file
# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
# remark #193: zero used for undefined preprocessing identifier
@ -1527,19 +1526,18 @@ then
# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
# remark #869: parameter "tw" was never referenced
# remark #981: operands are evaluated in unspecified order
# warning #269: invalid format string conversion
# warning #279: controlling expression is constant
AC_CHECKING([for $CC warning options])
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
for cf_opt in \
wd1419 \
wd1682 \
wd1683 \
wd1684 \
wd193 \
wd279 \
wd593 \
wd279 \
wd810 \
wd869 \
wd981
@ -2199,7 +2197,7 @@ ifdef([AC_FUNC_FSEEKO],[
])
])
dnl ---------------------------------------------------------------------------
dnl CF_LDFLAGS_STATIC version: 5 updated: 2008/12/27 12:30:03
dnl CF_LDFLAGS_STATIC version: 6 updated: 2009/03/14 14:03:25
dnl -----------------
dnl Check for compiler/linker flags used to temporarily force usage of static
dnl libraries. This depends on the compiler and platform. Use this to help
@ -2209,7 +2207,7 @@ AC_DEFUN([CF_LDFLAGS_STATIC],[
if test "$GCC" = yes ; then
case $cf_cv_system_name in #(
OS/2*|os2*|aix[[4]]*) #( vi
OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]]) #( vi
LDFLAGS_STATIC=
LDFLAGS_SHARED=
;;

1282
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.688 2009/02/28 14:49:13 tom Exp $
# $Id: dist.mk,v 1.689 2009/03/14 12:17:13 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 = 20090228
NCURSES_PATCH = 20090314
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -1,5 +1,5 @@
#!@SHELL@
# $Id: gen-pkgconfig.in,v 1.5 2009/01/24 21:06:36 tom Exp $
# $Id: gen-pkgconfig.in,v 1.7 2009/03/14 20:37:54 tom Exp $
##############################################################################
# Copyright (c) 2009 Free Software Foundation, Inc. #
# #
@ -39,6 +39,10 @@
# library, except that the tinfo library does not depend on ncurses.
LIB_NAME=@LIB_NAME@
TINFO_NAME=@TINFO_NAME@
PANEL_NAME=panel # @PANEL_NAME@
MENU_NAME=menu # @MENU_NAME@
FORM_NAME=form # @FORM_NAME@
CXX_NAME=ncurses++ # @CXX_NAME@
DFT_DEP_SUFFIX=@DFT_DEP_SUFFIX@
CXX_LIB_SUFFIX=@CXX_LIB_SUFFIX@
@ -54,10 +58,24 @@ show_libdir='@libdir@'
MAIN_LIBRARY="${LIB_NAME}@DFT_ARG_SUFFIX@"
SUB_LIBRARY="${TINFO_NAME}@DFT_ARG_SUFFIX@"
PANEL_LIBRARY="${PANEL_NAME}@DFT_ARG_SUFFIX@"
MENU_LIBRARY="${MENU_NAME}@DFT_ARG_SUFFIX@"
FORM_LIBRARY="${FORM_NAME}@DFT_ARG_SUFFIX@"
SUB_LIBRARY_REQ=${SUB_LIBRARY}
TINFO_NAME_REQ=${TINFO_NAME}
if test $TINFO_NAME = $LIB_NAME ; then
SUB_LIBRARY_REQ=
TINFO_NAME_REQ=
fi
for lib in ../lib/*
do
name=`basename $lib`
if test "$name" = "*" ; then
break
fi
root=`basename $name "$DFT_DEP_SUFFIX"`
if test "$name" = "$root" ; then
root=`basename $name "$CXX_LIB_SUFFIX"`
@ -70,13 +88,16 @@ do
desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
if test $name = $MAIN_LIBRARY ; then
reqs=
reqs=$TINFO_NAME_REQ
desc="$desc library"
elif test $name = $SUB_LIBRARY ; then
reqs=
desc="$desc terminal interface library"
elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then
reqs="$PANEL_LIBRARY $MENU_LIBRARY $FORM_LIBRARY $MAIN_LIBRARY $SUB_LIBRARY_REQ"
desc="$desc add-on library"
else
reqs=$MAIN_LIBRARY
reqs="$MAIN_LIBRARY $SUB_LIBRARY_REQ"
desc="$desc add-on library"
fi

View File

@ -1,5 +1,5 @@
#!@SHELL@
# $Id: ncurses-config.in,v 1.22 2009/01/24 21:06:45 tom Exp $
# $Id: ncurses-config.in,v 1.23 2009/03/14 19:20:57 Charles.Wilson Exp $
##############################################################################
# Copyright (c) 2006-2007,2009 Free Software Foundation, Inc. #
# #
@ -40,6 +40,7 @@ datadir="@datadir@"
mandir="@mandir@"
THIS="@LIB_NAME@@DFT_ARG_SUFFIX@"
TINFO_LIB="@TINFO_NAME@@DFT_ARG_SUFFIX@"
LANG=C; export LANG
LANGUAGE=C; export LANGUAGE
@ -82,9 +83,15 @@ while test $# -gt 0; do
ENDECHO
;;
--libs)
if test @TINFO_NAME@ = @LIB_NAME@ ; then
sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
-L$libdir @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
ENDECHO
else
sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
-L$libdir @EXTRA_LDFLAGS@ -l${THIS} -l${TINFO_LIB} @LIBS@
ENDECHO
fi
;;
# identification
--version)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2006-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 2006-2008,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 *
@ -37,7 +37,7 @@
#include <tic.h>
#include <term_entry.h>
MODULE_ID("$Id: entries.c,v 1.10 2008/12/07 00:11:45 tom Exp $")
MODULE_ID("$Id: entries.c,v 1.11 2009/03/14 15:22:37 tom Exp $")
/****************************************************************************
*
@ -117,11 +117,12 @@ _nc_leaks_tinfo(void)
T((T_CALLED("_nc_free_tinfo()")));
#if NO_LEAKS
_nc_free_tparm();
_nc_tgetent_leaks();
if (cur_term != 0)
del_curterm(cur_term);
_nc_free_tparm();
_nc_tgetent_leaks();
_nc_free_entries(_nc_head);
_nc_get_type(0);
_nc_first_name(0);

View File

@ -40,7 +40,7 @@
#include <term_entry.h> /* TTY, cur_term */
#include <termcap.h> /* ospeed */
MODULE_ID("$Id: lib_cur_term.c,v 1.19 2009/02/28 15:49:58 tom Exp $")
MODULE_ID("$Id: lib_cur_term.c,v 1.20 2009/03/14 14:39:32 tom Exp $")
#undef CUR
#define CUR termp->type.
@ -68,7 +68,9 @@ set_curterm(TERMINAL * termp)
oldterm = cur_term;
if (SP)
SP->_term = termp;
#if BROKEN_LINKER || USE_REENTRANT
#if BROKEN_LINKER && !USE_REENTRANT
cur_term = termp;
#elif BROKEN_LINKER || USE_REENTRANT
_nc_prescreen._cur_term = termp;
#else
cur_term = termp;

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.80 2008/11/15 19:04:19 tom Exp $
# $Id: Makefile.in,v 1.81 2009/03/14 18:45:55 tom Exp $
##############################################################################
# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
# Copyright (c) 1998-2008,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"), #
@ -172,10 +172,16 @@ define_init = `echo init| $(TRANSFORM)`
define_reset = `echo reset| $(TRANSFORM)`
transform.h :
echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >$@
echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@
echo "#define PROG_RESET \"$(define_reset)\"" >>$@
echo "#define PROG_INIT \"$(define_init)\"" >>$@
echo "#ifndef __TRANSFORM_H" >$@
echo "#define __TRANSFORM_H 1" >>$@
echo "#include <progs.priv.h>" >>$@
echo "extern bool same_program(const char *, const char *);" >>$@
-test -n "$x" && echo "#define SUFFIX_IGNORED \"$x\"" >>$@
echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >>$@
echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@
echo "#define PROG_RESET \"$(define_reset)\"" >>$@
echo "#define PROG_INIT \"$(define_init)\"" >>$@
echo "#endif /* __TRANSFORM_H */" >>$@
install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) tic$x $(DESTDIR)$(bindir)/$(actual_tic)
@ -216,7 +222,8 @@ $(DESTDIR)$(bindir) :
DEPS_TIC = \
$(MODEL)/tic$o \
$(MODEL)/dump_entry$o
$(MODEL)/dump_entry$o \
$(MODEL)/transform$o
tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@
@ -240,7 +247,8 @@ tabs$x: $(DEPS_TABS) $(DEPS_TABS)
@ECHO_LINK@ $(LINK) $(DEPS_TABS) $(LDFLAGS_TINFO) -o $@
DEPS_TPUT = \
$(MODEL)/tput$o
$(MODEL)/tput$o \
$(MODEL)/transform$o
tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@
@ -253,7 +261,8 @@ infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@
DEPS_TSET = \
$(MODEL)/tset$o
$(MODEL)/tset$o \
$(MODEL)/transform$o
tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@

View File

@ -1,7 +1,7 @@
# $Id: modules,v 1.14 2008/11/15 16:26:48 tom Exp $
# $Id: modules,v 1.15 2009/03/14 18:45:55 tom Exp $
# Program modules (some are in ncurses lib!)
##############################################################################
# Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. #
# Copyright (c) 1998-2008,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"), #
@ -40,5 +40,6 @@ infocmp progs $(srcdir) $(HEADER_DEPS) $(srcdir)/dump_entry.h
tabs progs $(srcdir) $(HEADER_DEPS)
tput progs $(srcdir) $(HEADER_DEPS) transform.h termsort.c
tset progs $(srcdir) $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h ../include/termcap.h
transform progs $(srcdir) $(HEADER_DEPS)
# vile:makemode

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,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 *
@ -44,7 +44,7 @@
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tic.c,v 1.137 2008/09/13 16:59:24 tom Exp $")
MODULE_ID("$Id: tic.c,v 1.138 2009/03/14 18:45:55 tom Exp $")
const char *_nc_progname = "tic";
@ -495,11 +495,11 @@ main(int argc, char *argv[])
_nc_progname = _nc_rootname(argv[0]);
if ((infodump = (strcmp(_nc_progname, PROG_CAPTOINFO) == 0)) != FALSE) {
if ((infodump = same_program(_nc_progname, PROG_CAPTOINFO)) != FALSE) {
outform = F_TERMINFO;
sortmode = S_TERMINFO;
}
if ((capdump = (strcmp(_nc_progname, PROG_INFOTOCAP) == 0)) != FALSE) {
if ((capdump = same_program(_nc_progname, PROG_INFOTOCAP)) != FALSE) {
outform = F_TERMCAP;
sortmode = S_TERMCAP;
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,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 *
@ -47,7 +47,7 @@
#endif
#include <transform.h>
MODULE_ID("$Id: tput.c,v 1.42 2008/07/13 11:05:12 tom Exp $")
MODULE_ID("$Id: tput.c,v 1.43 2009/03/14 18:45:55 tom Exp $")
#define PUTS(s) fputs(s, stdout)
#define PUTCHAR(c) putchar(c)
@ -86,8 +86,8 @@ usage(void)
static void
check_aliases(const char *name)
{
is_init = (strcmp(name, PROG_INIT) == 0);
is_reset = (strcmp(name, PROG_RESET) == 0);
is_init = same_program(name, PROG_INIT);
is_reset = same_program(name, PROG_RESET);
}
/*

79
progs/transform.c Normal file
View File

@ -0,0 +1,79 @@
/****************************************************************************
* Copyright (c) 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"), 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 *
****************************************************************************/
#include <progs.priv.h>
#include <string.h>
#include <transform.h>
MODULE_ID("$Id: transform.c,v 1.1 2009/03/14 19:08:28 tom Exp $")
#ifdef SUFFIX_IGNORED
static void
trim_suffix(const char *a, unsigned *len)
{
const char ignore[] = SUFFIX_IGNORED;
if (sizeof(ignore) != 0) {
bool trim = FALSE;
unsigned need = (sizeof(ignore) - 1);
if (*len > need) {
unsigned first = *len - need;
unsigned n;
trim = TRUE;
for (n = first; n < *len; ++n) {
if (tolower(a[n]) != tolower(ignore[n - first])) {
trim = FALSE;
break;
}
}
if (trim) {
*len -= need;
}
}
}
}
#else
#define trim_suffix(a, len) /* nothing */
#endif
bool
same_program(const char *a, const char *b)
{
unsigned len_a = strlen(a);
unsigned len_b = strlen(b);
trim_suffix(a, &len_a);
trim_suffix(b, &len_b);
return (len_a == len_b) && (strncmp(a, b, len_a) == 0);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,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 *
@ -107,7 +107,7 @@ char *ttyname(int fd);
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tset.c,v 1.76 2008/10/11 19:26:19 tom Exp $")
MODULE_ID("$Id: tset.c,v 1.77 2009/03/14 19:08:35 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
@ -1247,7 +1247,7 @@ main(int argc, char **argv)
ospeed = (NCURSES_OSPEED) mode.sg_ospeed;
#endif
if (!strcmp(_nc_progname, PROG_RESET)) {
if (same_program(_nc_progname, PROG_RESET)) {
isreset = TRUE;
reset_mode();
}