-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1885 2012/03/31 23:10:23 tom Exp $
+-- $Id: NEWS,v 1.1891 2012/04/07 19:17:36 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20120407
+ + fix an inconsistency between tic/infocmp "-x" option; tic omits all
+ non-standard capabilities, while infocmp was ignoring only the user
+ definable capabilities.
+ + 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.
+ + revert 2011-07-16 change to "linux" alias, return to "linux2.2" -TD
+ + 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
# 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.868 2012/04/07 15:24:19 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 9
-NCURSES_PATCH = 20120331
+NCURSES_PATCH = 20120407
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#
# 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.
#
# 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).
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,/
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=^?,/
# 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.*)
-cat <<EOF
-/^# This is Linux console for ncurses/,/^$/{
- s/use=linux3.0,/use=linux-c,/
-}
-EOF
- ;;
- x2.[0-4]*)
+echo "** using $WHICH_LINUX terminal description for Linux console" >&2
cat <<EOF
/^# This is Linux console for ncurses/,/^$/{
- s/use=linux3.0,/use=linux2.2,/
+ s/use=$linux_dft,/use=$WHICH_LINUX,/
}
EOF
- ;;
- esac
fi
# 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
# 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%;,
# 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
# 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!
#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.
* 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;
}
/*
{
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;
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;
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);
#include <dump_entry.h>
-MODULE_ID("$Id: infocmp.c,v 1.114 2012/03/11 00:10:57 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.115 2012/04/07 19:12:01 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
}
}
+/*
+ * ncurses stores two types of non-standard capabilities:
+ * a) capabilities listed past the "STOP-HERE" comment in the Caps file.
+ * These are used in the terminfo source file to provide data for termcaps,
+ * e.g., when there is no equivalent capability in terminfo, as well as for
+ * widely-used non-standard capabilities.
+ * b) user-definable capabilities, via "tic -x".
+ *
+ * However, if "-x" is omitted from the tic command, both types of
+ * non-standard capability are not loaded into the terminfo database. This
+ * macro is used for limit-checks against the symbols that tic uses to omit
+ * the two types of non-standard entry.
+ */
+#define check_user_definable(n,limit) if (!_nc_user_definable && (n) > (limit)) break
+
static void
compare_predicate(PredType type, PredIdx idx, const char *name)
/* predicate function to use for entry difference reports */
switch (type) {
case CMP_BOOLEAN:
+ check_user_definable(idx, BOOLWRITE);
b1 = e1->tterm.Booleans[idx];
b2 = e2->tterm.Booleans[idx];
switch (compare) {
break;
case CMP_NUMBER:
+ check_user_definable(idx, NUMWRITE);
n1 = e1->tterm.Numbers[idx];
n2 = e2->tterm.Numbers[idx];
dump_numeric(n1, buf1);
break;
case CMP_STRING:
+ check_user_definable(idx, STRWRITE);
s1 = e1->tterm.Strings[idx];
s2 = e2->tterm.Strings[idx];
switch (compare) {