ncurses 6.1 - patch 20180331

+ improve terminfo write/read by modifying the fourth item of the
  extended header to denote the number of valid strings in the extended
  string table (prompted by a comment in unibilium's sources).
This commit is contained in:
Thomas E. Dickey 2018-04-01 02:19:08 +00:00
parent 073e4446d2
commit 74137fec04
32 changed files with 1015 additions and 972 deletions

7
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.3105 2018/03/24 22:56:36 tom Exp $
-- $Id: NEWS,v 1.3107 2018/03/31 22:45:41 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,11 @@ 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.
20180331
+ improve terminfo write/read by modifying the fourth item of the
extended header to denote the number of valid strings in the extended
string table (prompted by a comment in unibilium's sources).
20180324
+ amend Scaled256() macro in test/picsmap.c to cover the full range
0..1000 (report by Roger Pau Monne).

View File

@ -1 +1 @@
5:0:10 6.1 20180324
5:0:10 6.1 20180331

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.1216 2018/03/22 08:41:45 tom Exp $
# $Id: dist.mk,v 1.1217 2018/03/31 15:26:33 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 = 6
NCURSES_MINOR = 1
NCURSES_PATCH = 20180324
NCURSES_PATCH = 20180331
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -125,7 +125,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -190,7 +190,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>

View File

@ -148,7 +148,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -246,7 +246,7 @@
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "form_" for detailed
descriptions of the entry points.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -481,7 +481,7 @@
https://invisible-island.net/ncurses/tctest.html
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>

View File

@ -85,7 +85,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>

View File

@ -221,7 +221,7 @@
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "menu_" for detailed
descriptions of the entry points.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -59,7 +59,7 @@
method of updating character screens with reasonable optimization.
This implementation is "new curses" (ncurses) and is the approved
replacement for 4.4BSD classic curses, which has been discontinued.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).
The <STRONG>ncurses</STRONG> library emulates the curses library of System V Release 4
UNIX, and XPG4 (X/Open Portability Guide) curses (also known as XSI

View File

@ -112,7 +112,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -1,6 +1,6 @@
<!--
****************************************************************************
* Copyright (c) 2017 Free Software Foundation, Inc. *
* Copyright (c) 2017,2018 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 *
@ -27,7 +27,7 @@
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey
* @Id: new_pair.3x,v 1.10 2017/11/18 23:48:44 tom Exp @
* @Id: new_pair.3x,v 1.11 2018/04/01 00:01:17 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
@ -155,7 +155,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="init_pair.3x.html">init_pair(3x)</A></STRONG>.
<STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>.
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>

View File

@ -204,7 +204,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>

View File

@ -164,7 +164,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -1,6 +1,6 @@
<!--
****************************************************************************
* Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
* Copyright (c) 1998-2017,2018 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 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
* @Id: term.5,v 1.27 2017/12/16 21:27:20 tom Exp @
* @Id: term.5,v 1.28 2018/03/31 22:41:29 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
@ -58,7 +58,7 @@
</PRE><H3><a name="h3-STORAGE-LOCATION">STORAGE LOCATION</a></H3><PRE>
Compiled terminfo descriptions are placed under the directory
<STRONG>/usr/share/terminfo</STRONG>. Two configurations are supported (when building
the ncurses libraries):
the <STRONG>ncurses</STRONG> libraries):
<STRONG>directory</STRONG> <STRONG>tree</STRONG>
A two-level scheme is used to avoid a linear search of a huge UNIX
@ -74,12 +74,12 @@
the terminfo's primary name as a key, and records containing only
aliases pointing to the primary name.
If built to write hashed databases, ncurses can still read ter-
If built to write hashed databases, <STRONG>ncurses</STRONG> can still read ter-
minfo databases organized as a directory tree, but cannot write
entries into the directory tree. It can write (or rewrite)
entries in the hashed database.
ncurses distinguishes the two cases in the TERMINFO and TER-
<STRONG>ncurses</STRONG> distinguishes the two cases in the TERMINFO and TER-
MINFO_DIRS environment variable by assuming a directory tree for
entries that correspond to an existing directory, and hashed data-
base otherwise.
@ -113,7 +113,7 @@
the least significant 8 bits of the value, and the second byte contains
the most significant 8 bits. (Thus, the value represented is 256*sec-
ond+first.) The value -1 is represented by the two bytes 0377, 0377;
other negative values are illegal. This value generally means that the
other negative values are illegal. This value generally means that the
corresponding capability is missing from this terminal. Note that this
format corresponds to the hardware of the VAX and PDP-11 (that is, lit-
tle-endian machines). Machines where this does not correspond to the
@ -159,11 +159,11 @@
binary format is used in all modern UNIX systems. Each system uses a
predefined set of boolean, number or string capabilities.
The ncurses libraries and applications support extended terminfo binary
The <STRONG>ncurses</STRONG> libraries and applications support extended terminfo binary
format, allowing users to define capabilities which are loaded at run-
time. This extension is made possible by using the fact that the other
implementations stop reading the terminfo data when they have reached
the end of the size given in the header. ncurses checks the size, and
the end of the size given in the header. <STRONG>ncurses</STRONG> checks the size, and
if it exceeds that due to the predefined data, continues to parse
according to its own scheme.
@ -175,69 +175,72 @@
(3) count of extended string capabilities
(4) size of the extended string table in bytes.
(4) count of the items in extended string table
(5) last offset of the extended string table in bytes.
(5) size of the extended string table in bytes
Using the counts and sizes, ncurses allocates arrays and reads data for
The count- and size-values for the extended string table include the
extended capability <EM>names</EM> as well as extended capability <EM>values</EM>.
Using the counts and sizes, <STRONG>ncurses</STRONG> allocates arrays and reads data for
the extended capabilities in the same order as the header information.
The extended string table contains values for string capabilities.
After the end of these values, it contains the names for each of the
extended capabilities in order, e.g., booleans, then numbers and
The extended string table contains values for string capabilities.
After the end of these values, it contains the names for each of the
extended capabilities in order, e.g., booleans, then numbers and
finally strings.
Applications which manipulate terminal data can use the definitions
described in <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG> which associate the long capability
Applications which manipulate terminal data can use the definitions
described in <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG> which associate the long capability
names with members of a <STRONG>TERMTYPE</STRONG> structure.
</PRE><H3><a name="h3-EXTENDED-NUMBER-FORMAT">EXTENDED NUMBER FORMAT</a></H3><PRE>
On occasion, 16-bit signed integers are not large enough. With ncurses
6.1, a new format is introduced by making a few changes to the legacy
On occasion, 16-bit signed integers are not large enough. With <STRONG>ncurses</STRONG>
6.1, a new format was introduced by making a few changes to the legacy
format:
<STRONG>o</STRONG> a different magic number (0542)
<STRONG>o</STRONG> changing the type for the <EM>number</EM> array from signed 16-bit integers
<STRONG>o</STRONG> changing the type for the <EM>number</EM> array from signed 16-bit integers
to signed 32-bit integers.
To maintain compatibility, the library presents the same data struc-
To maintain compatibility, the library presents the same data struc-
tures to direct users of the <STRONG>TERMTYPE</STRONG> structure as in previous formats.
However, that cannot provide callers with the extended numbers. The
library uses a similar but hidden data structure <STRONG>TERMTYPE2</STRONG> to provide
However, that cannot provide callers with the extended numbers. The
library uses a similar but hidden data structure <STRONG>TERMTYPE2</STRONG> to provide
data for the terminfo functions.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
Note that it is possible for <STRONG>setupterm</STRONG> to expect a different set of
capabilities than are actually present in the file. Either the data-
Note that it is possible for <STRONG>setupterm</STRONG> to expect a different set of
capabilities than are actually present in the file. Either the data-
base may have been updated since <STRONG>setupterm</STRONG> has been recompiled (result-
ing in extra unrecognized entries in the file) or the program may have
been recompiled more recently than the database was updated (resulting
in missing entries). The routine <STRONG>setupterm</STRONG> must be prepared for both
possibilities - this is why the numbers and sizes are included. Also,
new capabilities must always be added at the end of the lists of bool-
ing in extra unrecognized entries in the file) or the program may have
been recompiled more recently than the database was updated (resulting
in missing entries). The routine <STRONG>setupterm</STRONG> must be prepared for both
possibilities - this is why the numbers and sizes are included. Also,
new capabilities must always be added at the end of the lists of bool-
ean, number, and string capabilities.
Despite the consistent use of little-endian for numbers and the other-
wise self-describing format, it is not wise to count on portability of
binary terminfo entries between commercial UNIX versions. The problem
is that there are at least three versions of terminfo (under HP-UX,
AIX, and OSF/1) which diverged from System V terminfo after SVr1, and
have added extension capabilities to the string table that (in the
binary format) collide with System V and XSI Curses extensions. See
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for detailed discussion of terminfo source compatibility
Despite the consistent use of little-endian for numbers and the other-
wise self-describing format, it is not wise to count on portability of
binary terminfo entries between commercial UNIX versions. The problem
is that there are at least three versions of terminfo (under HP-UX,
AIX, and OSF/1) which diverged from System V terminfo after SVr1, and
have added extension capabilities to the string table that (in the
binary format) collide with System V and XSI Curses extensions. See
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for detailed discussion of terminfo source compatibility
issues.
Direct access to the <STRONG>TERMTYPE</STRONG> structure is provided for legacy applica-
tions. Portable applications should use the <STRONG>tigetflag</STRONG> and related
tions. Portable applications should use the <STRONG>tigetflag</STRONG> and related
functions described in <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> for reading terminal capabili-
ties.
A small number of terminal descriptions use uppercase characters in
their names. If the underlying filesystem ignores the difference
between uppercase and lowercase, ncurses represents the "first charac-
A small number of terminal descriptions use uppercase characters in
their names. If the underlying filesystem ignores the difference
between uppercase and lowercase, <STRONG>ncurses</STRONG> represents the "first charac-
ter" of the terminal name used as the intermediate level of a directory
tree in (two-character) hexadecimal form.
@ -284,10 +287,10 @@
</PRE><H2><a name="h2-LIMITS">LIMITS</a></H2><PRE>
Some limitations:
<STRONG>o</STRONG> total compiled entries cannot exceed 4096 bytes in the legacy for-
<STRONG>o</STRONG> total compiled entries cannot exceed 4096 bytes in the legacy for-
mat.
<STRONG>o</STRONG> total compiled entries cannot exceed 32768 bytes in the extended
<STRONG>o</STRONG> total compiled entries cannot exceed 32768 bytes in the extended
format.
<STRONG>o</STRONG> the name field cannot exceed 128 bytes.

File diff suppressed because it is too large Load Diff

View File

@ -364,7 +364,7 @@
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="term.5.html">term(5)</A></STRONG>. <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>

View File

@ -113,7 +113,7 @@
<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG>ter-</STRONG>
<STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -482,7 +482,7 @@
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -389,7 +389,7 @@
<STRONG>csh(1)</STRONG>, <STRONG>sh(1)</STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>tty(4)</STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
<STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180203).
This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180331).

View File

@ -26,7 +26,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
* @Id: user_caps.5,v 1.6 2018/02/03 22:38:17 tom Exp @
* @Id: user_caps.5,v 1.7 2018/02/17 19:07:01 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
@ -200,7 +200,7 @@
could define <STRONG>RGB#1</STRONG> to represent the standard eight ANSI colors,
i.e., one bit per color.
U8 <EM>boolean</EM>, asserts that ncurses must use Unicode values for line-
U8 <EM>number</EM>, asserts that ncurses must use Unicode values for line-
drawing characters, and that it should ignore the alternate char-
acter set capabilities when the locale uses UTF-8 encoding. For
more information, see the discussion of <STRONG>NCURSES_NO_UTF8_ACS</STRONG> in

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2017 Free Software Foundation, Inc. *
.\" Copyright (c) 2017,2018 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 *
@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey
.\"
.\" $Id: new_pair.3x,v 1.10 2017/11/18 23:48:44 tom Exp $
.\" $Id: new_pair.3x,v 1.11 2018/04/01 00:01:17 tom Exp $
.TH new_pair 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -153,6 +153,6 @@ These routines are specific to ncurses. They were not supported on
Version 7, BSD or System V implementations. It is recommended that
any code depending on them be conditioned using NCURSES_VERSION.
.SH SEE ALSO
\fBinit_pair\fR(3X).
\fBcurs_color\fR(3X).
.SH AUTHOR
Thomas Dickey.

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2017,2018 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: term.5,v 1.27 2017/12/16 21:27:20 tom Exp $
.\" $Id: term.5,v 1.28 2018/03/31 22:41:29 tom Exp $
.TH term 5
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -58,7 +58,7 @@ term \- format of compiled term file.
.SH DESCRIPTION
.SS STORAGE LOCATION
Compiled terminfo descriptions are placed under the directory \fB\*d\fP.
Two configurations are supported (when building the ncurses libraries):
Two configurations are supported (when building the \fBncurses\fP libraries):
.TP 5
.B directory tree
A two-level scheme is used to avoid a linear search
@ -81,11 +81,11 @@ the terminfo's primary name as a key,
and records containing only aliases pointing to the primary name.
.IP
If built to write hashed databases,
ncurses can still read terminfo databases organized as a directory tree,
\fBncurses\fP can still read terminfo databases organized as a directory tree,
but cannot write entries into the directory tree.
It can write (or rewrite) entries in the hashed database.
.IP
ncurses distinguishes the two cases in the TERMINFO and TERMINFO_DIRS
\fBncurses\fP distinguishes the two cases in the TERMINFO and TERMINFO_DIRS
environment variable by assuming a directory tree for entries that
correspond to an existing directory,
and hashed database otherwise.
@ -129,7 +129,8 @@ The first byte contains the least significant 8 bits of the value,
and the second byte contains the most significant 8 bits.
(Thus, the value represented is 256*second+first.)
The value \-1 is represented by the two bytes 0377, 0377; other negative
values are illegal. This value generally
values are illegal.
This value generally
means that the corresponding capability is missing from this terminal.
Note that this format corresponds to the hardware of the \s-1VAX\s+1
and \s-1PDP\s+1-11 (that is, little-endian machines).
@ -179,12 +180,14 @@ With some minor variations of the offsets (see PORTABILITY),
the same binary format is used in all modern UNIX systems.
Each system uses a predefined set of boolean, number or string capabilities.
.PP
The ncurses libraries and applications support extended terminfo binary format,
allowing users to define capabilities which are loaded at runtime. This
The \fBncurses\fP libraries and applications support extended terminfo binary format,
allowing users to define capabilities which are loaded at runtime.
This
extension is made possible by using the fact that the other implementations
stop reading the terminfo data when they have reached the end of the size given
in the header.
ncurses checks the size, and if it exceeds that due to the predefined data,
\fBncurses\fP checks the size,
and if it exceeds that due to the predefined data,
continues to parse according to its own scheme.
.PP
First, it reads the extended header (5 short integers):
@ -200,13 +203,17 @@ count of extended numeric capabilities
count of extended string capabilities
.TP 5
(4)
size of the extended string table in bytes.
count of the items in extended string table
.TP 5
(5)
last offset of the extended string table in bytes.
size of the extended string table in bytes
.RE
.PP
Using the counts and sizes, ncurses allocates arrays and reads data
The count- and size-values for the extended string table
include the extended capability \fInames\fP as well as
extended capability \fIvalues\fP.
.PP
Using the counts and sizes, \fBncurses\fP allocates arrays and reads data
for the extended capabilities in the same order as the header information.
.PP
The extended string table contains values for string capabilities.
@ -221,7 +228,7 @@ names with members of a \fBTERMTYPE\fP structure.
.SS EXTENDED NUMBER FORMAT
.PP
On occasion, 16-bit signed integers are not large enough.
With ncurses 6.1, a new format is introduced by making a few changes
With \fBncurses\fP 6.1, a new format was introduced by making a few changes
to the legacy format:
.bP
a different magic number (0542)
@ -255,11 +262,13 @@ of boolean, number, and string capabilities.
.PP
Despite the consistent use of little-endian for numbers and the otherwise
self-describing format, it is not wise to count on portability of binary
terminfo entries between commercial UNIX versions. The problem is that there
terminfo entries between commercial UNIX versions.
The problem is that there
are at least three versions of terminfo (under HP\-UX, AIX, and OSF/1) which
diverged from System V terminfo after SVr1, and have added extension
capabilities to the string table that (in the binary format) collide with
System V and XSI Curses extensions. See \fBterminfo\fR(\*n) for detailed
System V and XSI Curses extensions.
See \fBterminfo\fR(\*n) for detailed
discussion of terminfo source compatibility issues.
.PP
Direct access to the \fBTERMTYPE\fP structure is provided for legacy
@ -271,7 +280,7 @@ A small number of terminal descriptions use uppercase characters in
their names.
If the underlying filesystem ignores the difference between
uppercase and lowercase,
ncurses represents the \*(``first character\*('' of the terminal name used as
\fBncurses\fP represents the \*(``first character\*('' of the terminal name used as
the intermediate level of a directory tree in (two-character) hexadecimal form.
.SH EXAMPLE
As an example, here is a description for the Lear-Siegler

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
* Copyright (c) 1998-2017,2018 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 *
@ -41,7 +41,7 @@
#include <tic.h>
MODULE_ID("$Id: read_entry.c,v 1.144 2017/10/23 21:20:06 tom Exp $")
MODULE_ID("$Id: read_entry.c,v 1.147 2018/04/01 01:32:39 tom Exp $")
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
@ -384,18 +384,18 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit)
int ext_bool_count = MyNumber(buf + 0);
int ext_num_count = MyNumber(buf + 2);
int ext_str_count = MyNumber(buf + 4);
int ext_str_size = MyNumber(buf + 6);
int ext_str_usage = MyNumber(buf + 6);
int ext_str_limit = MyNumber(buf + 8);
unsigned need = (unsigned) (ext_bool_count + ext_num_count + ext_str_count);
int base = 0;
if ((int) need >= (max_entry_size / 2)
|| ext_str_size >= max_entry_size
|| ext_str_usage >= max_entry_size
|| ext_str_limit >= max_entry_size
|| ext_bool_count < 0
|| ext_num_count < 0
|| ext_str_count < 0
|| ext_str_size < 0
|| ext_str_usage < 0
|| ext_str_limit < 0) {
returnDB(TGETENT_NO);
}
@ -408,9 +408,15 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit)
TYPE_REALLOC(NCURSES_INT2, ptr->num_Numbers, ptr->Numbers);
TYPE_REALLOC(char *, ptr->num_Strings, ptr->Strings);
TR(TRACE_DATABASE, ("extended header is %d/%d/%d(%d:%d)",
ext_bool_count, ext_num_count, ext_str_count,
ext_str_size, ext_str_limit));
TR(TRACE_DATABASE, ("extended header: "
"bool %d, "
"number %d, "
"string %d(%d:%d)",
ext_bool_count,
ext_num_count,
ext_str_count,
ext_str_usage,
ext_str_limit));
TR(TRACE_DATABASE, ("READ %d extended-booleans @%d",
ext_bool_count, offset));
@ -456,8 +462,11 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit)
}
if ((ptr->ext_Strings = UShort(ext_str_count)) != 0) {
int check = (ext_bool_count + ext_num_count + ext_str_count);
TR(TRACE_DATABASE,
("Before computing extended-string capabilities str_count=%d, ext_str_count=%d",
("Before computing extended-string capabilities "
"str_count=%d, ext_str_count=%d",
str_count, ext_str_count));
convert_strings(buf, ptr->Strings + str_count, ext_str_count,
ext_str_limit, ptr->ext_str_table);
@ -466,12 +475,22 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit)
i, i + str_count,
_nc_visbuf(ptr->Strings[i + str_count])));
ptr->Strings[i + STRCOUNT] = ptr->Strings[i + str_count];
if (VALID_STRING(ptr->Strings[i + STRCOUNT]))
if (VALID_STRING(ptr->Strings[i + STRCOUNT])) {
base += (int) (strlen(ptr->Strings[i + STRCOUNT]) + 1);
++check;
}
TR(TRACE_DATABASE, ("... to [%d] %s",
i + STRCOUNT,
_nc_visbuf(ptr->Strings[i + STRCOUNT])));
}
TR(TRACE_DATABASE, ("Check table-size: %d/%d", check, ext_str_usage));
#if 0
/*
* Phasing in a proper check will be done "later".
*/
if (check != ext_str_usage)
returnDB(TGETENT_NO);
#endif
}
if (need) {

View File

@ -50,7 +50,7 @@
#define TRACE_NUM(n) /* nothing */
#endif
MODULE_ID("$Id: write_entry.c,v 1.102 2018/02/11 20:24:28 Julien.Cristau Exp $")
MODULE_ID("$Id: write_entry.c,v 1.104 2018/04/01 00:51:04 tom Exp $")
static int total_written;
static int total_parts;
@ -796,7 +796,8 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
#if NCURSES_XNAMES
if (extended_object(tp)) {
unsigned extcnt = (unsigned) NUM_EXT_NAMES(tp);
unsigned ext_total = (unsigned) NUM_EXT_NAMES(tp);
unsigned ext_usage = ext_total;
if (even_boundary(nextfree))
return (ERR);
@ -810,10 +811,16 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
return (ERR);
nextfree += compute_offsets(tp->ext_Names,
(size_t) extcnt,
(size_t) ext_total,
offsets + tp->ext_Strings);
TRACE_OUT(("after extended capnames, nextfree=%d", nextfree));
strmax = tp->ext_Strings + extcnt;
strmax = tp->ext_Strings + ext_total;
for (i = 0; i < tp->ext_Strings; ++i) {
if (VALID_STRING(tp->Strings[i + STRCOUNT])) {
ext_usage++;
}
}
TRACE_OUT(("will write %u/%lu strings", ext_usage, (unsigned long) strmax));
/*
* Write the extended header
@ -821,7 +828,7 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
LITTLE_ENDIAN(buf + 0, tp->ext_Booleans);
LITTLE_ENDIAN(buf + 2, tp->ext_Numbers);
LITTLE_ENDIAN(buf + 4, tp->ext_Strings);
LITTLE_ENDIAN(buf + 6, strmax);
LITTLE_ENDIAN(buf + 6, ext_usage);
LITTLE_ENDIAN(buf + 8, nextfree);
TRACE_OUT(("WRITE extended-header @%d", *offset));
if (Write(buf, 10, 1) != 1)
@ -868,7 +875,7 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
/*
* Write the extended names
*/
for (i = 0; i < extcnt; i++) {
for (i = 0; i < ext_total; i++) {
TRACE_OUT(("WRITE ext_Names[%d]=%s", (int) i, tp->ext_Names[i]));
if (!WRITE_STRING(tp->ext_Names[i]))
return (ERR);

View File

@ -1,8 +1,8 @@
ncurses6 (6.1+20180324) unstable; urgency=low
ncurses6 (6.1+20180331) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 22 Mar 2018 04:41:45 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 31 Mar 2018 11:26:33 -0400
ncurses6 (5.9-20131005) unstable; urgency=low

View File

@ -1,8 +1,8 @@
ncurses6 (6.1+20180324) unstable; urgency=low
ncurses6 (6.1+20180331) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 22 Mar 2018 04:41:45 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 31 Mar 2018 11:26:33 -0400
ncurses6 (5.9-20131005) unstable; urgency=low

View File

@ -1,8 +1,8 @@
ncurses6 (6.1+20180324) unstable; urgency=low
ncurses6 (6.1+20180331) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 22 Mar 2018 04:41:45 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 31 Mar 2018 11:26:33 -0400
ncurses6 (5.9-20120608) unstable; urgency=low

View File

@ -1,4 +1,4 @@
; $Id: mingw-ncurses.nsi,v 1.263 2018/03/22 08:41:45 tom Exp $
; $Id: mingw-ncurses.nsi,v 1.264 2018/03/31 15:26:33 tom Exp $
; TODO add examples
; TODO bump ABI to 6
@ -10,7 +10,7 @@
!define VERSION_MAJOR "6"
!define VERSION_MINOR "1"
!define VERSION_YYYY "2018"
!define VERSION_MMDD "0324"
!define VERSION_MMDD "0331"
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
!define MY_ABI "5"

View File

@ -3,7 +3,7 @@
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.1
Release: 20180324
Release: 20180331
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz

View File

@ -1,7 +1,7 @@
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
Release: 20180324
Release: 20180331
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz