From c6abbc3dd08d8a749098dc1674ce6ec65d844e86 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 21 Jan 2007 01:25:57 +0000 Subject: [PATCH] ncurses 5.6 - patch 20070120 + add _nc_leaks_tic() to separate leak-checking of tic library from term/ncurses libraries, and thereby eliminate a library dependency. + fix test/mk-test.awk to ignore blank lines. + correct paths in include/headers, for --srcdir (patch by Miroslav Lichvar). in a separate library (suggested by Miroslav Lichvar). --- NEWS | 11 +++++++-- configure | 49 ++++++++++++++------------------------ configure.in | 21 ++++------------ dist.mk | 4 ++-- include/headers | 8 +++---- include/nc_alloc.h | 5 ++-- ncurses/base/lib_freeall.c | 8 ++----- ncurses/tinfo/comp_parse.c | 15 ++++++++++-- progs/infocmp.c | 5 ++-- progs/toe.c | 5 ++-- test/mk-test.awk | 12 +++++++--- 11 files changed, 70 insertions(+), 73 deletions(-) diff --git a/NEWS b/NEWS index 1af8bffd..ab3a9d5a 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1067 2007/01/14 01:21:07 tom Exp $ +-- $Id: NEWS,v 1.1069 2007/01/20 22:37:14 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,13 +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. +20070120 + + add _nc_leaks_tic() to separate leak-checking of tic library from + term/ncurses libraries, and thereby eliminate a library dependency. + + fix test/mk-test.awk to ignore blank lines. + + correct paths in include/headers, for --srcdir (patch by Miroslav + Lichvar). + 20070113 + add a break-statement in misc/shlib to ensure that it exits on the _first_ matched directory (report by Paul Novak). + add tack/configure, which can be used to build tack outside the ncurses build-tree. + add --with-ticlib option, to build/install the tic-support functions - in a separate library (suggestd by Miroslav Lichvar). + in a separate library (suggested by Miroslav Lichvar). 20070106 + change MKunctrl.awk to reduce relocation table for unctrl.o diff --git a/configure b/configure index da5dbcd6..496f814e 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.388 . +# From configure.in Revision: 1.389 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20061216. # @@ -15186,20 +15186,7 @@ if test "$with_ticlib" != no ; then TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}" TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}" fi - - TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TICS_DEP_SUFFIX}" - TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TICS_DEP_SUFFIX}" - if test "$DFT_LWR_MODEL" = "libtool"; then - TEST_ARGS="${TEST_DEPS}" - TEST_ARG2="${TEST_DEP2}" - TICS_ARGS="-L${LIB_DIR} $TEST_ARGS" - else - TEST_ARGS="-l${TICS_ARG_SUFFIX}" - TEST_ARG2="-l${TICS_ARG_SUFFIX}" - TICS_ARGS="-L${LIB_DIR} $TEST_ARGS" - # SHLIB_LIST="$SHLIB_LIST -l${TICS_LIB_SUFFIX}" - fi - test "$with_no_leaks" != no && TICS_LEAKS="-l${TICS_NAME}" + TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}" else TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}" fi @@ -15236,12 +15223,12 @@ fi # needed for Ada95 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'` -echo "$as_me:15239: checking where we will install curses.h" >&5 +echo "$as_me:15226: checking where we will install curses.h" >&5 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6 test "$with_overwrite" = no && \ test "x$includedir" = 'x${prefix}/include' && \ includedir='${prefix}/include/ncurses'${LIB_SUFFIX} -echo "$as_me:15244: result: $includedir" >&5 +echo "$as_me:15231: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -15249,7 +15236,7 @@ echo "${ECHO_T}$includedir" >&6 if test "$with_overwrite" != no ; then if test "$NCURSES_LIBUTF8" = 1 ; then NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' - { echo "$as_me:15252: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:15239: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;} fi fi @@ -15265,7 +15252,7 @@ EOF ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:15268: checking for src modules" >&5 +echo "$as_me:15255: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -15328,7 +15315,7 @@ EOF fi fi done -echo "$as_me:15331: result: $cf_cv_src_modules" >&5 +echo "$as_me:15318: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -15574,7 +15561,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:15577: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:15564: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -15750,7 +15737,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:15753: error: ambiguous option: $1 + { { echo "$as_me:15740: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -15769,7 +15756,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:15772: error: unrecognized option: $1 + -*) { { echo "$as_me:15759: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -15862,7 +15849,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:15865: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:15852: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -16235,7 +16222,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:16238: creating $ac_file" >&5 + { echo "$as_me:16225: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -16253,7 +16240,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:16256: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16243: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16266,7 +16253,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16269: error: cannot find input file: $f" >&5 + { { echo "$as_me:16256: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16332,7 +16319,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:16335: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:16322: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -16343,7 +16330,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:16346: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16333: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16356,7 +16343,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16359: error: cannot find input file: $f" >&5 + { { echo "$as_me:16346: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16414,7 +16401,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:16417: $ac_file is unchanged" >&5 + { echo "$as_me:16404: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ diff --git a/configure.in b/configure.in index de343778..93542d23 100644 --- a/configure.in +++ b/configure.in @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.388 2007/01/14 00:23:57 tom Exp $ +dnl $Id: configure.in,v 1.389 2007/01/21 00:30:30 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.388 $) +AC_REVISION($Revision: 1.389 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -693,7 +693,7 @@ AC_SUBST(cf_cv_enable_lp64) CF_LARGEFILE -### use option --disable-tparm-varargs to make tparm() conform to X/Open +### use option --disable-tparm-varargs to make tparm() conform to X/Open AC_MSG_CHECKING(if you want tparm not to use X/Open fixed-parameter list) AC_ARG_ENABLE(tparm-varargs, [ --disable-tparm-varargs compile tparm() without varargs interface], @@ -1474,20 +1474,7 @@ if test "$with_ticlib" != no ; then TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}" TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}" fi - - TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TICS_DEP_SUFFIX}" - TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TICS_DEP_SUFFIX}" - if test "$DFT_LWR_MODEL" = "libtool"; then - TEST_ARGS="${TEST_DEPS}" - TEST_ARG2="${TEST_DEP2}" - TICS_ARGS="-L${LIB_DIR} $TEST_ARGS" - else - TEST_ARGS="-l${TICS_ARG_SUFFIX}" - TEST_ARG2="-l${TICS_ARG_SUFFIX}" - TICS_ARGS="-L${LIB_DIR} $TEST_ARGS" - # SHLIB_LIST="$SHLIB_LIST -l${TICS_LIB_SUFFIX}" - fi - test "$with_no_leaks" != no && TICS_LEAKS="-l${TICS_NAME}" + TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}" else TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}" fi diff --git a/dist.mk b/dist.mk index 1af70b34..064dc1f9 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.572 2007/01/13 14:33:01 tom Exp $ +# $Id: dist.mk,v 1.573 2007/01/20 19:55:40 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 = 20070113 +NCURSES_PATCH = 20070120 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/include/headers b/include/headers index d06774c1..a24bd909 100644 --- a/include/headers +++ b/include/headers @@ -1,4 +1,4 @@ -# $Id: headers,v 1.8 2007/01/13 23:31:33 tom Exp $ +# $Id: headers,v 1.9 2007/01/20 19:57:04 Miroslav.Lichvar Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -35,8 +35,8 @@ unctrl.h termcap.h $(srcdir)/ncurses_dll.h @ ticlib -tic.h -term_entry.h -nc_tparm.h +$(srcdir)/tic.h +$(srcdir)/term_entry.h +$(srcdir)/nc_tparm.h # vile:makemode diff --git a/include/nc_alloc.h b/include/nc_alloc.h index ad514087..c5fcc734 100644 --- a/include/nc_alloc.h +++ b/include/nc_alloc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,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 * @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996,1997 * ****************************************************************************/ -/* $Id: nc_alloc.h,v 1.13 2005/01/16 00:27:35 tom Exp $ */ +/* $Id: nc_alloc.h,v 1.14 2007/01/21 01:09:07 tom Exp $ */ #ifndef NC_ALLOC_included #define NC_ALLOC_included 1 @@ -69,6 +69,7 @@ struct termtype; extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN; extern NCURSES_EXPORT(void) _nc_free_tparm(void); extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void); +extern NCURSES_EXPORT(void) _nc_leaks_tic(void); #define ExitProgram(code) _nc_free_and_exit(code) #endif diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c index 23728f39..90b6c1f4 100644 --- a/ncurses/base/lib_freeall.c +++ b/ncurses/base/lib_freeall.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,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 * @@ -40,7 +40,7 @@ extern int malloc_errfd; /* FIXME */ #endif -MODULE_ID("$Id: lib_freeall.c,v 1.40 2006/12/31 00:32:34 tom Exp $") +MODULE_ID("$Id: lib_freeall.c,v 1.41 2007/01/21 01:09:07 tom Exp $") /* * Free all ncurses data. This is used for testing only (there's no practical @@ -96,11 +96,7 @@ _nc_freeall(void) FreeIfNeeded(_nc_wacs); #endif #if NO_LEAKS - _nc_alloc_entry_leaks(); - _nc_captoinfo_leaks(); - _nc_comp_scan_leaks(); _nc_keyname_leaks(); - _nc_tic_expand(0, FALSE, 0); #endif if ((s = _nc_home_terminfo()) != 0) diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index 3334b1f7..0cb77fd4 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,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 * @@ -53,7 +53,7 @@ #include #include -MODULE_ID("$Id: comp_parse.c,v 1.64 2006/12/24 00:45:20 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.65 2007/01/21 01:10:09 tom Exp $") static void sanity_check2(TERMTYPE *, bool); NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2; @@ -465,3 +465,14 @@ sanity_check(TERMTYPE *tp) { sanity_check2(tp, FALSE); } + +#if NO_LEAKS +NCURSES_EXPORT(void) +_nc_leaks_tic(void) +{ + _nc_alloc_entry_leaks(); + _nc_captoinfo_leaks(); + _nc_comp_scan_leaks(); + _nc_tic_expand(0, FALSE, 0); +} +#endif diff --git a/progs/infocmp.c b/progs/infocmp.c index d3353f26..932063e5 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,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 * @@ -41,7 +41,7 @@ #include -MODULE_ID("$Id: infocmp.c,v 1.85 2006/08/19 21:20:37 tom Exp $") +MODULE_ID("$Id: infocmp.c,v 1.86 2007/01/21 01:09:07 tom Exp $") #define L_CURL "{" #define R_CURL "}" @@ -96,6 +96,7 @@ ExitProgram(int code) while (termcount-- > 0) _nc_free_termtype(&entries[termcount].tterm); _nc_leaks_dump_entry(); + _nc_leaks_tic(); _nc_free_and_exit(code); } #endif diff --git a/progs/toe.c b/progs/toe.c index 9c0de791..2e67bd50 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,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 * @@ -46,7 +46,7 @@ #include #endif -MODULE_ID("$Id: toe.c,v 1.41 2006/08/19 18:18:09 tom Exp $") +MODULE_ID("$Id: toe.c,v 1.42 2007/01/21 01:09:07 tom Exp $") #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) @@ -60,6 +60,7 @@ ExitProgram(int code) { _nc_free_entries(_nc_head); _nc_leaks_dump_entry(); + _nc_leaks_tic(); _nc_free_and_exit(code); } #endif diff --git a/test/mk-test.awk b/test/mk-test.awk index a89c150e..9be0361b 100644 --- a/test/mk-test.awk +++ b/test/mk-test.awk @@ -1,6 +1,6 @@ -# $Id: mk-test.awk,v 1.4 2006/10/21 22:56:50 tom Exp $ +# $Id: mk-test.awk,v 1.5 2007/01/20 21:28:47 tom Exp $ ############################################################################## -# Copyright (c) 2006 Free Software Foundation, Inc. # +# Copyright (c) 2006,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 "Software"), # @@ -34,7 +34,13 @@ BEGIN { first = 1; count = 0; } -!/^#/ { +/^#/ { + next; + } +/^$/ { + next; + } + { if (first) { print "# generated by mk-test.awk\n"; first = 0; -- 2.45.1