From 205f120bce7a338464e79ef846e4f07eff365d6c Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 5 Oct 2008 00:17:19 +0000 Subject: [PATCH] ncurses 5.6 - patch 20081004 + some build-fixes for configure --disable-ext-funcs (incomplete, but works for C/C++ parts). + improve configure-check for awks unable to handle large strings, e.g. AIX 5.1 whose awk silently gives up on large printf's. --- Ada95/gen/Makefile.in | 6 +++--- Ada95/gen/gen.c | 8 +++----- NEWS | 8 +++++++- aclocal.m4 | 6 +++--- configure | 6 +++--- configure.in | 6 +++--- dist.mk | 4 ++-- ncurses/base/MKunctrl.awk | 4 +++- ncurses/curses.priv.h | 6 +++++- test/test.priv.h | 6 ++++-- test/worm.c | 4 ++-- 11 files changed, 38 insertions(+), 26 deletions(-) diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in index 7bb1dc9c..b7e3becf 100644 --- a/Ada95/gen/Makefile.in +++ b/Ada95/gen/Makefile.in @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 1998-2007,2008 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 @@ # # Author: Juergen Pfeifer, 1996 # -# $Id: Makefile.in,v 1.60 2007/09/15 17:55:33 tom Exp $ +# $Id: Makefile.in,v 1.61 2008/10/04 22:58:31 tom Exp $ # .SUFFIXES: @@ -79,7 +79,7 @@ LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) RANLIB = @RANLIB@ M4 = m4 -M4FLAGS = +M4FLAGS = -DNCURSES_EXT_FUNCS=@NCURSES_EXT_FUNCS@ ADACURSES_CONFIG = adacurses-config diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c index 3394aa4c..d8ea44f7 100644 --- a/Ada95/gen/gen.c +++ b/Ada95/gen/gen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2005,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998,2007,2008 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 * @@ -32,7 +32,7 @@ /* Version Control - $Id: gen.c,v 1.48 2007/05/05 17:24:36 tom Exp $ + $Id: gen.c,v 1.49 2008/10/04 21:59:37 tom Exp $ --------------------------------------------------------------------------*/ /* This program generates various record structures and constants from the @@ -1147,15 +1147,13 @@ color_def(const char *name, int value) printf(" %-16s : constant Color_Number := %d;\n", name, value); } -#define HAVE_USE_DEFAULT_COLORS 1 - /* * Generate all color definitions */ static void gen_color(void) { -#ifdef HAVE_USE_DEFAULT_COLORS +#if HAVE_USE_DEFAULT_COLORS color_def("Default_Color", -1); #endif #ifdef COLOR_BLACK diff --git a/NEWS b/NEWS index a14e7ed9..f672612c 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.1302 2008/09/27 22:37:50 tom Exp $ +-- $Id: NEWS,v 1.1304 2008/10/04 23:01:08 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,12 @@ 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. +20081004 + + some build-fixes for configure --disable-ext-funcs (incomplete, but + works for C/C++ parts). + + improve configure-check for awks unable to handle large strings, e.g. + AIX 5.1 whose awk silently gives up on large printf's. + 20080927 + fix build for --with-dmalloc by workaround for redefinition of strndup between string.h and dmalloc.h diff --git a/aclocal.m4 b/aclocal.m4 index 65a4cc03..8fe0cf8d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.465 2008/09/20 23:52:48 tom Exp $ +dnl $Id: aclocal.m4,v 1.466 2008/10/04 21:21:40 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -331,7 +331,7 @@ You have the following choices: fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_AWK_BIG_PRINTF version: 1 updated: 2008/09/06 17:17:18 +dnl CF_AWK_BIG_PRINTF version: 2 updated: 2008/10/04 17:16:18 dnl ----------------- dnl Check if awk can handle big strings using printf. Some older versions of dnl awk choke on large strings passed via "%s". @@ -346,7 +346,7 @@ AC_DEFUN([CF_AWK_BIG_PRINTF], ;; *) #(vi if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \ - | $AWK '{ if (length([$]0) != $1) exit 1; }' 2>/dev/null >/dev/null ); then + | $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then eval $2=yes else eval $2=no diff --git a/configure b/configure index 084e60f2..64c60234 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.450 . +# From configure.in Revision: 1.451 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20080325. # @@ -5638,8 +5638,8 @@ else eval with_big_strings=no ;; *) #(vi - if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 4000) { xx = xx "x"; }; printf("%s\n", xx); }' \ - | $AWK '{ if (length($0) != 4000) exit 1; }' 2>/dev/null >/dev/null ); then + if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \ + | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then eval with_big_strings=yes else eval with_big_strings=no diff --git a/configure.in b/configure.in index a9dd9c71..0714369f 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.450 2008/09/13 15:03:24 tom Exp $ +dnl $Id: configure.in,v 1.451 2008/10/04 21:00:54 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.450 $) +AC_REVISION($Revision: 1.451 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -505,7 +505,7 @@ AC_MSG_CHECKING(if big-strings option selected) AC_ARG_ENABLE(big-strings, [ --disable-big-strings assume compiler has only standard-size strings], [with_big_strings=$enableval], - [CF_AWK_BIG_PRINTF(4000,with_big_strings)]) + [CF_AWK_BIG_PRINTF(12000,with_big_strings)]) AC_MSG_RESULT($with_big_strings) USE_BIG_STRINGS=0 diff --git a/dist.mk b/dist.mk index aefa45e9..510711e5 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.663 2008/09/27 12:10:38 tom Exp $ +# $Id: dist.mk,v 1.664 2008/10/04 19:28:59 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 = 20080927 +NCURSES_PATCH = 20081004 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/ncurses/base/MKunctrl.awk b/ncurses/base/MKunctrl.awk index 4bebf3cf..36fbeecb 100644 --- a/ncurses/base/MKunctrl.awk +++ b/ncurses/base/MKunctrl.awk @@ -1,4 +1,4 @@ -# $Id: MKunctrl.awk,v 1.22 2008/05/31 19:36:11 tom Exp $ +# $Id: MKunctrl.awk,v 1.23 2008/10/04 21:40:24 tom Exp $ ############################################################################## # Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # # # @@ -101,6 +101,7 @@ END { blob = blob "\""; print "" + printf "#if NCURSES_EXT_FUNCS\n"; if (bigstrings) { blob = blob "\n/* printable values in 128-255 range */" printf "static const short unctrl_c1[] = {" @@ -135,6 +136,7 @@ END { } } print "};" + print "#endif /* NCURSES_EXT_FUNCS */" blob = blob "\"\n" print "" diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 5175dd7c..29e13195 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.393 2008/09/27 22:12:07 tom Exp $ + * $Id: curses.priv.h,v 1.394 2008/10/04 21:37:45 tom Exp $ * * curses.priv.h * @@ -1442,6 +1442,10 @@ extern NCURSES_EXPORT(void) _nc_expanded (void); #endif +#if !NCURSES_EXT_FUNCS +#define set_escdelay(value) ESCDELAY = value +#endif + #if !HAVE_GETCWD #define getcwd(buf,len) getwd(buf) #endif diff --git a/test/test.priv.h b/test/test.priv.h index 1f83dbed..7c1f39ff 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.78 2008/09/06 22:01:24 tom Exp $ */ +/* $Id: test.priv.h,v 1.79 2008/10/04 21:53:41 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -548,9 +548,11 @@ typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); #if HAVE_USE_WINDOW #define USING_WINDOW(w,func) use_window(w, (NCURSES_WINDOW_CB) func, w) +#define USING_WINDOW2(w,func,data) use_window(w, (NCURSES_WINDOW_CB) func, data) #define WANT_USE_WINDOW() extern void _nc_want_use_window(void) #else #define USING_WINDOW(w,func) func(w) +#define USING_WINDOW2(w,func,data) func(w,data) #define WANT_USE_WINDOW() extern void _nc_want_use_window(void) #endif @@ -558,7 +560,7 @@ typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); #define USING_SCREEN(s,func,data) use_screen(s, (NCURSES_SCREEN_CB) func, data) #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void) #else -#define USING_SCREEN(s,func,data) func(data) +#define USING_SCREEN(s,func,data) func(s,data) #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void) #endif diff --git a/test/worm.c b/test/worm.c index e1c83d64..2029b34f 100644 --- a/test/worm.c +++ b/test/worm.c @@ -61,7 +61,7 @@ Options: traces will be dumped. The program stops and waits for one character of input at the beginning and end of the interval. - $Id: worm.c,v 1.57 2008/03/02 01:43:35 tom Exp $ + $Id: worm.c,v 1.58 2008/10/04 21:54:09 tom Exp $ */ #include @@ -356,7 +356,7 @@ draw_all_worms(void) } #else for (n = 0, w = &worm[0]; n < number; n++, w++) { - if (use_window(stdscr, draw_worm, w)) + if (USING_WINDOW2(stdscr, draw_worm, w)) done = TRUE; } #endif -- 2.44.0