ncurses 5.7 - patch 20091121

+ fix case where progs/tput is used while sp-funcs is configure; this
  requires save/restore of out-character function from _nc_prescreen
  rather than the SCREEN structure (report by Charles Wilson).
+ fix typo in man/curs_trace.3x which caused incorrect symbolic links
+ improved configure macros CF_GCC_ATTRIBUTES, CF_PROG_LINT.
This commit is contained in:
Thomas E. Dickey 2009-11-22 01:54:35 +00:00
parent f783dbd488
commit 582d14ba03
9 changed files with 727 additions and 639 deletions

10
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1462 2009/11/14 22:32:45 tom Exp $
-- $Id: NEWS,v 1.1465 2009/11/21 23:14:39 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,7 +45,15 @@ 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.
20091121
+ fix case where progs/tput is used while sp-funcs is configure; this
requires save/restore of out-character function from _nc_prescreen
rather than the SCREEN structure (report by Charles Wilson).
+ fix typo in man/curs_trace.3x which caused incorrect symbolic links
+ improved configure macros CF_GCC_ATTRIBUTES, CF_PROG_LINT.
20091114
+ updated man/curs_trace.3x
+ limit hashing for termcap-names to 2-characters (Ubuntu #481740).
+ change a variable name in lib_newwin.c to make it clearer which

53
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.488 2009/07/17 09:14:49 tom Exp $
dnl $Id: aclocal.m4,v 1.489 2009/11/21 17:49:12 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -1397,7 +1397,7 @@ esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 11 updated: 2007/07/29 09:55:12
dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@ -1443,26 +1443,61 @@ extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
EOF
cf_printf_attribute=no
cf_scanf_attribute=no
for cf_attribute in scanf printf unused noreturn
do
CF_UPPER(cf_ATTRIBUTE,$cf_attribute)
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&AC_FD_CC
case $cf_attribute in
scanf|printf)
cat >conftest.h <<EOF
case $cf_attribute in #(vi
printf) #(vi
cf_printf_attribute=yes
cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
;;
*)
cat >conftest.h <<EOF
scanf) #(vi
cf_scanf_attribute=yes
cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
;;
*) #(vi
cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE $cf_directive
EOF
;;
esac
if AC_TRY_EVAL(ac_compile); then
test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
cat conftest.h >>confdefs.h
case $cf_attribute in #(vi
printf) #(vi
if test "$cf_printf_attribute" = no ; then
cat >>confdefs.h <<EOF
#define GCC_PRINTFLIKE(fmt,var) /* nothing */
EOF
else
cat >>confdefs.h <<EOF
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
EOF
fi
;;
scanf) #(vi
if test "$cf_scanf_attribute" = no ; then
cat >>confdefs.h <<EOF
#define GCC_SCANFLIKE(fmt,var) /* nothing */
EOF
else
cat >>confdefs.h <<EOF
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
EOF
fi
;;
esac
fi
done
else
@ -4153,11 +4188,11 @@ fi
AC_SUBST(LDCONFIG)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_LINT version: 1 updated: 2006/09/16 11:40:59
dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
dnl ------------
AC_DEFUN([CF_PROG_LINT],
[
AC_CHECK_PROGS(LINT, tdlint lint alint)
AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
AC_SUBST(LINT_OPTS)
])dnl
dnl ---------------------------------------------------------------------------

1265
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.731 2009/11/14 00:58:56 tom Exp $
# $Id: dist.mk,v 1.732 2009/11/21 17:49:48 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 = 20091114
NCURSES_PATCH = 20091121
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_trace.3x,v 1.9 2009/11/14 22:32:19 tom Exp $
.\" $Id: curs_trace.3x,v 1.10 2009/11/21 18:20:15 tom Exp $
.TH curs_trace 3X ""
.na
.hy 0
@ -58,9 +58,9 @@
.br
\fBchar *_nc_tracebits(void);\fR
.br
\fBchar * _tracecchar_t (const cchar_t *string);\fR
\fBchar * _tracecchar_t(const cchar_t *string);\fR
.br
\fBchar * _tracecchar_t2 (int buffer, const cchar_t *string);\fR
\fBchar * _tracecchar_t2(int buffer, const cchar_t *string);\fR
.br
\fBchar *_tracechar(int ch);\fR
.br

View File

@ -35,7 +35,7 @@
/*
* $Id: curses.priv.h,v 1.442 2009/10/31 20:33:43 tom Exp $
* $Id: curses.priv.h,v 1.443 2009/11/21 22:27:52 tom Exp $
*
* curses.priv.h
*
@ -805,6 +805,7 @@ typedef struct {
#if NCURSES_NO_PADDING
bool _no_padding; /* flag to set if padding disabled */
#endif
NCURSES_SP_OUTC _outch; /* output handler if not putc */
#if BROKEN_LINKER || USE_REENTRANT
chtype *real_acs_map;
int _LINES;

View File

@ -42,7 +42,7 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_data.c,v 1.55 2009/06/07 14:48:25 tom Exp $")
MODULE_ID("$Id: lib_data.c,v 1.56 2009/11/21 22:34:17 tom Exp $")
/*
* OS/2's native linker complains if we don't initialize public data when
@ -229,6 +229,7 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
#if NCURSES_NO_PADDING
FALSE, /* flag to set if padding disabled */
#endif
0, /* _outch */
#if BROKEN_LINKER || USE_REENTRANT
NULL, /* real_acs_map */
0, /* LINES */

View File

@ -51,7 +51,7 @@
#include <termcap.h> /* ospeed */
#include <tic.h>
MODULE_ID("$Id: lib_tputs.c,v 1.79 2009/10/24 21:56:58 tom Exp $")
MODULE_ID("$Id: lib_tputs.c,v 1.80 2009/11/21 23:09:31 tom Exp $")
NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
@ -75,9 +75,12 @@ _nc_set_no_padding(SCREEN *sp)
#endif
#if NCURSES_SP_FUNCS
#define my_outch SP_PARM->_outch
#define SetOutCh(func) if (SP_PARM) SP_PARM->_outch = func; else _nc_prescreen._outch = func
#define GetOutCh() (SP_PARM ? SP_PARM->_outch : _nc_prescreen._outch)
#else
static NCURSES_SP_OUTC my_outch = NCURSES_SP_NAME(_nc_outch);
#define SetOutCh(func) static_outch = func
#define GetOutCh() static_outch
static NCURSES_SP_OUTC static_outch = NCURSES_SP_NAME(_nc_outch);
#endif
NCURSES_EXPORT(int)
@ -92,6 +95,7 @@ NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms)
NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
napms(ms);
} else {
NCURSES_SP_OUTC my_outch = GetOutCh();
register int nullcount;
nullcount = (ms * _nc_baudrate(ospeed)) / (BAUDBYTE * 1000);
@ -199,6 +203,7 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
int affcnt,
NCURSES_SP_OUTC outc)
{
NCURSES_SP_OUTC my_outch = GetOutCh();
bool always_delay;
bool normal_delay;
int number;
@ -280,7 +285,7 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
}
#endif /* BSD_TPUTS */
my_outch = outc; /* redirect delay_output() */
SetOutCh(outc); /* redirect delay_output() */
while (*string) {
if (*string != '$')
(*outc) (NCURSES_SP_ARGx *string);
@ -352,7 +357,7 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
delay_output(trailpad / 10);
#endif /* BSD_TPUTS */
my_outch = NCURSES_SP_NAME(_nc_outch);
SetOutCh(my_outch);
return OK;
}

View File

@ -40,10 +40,10 @@
#include <curses.priv.h>
#ifndef CUR
#define CUR SP_TERMTYPE
#define CUR SP_TERMTYPE
#endif
MODULE_ID("$Id: lib_traceatr.c,v 1.66 2009/05/10 00:48:29 tom Exp $")
MODULE_ID("$Id: lib_traceatr.c,v 1.67 2009/11/21 23:06:40 tom Exp $")
#define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
@ -232,6 +232,9 @@ _nc_altcharset_name(attr_t attr, chtype ch)
const char *result = 0;
#if NCURSES_SP_FUNCS
(void) sp;
#endif
if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
char *cp;
char *found = 0;