ncurses 5.9 - patch 20110807

+ improve rpath fix from 20110730 by ensuring that the new $RPATH_LIST
  variable is defined in the makefiles which use it.
+ build-fix for DragonFlyBSD's pkgsrc in test/configure script.
+ build-fixes for NetBSD 5.1 with termcap support enabled.
+ corrected k9 in dg460-ansi, add other features based on manuals -TD
+ improve trimming of whitespace at the end of terminfo/termcap output
  from tic/infocmp.
+ when writing termcap source, ensure that colons in the description
  field are translated to a non-delimiter, i.e., "=".
+ add "-0" option to tic/infocmp, to make the termcap/terminfo source
  use a single line.
+ add a null-pointer check when handling the $CC variable.
This commit is contained in:
Thomas E. Dickey 2011-08-07 22:43:00 +00:00
parent 8e25fff6a5
commit d4d1d81ab6
24 changed files with 1120 additions and 915 deletions

10
Ada95/aclocal.m4 vendored
View File

@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey
dnl
dnl $Id: aclocal.m4,v 1.35 2011/07/30 23:33:10 tom Exp $
dnl $Id: aclocal.m4,v 1.36 2011/08/07 00:41:53 tom Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -673,7 +673,7 @@ dnl ----------
dnl "dirname" is not portable, so we fake it with a shell script.
AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ENABLE_PC_FILES version: 3 updated: 2011/07/16 20:37:23
dnl CF_ENABLE_PC_FILES version: 4 updated: 2011/08/06 20:32:05
dnl ------------------
dnl This is the "--enable-pc-files" option, which is available if there is a
dnl pkg-config configuration on the local machine.
@ -701,7 +701,7 @@ if test "$PKG_CONFIG" != no ; then
fi
if test -z "$PKG_CONFIG_LIBDIR" ; then
cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
case x`arch 2>/dev/null` in #(vi
case x`(arch) 2>/dev/null` in #(vi
*64) #(vi
for cf_config in $cf_path/lib64 $cf_path/lib32 $cf_path/lib
do
@ -3599,7 +3599,7 @@ if test "$with_pthread" != no ; then
fi
])
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 36 updated: 2011/07/02 15:36:04
dnl CF_XOPEN_SOURCE version: 37 updated: 2011/08/06 20:32:05
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@ -3651,7 +3651,7 @@ mirbsd*) #(vi
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
;;
netbsd*) #(vi
# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw

4
Ada95/configure vendored
View File

@ -2962,7 +2962,7 @@ echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C
fi
if test -z "$PKG_CONFIG_LIBDIR" ; then
cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
case x`arch 2>/dev/null` in #(vi
case x`(arch) 2>/dev/null` in #(vi
*64) #(vi
for cf_config in $cf_path/lib64 $cf_path/lib32 $cf_path/lib
do
@ -8098,7 +8098,7 @@ mirbsd*) #(vi
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
;;
netbsd*) #(vi
# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.30 2010/11/27 21:45:27 tom Exp $
# $Id: Makefile.in,v 1.31 2011/08/07 15:36:52 tom Exp $
##############################################################################
# Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. #
# #
@ -35,7 +35,8 @@ SHELL = /bin/sh
VPATH = @srcdir@
DESTDIR=@DESTDIR@
CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)"
RPATH_LIST=@RPATH_LIST@
CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)"
@SET_MAKE@

16
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1755 2011/07/30 22:57:54 tom Exp $
-- $Id: NEWS,v 1.1762 2011/08/07 15:45:26 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.
20110807
+ improve rpath fix from 20110730 by ensuring that the new $RPATH_LIST
variable is defined in the makefiles which use it.
+ build-fix for DragonFlyBSD's pkgsrc in test/configure script.
+ build-fixes for NetBSD 5.1 with termcap support enabled.
+ corrected k9 in dg460-ansi, add other features based on manuals -TD
+ improve trimming of whitespace at the end of terminfo/termcap output
from tic/infocmp.
+ when writing termcap source, ensure that colons in the description
field are translated to a non-delimiter, i.e., "=".
+ add "-0" option to tic/infocmp, to make the termcap/terminfo source
use a single line.
+ add a null-pointer check when handling the $CC variable.
20110730
+ modify configure script and makefiles in c++ and progs to allow the
directory used for rpath option to be overridden, e.g., to work

43
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.564 2011/07/30 23:32:32 tom Exp $
dnl $Id: aclocal.m4,v 1.566 2011/08/07 18:55:48 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -795,27 +795,48 @@ AC_MSG_RESULT($includedir)
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CGETENT version: 3 updated: 2000/08/12 23:18:52
dnl CF_CGETENT version: 4 updated: 2011/08/07 14:54:41
dnl ----------
dnl Check if the terminal-capability database functions are available. If not,
dnl ncurses has a much-reduced version.
AC_DEFUN([CF_CGETENT],[
AC_MSG_CHECKING(for terminal-capability database functions)
AC_CACHE_VAL(cf_cv_cgetent,[
AC_CACHE_CHECK(for terminal-capability database functions,cf_cv_cgetent,[
AC_TRY_LINK([
#include <stdlib.h>],[
char temp[128];
char *buf = temp;
char *db_array = temp;
cgetent(&buf, /* int *, */ &db_array, "vt100");
cgetent(&buf, &db_array, "vt100");
cgetcap(buf, "tc", '=');
cgetmatch(buf, "tc");
],
[cf_cv_cgetent=yes],
[cf_cv_cgetent=no])
])
AC_MSG_RESULT($cf_cv_cgetent)
test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)
if test "$cf_cv_cgetent" = yes
then
AC_DEFINE(HAVE_BSD_CGETENT)
AC_CACHE_CHECK(if cgetent uses const parameter,cf_cv_cgetent_const,[
AC_TRY_LINK([
#include <stdlib.h>],[
char temp[128];
char *buf = temp;
#ifndef _NETBSD_SOURCE /* given, since April 2004 in stdlib.h */
const char *db_array = temp;
cgetent(&buf, &db_array, "vt100");
#endif
cgetcap(buf, "tc", '=');
cgetmatch(buf, "tc");
],
[cf_cv_cgetent_const=yes],
[cf_cv_cgetent_const=no])
])
if test "$cf_cv_cgetent_const" = yes
then
AC_DEFINE_UNQUOTED(CGETENT_CONST,const)
fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
@ -1169,7 +1190,7 @@ if test "$cf_disable_rpath_hack" = no ; then
fi
])
dnl ---------------------------------------------------------------------------
dnl CF_ENABLE_PC_FILES version: 3 updated: 2011/07/16 20:37:23
dnl CF_ENABLE_PC_FILES version: 4 updated: 2011/08/06 20:32:05
dnl ------------------
dnl This is the "--enable-pc-files" option, which is available if there is a
dnl pkg-config configuration on the local machine.
@ -1197,7 +1218,7 @@ if test "$PKG_CONFIG" != no ; then
fi
if test -z "$PKG_CONFIG_LIBDIR" ; then
cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
case x`arch 2>/dev/null` in #(vi
case x`(arch) 2>/dev/null` in #(vi
*64) #(vi
for cf_config in $cf_path/lib64 $cf_path/lib32 $cf_path/lib
do
@ -6637,7 +6658,7 @@ CF_NO_LEAKS_OPTION(valgrind,
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 36 updated: 2011/07/02 15:36:04
dnl CF_XOPEN_SOURCE version: 37 updated: 2011/08/06 20:32:05
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@ -6689,7 +6710,7 @@ mirbsd*) #(vi
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
;;
netbsd*) #(vi
# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw

968
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.827 2011/07/24 13:21:30 tom Exp $
# $Id: dist.mk,v 1.829 2011/08/07 15:43: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 = 9
NCURSES_PATCH = 20110730
NCURSES_PATCH = 20110807
# 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.53 2010/11/27 21:45:27 tom Exp $
# $Id: Makefile.in,v 1.54 2011/08/07 15:46:50 tom Exp $
##############################################################################
# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# Copyright (c) 1998-2010,2011 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"), #
@ -102,6 +102,7 @@ LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
RPATH_LIST = @RPATH_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
NCURSES_MAJOR = @NCURSES_MAJOR@

View File

@ -1,4 +1,4 @@
# $Id: ncurses_defs,v 1.49 2011/04/23 22:09:35 tom Exp $
# $Id: ncurses_defs,v 1.50 2011/08/07 18:36:02 tom Exp $
##############################################################################
# Copyright (c) 2000-2010,2011 Free Software Foundation, Inc. #
# #
@ -34,6 +34,7 @@
BROKEN_LINKER
BSD_TPUTS
CC_HAS_PROTOS
CGETENT_CONST /* nothing */
CPP_HAS_PARAM_INIT
CURSES_ACS_ARRAY acs_map
CURSES_WACS_ARRAY _nc_wacs

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: infocmp.1m,v 1.48 2011/07/30 22:06:07 tom Exp $
.\" $Id: infocmp.1m,v 1.49 2011/08/06 17:46:28 tom Exp $
.TH @INFOCMP@ 1M ""
.ds n 5
.ds d @TERMINFO@
@ -209,6 +209,9 @@ databases. This is useful for comparing descriptions for the same terminal
created by different people.
.SS Other Options
.TP 5
\fB\-0\fR
causes the fields to be printed on one line, without wrapping.
.TP 5
\fB\-1\fR
causes the fields to be printed out one to a line. Otherwise,
the fields will be printed several to a line to a maximum width
@ -399,6 +402,8 @@ using the \fB\-x\fR option of \fBtic\fP.
Compiled terminal description database.
.SH EXTENSIONS
The
\fB\-0\fR,
\fB\-1\fR,
\fB\-E\fR,
\fB\-F\fR,
\fB\-G\fR,

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2010,2011 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 *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: tic.1m,v 1.48 2011/07/30 21:58:54 tom Exp $
.\" $Id: tic.1m,v 1.49 2011/08/06 17:49:46 tom Exp $
.TH @TIC@ 1M ""
.ds n 5
.ds d @TERMINFO@
@ -35,6 +35,7 @@
.SH SYNOPSIS
\fBtic\fR
[\fB\-\
0\
1\
C\
G\
@ -82,6 +83,9 @@ Libraries that read terminfo entries are expected to check for a TERMINFO
directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and
finally look in \fI\*d\fR.
.TP
\fB\-0\fR
restricts the output to a single line
.TP
\fB\-1\fR
restricts the output to a single column
.TP
@ -112,9 +116,11 @@ bad use links.
If you specify \fB\-C\fR (\fB\-I\fR) with this option, the code
will print warnings about entries which, after use resolution, are more than
1023 (4096) bytes long.
Due to a fixed buffer length in older termcap
libraries (and a documented limit in terminfo), these entries may cause core
dumps.
Due to a fixed buffer length in older termcap libraries,
as well as buggy checking for the buffer length
(and a documented limit in terminfo),
these entries may cause core
dumps with other implementations.
.TP
\fB\-e \fR\fInames\fR
Limit writes and translations to the following comma-separated list of
@ -312,6 +318,8 @@ The error messages from this \fBtic\fR have the same format as GNU C
error messages, and can be parsed by GNU Emacs's compile facility.
.PP
The
\fB\-0\fR,
\fB\-1\fR,
\fB\-C\fR,
\fB\-G\fR,
\fB\-I\fR,

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.54 2010/11/27 21:45:27 tom Exp $
# $Id: Makefile.in,v 1.55 2011/08/07 15:46:50 tom Exp $
##############################################################################
# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# Copyright (c) 1998-2010,2011 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"), #
@ -102,6 +102,7 @@ LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
RPATH_LIST = @RPATH_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
NCURSES_MAJOR = @NCURSES_MAJOR@

View File

@ -6,8 +6,8 @@
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
# $Revision: 1.393 $
# $Date: 2011/07/21 09:29:09 $
# $Revision: 1.395 $
# $Date: 2011/08/06 19:48:29 $
#
# The original header is preserved below for reference. It is noted that there
# is a "newer" version which differs in some cosmetic details (but actually
@ -12798,7 +12798,6 @@ dg450|dg6134|data general 6134,
# backspace on all terminals. This is not so in DG mode.
# (dg460-ansi: removed obsolete ":kn#6:"; also removed ":mu=\EW:", on the
# grounds that there is no matching ":ml:"
# fixed garbled ":k9=\E[00\:z:" capability -- esr)
dg460-ansi|Data General Dasher 460 in ANSI-mode,
OTbs, am, msgr, ul,
cols#80, it#8, lines#24,
@ -12809,10 +12808,12 @@ dg460-ansi|Data General Dasher 460 in ANSI-mode,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
kf0=\E[001z, kf1=\E[002z, kf2=\E[003z, kf3=\E[004z,
kf4=\E[005z, kf5=\E[006z, kf6=\E[007z, kf7=\E[008z,
kf8=\E[009z, kf9=\E[010z, khome=\E[H, lf0=f1, lf1=f2, lf2=f3,
lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10, rev=\E[7m,
ri=\E[T, rmso=\E[m, rmul=\E[05, sgr0=\E[m, smso=\E[7m,
smul=\E[4m,
kf8=\E[009z, kf9=\E[00\:z, khome=\E[H, lf0=f1, lf1=f2,
lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10,
mc0=\E[i, rev=\E[7m, ri=\E[T, rmso=\E[m, rmul=\E[05,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m,
sgr0=\E(B\E[m, smso=\E[7m, smul=\E[4m, u6=\E[%d;%dR,
u7=\E[6n, u8=\E[5n, u9=\E[0n,
# From: Wayne Throop <mcnc!rti-sel!rtp47!throopw> (not official)
# Data General 605x
# Ought to work for a Model 6242, Type D210 as well as a 605x.
@ -22427,4 +22428,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
# * add kich1 to sun (Yuri Pankov)
# * use bold rather than reverse for smso in sun-color (Yuri Pankov).
#
# 2011-08-06
# * corrected k9 in dg460-ansi, add other features based on manuals -TD
#
######## SHANTIH! SHANTIH! SHANTIH!

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.130 2010/11/27 21:45:27 tom Exp $
# $Id: Makefile.in,v 1.131 2011/08/07 15:46:50 tom Exp $
##############################################################################
# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# Copyright (c) 1998-2010,2011 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"), #
@ -125,6 +125,7 @@ SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@
TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@
TICS_LIST = $(SHLIB_DIRS) @TICS_LIST@
RPATH_LIST = @RPATH_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
NCURSES_MAJOR = @NCURSES_MAJOR@

View File

@ -47,7 +47,7 @@
#include <locale.h>
#endif
MODULE_ID("$Id: lib_setup.c,v 1.138 2011/06/14 22:36:29 tom Exp $")
MODULE_ID("$Id: lib_setup.c,v 1.139 2011/08/05 21:56:40 tom Exp $")
/****************************************************************************
*
@ -479,7 +479,7 @@ _nc_tinfo_cmdch(TERMINAL * termp, char proto)
if ((tmp = getenv("CC")) != 0 && strlen(tmp) == 1) {
CC = *tmp;
for_each_string(i, &(termp->type)) {
for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
for (tmp = termp->type.Strings[i]; tmp && *tmp; tmp++) {
if (*tmp == proto)
*tmp = CC;
}

View File

@ -56,7 +56,7 @@
#include <sys/types.h>
#include <tic.h>
MODULE_ID("$Id: read_termcap.c,v 1.79 2011/07/29 00:25:02 tom Exp $")
MODULE_ID("$Id: read_termcap.c,v 1.81 2011/08/07 18:56:35 tom Exp $")
#if !PURE_TERMINFO
@ -781,15 +781,16 @@ _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name)
register char *p;
register char *cp;
char *dummy = NULL;
char **fname;
const char **fname;
char *home;
int i;
char pathbuf[PBUFSIZ]; /* holds raw path of filenames */
char *pathvec[PVECSIZ]; /* to point to names in pathbuf */
char **pvec; /* holds usable tail of path vector */
CGETENT_CONST char *pathvec[PVECSIZ]; /* point to names in pathbuf */
CGETENT_CONST char **pvec; /* holds usable tail of path vector */
NCURSES_CONST char *termpath;
string_desc desc;
*lineno = 1;
fname = pathvec;
pvec = pathvec;
tbuf = bp;

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.58 2010/11/27 21:45:27 tom Exp $
# $Id: Makefile.in,v 1.59 2011/08/07 15:46:50 tom Exp $
##############################################################################
# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# Copyright (c) 1998-2010,2011 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"), #
@ -103,6 +103,7 @@ LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
RPATH_LIST = @RPATH_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
NCURSES_MAJOR = @NCURSES_MAJOR@

View File

@ -39,7 +39,7 @@
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
MODULE_ID("$Id: dump_entry.c,v 1.91 2011/05/14 22:39:21 tom Exp $")
MODULE_ID("$Id: dump_entry.c,v 1.95 2011/08/07 22:10:17 tom Exp $")
#define INDENT 8
#define DISCARD(string) string = ABSENT_STRING
@ -57,6 +57,7 @@ static int tversion; /* terminfo version */
static int outform; /* output format to use */
static int sortmode; /* sort mode to use */
static int width = 60; /* max line width for listings */
static int height = 65535; /* max number of lines for listings */
static int column; /* current column, limited by 'width' */
static int oldcol; /* last value of column before wrap */
static bool pretty; /* true if we format if-then-else strings */
@ -176,11 +177,13 @@ dump_init(const char *version,
int mode,
int sort,
int twidth,
int theight,
unsigned traceval,
bool formatted)
/* set up for entry display */
{
width = twidth;
height = theight;
pretty = formatted;
/* versions */
@ -205,7 +208,7 @@ dump_init(const char *version,
bool_names = boolnames;
num_names = numnames;
str_names = strnames;
separator = twidth ? ", " : ",";
separator = (twidth > 0 && theight > 1) ? ", " : ",";
trailer = "\n\t";
break;
@ -213,7 +216,7 @@ dump_init(const char *version,
bool_names = boolfnames;
num_names = numfnames;
str_names = strfnames;
separator = twidth ? ", " : ",";
separator = (twidth > 0 && theight > 1) ? ", " : ",";
trailer = "\n\t";
break;
@ -597,9 +600,23 @@ fmt_entry(TERMTYPE *tterm,
column = INDENT; /* FIXME: workaround to prevent empty lines */
} else {
strcpy_DYN(&outbuf, tterm->term_names);
/*
* Colon is legal in terminfo descriptions, but not in termcap.
*/
if (!infodump) {
char *p = outbuf.text;
while (*p) {
if (*p == ':') {
*p = '=';
}
++p;
}
}
strcpy_DYN(&outbuf, separator);
column = (int) outbuf.used;
force_wrap();
if (height > 1)
force_wrap();
}
for_each_boolean(j, tterm) {
@ -623,7 +640,7 @@ fmt_entry(TERMTYPE *tterm,
}
}
if (column != INDENT)
if (column != INDENT && height > 1)
force_wrap();
for_each_number(j, tterm) {
@ -649,7 +666,7 @@ fmt_entry(TERMTYPE *tterm,
}
}
if (column != INDENT)
if (column != INDENT && height > 1)
force_wrap();
len += (int) (num_bools
@ -1155,7 +1172,30 @@ dump_uses(const char *name, bool infodump)
int
show_entry(void)
{
trim_trailing();
/*
* Trim any remaining whitespace.
*/
if (outbuf.used != 0) {
bool infodump = (outform != F_TERMCAP && outform != F_TCONVERR);
char delim = infodump ? ',' : ':';
int j;
for (j = (int) outbuf.used - 1; j > 0; --j) {
char ch = outbuf.text[j];
if (ch == '\n') {
;
} else if (isspace(UChar(ch))) {
outbuf.used = j;
} else if (!infodump && ch == '\\') {
outbuf.used = j;
} else if (ch == delim && (j == 0 || outbuf.text[j - 1] != '\\')) {
outbuf.used = (j + 1);
} else {
break;
}
}
outbuf.text[outbuf.used] = '\0';
}
(void) fputs(outbuf.text, stdout);
putchar('\n');
return (int) outbuf.used;

View File

@ -33,7 +33,7 @@
****************************************************************************/
/*
* $Id: dump_entry.h,v 1.31 2011/05/14 18:00:09 tom Exp $
* $Id: dump_entry.h,v 1.32 2011/08/06 16:33:05 tom Exp $
*
* Dump control definitions and variables
*/
@ -71,7 +71,7 @@ extern int fmt_entry(TERMTYPE *, PredFunc, bool, bool, bool, int);
extern int show_entry(void);
extern void compare_entry(PredHook, TERMTYPE *, bool);
extern void dump_entry(TERMTYPE *, bool, bool, int, PredFunc);
extern void dump_init(const char *, int, int, int, unsigned, bool);
extern void dump_init(const char *, int, int, int, int, unsigned, bool);
extern void dump_uses(const char *, bool);
extern void repair_acsc(TERMTYPE *tp);

View File

@ -42,7 +42,7 @@
#include <dump_entry.h>
MODULE_ID("$Id: infocmp.c,v 1.107 2011/07/30 21:51:01 tom Exp $")
MODULE_ID("$Id: infocmp.c,v 1.108 2011/08/06 16:36:06 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
@ -72,6 +72,7 @@ static const char *s_cancel = "NULL";
static const char *tversion; /* terminfo version selected */
static unsigned itrace; /* trace flag for debugging */
static int mwidth = 60;
static int mheight = 65535;
static int numbers = 0; /* format "%'char'" to/from "%{number}" */
static int outform = F_TERMINFO; /* output format */
static int sortmode; /* sort_mode */
@ -795,7 +796,7 @@ file_comparison(int argc, char *argv[])
int i, n;
memset(heads, 0, sizeof(heads));
dump_init((char *) 0, F_LITERAL, S_TERMINFO, 0, itrace, FALSE);
dump_init((char *) 0, F_LITERAL, S_TERMINFO, 0, 65535, itrace, FALSE);
for (n = 0; n < argc && n < MAXCOMPARE; n++) {
if (freopen(argv[n], "r", stdin) == 0)
@ -974,6 +975,7 @@ usage(void)
"Usage: infocmp [options] [-A directory] [-B directory] [termname...]"
,""
,"Options:"
," -0 print single-row"
," -1 print single-column"
," -K use termcap-names and BSD syntax"
," -C use termcap-names"
@ -1300,8 +1302,13 @@ main(int argc, char *argv[])
while ((c = getopt(argc,
argv,
"1A:aB:CcdEeFfGgIiKLlnpqR:rs:TtUuVv:w:x")) != -1) {
"01A:aB:CcdEeFfGgIiKLlnpqR:rs:TtUuVv:w:x")) != -1) {
switch (c) {
case '0':
mwidth = 65535;
mheight = 1;
break;
case '1':
mwidth = 0;
break;
@ -1483,7 +1490,7 @@ main(int argc, char *argv[])
sortmode = S_TERMINFO;
/* set up for display */
dump_init(tversion, outform, sortmode, mwidth, itrace, formatted);
dump_init(tversion, outform, sortmode, mwidth, mheight, itrace, formatted);
/* make sure we have at least one terminal name to work with */
if (optind >= argc)

View File

@ -44,7 +44,7 @@
#include <dump_entry.h>
#include <transform.h>
MODULE_ID("$Id: tic.c,v 1.151 2011/07/30 21:49:32 tom Exp $")
MODULE_ID("$Id: tic.c,v 1.152 2011/08/06 17:41:36 tom Exp $")
const char *_nc_progname = "tic";
@ -489,6 +489,7 @@ main(int argc, char *argv[])
int sortmode = S_TERMINFO; /* sort_mode */
int width = 60;
int height = 65535;
bool formatted = FALSE; /* reformat complex strings? */
bool literal = FALSE; /* suppress post-processing? */
int numbers = 0; /* format "%'char'" to/from "%{number}" */
@ -534,10 +535,19 @@ main(int argc, char *argv[])
width = (width * 10) + (this_opt - '0');
break;
default:
if (this_opt != '1')
switch (this_opt) {
case '0':
last_opt = this_opt;
width = 65535;
height = 1;
break;
case '1':
last_opt = this_opt;
width = 0;
break;
default:
usage();
last_opt = this_opt;
width = 0;
}
}
continue;
}
@ -702,11 +712,11 @@ main(int argc, char *argv[])
smart_defaults
? outform
: F_LITERAL,
sortmode, width, debug_level, formatted);
sortmode, width, height, debug_level, formatted);
else if (capdump)
dump_init(tversion,
outform,
sortmode, width, debug_level, FALSE);
sortmode, width, height, debug_level, FALSE);
/* parse entries out of the source file */
_nc_set_source(source_file);

View File

@ -44,7 +44,7 @@
#include <hashed_db.h>
#endif
MODULE_ID("$Id: toe.c,v 1.54 2011/05/21 18:32:13 tom Exp $")
MODULE_ID("$Id: toe.c,v 1.58 2011/08/07 18:36:31 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
@ -181,8 +181,10 @@ typelist(int eargc, char *eargv[],
(void) fprintf(stderr,
"%s: can't open terminfo directory %s\n",
_nc_progname, eargv[i]);
return (EXIT_FAILURE);
} else if (verbosity)
continue;
}
if (verbosity)
(void) printf("#\n#%s:\n#\n", eargv[i]);
while ((subdir = readdir(termdir)) != 0) {
@ -244,12 +246,16 @@ typelist(int eargc, char *eargv[],
closedir(termdir);
if (cwd_buf != 0)
free(cwd_buf);
continue;
}
#if USE_HASHED_DB
else {
DB *capdbp;
char filename[PATH_MAX];
if (verbosity)
(void) printf("#\n#%s:\n#\n", eargv[i]);
if (make_db_name(filename, eargv[i], sizeof(filename))) {
if ((capdbp = _nc_db_open(filename, FALSE)) != 0) {
DBT key, data;
@ -275,6 +281,7 @@ typelist(int eargc, char *eargv[],
}
_nc_db_close(capdbp);
continue;
}
}
}
@ -282,30 +289,36 @@ typelist(int eargc, char *eargv[],
#endif
#if USE_TERMCAP
#if HAVE_BSD_CGETENT
char *db_array[2];
char *buffer = 0;
{
CGETENT_CONST char *db_array[2];
char *buffer = 0;
if (verbosity)
(void) printf("#\n#%s:\n#\n", eargv[i]);
if (verbosity)
(void) printf("#\n#%s:\n#\n", eargv[i]);
db_array[0] = eargv[i];
db_array[1] = 0;
db_array[0] = eargv[i];
db_array[1] = 0;
if (cgetfirst(&buffer, db_array)) {
show_termcap(buffer, hook);
free(buffer);
while (cgetnext(&buffer, db_array)) {
if (cgetfirst(&buffer, db_array) > 0) {
show_termcap(buffer, hook);
free(buffer);
while (cgetnext(&buffer, db_array) > 0) {
show_termcap(buffer, hook);
free(buffer);
}
cgetclose();
continue;
}
}
cgetclose();
#else
/* scan termcap text-file only */
if (_nc_is_file_path(eargv[i])) {
char buffer[2048];
FILE *fp;
if (verbosity)
(void) printf("#\n#%s:\n#\n", eargv[i]);
if ((fp = fopen(eargv[i], "r")) != 0) {
while (fgets(buffer, sizeof(buffer), fp) != 0) {
if (*buffer == '#')

33
test/aclocal.m4 vendored
View File

@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written *
dnl authorization. *
dnl***************************************************************************
dnl
dnl $Id: aclocal.m4,v 1.63 2011/07/02 20:36:41 tom Exp $
dnl $Id: aclocal.m4,v 1.64 2011/08/07 00:40:42 tom Exp $
dnl
dnl Author: Thomas E. Dickey
dnl
@ -2910,7 +2910,7 @@ AC_TRY_LINK([
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 36 updated: 2011/07/02 15:36:04
dnl CF_XOPEN_SOURCE version: 37 updated: 2011/08/06 20:32:05
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@ -2962,7 +2962,7 @@ mirbsd*) #(vi
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
;;
netbsd*) #(vi
# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
@ -3153,7 +3153,7 @@ elif test "$cf_x_athena_inc" != default ; then
fi
])
dnl ---------------------------------------------------------------------------
dnl CF_X_ATHENA_LIBS version: 10 updated: 2011/02/13 13:31:33
dnl CF_X_ATHENA_LIBS version: 12 updated: 2011/07/17 19:55:02
dnl ----------------
dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
@ -3169,19 +3169,24 @@ for cf_path in default \
/usr/local
do
for cf_lib in \
"-l$cf_x_athena_root -lXmu" \
"-l$cf_x_athena_root -lXpm -lXmu" \
"-l${cf_x_athena_root}_s -lXmu_s"
${cf_x_athena_root} \
${cf_x_athena_root}7 \
${cf_x_athena_root}6
do
for cf_libs in \
"-l$cf_lib -lXmu" \
"-l$cf_lib -lXpm -lXmu" \
"-l${cf_lib}_s -lXmu_s"
do
if test -z "$cf_x_athena_lib" ; then
cf_save="$LIBS"
cf_test=XawSimpleMenuAddGlobalActions
if test $cf_path != default ; then
CF_ADD_LIBS(-L$cf_path/lib $cf_lib)
AC_MSG_CHECKING(for $cf_lib in $cf_path)
CF_ADD_LIBS(-L$cf_path/lib $cf_libs)
AC_MSG_CHECKING(for $cf_libs in $cf_path)
else
CF_ADD_LIBS($cf_lib)
AC_MSG_CHECKING(for $cf_test in $cf_lib)
CF_ADD_LIBS($cf_libs)
AC_MSG_CHECKING(for $cf_test in $cf_libs)
fi
AC_TRY_LINK([
#include <X11/Intrinsic.h>
@ -3192,12 +3197,14 @@ $cf_test((XtAppContext) 0)],
[cf_result=no])
AC_MSG_RESULT($cf_result)
if test "$cf_result" = yes ; then
cf_x_athena_lib="$cf_lib"
cf_x_athena_lib="$cf_libs"
break
fi
LIBS="$cf_save"
fi
done
done # cf_libs
test -n "$cf_x_athena_lib" && break
done # cf_lib
done
if test -z "$cf_x_athena_lib" ; then

737
test/configure vendored

File diff suppressed because it is too large Load Diff