snapshot of project "ncurses", label v5_9_20120401

This commit is contained in:
Thomas E. Dickey 2012-04-01 20:37:08 -04:00
parent 05273a880b
commit 2c3022fd6e
5 changed files with 142 additions and 41 deletions

14
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1886 2012/03/31 23:44:45 tom Exp $
-- $Id: NEWS,v 1.1889 2012/04/01 20:25:48 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,18 @@ 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.
20120401
+ improve special case in tic parsing of description to allow it to be
followed by terminfo capabilities. Previously the description had to
be the last field on an input line to allow tic to distinguish
between termcap and terminfo format while still allowing commas to be
embedded in the description.
+ correct variable name in gen_edit.sh which broke configurability of
the --with-xterm-kbs option.
+ further amend 20110910 change, providing for configure-script
override of the "linux" terminfo entry to install and changing the
default for that to "linux2.2" (Debian #665959).
20120331
+ update Ada95/configure to use CF_DISABLE_ECHO (cf: 20120317).
+ correct order of use-clauses in st-256color -TD

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.866 2012/03/31 15:04:31 tom Exp $
# $Id: dist.mk,v 1.867 2012/04/01 10:05:11 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 = 20120331
NCURSES_PATCH = 20120401
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -29,7 +29,7 @@
#
# Author: Thomas E. Dickey
#
# $Id: gen_edit.sh,v 1.4 2012/02/11 16:30:03 tom Exp $
# $Id: gen_edit.sh,v 1.5 2012/04/01 15:04:37 tom Exp $
# Generate a sed-script for converting the terminfo.src to the form which will
# be installed.
#
@ -37,9 +37,12 @@
# The leaf directory names (lib, tabset, terminfo)
#
: ${datadir=@datadir@}
: ${xterm_new=@WHICH_XTERM@}
: ${xterm_kbs=@XTERM_KBS@}
linux_dft=linux2.2
: ${datadir=/usr/share}
: ${WHICH_LINUX=$linux_dft}
: ${WHICH_XTERM=xterm-new}
: ${XTERM_KBS=BS}
# If we're not installing into /usr/share/, we'll have to adjust the location
# of the tabset files in terminfo.src (which are in a parallel directory).
@ -50,7 +53,8 @@ s%/usr/share/tabset%$TABSET%g
EOF
fi
if test "$xterm_new" != "xterm-new" ; then
if test "$WHICH_XTERM" != "xterm-new" ; then
echo "** using $WHICH_XTERM terminal description for XTerm entry" >&2
cat <<EOF
/^# This is xterm for ncurses/,/^$/{
s/use=xterm-new,/use=$WHICH_XTERM,/
@ -58,7 +62,8 @@ cat <<EOF
EOF
fi
if test "$xterm_kbs" != "BS" ; then
if test "$XTERM_KBS" != "BS" ; then
echo "** using DEL for XTerm backspace-key" >&2
cat <<EOF
/^xterm+kbs|fragment for backspace key/,/^#/{
s/kbs=^H,/kbs=^?,/
@ -68,24 +73,46 @@ fi
# Work around incompatibities built into Linux console. The 2.6 series added
# a patch to fixup the SI/SO behavior, which is closer to vt100, but the older
# kernels do not recognize those controls.
system=`uname -s 2>/dev/null`
if test "x$system" = xLinux
# kernels do not recognize those controls. All of the kernels recognize the
# older flavor of rmacs/smacs, but beginning in the late 1990s, changes made
# as part of implementing UTF-8 prevent using those for line-drawing when the
# console is in UTF-8 mode. Taking into account the fact that it took about
# ten years to provide (and distribute) the 2.6 series' change for SI/SO, the
# default remains "linux2.2".
case x$WHICH_LINUX in #(vi
xauto)
system=`uname -s 2>/dev/null`
if test "x$system" = xLinux
then
case x`uname -r` in
x1.*)
WHICH_LINUX=linux-c
;;
x2.[0-4]*)
WHICH_LINUX=linux2.2
;;
*)
WHICH_LINUX=linux3.0
;;
esac
else
WHICH_LINUX=$linux_dft
fi
;;
xlinux*)
# allow specific setting
;;
*)
WHICH_LINUX=$linux_dft
;;
esac
if test $WHICH_LINUX != $linux_dft
then
case x`uname -r` in
x1.*)
echo "** using $WHICH_LINUX terminal description for Linux console" >&2
cat <<EOF
/^# This is Linux console for ncurses/,/^$/{
s/use=linux3.0,/use=linux-c,/
s/use=$linux_dft,/use=$WHICH_LINUX,/
}
EOF
;;
x2.[0-4]*)
cat <<EOF
/^# This is Linux console for ncurses/,/^$/{
s/use=linux3.0,/use=linux2.2,/
}
EOF
;;
esac
fi

View File

@ -6,8 +6,8 @@
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
# $Revision: 1.427 $
# $Date: 2012/03/27 09:57:34 $
# $Revision: 1.428 $
# $Date: 2012/04/01 13:58:39 $
#
# 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
@ -942,6 +942,8 @@ linux2.2|linux 2.2.x console,
# http://lkml.indiana.edu/hypermail/linux/kernel/0602.2/0868.html
# Using SI/SO has the drawback that it confuses screen. SCS would work.
# However, SCS is buggy (see comment in Debian #515609) -TD
# Further, this breaks longstanding workarounds for Linux console's line
# drawing (see Debian 665959) -TD
linux2.6|linux 2.6.x console,
rmacs=^O,
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;m%?%p9%t\016%e\017%;,
@ -953,7 +955,7 @@ linux3.0|linux 3.0 kernels,
# This is Linux console for ncurses.
linux|linux console,
use=linux3.0,
use=linux2.2,
# Subject: linux 2.6.26 vt back_color_erase
# Changes to the Linux console driver broke bce model as reported in
@ -22710,4 +22712,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
# 2012-03-31
# * correct order of use-clauses in st-256color -TD
#
# 2012-04-01
# * revert 2011-07-16 change to "linux" alias, return to "linux2.2" -TD
#
######## SHANTIH! SHANTIH! SHANTIH!

View File

@ -50,7 +50,7 @@
#include <ctype.h>
#include <tic.h>
MODULE_ID("$Id: comp_scan.c,v 1.97 2012/03/24 22:24:19 tom Exp $")
MODULE_ID("$Id: comp_scan.c,v 1.99 2012/04/01 20:37:08 tom Exp $")
/*
* Maximum length of string capability we'll accept before raising an error.
@ -128,14 +128,19 @@ _nc_reset_input(FILE *fp, char *buf)
* Returns the final nonblank character on the current input buffer
*/
static int
last_char(void)
last_char(int from_end)
{
size_t len = strlen(bufptr);
int result = 0;
while (len--) {
if (!isspace(UChar(bufptr[len])))
return bufptr[len];
if (!isspace(UChar(bufptr[len]))) {
if (from_end < (int) len)
result = bufptr[(int) len - from_end];
break;
}
}
return 0;
return result;
}
/*
@ -341,13 +346,13 @@ _nc_get_token(bool silent)
{
static const char terminfo_punct[] = "@%&*!#";
char *after_list;
char *after_name;
char *after_name; /* after primary name */
char *after_list; /* after primary and alias list */
char *numchk;
char *tok_ptr;
char *s;
char numbuf[80];
int ch;
int ch, c0, c1;
int dot_flag = FALSE;
int type;
long number;
@ -460,7 +465,7 @@ _nc_get_token(bool silent)
after_list = tok_ptr;
if (after_name == 0)
after_name = tok_ptr;
} else if (ch == ':' && last_char() != ',') {
} else if (ch == ':' && last_char(0) != ',') {
_nc_syntax = SYN_TERMCAP;
separator = ':';
break;
@ -474,12 +479,64 @@ _nc_get_token(bool silent)
if (after_name == 0)
break;
/*
* If we see a comma, we assume this is terminfo unless we
* subsequently run into a colon. But we don't stop
* looking for a colon until hitting a newline. This
* allows commas to be embedded in description fields of
* either syntax.
* We saw a comma, but are not entirely sure this is
* terminfo format, since we can still be parsing the
* description field (for either syntax).
*
* A properly formatted termcap line ends with either a
* colon, or a backslash after a colon. It is possible
* to have a backslash in the middle of a capability, but
* then there would be no leading whitespace on the next
* line - something we want to discourage.
*/
c0 = last_char(0);
c1 = last_char(1);
if (c1 != ':' && c0 != '\\' && c0 != ':') {
bool capability = FALSE;
/*
* Since it is not termcap, assume the line is terminfo
* format. However, the comma can be embedded in a
* description field. It also can be a separator
* between a description field and a capability.
*
* Improve the guess by checking if the next word after
* the comma does not look like a capability. In that
* case, extend the description past the comma.
*/
for (s = bufptr; isspace(UChar(*s)); ++s) {
;
}
if (islower(UChar(*s))) {
char *name = s;
while (isalnum(UChar(*s))) {
++s;
}
if (*s == '#' || *s == '=' || *s == '@') {
/*
* Checking solely with syntax allows us to
* support extended capabilities with string
* values.
*/
capability = TRUE;
} else if (*s == ',') {
c0 = *s;
*s = '\0';
/*
* Otherwise, we can handle predefined boolean
* capabilities, still aided by syntax.
*/
if (_nc_find_entry(name,
_nc_get_hash_table(FALSE))) {
capability = TRUE;
}
*s = c0;
}
}
if (capability) {
break;
}
}
} else
ch = eat_escaped_newline(ch);