-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2961 2017/09/30 23:18:33 tom Exp $
+-- $Id: NEWS,v 1.2966 2017/10/07 23:37:31 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.
+20171007
+ + modify "-T" option of clear and tput to call use_tioctl() to obtain
+ the operating system's notion of the screensize if possible.
+ + review/repair some exit-codes for tput, making usage-message exit
+ with 2 rather than 1, and a failure to open terminal 4+errno.
+ + amend check in tput, tabs and clear to allow those to use the
+ database-only features in cron if a -T option gives a suitable
+ terminal name (report by Lauri Tirkkonen).
+ + correct an ifdef in test/ncurses.c for systems with soft-keys but
+ not slk_color().
+ + regenerate man-html documentation.
+
20170930
+ fix a symbol conflict that made ncurses.c C/c menu not work with
Solaris xpg4 curses.
-5:0:9 6.0 20170930
+5:0:9 6.0 20171007
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1185 2017/09/28 08:10:00 tom Exp $
+# $Id: dist.mk,v 1.1186 2017/10/02 01:01:40 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 = 6
NCURSES_MINOR = 0
-NCURSES_PATCH = 20170930
+NCURSES_PATCH = 20171007
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
the filename or entry. If <STRONG>TERMCAP</STRONG> is a full pathname to a file, only
the terminal whose name is specified in the environment variable <STRONG>TERM</STRONG>
is extracted from that file. If the environment variable <STRONG>TERMCAP</STRONG> is
- not set, then the file <STRONG>/usr/local/ncurses/lib/terminfo</STRONG> is read.
+ not set, then the file <STRONG>/usr/share/terminfo</STRONG> is read.
<STRONG>-v</STRONG> print out tracing information on standard error as the program
runs.
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo
- Compiled terminal description database.
+ /usr/share/terminfo Compiled terminal description database.
</PRE><H2><a name="h2-TRANSLATIONS-FROM-NONSTANDARD-CAPABILITIES">TRANSLATIONS FROM NONSTANDARD CAPABILITIES</a></H2><PRE>
PD kN XENIX key_npage
PN po XENIX prtr_off
PS pf XENIX prtr_on
-
PU kP XENIX key_ppage
+
RT @8 XENIX kent
UP ku XENIX kcuu1
KA k; Tek key_f10
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: clear.1,v 1.17 2017/08/19 14:12:50 tom Exp @
+ * @Id: clear.1,v 1.18 2017/10/07 21:30:17 tom Exp @
* these would be fallbacks for DS/DE,
* but groff changed the meaning of the macros.
-->
<STRONG>-T</STRONG> <EM>type</EM>
indicates the <EM>type</EM> of terminal. Normally this option is unneces-
sary, because the default is taken from the environment variable
- <STRONG>TERM</STRONG>.
+ <STRONG>TERM</STRONG>. If <STRONG>-T</STRONG> is specified, then the shell variables <STRONG>LINES</STRONG> and <STRONG>COL-</STRONG>
+ <STRONG>UMNS</STRONG> will also be ignored.
<STRONG>-V</STRONG> reports the version of ncurses which was used in this program, and
exits. The options are as follows:
</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
- A <STRONG>clear</STRONG> command appeared in 2.79BSD dated February 24, 1979. Later
+ A <STRONG>clear</STRONG> command appeared in 2.79BSD dated February 24, 1979. Later
that was provided in Unix 8th edition (1985).
- AT&T adapted a different BSD program (<STRONG>tset</STRONG>) to make a new command
- (<STRONG>tput</STRONG>), and used this to replace the <STRONG>clear</STRONG> command with a shell script
+ AT&T adapted a different BSD program (<STRONG>tset</STRONG>) to make a new command
+ (<STRONG>tput</STRONG>), and used this to replace the <STRONG>clear</STRONG> command with a shell script
which calls <STRONG>tput</STRONG> <STRONG>clear</STRONG>, e.g.,
/usr/bin/tput ${1:+-T$1} clear 2> /dev/null
The remainder of the script in each case is a copyright notice.
- The ncurses <STRONG>clear</STRONG> command began in 1995 by adapting the original BSD
+ The ncurses <STRONG>clear</STRONG> command began in 1995 by adapting the original BSD
<STRONG>clear</STRONG> command (with terminfo, of course).
The <STRONG>E3</STRONG> extension came later:
- <STRONG>o</STRONG> In June 1999, xterm provided an extension to the standard control
- sequence for clearing the screen. Rather than clearing just the
+ <STRONG>o</STRONG> In June 1999, xterm provided an extension to the standard control
+ sequence for clearing the screen. Rather than clearing just the
visible part of the screen using
printf '\033[2J'
printf '\033[<STRONG>3</STRONG>J'
- This is documented in <EM>XTerm</EM> <EM>Control</EM> <EM>Sequences</EM> as a feature origi-
+ This is documented in <EM>XTerm</EM> <EM>Control</EM> <EM>Sequences</EM> as a feature origi-
nating with xterm.
<STRONG>o</STRONG> A few other terminal developers adopted the feature, e.g., PuTTY in
2006.
- <STRONG>o</STRONG> In April 2011, a Red Hat developer submitted a patch to the Linux
- kernel, modifying its console driver to do the same thing. The
- Linux change, part of the 3.0 release, did not mention xterm,
+ <STRONG>o</STRONG> In April 2011, a Red Hat developer submitted a patch to the Linux
+ kernel, modifying its console driver to do the same thing. The
+ Linux change, part of the 3.0 release, did not mention xterm,
although it was cited in the Red Hat bug report (#683733) which led
to the change.
- <STRONG>o</STRONG> Again, a few other terminal developers adopted the feature. But
+ <STRONG>o</STRONG> Again, a few other terminal developers adopted the feature. But
the next relevant step was a change to the <STRONG>clear</STRONG> program in 2013 to
incorporate this extension.
- <STRONG>o</STRONG> In 2013, the <STRONG>E3</STRONG> extension was overlooked in <STRONG>tput</STRONG> with the "clear"
- parameter. That was addressed in 2016 by reorganizing <STRONG>tput</STRONG> to
+ <STRONG>o</STRONG> In 2013, the <STRONG>E3</STRONG> extension was overlooked in <STRONG>tput</STRONG> with the "clear"
+ parameter. That was addressed in 2016 by reorganizing <STRONG>tput</STRONG> to
share its logic with <STRONG>clear</STRONG> and <STRONG>tset</STRONG>.
Neither IEEE Std 1003.1/The Open Group Base Specifications Issue 7
(POSIX.1-2008) nor X/Open Curses Issue 7 documents tset or reset.
- The latter documents <STRONG>tput</STRONG>, which could be used to replace this utility
- either via a shell script or by an alias (such as a symbolic link) to
+ The latter documents <STRONG>tput</STRONG>, which could be used to replace this utility
+ either via a shell script or by an alias (such as a symbolic link) to
run <STRONG>tput</STRONG> as <STRONG>clear</STRONG>.
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_memleaks.3x,v 1.5 2017/07/28 00:04:34 tom Exp @
+ * @Id: curs_memleaks.3x,v 1.6 2017/08/22 08:35:37 Sven.Joachim Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
- <STRONG>_nc_freeall</STRONG> <STRONG>_nc_free_and_exit</STRONG> <STRONG>_nc_free_tinfo</STRONG> - <STRONG>curses</STRONG> memory-leak
+ <STRONG>_nc_freeall</STRONG>, <STRONG>_nc_free_and_exit</STRONG>, <STRONG>_nc_free_tinfo</STRONG> - <STRONG>curses</STRONG> memory-leak
checking
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_util.3x,v 1.49 2017/05/30 21:09:21 tom Exp @
+ * @Id: curs_util.3x,v 1.51 2017/10/07 21:47:25 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
</PRE><H3><a name="h3-filter_nofilter">filter/nofilter</a></H3><PRE>
The <STRONG>filter</STRONG> routine, if used, must be called before <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG>
- are called. The effect is that, during those calls, <STRONG>LINES</STRONG> is set to 1;
- the capabilities <STRONG>clear</STRONG>, <STRONG>cup</STRONG>, <STRONG>cud</STRONG>, <STRONG>cud1</STRONG>, <STRONG>cuu1</STRONG>, <STRONG>cuu</STRONG>, <STRONG>vpa</STRONG> are disabled;
- and the <STRONG>home</STRONG> string is set to the value of <STRONG>cr</STRONG>.
+ are called. Calling <STRONG>filter</STRONG> causes these changes in initialization:
- The <STRONG>nofilter</STRONG> routine cancels the effect of a preceding <STRONG>filter</STRONG> call.
- That allows the caller to initialize a screen on a different device,
- using a different value of <STRONG>$TERM</STRONG>. The limitation arises because the
+ <STRONG>o</STRONG> <STRONG>LINES</STRONG> is set to 1;
+
+ <STRONG>o</STRONG> the capabilities <STRONG>clear</STRONG>, <STRONG>cud1</STRONG>, <STRONG>cud</STRONG>, <STRONG>cup</STRONG>, <STRONG>cuu1</STRONG>, <STRONG>cuu</STRONG>, <STRONG>vpa</STRONG> are dis-
+ abled;
+
+ <STRONG>o</STRONG> the capability <STRONG>ed</STRONG> is disabled if <STRONG>bce</STRONG> is set;
+
+ <STRONG>o</STRONG> and the <STRONG>home</STRONG> string is set to the value of <STRONG>cr</STRONG>.
+
+ The <STRONG>nofilter</STRONG> routine cancels the effect of a preceding <STRONG>filter</STRONG> call.
+ That allows the caller to initialize a screen on a different device,
+ using a different value of <STRONG>$TERM</STRONG>. The limitation arises because the
<STRONG>filter</STRONG> routine modifies the in-memory copy of the terminal information.
</PRE><H3><a name="h3-use_env">use_env</a></H3><PRE>
- The <STRONG>use_env</STRONG> routine, if used, should be called before <STRONG>initscr</STRONG> or
- <STRONG>newterm</STRONG> are called (because those compute the screen size). It modi-
- fies the way <STRONG>ncurses</STRONG> treats environment variables when determining the
+ The <STRONG>use_env</STRONG> routine, if used, should be called before <STRONG>initscr</STRONG> or
+ <STRONG>newterm</STRONG> are called (because those compute the screen size). It modi-
+ fies the way <STRONG>ncurses</STRONG> treats environment variables when determining the
screen size.
- <STRONG>o</STRONG> Normally <STRONG>ncurses</STRONG> looks first at the terminal database for the
+ <STRONG>o</STRONG> Normally <STRONG>ncurses</STRONG> looks first at the terminal database for the
screen size.
- If <STRONG>use_env</STRONG> was called with <STRONG>FALSE</STRONG> for parameter, it stops here un-
- less If <STRONG>use_tioctl</STRONG> was also called with <STRONG>TRUE</STRONG> for parameter.
+ If <STRONG>use_env</STRONG> was called with <STRONG>FALSE</STRONG> for parameter, it stops here un-
+ less <STRONG>use_tioctl</STRONG> was also called with <STRONG>TRUE</STRONG> for parameter.
- <STRONG>o</STRONG> Then it asks for the screen size via operating system calls. If
+ <STRONG>o</STRONG> Then it asks for the screen size via operating system calls. If
successful, it overrides the values from the terminal database.
- <STRONG>o</STRONG> Finally (unless <STRONG>use_env</STRONG> was called with <STRONG>FALSE</STRONG> parameter), <STRONG>ncurses</STRONG>
- examines the <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> environment variables, using a value
- in those to override the results from the operating system or ter-
+ <STRONG>o</STRONG> Finally (unless <STRONG>use_env</STRONG> was called with <STRONG>FALSE</STRONG> parameter), <STRONG>ncurses</STRONG>
+ examines the <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> environment variables, using a value
+ in those to override the results from the operating system or ter-
minal database.
- <STRONG>Ncurses</STRONG> also updates the screen size in response to <STRONG>SIGWINCH</STRONG>, un-
+ <STRONG>Ncurses</STRONG> also updates the screen size in response to <STRONG>SIGWINCH</STRONG>, un-
less overridden by the <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> environment variables,
</PRE><H3><a name="h3-use_tioctl">use_tioctl</a></H3><PRE>
- The <STRONG>use_tioctl</STRONG> routine, if used, should be called before <STRONG>initscr</STRONG> or
- <STRONG>newterm</STRONG> are called (because those compute the screen size). After
- <STRONG>use_tioctl</STRONG> is called with <STRONG>TRUE</STRONG> as an argument, <STRONG>ncurses</STRONG> modifies the
+ The <STRONG>use_tioctl</STRONG> routine, if used, should be called before <STRONG>initscr</STRONG> or
+ <STRONG>newterm</STRONG> are called (because those compute the screen size). After
+ <STRONG>use_tioctl</STRONG> is called with <STRONG>TRUE</STRONG> as an argument, <STRONG>ncurses</STRONG> modifies the
last step in its computation of screen size as follows:
- <STRONG>o</STRONG> checks if the <STRONG>LINES</STRONG> and <STRONG>COLUMNS</STRONG> environment variables are set to a
+ <STRONG>o</STRONG> checks if the <STRONG>LINES</STRONG> and <STRONG>COLUMNS</STRONG> environment variables are set to a
number greater than zero.
- <STRONG>o</STRONG> for each, <STRONG>ncurses</STRONG> updates the corresponding environment variable
- with the value that it has obtained via operating system call or
+ <STRONG>o</STRONG> for each, <STRONG>ncurses</STRONG> updates the corresponding environment variable
+ with the value that it has obtained via operating system call or
from the terminal database.
- <STRONG>o</STRONG> <STRONG>ncurses</STRONG> re-fetches the value of the environment variables so that
+ <STRONG>o</STRONG> <STRONG>ncurses</STRONG> re-fetches the value of the environment variables so that
it is still the environment variables which set the screen size.
The <STRONG>use_env</STRONG> and <STRONG>use_tioctl</STRONG> routines combine as summarized here:
<EM>use</EM><STRONG>_</STRONG><EM>env</EM> <EM>use</EM><STRONG>_</STRONG><EM>tioctl</EM> <EM>Summary</EM>
----------------------------------------------------------------
- TRUE FALSE This is the default behavior. <STRONG>ncurses</STRONG>
+ TRUE FALSE This is the default behavior. <STRONG>ncurses</STRONG>
uses operating system calls unless over-
ridden by $LINES or $COLUMNS environment
variables.
- TRUE TRUE <STRONG>ncurses</STRONG> updates $LINES and $COLUMNS
+ TRUE TRUE <STRONG>ncurses</STRONG> updates $LINES and $COLUMNS
based on operating system calls.
FALSE TRUE <STRONG>ncurses</STRONG> ignores $LINES and $COLUMNS, us-
es operating system calls to obtain
size.
- FALSE FALSE <STRONG>ncurses</STRONG> relies on the terminal database
+ FALSE FALSE <STRONG>ncurses</STRONG> relies on the terminal database
to determine size.
</PRE><H3><a name="h3-putwin_getwin">putwin/getwin</a></H3><PRE>
- The <STRONG>putwin</STRONG> routine writes all data associated with window (or pad) <EM>win</EM>
+ The <STRONG>putwin</STRONG> routine writes all data associated with window (or pad) <EM>win</EM>
into the file to which <EM>filep</EM> points. This information can be later re-
trieved using the <STRONG>getwin</STRONG> function.
- The <STRONG>getwin</STRONG> routine reads window related data stored in the file by
- <STRONG>putwin</STRONG>. The routine then creates and initializes a new window using
- that data. It returns a pointer to the new window. There are a few
+ The <STRONG>getwin</STRONG> routine reads window related data stored in the file by
+ <STRONG>putwin</STRONG>. The routine then creates and initializes a new window using
+ that data. It returns a pointer to the new window. There are a few
caveats:
<STRONG>o</STRONG> the data written is a copy of the <STRONG>WINDOW</STRONG> structure, and its associ-
- ated character cells. The format differs between the wide-charac-
- ter (ncursesw) and non-wide (ncurses) libraries. You can transfer
+ ated character cells. The format differs between the wide-charac-
+ ter (ncursesw) and non-wide (ncurses) libraries. You can transfer
data between the two, however.
- <STRONG>o</STRONG> the retrieved window is always created as a top-level window (or
+ <STRONG>o</STRONG> the retrieved window is always created as a top-level window (or
pad), rather than a subwindow.
- <STRONG>o</STRONG> the window's character cells contain the color pair <EM>value</EM>, but not
- the actual color <EM>numbers</EM>. If cells in the retrieved window use
- color pairs which have not been created in the application using
+ <STRONG>o</STRONG> the window's character cells contain the color pair <EM>value</EM>, but not
+ the actual color <EM>numbers</EM>. If cells in the retrieved window use
+ color pairs which have not been created in the application using
<STRONG>init_pair</STRONG>, they will not be colored when the window is refreshed.
</PRE><H3><a name="h3-delay_output">delay_output</a></H3><PRE>
- The <STRONG>delay_output</STRONG> routine inserts an <EM>ms</EM> millisecond pause in output.
- This routine should not be used extensively because padding characters
- are used rather than a CPU pause. If no padding character is speci-
+ The <STRONG>delay_output</STRONG> routine inserts an <EM>ms</EM> millisecond pause in output.
+ This routine should not be used extensively because padding characters
+ are used rather than a CPU pause. If no padding character is speci-
fied, this uses <STRONG>napms</STRONG> to perform the delay.
</PRE><H3><a name="h3-flushinp">flushinp</a></H3><PRE>
- The <STRONG>flushinp</STRONG> routine throws away any typeahead that has been typed by
+ The <STRONG>flushinp</STRONG> routine throws away any typeahead that has been typed by
the user and has not yet been read by the program.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- Except for <STRONG>flushinp</STRONG>, routines that return an integer return <STRONG>ERR</STRONG> upon
- failure and <STRONG>OK</STRONG> (SVr4 specifies only "an integer value other than <STRONG>ERR</STRONG>")
+ Except for <STRONG>flushinp</STRONG>, routines that return an integer return <STRONG>ERR</STRONG> upon
+ failure and <STRONG>OK</STRONG> (SVr4 specifies only "an integer value other than <STRONG>ERR</STRONG>")
upon successful completion.
Routines that return pointers return <STRONG>NULL</STRONG> on error.
returns an error if the terminal was not initialized.
<STRONG>putwin</STRONG>
- returns an error if the associated <STRONG>fwrite</STRONG> calls return an er-
+ returns an error if the associated <STRONG>fwrite</STRONG> calls return an er-
ror.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
</PRE><H3><a name="h3-filter">filter</a></H3><PRE>
- The SVr4 documentation describes the action of <STRONG>filter</STRONG> only in the
- vaguest terms. The description here is adapted from the XSI Curses
+ The SVr4 documentation describes the action of <STRONG>filter</STRONG> only in the
+ vaguest terms. The description here is adapted from the XSI Curses
standard (which erroneously fails to describe the disabling of <STRONG>cuu</STRONG>).
</PRE><H3><a name="h3-keyname">keyname</a></H3><PRE>
- The <STRONG>keyname</STRONG> function may return the names of user-defined string capa-
- bilities which are defined in the terminfo entry via the <STRONG>-x</STRONG> option of
+ The <STRONG>keyname</STRONG> function may return the names of user-defined string capa-
+ bilities which are defined in the terminfo entry via the <STRONG>-x</STRONG> option of
<STRONG>tic</STRONG>. This implementation automatically assigns at run-time keycodes to
- user-defined strings which begin with "k". The keycodes start at
+ user-defined strings which begin with "k". The keycodes start at
KEY_MAX, but are not guaranteed to be the same value for different runs
- because user-defined codes are merged from all terminal descriptions
- which have been loaded. The <STRONG><A HREF="curs_extend.3x.html">use_extended_names(3x)</A></STRONG> function controls
- whether this data is loaded when the terminal description is read by
+ because user-defined codes are merged from all terminal descriptions
+ which have been loaded. The <STRONG><A HREF="curs_extend.3x.html">use_extended_names(3x)</A></STRONG> function controls
+ whether this data is loaded when the terminal description is read by
the library.
</PRE><H3><a name="h3-nofilter_use_tioctl">nofilter/use_tioctl</a></H3><PRE>
- The <STRONG>nofilter</STRONG> and <STRONG>use_tioctl</STRONG> routines are specific to <STRONG>ncurses</STRONG>. They
- were not supported on Version 7, BSD or System V implementations. It
- is recommended that any code depending on <STRONG>ncurses</STRONG> extensions be condi-
+ The <STRONG>nofilter</STRONG> and <STRONG>use_tioctl</STRONG> routines are specific to <STRONG>ncurses</STRONG>. They
+ were not supported on Version 7, BSD or System V implementations. It
+ is recommended that any code depending on <STRONG>ncurses</STRONG> extensions be condi-
tioned using NCURSES_VERSION.
</PRE><H3><a name="h3-putwin_getwin">putwin/getwin</a></H3><PRE>
The <STRONG>putwin</STRONG> and <STRONG>getwin</STRONG> functions have several issues with portability:
- <STRONG>o</STRONG> The files written and read by these functions use an implementa-
+ <STRONG>o</STRONG> The files written and read by these functions use an implementa-
tion-specific format. Although the format is an obvious target for
standardization, it has been overlooked.
- Interestingly enough, according to the copyright dates in Solaris
- source, the functions (along with <STRONG>scr_init</STRONG>, etc.) originated with
+ Interestingly enough, according to the copyright dates in Solaris
+ source, the functions (along with <STRONG>scr_init</STRONG>, etc.) originated with
the University of California, Berkeley (in 1982) and were later (in
- 1988) incorporated into SVr4. Oddly, there are no such functions
+ 1988) incorporated into SVr4. Oddly, there are no such functions
in the 4.3BSD curses sources.
<STRONG>o</STRONG> Most implementations simply dump the binary <STRONG>WINDOW</STRONG> structure to the
- file. These include SVr4 curses, NetBSD and PDCurses, as well as
+ file. These include SVr4 curses, NetBSD and PDCurses, as well as
older <STRONG>ncurses</STRONG> versions. This implementation (as well as the X/Open
variant of Solaris curses, dated 1995) uses textual dumps.
- The implementations which use binary dumps use block-I/O (the
- <STRONG>fwrite</STRONG> and <STRONG>fread</STRONG> functions). Those that use textual dumps use
+ The implementations which use binary dumps use block-I/O (the
+ <STRONG>fwrite</STRONG> and <STRONG>fread</STRONG> functions). Those that use textual dumps use
buffered-I/O. A few applications may happen to write extra data in
- the file using these functions. Doing that can run into problems
- mixing block- and buffered-I/O. This implementation reduces the
- problem on writes by flushing the output. However, reading from a
+ the file using these functions. Doing that can run into problems
+ mixing block- and buffered-I/O. This implementation reduces the
+ problem on writes by flushing the output. However, reading from a
file written using mixed schemes may not be successful.
</PRE><H3><a name="h3-unctrl_wunctrl">unctrl/wunctrl</a></H3><PRE>
- The XSI Curses standard, Issue 4 describes these functions. It states
+ The XSI Curses standard, Issue 4 describes these functions. It states
that <STRONG>unctrl</STRONG> and <STRONG>wunctrl</STRONG> will return a null pointer if unsuccessful, but
- does not define any error conditions. This implementation checks for
+ does not define any error conditions. This implementation checks for
three cases:
- <STRONG>o</STRONG> the parameter is a 7-bit US-ASCII code. This is the case that
+ <STRONG>o</STRONG> the parameter is a 7-bit US-ASCII code. This is the case that
X/Open Curses documented.
<STRONG>o</STRONG> the parameter is in the range 128-159, i.e., a C1 control code. If
- <STRONG>use_legacy_coding</STRONG> has been called with a <STRONG>2</STRONG> parameter, <STRONG>unctrl</STRONG> re-
- turns the parameter, i.e., a one-character string with the parame-
- ter as the first character. Otherwise, it returns "~@", "~A",
+ <STRONG>use_legacy_coding</STRONG> has been called with a <STRONG>2</STRONG> parameter, <STRONG>unctrl</STRONG> re-
+ turns the parameter, i.e., a one-character string with the parame-
+ ter as the first character. Otherwise, it returns "~@", "~A",
etc., analogous to "^@", "^A", C0 controls.
X/Open Curses does not document whether <STRONG>unctrl</STRONG> can be called before
pointer.
The strings returned by <STRONG>unctrl</STRONG> in this implementation are determined at
- compile time, showing C1 controls from the upper-128 codes with a "~"
- prefix rather than "^". Other implementations have different conven-
+ compile time, showing C1 controls from the upper-128 codes with a "~"
+ prefix rather than "^". Other implementations have different conven-
tions. For example, they may show both sets of control characters with
"^", and strip the parameter to 7 bits. Or they may ignore C1 controls
and treat all of the upper-128 codes as printable. This implementation
- uses 8 bits but does not modify the string to reflect locale. The
- <STRONG>use_legacy_coding</STRONG> function allows the caller to change the output of
+ uses 8 bits but does not modify the string to reflect locale. The
+ <STRONG>use_legacy_coding</STRONG> function allows the caller to change the output of
<STRONG>unctrl</STRONG>.
- Likewise, the <STRONG><A HREF="curs_inopts.3x.html">meta(3x)</A></STRONG> function allows the caller to change the output
- of <STRONG>keyname</STRONG>, i.e., it determines whether to use the "M-" prefix for
- "meta" keys (codes in the range 128 to 255). Both <STRONG>use_legacy_coding</STRONG>
- and <STRONG>meta</STRONG> succeed only after curses is initialized. X/Open Curses does
- not document the treatment of codes 128 to 159. When treating them as
- "meta" keys (or if <STRONG>keyname</STRONG> is called before initializing curses), this
+ Likewise, the <STRONG><A HREF="curs_inopts.3x.html">meta(3x)</A></STRONG> function allows the caller to change the output
+ of <STRONG>keyname</STRONG>, i.e., it determines whether to use the "M-" prefix for
+ "meta" keys (codes in the range 128 to 255). Both <STRONG>use_legacy_coding</STRONG>
+ and <STRONG>meta</STRONG> succeed only after curses is initialized. X/Open Curses does
+ not document the treatment of codes 128 to 159. When treating them as
+ "meta" keys (or if <STRONG>keyname</STRONG> is called before initializing curses), this
implementation returns strings "M-^@", "M-^A", etc.
</PRE><H3><a name="h3-use_env_use_tioctl">use_env/use_tioctl</a></H3><PRE>
- If <STRONG>ncurses</STRONG> is configured to provide the sp-functions extension, the
- state of <STRONG>use_env</STRONG> and <STRONG>use_tioctl</STRONG> may be updated before creating each
- <EM>screen</EM> rather than once only (<STRONG><A HREF="curs_sp_funcs.3x.html">curs_sp_funcs(3x)</A></STRONG>). This feature of
+ If <STRONG>ncurses</STRONG> is configured to provide the sp-functions extension, the
+ state of <STRONG>use_env</STRONG> and <STRONG>use_tioctl</STRONG> may be updated before creating each
+ <EM>screen</EM> rather than once only (<STRONG><A HREF="curs_sp_funcs.3x.html">curs_sp_funcs(3x)</A></STRONG>). This feature of
<STRONG>use_env</STRONG> is not provided by other implementation of curses.
<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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo
- Compiled terminal description database.
+ /usr/share/terminfo Compiled terminal description database.
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
http://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo
- Compiled terminal description database.
+ /usr/share/terminfo Compiled terminal description database.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
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
standard place. For example, if <STRONG>TERM</STRONG> is set to <STRONG>att4424</STRONG>, then the com-
piled terminal definition is found in
- <STRONG>/usr/local/ncurses/lib/terminfo/a/att4424</STRONG>.
+ <STRONG>/usr/share/terminfo/a/att4424</STRONG>.
(The <STRONG>a</STRONG> is copied from the first letter of <STRONG>att4424</STRONG> to avoid creation of
huge directories.) However, if <STRONG>TERMINFO</STRONG> is set to <STRONG>$HOME/myterms</STRONG>,
and if that fails, it then checks
- <STRONG>/usr/local/ncurses/lib/terminfo/a/att4424</STRONG>.
+ <STRONG>/usr/share/terminfo/a/att4424</STRONG>.
This is useful for developing experimental definitions or when write
- permission in <STRONG>/usr/local/ncurses/lib/terminfo</STRONG> is not available.
+ permission in <STRONG>/usr/share/terminfo</STRONG> is not available.
The integer variables <STRONG>LINES</STRONG> and <STRONG>COLS</STRONG> are defined in <STRONG><curses.h></STRONG> and will
be filled in by <STRONG>initscr</STRONG> with the size of the screen. The constants
<STRONG>o</STRONG> /usr/local/ncurses/share/terminfo:/usr/share/terminfo (corre-
sponding to the TERMINFO_DIRS variable)
- <STRONG>o</STRONG> /usr/local/ncurses/lib/terminfo (corresponding to the TER-
- MINFO variable)
+ <STRONG>o</STRONG> /usr/share/terminfo (corresponding to the TERMINFO variable)
</PRE><H3><a name="h3-TERMINFO_DIRS">TERMINFO_DIRS</a></H3><PRE>
- Specifies a list of locations to search for terminal descriptions.
- Each location in the list is a terminal database as described in the
- section on the <STRONG>TERMINFO</STRONG> variable. The list is separated by colons
+ Specifies a list of locations to search for terminal descriptions.
+ Each location in the list is a terminal database as described in the
+ section on the <STRONG>TERMINFO</STRONG> variable. The list is separated by colons
(i.e., ":") on Unix, semicolons on OS/2 EMX.
There is no corresponding feature in System V terminfo; it is an exten-
</PRE><H3><a name="h3-TERMPATH">TERMPATH</a></H3><PRE>
- If <STRONG>TERMCAP</STRONG> does not hold a file name then <STRONG>ncurses</STRONG> checks the <STRONG>TERMPATH</STRONG>
- environment variable. This is a list of filenames separated by spaces
+ If <STRONG>TERMCAP</STRONG> does not hold a file name then <STRONG>ncurses</STRONG> checks the <STRONG>TERMPATH</STRONG>
+ environment variable. This is a list of filenames separated by spaces
or colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
- If the <STRONG>TERMPATH</STRONG> environment variable is not set, <STRONG>ncurses</STRONG> looks in the
+ If the <STRONG>TERMPATH</STRONG> environment variable is not set, <STRONG>ncurses</STRONG> looks in the
files
/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap,
in that order.
The library may be configured to disregard the following variables when
- the current user is the superuser (root), or if the application uses
+ the current user is the superuser (root), or if the application uses
setuid or setgid permissions:
$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
</PRE><H2><a name="h2-ALTERNATE-CONFIGURATIONS">ALTERNATE CONFIGURATIONS</a></H2><PRE>
Several different configurations are possible, depending on the config-
- ure script options used when building <STRONG>ncurses</STRONG>. There are a few main
- options whose effects are visible to the applications developer using
+ ure script options used when building <STRONG>ncurses</STRONG>. There are a few main
+ options whose effects are visible to the applications developer using
<STRONG>ncurses</STRONG>:
--disable-overwrite
<STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
- This option is used to avoid filename conflicts when <STRONG>ncurses</STRONG> is
+ This option is used to avoid filename conflicts when <STRONG>ncurses</STRONG> is
not the main implementation of curses of the computer. If <STRONG>ncurses</STRONG>
- is installed disabling overwrite, it puts its headers in a subdi-
+ is installed disabling overwrite, it puts its headers in a subdi-
rectory, e.g.,
<STRONG>#include</STRONG> <STRONG><ncurses/curses.h></STRONG>
- It also omits a symbolic link which would allow you to use
+ It also omits a symbolic link which would allow you to use
<STRONG>-lcurses</STRONG> to build executables.
--enable-widec
- The configure script renames the library and (if the <STRONG>--dis-</STRONG>
- <STRONG>able-overwrite</STRONG> option is used) puts the header files in a differ-
+ The configure script renames the library and (if the <STRONG>--dis-</STRONG>
+ <STRONG>able-overwrite</STRONG> option is used) puts the header files in a differ-
ent subdirectory. All of the library names have a "w" appended to
them, i.e., instead of
<STRONG>-lncursesw</STRONG>
You must also define <STRONG>_XOPEN_SOURCE_EXTENDED</STRONG> when compiling for the
- wide-character library to use the extended (wide-character) func-
- tions. The <STRONG>curses.h</STRONG> file which is installed for the wide-charac-
+ wide-character library to use the extended (wide-character) func-
+ tions. The <STRONG>curses.h</STRONG> file which is installed for the wide-charac-
ter library is designed to be compatible with the normal library's
- header. Only the size of the <STRONG>WINDOW</STRONG> structure differs, and very
- few applications require more than a pointer to <STRONG>WINDOW</STRONG>s. If the
+ header. Only the size of the <STRONG>WINDOW</STRONG> structure differs, and very
+ few applications require more than a pointer to <STRONG>WINDOW</STRONG>s. If the
headers are installed allowing overwrite, the wide-character
- library's headers should be installed last, to allow applications
+ library's headers should be installed last, to allow applications
to be built using either library from the same set of headers.
--with-pthread
- The configure script renames the library. All of the library
- names have a "t" appended to them (before any "w" added by
+ The configure script renames the library. All of the library
+ names have a "t" appended to them (before any "w" added by
<STRONG>--enable-widec</STRONG>).
The global variables such as <STRONG>LINES</STRONG> are replaced by macros to allow
read-only access. At the same time, setter-functions are provided
- to set these values. Some applications (very few) may require
+ to set these values. Some applications (very few) may require
changes to work with this convention.
--with-shared
--with-debug
--with-profile
- The shared and normal (static) library names differ by their suf-
- fixes, e.g., <STRONG>libncurses.so</STRONG> and <STRONG>libncurses.a</STRONG>. The debug and pro-
- filing libraries add a "_g" and a "_p" to the root names respec-
+ The shared and normal (static) library names differ by their suf-
+ fixes, e.g., <STRONG>libncurses.so</STRONG> and <STRONG>libncurses.a</STRONG>. The debug and pro-
+ filing libraries add a "_g" and a "_p" to the root names respec-
tively, e.g., <STRONG>libncurses_g.a</STRONG> and <STRONG>libncurses_p.a</STRONG>.
--with-trace
- The <STRONG>trace</STRONG> function normally resides in the debug library, but it
+ The <STRONG>trace</STRONG> function normally resides in the debug library, but it
is sometimes useful to configure this in the shared library. Con-
- figure scripts should check for the function's existence rather
+ figure scripts should check for the function's existence rather
than assuming it is always in the debug library.
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
/usr/share/tabset
- directory containing initialization files for the terminal capa-
- bility database /usr/local/ncurses/lib/terminfo terminal capabil-
- ity database
+ directory containing initialization files for the terminal capa-
+ bility database /usr/share/terminfo terminal capability database
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG>--terminfo</STRONG>
echos the $TERMINFO terminfo database path, e.g.,
- /usr/local/ncurses/lib/terminfo
+ /usr/share/terminfo
<STRONG>--terminfo-dirs</STRONG>
echos the $TERMINFO_DIRS directory list, e.g.,
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: term.5,v 1.26.1.3 2017/05/27 23:28:31 tom Exp @
+ * @Id: term.5,v 1.26 2017/02/18 16:58:21 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
</PRE><H3><a name="h3-STORAGE-LOCATION">STORAGE LOCATION</a></H3><PRE>
Compiled terminfo descriptions are placed under the directory
- <STRONG>/usr/local/ncurses/lib/terminfo</STRONG>. Two configurations are supported
- (when building the ncurses libraries):
+ <STRONG>/usr/share/terminfo</STRONG>. Two configurations are supported (when building
+ the ncurses libraries):
<STRONG>directory</STRONG> <STRONG>tree</STRONG>
A two-level scheme is used to avoid a linear search of a huge UNIX
- system directory: <STRONG>/usr/local/ncurses/lib/terminfo/c/name</STRONG> where
- <EM>name</EM> is the name of the terminal, and <EM>c</EM> is the first character of
- <EM>name</EM>. Thus, <EM>act4</EM> can be found in the file
- <STRONG>/usr/local/ncurses/lib/terminfo/a/act4</STRONG>. Synonyms for the same
- terminal are implemented by multiple links to the same compiled
- file.
+ system directory: <STRONG>/usr/share/terminfo/c/name</STRONG> where <EM>name</EM> is the
+ name of the terminal, and <EM>c</EM> is the first character of <EM>name</EM>. Thus,
+ <EM>act4</EM> can be found in the file <STRONG>/usr/share/terminfo/a/act4</STRONG>. Syn-
+ onyms for the same terminal are implemented by multiple links to
+ the same compiled file.
<STRONG>hashed</STRONG> <STRONG>database</STRONG>
Using Berkeley database, two types of records are stored: the ter-
- minfo data in the same format as stored in a directory tree with
- the terminfo's primary name as a key, and records containing only
+ minfo data in the same format as stored in a directory tree with
+ 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-
- minfo databases organized as a directory tree, but cannot write
- entries into the directory tree. It can write (or rewrite)
+ If built to write hashed databases, ncurses 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-
- MINFO_DIRS environment variable by assuming a directory tree for
+ ncurses 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.
-</PRE><H3><a name="h3-LEGACY-STORAGE-FORMAT">LEGACY STORAGE FORMAT</a></H3><PRE>
+</PRE><H3><a name="h3-STORAGE-FORMAT">STORAGE FORMAT</a></H3><PRE>
The format has been chosen so that it will be the same on all hardware.
- An 8 or more bit byte is assumed, but no assumptions about byte order-
+ An 8 or more bit byte is assumed, but no assumptions about byte order-
ing or sign extension are made.
The compiled file is created with the <STRONG>tic</STRONG> program, and read by the rou-
- tine <STRONG><A HREF="curs_terminfo.3x.html">setupterm(3x)</A></STRONG>. The file is divided into six parts: the header,
+ tine <STRONG><A HREF="curs_terminfo.3x.html">setupterm(3x)</A></STRONG>. The file is divided into six parts: the header,
terminal names, boolean flags, numbers, strings, and string table.
- The header section begins the file. This section contains six short
+ The header section begins the file. This section contains six short
integers in the format described below. These integers are
(1) the magic number (octal 0432);
(6) the size, in bytes, of the string table.
- Short integers are stored in two 8-bit bytes. The first byte contains
+ Short integers are stored in two 8-bit bytes. 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*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
+ 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
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
- hardware must read the integers as two bytes and compute the little-
+ tle-endian machines). Machines where this does not correspond to the
+ hardware must read the integers as two bytes and compute the little-
endian value.
- The terminal names section comes next. It contains the first line of
- the terminfo description, listing the various names for the terminal,
- separated by the "|" character. The section is terminated with an
+ The terminal names section comes next. It contains the first line of
+ the terminfo description, listing the various names for the terminal,
+ separated by the "|" character. The section is terminated with an
ASCII NUL character.
- The boolean flags have one byte for each flag. This byte is either 0
- or 1 as the flag is present or absent. The capabilities are in the
+ The boolean flags have one byte for each flag. This byte is either 0
+ or 1 as the flag is present or absent. The capabilities are in the
same order as the file <term.h>.
Between the boolean section and the number section, a null byte will be
- inserted, if necessary, to ensure that the number section begins on an
+ inserted, if necessary, to ensure that the number section begins on an
even byte (this is a relic of the PDP-11's word-addressed architecture,
- originally designed in to avoid IOT traps induced by addressing a word
- on an odd byte boundary). All short integers are aligned on a short
+ originally designed in to avoid IOT traps induced by addressing a word
+ on an odd byte boundary). All short integers are aligned on a short
word boundary.
- The numbers section is similar to the flags section. Each capability
+ The numbers section is similar to the flags section. Each capability
takes up two bytes, and is stored as a little-endian short integer. If
the value represented is -1, the capability is taken to be missing.
- The strings section is also similar. Each capability is stored as a
+ The strings section is also similar. Each capability is stored as a
short integer, in the format above. A value of -1 means the capability
is missing. Otherwise, the value is taken as an offset from the begin-
- ning of the string table. Special characters in ^X or \c notation are
- stored in their interpreted form, not the printing representation.
- Padding information $<nn> and parameter information %x are stored
+ ning of the string table. Special characters in ^X or \c notation are
+ stored in their interpreted form, not the printing representation.
+ Padding information $<nn> and parameter information %x are stored
intact in uninterpreted form.
- The final section is the string table. It contains all the values of
- string capabilities referenced in the string section. Each string is
+ The final section is the string table. It contains all the values of
+ string capabilities referenced in the string section. Each string is
null terminated.
</PRE><H3><a name="h3-EXTENDED-STORAGE-FORMAT">EXTENDED STORAGE FORMAT</a></H3><PRE>
The previous section describes the conventional terminfo binary format.
- With some minor variations of the offsets (see PORTABILITY), the same
- binary format is used in all modern UNIX systems. Each system uses a
+ 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.
The ncurses libraries and applications support extended terminfo binary
- format, allowing users to define capabilities which are loaded at run-
+ 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
- if it exceeds that due to the predefined data, continues to parse
+ 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, continues to parse
according to its own scheme.
First, it reads the extended header (5 short integers):
Using the counts and sizes, ncurses 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
- 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
- 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
- to signed 32-bit integers.
-
- 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
- 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
<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
- functions described in <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> for reading terminal capabili-
- ties.
-
</PRE><H2><a name="h2-EXAMPLE">EXAMPLE</a></H2><PRE>
- As an example, here is a description for the Lear-Siegler ADM-3, a pop-
- ular though rather stupid early terminal:
-
- adm3a|lsi adm3a,
- am,
- cols#80, lines#24,
- bel=^G, clear= 32$<1>, cr=^M, cub1=^H, cud1=^J,
- cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
- home=^^, ind=^J,
-
-
- and a hexadecimal dump of the compiled terminal description:
-
- 0000 1a 01 10 00 02 00 03 00 82 00 31 00 61 64 6d 33 ........ ..1.adm3
- 0010 61 7c 6c 73 69 20 61 64 6d 33 61 00 00 01 50 00 a|lsi ad m3a...P.
- 0020 ff ff 18 00 ff ff 00 00 02 00 ff ff ff ff 04 00 ........ ........
- 0030 ff ff ff ff ff ff ff ff 0a 00 25 00 27 00 ff ff ........ ..%.'...
- 0040 29 00 ff ff ff ff 2b 00 ff ff 2d 00 ff ff ff ff ).....+. ..-.....
- 0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 00a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 00b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 00c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 00d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 00e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 00f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
- 0120 ff ff ff ff ff ff 2f 00 07 00 0d 00 1a 24 3c 31 ....../. .....$<1
- 0130 3e 00 1b 3d 25 70 31 25 7b 33 32 7d 25 2b 25 63 >..=%p1% {32}%+%c
- 0140 25 70 32 25 7b 33 32 7d 25 2b 25 63 00 0a 00 1e %p2%{32} %+%c....
- 0150 00 08 00 0c 00 0b 00 0a 00 ........ .
+ As an example, here is a hex dump of the description for the Lear-
+ Siegler ADM-3, a popular though rather stupid early terminal:
+
+ adm3a|lsi adm3a,
+ am,
+ cols#80, lines#24,
+ bel=^G, clear= 32$<1>, cr=^M, cub1=^H, cud1=^J,
+ cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
+ home=^^, ind=^J,
+
+ 0000 1a 01 10 00 02 00 03 00 82 00 31 00 61 64 6d 33 ........ ..1.adm3
+ 0010 61 7c 6c 73 69 20 61 64 6d 33 61 00 00 01 50 00 a|lsi ad m3a...P.
+ 0020 ff ff 18 00 ff ff 00 00 02 00 ff ff ff ff 04 00 ........ ........
+ 0030 ff ff ff ff ff ff ff ff 0a 00 25 00 27 00 ff ff ........ ..%.'...
+ 0040 29 00 ff ff ff ff 2b 00 ff ff 2d 00 ff ff ff ff ).....+. ..-.....
+ 0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 00a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 00b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 00c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 00d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 00e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 00f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+ 0120 ff ff ff ff ff ff 2f 00 07 00 0d 00 1a 24 3c 31 ....../. .....$<1
+ 0130 3e 00 1b 3d 25 70 31 25 7b 33 32 7d 25 2b 25 63 >..=%p1% {32}%+%c
+ 0140 25 70 32 25 7b 33 32 7d 25 2b 25 63 00 0a 00 1e %p2%{32} %+%c....
+ 0150 00 08 00 0c 00 0b 00 0a 00 ........ .
</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-
- mat.
-
- <STRONG>o</STRONG> total compiled entries cannot exceed 32768 bytes in the extended
- format.
-
- <STRONG>o</STRONG> the name field cannot exceed 128 bytes.
+ Some limitations: total compiled entries cannot exceed 4096 bytes. The
+ name field cannot exceed 128 bytes.
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo/*/* compiled terminal capability
- data base
+ /usr/share/terminfo/*/* compiled terminal capability data base
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
Thomas E. Dickey
extended terminfo format for ncurses 5.0
hashed database support for ncurses 5.6
- extended number support for ncurses 6.1
Eric S. Raymond
- documented legacy terminfo format, e.g., from pdcurses.
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
<ul>
<li><a href="#h3-STORAGE-LOCATION">STORAGE LOCATION</a></li>
-<li><a href="#h3-LEGACY-STORAGE-FORMAT">LEGACY STORAGE FORMAT</a></li>
+<li><a href="#h3-STORAGE-FORMAT">STORAGE FORMAT</a></li>
<li><a href="#h3-EXTENDED-STORAGE-FORMAT">EXTENDED STORAGE FORMAT</a></li>
-<li><a href="#h3-EXTENDED-NUMBER-FORMAT">EXTENDED NUMBER FORMAT</a></li>
</ul>
</li>
<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
line.
Terminal type descriptions are stored as files of capability data
- underneath /usr/local/ncurses/lib/terminfo. To browse a list of all
- terminal names recognized by the system, do
+ underneath /usr/share/terminfo. To browse a list of all terminal names
+ recognized by the system, do
toe | more
infocmp <EM>entry</EM><STRONG>_</STRONG><EM>name</EM>
where <EM>entry</EM><STRONG>_</STRONG><EM>name</EM> is the name of the type you wish to examine (and the
- name of its capability file the subdirectory of
- /usr/local/ncurses/lib/terminfo named for its first letter). This com-
- mand dumps a capability file in the text format described by <STRONG>ter-</STRONG>
- <STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>.
+ name of its capability file the subdirectory of /usr/share/terminfo
+ named for its first letter). This command dumps a capability file in
+ the text format described by <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- The first line of a <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> description gives the names by which
- terminfo knows a terminal, separated by "|" (pipe-bar) characters with
+ The first line of a <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> description gives the names by which
+ terminfo knows a terminal, separated by "|" (pipe-bar) characters with
the last name field terminated by a comma. The first name field is the
type's <EM>primary</EM> <EM>name</EM>, and is the one to use when setting <STRONG>TERM</STRONG>. The last
- name field (if distinct from the first) is actually a description of
- the terminal type (it may contain blanks; the others must be single
- words). Name fields between the first and last (if present) are
+ name field (if distinct from the first) is actually a description of
+ the terminal type (it may contain blanks; the others must be single
+ words). Name fields between the first and last (if present) are
aliases for the terminal, usually historical names retained for compat-
ibility.
- There are some conventions for how to choose terminal primary names
- that help keep them informative and unique. Here is a step-by-step
+ There are some conventions for how to choose terminal primary names
+ that help keep them informative and unique. Here is a step-by-step
guide to naming terminals that also explains how to parse them:
- First, choose a root name. The root will consist of a lower-case let-
- ter followed by up to seven lower-case letters or digits. You need to
+ First, choose a root name. The root will consist of a lower-case let-
+ ter followed by up to seven lower-case letters or digits. You need to
avoid using punctuation characters in root names, because they are used
- and interpreted as filenames and shell meta-characters (such as !, $,
+ and interpreted as filenames and shell meta-characters (such as !, $,
*, ?, etc.) embedded in them may cause odd and unhelpful behavior. The
- slash (/), or any other character that may be interpreted by anyone's
- file system (\, $, [, ]), is especially dangerous (terminfo is plat-
- form-independent, and choosing names with special characters could
- someday make life difficult for users of a future port). The dot (.)
- character is relatively safe as long as there is at most one per root
+ slash (/), or any other character that may be interpreted by anyone's
+ file system (\, $, [, ]), is especially dangerous (terminfo is plat-
+ form-independent, and choosing names with special characters could
+ someday make life difficult for users of a future port). The dot (.)
+ character is relatively safe as long as there is at most one per root
name; some historical terminfo names use it.
- The root name for a terminal or workstation console type should almost
- always begin with a vendor prefix (such as <STRONG>hp</STRONG> for Hewlett-Packard, <STRONG>wy</STRONG>
- for Wyse, or <STRONG>att</STRONG> for AT&T terminals), or a common name of the terminal
- line (<STRONG>vt</STRONG> for the VT series of terminals from DEC, or <STRONG>sun</STRONG> for Sun
- Microsystems workstation consoles, or <STRONG>regent</STRONG> for the ADDS Regent
- series. You can list the terminfo tree to see what prefixes are
- already in common use. The root name prefix should be followed when
+ The root name for a terminal or workstation console type should almost
+ always begin with a vendor prefix (such as <STRONG>hp</STRONG> for Hewlett-Packard, <STRONG>wy</STRONG>
+ for Wyse, or <STRONG>att</STRONG> for AT&T terminals), or a common name of the terminal
+ line (<STRONG>vt</STRONG> for the VT series of terminals from DEC, or <STRONG>sun</STRONG> for Sun
+ Microsystems workstation consoles, or <STRONG>regent</STRONG> for the ADDS Regent
+ series. You can list the terminfo tree to see what prefixes are
+ already in common use. The root name prefix should be followed when
appropriate by a model number; thus <STRONG>vt100</STRONG>, <STRONG>hp2621</STRONG>, <STRONG>wy50</STRONG>.
- The root name for a PC-Unix console type should be the OS name, i.e.,
- <STRONG>linux</STRONG>, <STRONG>bsdos</STRONG>, <STRONG>freebsd</STRONG>, <STRONG>netbsd</STRONG>. It should <EM>not</EM> be <STRONG>console</STRONG> or any other
+ The root name for a PC-Unix console type should be the OS name, i.e.,
+ <STRONG>linux</STRONG>, <STRONG>bsdos</STRONG>, <STRONG>freebsd</STRONG>, <STRONG>netbsd</STRONG>. It should <EM>not</EM> be <STRONG>console</STRONG> or any other
generic that might cause confusion in a multi-platform environment! If
- a model number follows, it should indicate either the OS release level
+ a model number follows, it should indicate either the OS release level
or the console driver release level.
- The root name for a terminal emulator (assuming it does not fit one of
+ The root name for a terminal emulator (assuming it does not fit one of
the standard ANSI or vt100 types) should be the program name or a read-
ily recognizable abbreviation of it (i.e., <STRONG>versaterm</STRONG>, <STRONG>ctrm</STRONG>).
- Following the root name, you may add any reasonable number of hyphen-
+ Following the root name, you may add any reasonable number of hyphen-
separated feature suffixes.
2p Has two pages of memory. Likewise 4p, 8p, etc.
- mc Magic-cookie. Some terminals (notably older Wyses) can only sup-
+ mc Magic-cookie. Some terminals (notably older Wyses) can only sup-
port one attribute without magic-cookie lossage. Their base entry
is usually paired with another that has this suffix and uses magic
cookies to support multiple attributes.
-m Mono mode - suppress color support.
- -na No arrow keys - termcap ignores arrow keys which are actually
+ -na No arrow keys - termcap ignores arrow keys which are actually
there on the terminal, so the user can use the arrow keys locally.
-nam No auto-margin - suppress am capability.
-w Wide; terminal is in 132 column mode.
- Conventionally, if your terminal type is a variant intended to specify
- a line height, that suffix should go first. So, for a hypothetical
- FuBarCo model 2317 terminal in 30-line mode with reverse video, best
+ Conventionally, if your terminal type is a variant intended to specify
+ a line height, that suffix should go first. So, for a hypothetical
+ FuBarCo model 2317 terminal in 30-line mode with reverse video, best
form would be <STRONG>fubar-30-rv</STRONG> (rather than, say, "fubar-rv-30").
- Terminal types that are written not as standalone entries, but rather
- as components to be plugged into other entries via <STRONG>use</STRONG> capabilities,
+ Terminal types that are written not as standalone entries, but rather
+ as components to be plugged into other entries via <STRONG>use</STRONG> capabilities,
are distinguished by using embedded plus signs rather than dashes.
Commands which use a terminal type to control display often accept a -T
- option that accepts a terminal name argument. Such programs should
- fall back on the <STRONG>TERM</STRONG> environment variable when no -T option is speci-
+ option that accepts a terminal name argument. Such programs should
+ fall back on the <STRONG>TERM</STRONG> environment variable when no -T option is speci-
fied.
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo/?/*
+ /usr/share/terminfo/?/*
compiled terminal capability data base
/etc/inittab
</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo/*/*
+ /usr/share/terminfo/*/*
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
<EM>Terminfo</EM> describes terminals by giving a set of capabilities which they
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences. This describes
- <STRONG>ncurses</STRONG> version 6.0 (patch 20170819).
+ <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
An empty directory name (i.e., if the variable begins or ends with
a colon, or contains adjacent colons) is interpreted as the system
- location <EM>/usr/local/ncurses/lib/terminfo</EM>.
+ location <EM>/usr/share/terminfo</EM>.
<STRONG>o</STRONG> Finally, <STRONG>ncurses</STRONG> searches these compiled-in locations:
<STRONG>o</STRONG> a list of directories (/usr/local/ncurses/share/ter-
minfo:/usr/share/terminfo), and
- <STRONG>o</STRONG> the system terminfo directory, <EM>/usr/local/ncurses/lib/terminfo</EM>
- (the compiled-in default).
+ <STRONG>o</STRONG> the system terminfo directory, <EM>/usr/share/terminfo</EM> (the com-
+ piled-in default).
</PRE><H3><a name="h3-Preparing-Descriptions">Preparing Descriptions</a></H3><PRE>
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- /usr/local/ncurses/lib/terminfo/?/*
- files containing terminal descriptions
+ /usr/share/terminfo/?/* files containing terminal descriptions
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
minfo" leaf, versus a "terminfo.db" file.
The results are normally placed in the system terminfo database
- <STRONG>/usr/local/ncurses/lib/terminfo</STRONG>. The compiled terminal description can
- be placed in a different terminfo database. There are two ways to
- achieve this:
+ <STRONG>/usr/share/terminfo</STRONG>. The compiled terminal description can be placed
+ in a different terminfo database. There are two ways to achieve this:
- <STRONG>o</STRONG> First, you may override the system default either by using the <STRONG>-o</STRONG>
- option, or by setting the variable <STRONG>TERMINFO</STRONG> in your shell environ-
+ <STRONG>o</STRONG> First, you may override the system default either by using the <STRONG>-o</STRONG>
+ option, or by setting the variable <STRONG>TERMINFO</STRONG> in your shell environ-
ment to a valid database location.
- <STRONG>o</STRONG> Secondly, if <STRONG>tic</STRONG> cannot write in <EM>/usr/local/ncurses/lib/terminfo</EM> or
- the location specified using your TERMINFO variable, it looks for
- the directory <EM>$HOME/.terminfo</EM> (or hashed database <EM>$HOME/.ter-</EM>
- <EM>minfo.db)</EM>; if that location exists, the entry is placed there.
+ <STRONG>o</STRONG> Secondly, if <STRONG>tic</STRONG> cannot write in <EM>/usr/share/terminfo</EM> or the loca-
+ tion specified using your TERMINFO variable, it looks for the
+ directory <EM>$HOME/.terminfo</EM> (or hashed database <EM>$HOME/.terminfo.db)</EM>;
+ if that location exists, the entry is placed there.
- Libraries that read terminfo entries are expected to check in succes-
+ Libraries that read terminfo entries are expected to check in succes-
sion
<STRONG>o</STRONG> a location specified with the TERMINFO environment variable,
<STRONG>o</STRONG> directories listed in the TERMINFO_DIRS environment variable,
- <STRONG>o</STRONG> a compiled-in list of directories (/usr/local/ncurses/share/ter-
+ <STRONG>o</STRONG> a compiled-in list of directories (/usr/local/ncurses/share/ter-
minfo:/usr/share/terminfo), and
- <STRONG>o</STRONG> the system terminfo database (<EM>/usr/local/ncurses/lib/terminfo</EM>).
+ <STRONG>o</STRONG> the system terminfo database (<EM>/usr/share/terminfo</EM>).
</PRE><H3><a name="h3-OPTIONS">OPTIONS</a></H3><PRE>
<STRONG>-1</STRONG> restricts the output to a single column
- <STRONG>-a</STRONG> tells <STRONG>tic</STRONG> to retain commented-out capabilities rather than dis-
+ <STRONG>-a</STRONG> tells <STRONG>tic</STRONG> to retain commented-out capabilities rather than dis-
carding them. Capabilities are commented by prefixing them with
- a period. This sets the <STRONG>-x</STRONG> option, because it treats the com-
- mented-out entries as user-defined names. If the source is
- termcap, accept the 2-character names required by version 6.
+ a period. This sets the <STRONG>-x</STRONG> option, because it treats the com-
+ mented-out entries as user-defined names. If the source is
+ termcap, accept the 2-character names required by version 6.
Otherwise these are ignored.
- <STRONG>-C</STRONG> Force source translation to termcap format. Note: this differs
- from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in that it does not merely
+ <STRONG>-C</STRONG> Force source translation to termcap format. Note: this differs
+ from the <STRONG>-C</STRONG> option of <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> in that it does not merely
translate capability names, but also translates terminfo strings
- to termcap format. Capabilities that are not translatable are
- left in the entry under their terminfo names but commented out
- with two preceding dots. The actual format used incorporates
- some improvements for escaped characters from terminfo format.
+ to termcap format. Capabilities that are not translatable are
+ left in the entry under their terminfo names but commented out
+ with two preceding dots. The actual format used incorporates
+ some improvements for escaped characters from terminfo format.
For a stricter BSD-compatible translation, add the <STRONG>-K</STRONG> option.
- If this is combined with <STRONG>-c</STRONG>, <STRONG>tic</STRONG> makes additional checks to
- report cases where the terminfo values do not have an exact
+ If this is combined with <STRONG>-c</STRONG>, <STRONG>tic</STRONG> makes additional checks to
+ report cases where the terminfo values do not have an exact
equivalent in termcap form. For example:
- <STRONG>o</STRONG> <STRONG>sgr</STRONG> usually will not convert, because termcap lacks the
- ability to work with more than two parameters, and because
- termcap lacks many of the arithmetic/logical operators used
+ <STRONG>o</STRONG> <STRONG>sgr</STRONG> usually will not convert, because termcap lacks the
+ ability to work with more than two parameters, and because
+ termcap lacks many of the arithmetic/logical operators used
in terminfo.
- <STRONG>o</STRONG> capabilities with more than one delay or with delays before
+ <STRONG>o</STRONG> capabilities with more than one delay or with delays before
the end of the string will not convert completely.
- <STRONG>-c</STRONG> tells <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including syntax prob-
- lems and bad use links. If you specify <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) with this
- option, the code will print warnings about entries which, after
- use resolution, are more than 1023 (4096) bytes long. Due to a
+ <STRONG>-c</STRONG> tells <STRONG>tic</STRONG> to only check <EM>file</EM> for errors, including syntax prob-
+ lems and bad use links. If you specify <STRONG>-C</STRONG> (<STRONG>-I</STRONG>) 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, as well as buggy
- checking for the buffer length (and a documented limit in ter-
- minfo), these entries may cause core dumps with other implemen-
+ checking for the buffer length (and a documented limit in ter-
+ minfo), these entries may cause core dumps with other implemen-
tations.
<STRONG>tic</STRONG> checks string capabilities to ensure that those with parame-
predefined string capabilities; those which are defined with the
<STRONG>-x</STRONG> option are ignored.
- <STRONG>-D</STRONG> tells <STRONG>tic</STRONG> to print the database locations that it knows about,
+ <STRONG>-D</STRONG> tells <STRONG>tic</STRONG> to print the database locations that it knows about,
and exit. The first location shown is the one to which it would
- write compiled terminal descriptions. If <STRONG>tic</STRONG> is not able to
- find a writable database location according to the rules summa-
- rized above, it will print a diagnostic and exit with an error
+ write compiled terminal descriptions. If <STRONG>tic</STRONG> is not able to
+ find a writable database location according to the rules summa-
+ rized above, it will print a diagnostic and exit with an error
rather than printing a list of database locations.
<STRONG>-e</STRONG> <EM>names</EM>
- Limit writes and translations to the following comma-separated
- list of terminals. If any name or alias of a terminal matches
- one of the names in the list, the entry will be written or
+ Limit writes and translations to the following comma-separated
+ list of terminals. If any name or alias of a terminal matches
+ one of the names in the list, the entry will be written or
translated as normal. Otherwise no output will be generated for
- it. The option value is interpreted as a file containing the
+ it. The option value is interpreted as a file containing the
list if it contains a '/'. (Note: depending on how tic was com-
piled, this option may require <STRONG>-I</STRONG> or <STRONG>-C</STRONG>.)
- <STRONG>-f</STRONG> Display complex terminfo strings which contain
+ <STRONG>-f</STRONG> Display complex terminfo strings which contain
if/then/else/endif expressions indented for readability.
- <STRONG>-G</STRONG> Display constant literals in decimal form rather than their
+ <STRONG>-G</STRONG> Display constant literals in decimal form rather than their
character equivalents.
- <STRONG>-g</STRONG> Display constant character literals in quoted form rather than
+ <STRONG>-g</STRONG> Display constant character literals in quoted form rather than
their decimal equivalents.
<STRONG>-I</STRONG> Force source translation to terminfo format.
<STRONG>-K</STRONG> Suppress some longstanding ncurses extensions to termcap format,
e.g., "\s" for space.
- <STRONG>-L</STRONG> Force source translation to terminfo format using the long C
+ <STRONG>-L</STRONG> Force source translation to terminfo format using the long C
variable names listed in <<STRONG>term.h</STRONG>>
<STRONG>-N</STRONG> Disable smart defaults. Normally, when translating from termcap
- to terminfo, the compiler makes a number of assumptions about
- the defaults of string capabilities <STRONG>reset1_string</STRONG>, <STRONG>car-</STRONG>
+ to terminfo, the compiler makes a number of assumptions about
+ the defaults of string capabilities <STRONG>reset1_string</STRONG>, <STRONG>car-</STRONG>
<STRONG>riage_return</STRONG>, <STRONG>cursor_left</STRONG>, <STRONG>cursor_down</STRONG>, <STRONG>scroll_forward</STRONG>, <STRONG>tab</STRONG>,
<STRONG>newline</STRONG>, <STRONG>key_backspace</STRONG>, <STRONG>key_left</STRONG>, and <STRONG>key_down</STRONG>, then attempts to
- use obsolete termcap capabilities to deduce correct values. It
+ use obsolete termcap capabilities to deduce correct values. It
also normally suppresses output of obsolete termcap capabilities
- such as <STRONG>bs</STRONG>. This option forces a more literal translation that
+ such as <STRONG>bs</STRONG>. This option forces a more literal translation that
also preserves the obsolete capabilities.
- <STRONG>-o</STRONG><EM>dir</EM> Write compiled entries to given database location. Overrides
+ <STRONG>-o</STRONG><EM>dir</EM> Write compiled entries to given database location. Overrides
the TERMINFO environment variable.
- <STRONG>-Q</STRONG><EM>n</EM> Rather than show source in terminfo (text) format, print the
- compiled (binary) format in hexadecimal or base64 form, depend-
+ <STRONG>-Q</STRONG><EM>n</EM> Rather than show source in terminfo (text) format, print the
+ compiled (binary) format in hexadecimal or base64 form, depend-
ing on the option's value:
1 hexadecimal
source.
<STRONG>-R</STRONG><EM>subset</EM>
- Restrict output to a given subset. This option is for use with
- archaic versions of terminfo like those on SVr1, Ultrix, or
- HP/UX that do not support the full set of SVR4/XSI Curses ter-
- minfo; and outright broken ports like AIX 3.x that have their
- own extensions incompatible with SVr4/XSI. Available subsets
+ Restrict output to a given subset. This option is for use with
+ archaic versions of terminfo like those on SVr1, Ultrix, or
+ HP/UX that do not support the full set of SVR4/XSI Curses ter-
+ minfo; and outright broken ports like AIX 3.x that have their
+ own extensions incompatible with SVr4/XSI. Available subsets
are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for
details.
- <STRONG>-r</STRONG> Force entry resolution (so there are no remaining tc capabili-
- ties) even when doing translation to termcap format. This may
- be needed if you are preparing a termcap file for a termcap
- library (such as GNU termcap through version 1.3 or BSD termcap
- through 4.3BSD) that does not handle multiple tc capabilities
+ <STRONG>-r</STRONG> Force entry resolution (so there are no remaining tc capabili-
+ ties) even when doing translation to termcap format. This may
+ be needed if you are preparing a termcap file for a termcap
+ library (such as GNU termcap through version 1.3 or BSD termcap
+ through 4.3BSD) that does not handle multiple tc capabilities
per entry.
- <STRONG>-s</STRONG> Summarize the compile by showing the database location into
- which entries are written, and the number of entries which are
+ <STRONG>-s</STRONG> Summarize the compile by showing the database location into
+ which entries are written, and the number of entries which are
compiled.
- <STRONG>-T</STRONG> eliminates size-restrictions on the generated text. This is
- mainly useful for testing and analysis, since the compiled
- descriptions are limited (e.g., 1023 for termcap, 4096 for ter-
+ <STRONG>-T</STRONG> eliminates size-restrictions on the generated text. This is
+ mainly useful for testing and analysis, since the compiled
+ descriptions are limited (e.g., 1023 for termcap, 4096 for ter-
minfo).
- <STRONG>-t</STRONG> tells <STRONG>tic</STRONG> to discard commented-out capabilities. Normally when
- translating from terminfo to termcap, untranslatable capabili-
+ <STRONG>-t</STRONG> tells <STRONG>tic</STRONG> to discard commented-out capabilities. Normally when
+ translating from terminfo to termcap, untranslatable capabili-
ties are commented-out.
- <STRONG>-U</STRONG> tells <STRONG>tic</STRONG> to not post-process the data after parsing the source
+ <STRONG>-U</STRONG> tells <STRONG>tic</STRONG> to not post-process the data after parsing the source
file. Normally, it infers data which is commonly missing in older
terminfo data, or in termcaps.
<STRONG>-v</STRONG><EM>n</EM> specifies that (verbose) output be written to standard error trace
information showing <STRONG>tic</STRONG>'s progress.
- The optional parameter <EM>n</EM> is a number from 1 to 10, inclusive,
+ The optional parameter <EM>n</EM> is a number from 1 to 10, inclusive,
indicating the desired level of detail of information. If ncurses
- is built without tracing support, the optional parameter is
+ is built without tracing support, the optional parameter is
ignored. If <EM>n</EM> is omitted, the default level is 1. If <EM>n</EM> is speci-
fied and greater than 1, the level of detail is increased.
If the debug level <EM>n</EM> is not given, it is taken to be one.
- <STRONG>-W</STRONG> By itself, the <STRONG>-w</STRONG> option will not force long strings to be
+ <STRONG>-W</STRONG> By itself, the <STRONG>-w</STRONG> option will not force long strings to be
wrapped. Use the <STRONG>-W</STRONG> option to do this.
- If you specify both <STRONG>-f</STRONG> and <STRONG>-W</STRONG> options, the latter is ignored when
+ If you specify both <STRONG>-f</STRONG> and <STRONG>-W</STRONG> options, the latter is ignored when
<STRONG>-f</STRONG> has already split the line.
<STRONG>-w</STRONG><EM>n</EM> specifies the width of the output. The parameter is optional. If
it is omitted, it defaults to 60.
- <STRONG>-x</STRONG> Treat unknown capabilities as user-defined. That is, if you sup-
- ply a capability name which <STRONG>tic</STRONG> does not recognize, it will infer
- its type (boolean, number or string) from the syntax and make an
- extended table entry for that. User-defined capability strings
+ <STRONG>-x</STRONG> Treat unknown capabilities as user-defined. That is, if you sup-
+ ply a capability name which <STRONG>tic</STRONG> does not recognize, it will infer
+ its type (boolean, number or string) from the syntax and make an
+ extended table entry for that. User-defined capability strings
whose name begins with "k" are treated as function keys.
</PRE><H3><a name="h3-PARAMETERS">PARAMETERS</a></H3><PRE>
- <EM>file</EM> contains one or more <STRONG>terminfo</STRONG> terminal descriptions in source
- format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. Each description in the file
+ <EM>file</EM> contains one or more <STRONG>terminfo</STRONG> terminal descriptions in source
+ format [see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. Each description in the file
describes the capabilities of a particular terminal.
- If <EM>file</EM> is "-", then the data is read from the standard input.
+ If <EM>file</EM> is "-", then the data is read from the standard input.
The <EM>file</EM> parameter may also be the path of a character-device.
</PRE><H3><a name="h3-PROCESSING">PROCESSING</a></H3><PRE>
- All but one of the capabilities recognized by <STRONG>tic</STRONG> are documented in
+ All but one of the capabilities recognized by <STRONG>tic</STRONG> are documented in
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. The exception is the <STRONG>use</STRONG> capability.
When a <STRONG>use</STRONG>=<EM>entry</EM>-<EM>name</EM> field is discovered in a terminal entry currently
- being compiled, <STRONG>tic</STRONG> reads in the binary from
- <STRONG>/usr/local/ncurses/lib/terminfo</STRONG> to complete the entry. (Entries cre-
- ated from <EM>file</EM> will be used first. <STRONG>tic</STRONG> duplicates the capabilities in
- <EM>entry</EM>-<EM>name</EM> for the current entry, with the exception of those capabili-
- ties that explicitly are defined in the current entry.
-
- When an entry, e.g., <STRONG>entry_name_1</STRONG>, contains a <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM> field,
- any canceled capabilities in <EM>entry</EM>_<EM>name</EM>_<EM>2</EM> must also appear in
- <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG> for these capabilities to be canceled in
+ being compiled, <STRONG>tic</STRONG> reads in the binary from <STRONG>/usr/share/terminfo</STRONG> to
+ complete the entry. (Entries created from <EM>file</EM> will be used first.
+ <STRONG>tic</STRONG> duplicates the capabilities in <EM>entry</EM>-<EM>name</EM> for the current entry,
+ with the exception of those capabilities that explicitly are defined in
+ the current entry.
+
+ When an entry, e.g., <STRONG>entry_name_1</STRONG>, contains a <STRONG>use=</STRONG><EM>entry</EM>_<EM>name</EM>_<EM>2</EM> field,
+ any canceled capabilities in <EM>entry</EM>_<EM>name</EM>_<EM>2</EM> must also appear in
+ <STRONG>entry_name_1</STRONG> before <STRONG>use=</STRONG> for these capabilities to be canceled in
<STRONG>entry_name_1</STRONG>.
Total compiled entries cannot exceed 4096 bytes. The name field cannot
- exceed 512 bytes. Terminal names exceeding the maximum alias length
+ exceed 512 bytes. Terminal names exceeding the maximum alias length
(32 characters on systems with long filenames, 14 characters otherwise)
- will be truncated to the maximum alias length and a warning message
+ will be truncated to the maximum alias length and a warning message
will be printed.
</PRE><H2><a name="h2-COMPATIBILITY">COMPATIBILITY</a></H2><PRE>
- There is some evidence that historic <STRONG>tic</STRONG> implementations treated
- description fields with no whitespace in them as additional aliases or
+ There is some evidence that historic <STRONG>tic</STRONG> implementations treated
+ description fields with no whitespace in them as additional aliases or
short names. This <STRONG>tic</STRONG> does not do that, but it does warn when descrip-
- tion fields may be treated that way and check them for dangerous char-
+ tion fields may be treated that way and check them for dangerous char-
acters.
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
- Unlike the SVr4 <STRONG>tic</STRONG> command, this implementation can actually compile
- termcap sources. In fact, entries in terminfo and termcap syntax can
- be mixed in a single source file. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of
+ Unlike the SVr4 <STRONG>tic</STRONG> command, this implementation can actually compile
+ termcap sources. In fact, entries in terminfo and termcap syntax can
+ be mixed in a single source file. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for the list of
termcap names taken to be equivalent to terminfo names.
- The SVr4 manual pages are not clear on the resolution rules for <STRONG>use</STRONG>
- capabilities. This implementation of <STRONG>tic</STRONG> will find <STRONG>use</STRONG> targets any-
- where in the source file, or anywhere in the file tree rooted at <STRONG>TER-</STRONG>
- <STRONG>MINFO</STRONG> (if <STRONG>TERMINFO</STRONG> is defined), or in the user's <EM>$HOME/.terminfo</EM> data-
+ The SVr4 manual pages are not clear on the resolution rules for <STRONG>use</STRONG>
+ capabilities. This implementation of <STRONG>tic</STRONG> will find <STRONG>use</STRONG> targets any-
+ where in the source file, or anywhere in the file tree rooted at <STRONG>TER-</STRONG>
+ <STRONG>MINFO</STRONG> (if <STRONG>TERMINFO</STRONG> is defined), or in the user's <EM>$HOME/.terminfo</EM> data-
base (if it exists), or (finally) anywhere in the system's file tree of
compiled entries.
- The error messages from this <STRONG>tic</STRONG> have the same format as GNU C error
+ The error messages from this <STRONG>tic</STRONG> have the same format as GNU C error
messages, and can be parsed by GNU Emacs's compile facility.
- The <STRONG>-0</STRONG>, <STRONG>-1</STRONG>, <STRONG>-C</STRONG>, <STRONG>-G</STRONG>, <STRONG>-I</STRONG>, <STRONG>-N</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>, <STRONG>-o</STRONG>, <STRONG>-r</STRONG>, <STRONG>-s</STRONG>, <STRONG>-t</STRONG>
+ The <STRONG>-0</STRONG>, <STRONG>-1</STRONG>, <STRONG>-C</STRONG>, <STRONG>-G</STRONG>, <STRONG>-I</STRONG>, <STRONG>-N</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>, <STRONG>-o</STRONG>, <STRONG>-r</STRONG>, <STRONG>-s</STRONG>, <STRONG>-t</STRONG>
and <STRONG>-x</STRONG> options are not supported under SVr4. The SVr4 <STRONG>-c</STRONG> mode does not
report bad use links.
- System V does not compile entries to or read entries from your
+ System V does not compile entries to or read entries from your
<EM>$HOME/.terminfo</EM> database unless TERMINFO is explicitly set to it.
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- <STRONG>/usr/local/ncurses/lib/terminfo/?/*</STRONG>
+ <STRONG>/usr/share/terminfo/?/*</STRONG>
Compiled terminal description database.
<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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- <STRONG>/usr/local/ncurses/lib/terminfo/?/*</STRONG>
+ <STRONG>/usr/share/terminfo/?/*</STRONG>
Compiled terminal description database.
<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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
- <STRONG>/usr/local/ncurses/lib/terminfo</STRONG>
+ <STRONG>/usr/share/terminfo</STRONG>
compiled terminal description database
<STRONG>/usr/share/tabset/*</STRONG>
</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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
system port name to terminal type mapping database (BSD versions
only).
- /usr/local/ncurses/lib/terminfo
+ /usr/share/terminfo
terminal capability database
<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.0 (patch 20170819).
+ This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20171007).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: user_caps.5,v 1.1 2017/08/12 21:26:12 tom Exp @
+ * @Id: user_caps.5,v 1.2 2017/09/04 19:27:24 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
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
- <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>.
Set this capability to a nonzero value to enable it.
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: clear.1,v 1.17 2017/08/19 14:12:50 tom Exp $
+.\" $Id: clear.1,v 1.18 2017/10/07 21:30:17 tom Exp $
.TH @CLEAR@ 1 ""
.\" these would be fallbacks for DS/DE,
.\" but groff changed the meaning of the macros.
Normally this option is
unnecessary, because the default is taken from the environment
variable \fBTERM\fR.
+If \fB\-T\fR is specified, then the shell
+variables \fBLINES\fR and \fBCOLUMNS\fR will also be ignored.
.TP
.B \-V
reports the version of ncurses which was used in this program, and exits.
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_util.3x,v 1.50 2017/09/10 21:20:35 tom Exp $
+.\" $Id: curs_util.3x,v 1.51 2017/10/07 21:47:25 tom Exp $
.TH curs_util 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.IP
If \fBuse_env\fP was called with \fBFALSE\fP for parameter,
it stops here unless
-If \fBuse_tioctl\fP was also called with \fBTRUE\fP for parameter.
+\fBuse_tioctl\fP was also called with \fBTRUE\fP for parameter.
.bP
Then it asks for the screen size via operating system calls.
If successful,
-ncurses6 (6.0+20170930) unstable; urgency=low
+ncurses6 (6.0+20171007) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 28 Sep 2017 04:10:01 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 01 Oct 2017 21:01:40 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20170930) unstable; urgency=low
+ncurses6 (6.0+20171007) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 28 Sep 2017 04:10:01 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 01 Oct 2017 21:01:40 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20170930) unstable; urgency=low
+ncurses6 (6.0+20171007) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 28 Sep 2017 04:10:01 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 01 Oct 2017 21:01:40 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.233 2017/09/28 08:10:00 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.234 2017/10/02 01:01:40 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "0"\r
!define VERSION_YYYY "2017"\r
-!define VERSION_MMDD "0930"\r
+!define VERSION_MMDD "1007"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.0
-Release: 20170930
+Release: 20171007
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.0
-Release: 20170930
+Release: 20171007
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
#include <clear_cmd.h>
#include <tty_settings.h>
-MODULE_ID("$Id: clear.c,v 1.19 2017/08/19 13:40:22 tom Exp $")
+MODULE_ID("$Id: clear.c,v 1.22 2017/10/07 21:48:32 tom Exp $")
const char *_nc_progname = "clear";
switch (c) {
case 'T':
use_env(FALSE);
+ use_tioctl(TRUE);
term = optarg;
break;
case 'V':
if (optind < argc)
usage();
- fd = save_tty_settings(&tty_settings);
+ fd = save_tty_settings(&tty_settings, FALSE);
setupterm(term, fd, (int *) 0);
#define USE_LIBTINFO
#include <clear_cmd.h>
-MODULE_ID("$Id: clear_cmd.c,v 1.2 2017/08/19 13:37:24 tom Exp $")
+MODULE_ID("$Id: clear_cmd.c,v 1.3 2017/10/08 00:04:26 tom Exp $")
static int
putch(int c)
int
clear_cmd(bool legacy)
{
- char *E3;
-
if (!legacy) {
/* Clear the scrollback buffer if possible. */
- E3 = tigetstr("E3");
+ char *E3 = tigetstr("E3");
if (E3)
(void) tputs(E3, lines > 0 ? lines : 1, putch);
}
* Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
- * $Id: progs.priv.h,v 1.44 2017/07/15 18:26:07 tom Exp $
+ * $Id: progs.priv.h,v 1.45 2017/10/07 20:42:10 tom Exp $
*
* progs.priv.h
*
#endif
#endif
+/* error-returns for tput */
+#define ErrUsage 2
+#define ErrTermType 3
+#define ErrCapName 4
+#define ErrSystem(n) (4 + (n))
+
#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
#define IGNORE_RC(func) errno = (int) func
#else
#include <sys/ptem.h>
#endif
-MODULE_ID("$Id: reset_cmd.c,v 1.12 2017/09/20 00:49:25 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.13 2017/10/07 20:56:03 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
static bool use_init = FALSE; /* invoked as init */
static void
-exit_error(void)
+failed(const char *msg)
{
+ int code = errno;
+
+ (void) fprintf(stderr, "%s: %s: %s\n", _nc_progname, msg, strerror(code));
restore_tty_settings();
(void) fprintf(my_file, "\n");
fflush(my_file);
- ExitProgram(EXIT_FAILURE);
- /* NOTREACHED */
-}
-
-static void
-failed(const char *msg)
-{
- char temp[BUFSIZ];
-
- _nc_STRCPY(temp, _nc_progname, sizeof(temp));
- _nc_STRCAT(temp, ": ", sizeof(temp));
- _nc_STRNCAT(temp, msg, sizeof(temp), sizeof(temp) - strlen(temp) - 2);
- perror(temp);
- exit_error();
+ ExitProgram(ErrSystem(code));
/* NOTREACHED */
}
/****************************************************************************
- * Copyright (c) 2008-2015,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2016,2017 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 *
#include <progs.priv.h>
#include <tty_settings.h>
-MODULE_ID("$Id: tabs.c,v 1.38 2016/12/31 15:10:52 tom Exp $")
+MODULE_ID("$Id: tabs.c,v 1.40 2017/10/07 19:34:58 tom Exp $")
static void usage(void) GCC_NORETURN;
_nc_progname = _nc_rootname(argv[0]);
- fd = save_tty_settings(&tty_settings);
+ fd = save_tty_settings(&tty_settings, FALSE);
if ((term_name = getenv("TERM")) == 0)
term_name = "ansi+tabs";
#include <transform.h>
#include <tty_settings.h>
-MODULE_ID("$Id: tput.c,v 1.72 2017/09/02 21:03:26 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.77 2017/10/07 23:51:01 tom Exp $")
#define PUTS(s) fputs(s, stdout)
#undef KEEP
(void) fprintf(stderr, "Usage: %s [options] [command]\n", prg_name);
fputs(msg, stderr);
- ExitProgram(EXIT_FAILURE);
+ ExitProgram(ErrUsage);
}
static char *
return result;
}
+/*
+ * Returns nonzero on error.
+ */
static int
tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
{
retry:
#endif
if (strcmp(name, "clear") == 0) {
- return clear_cmd(opt_x);
+ return (clear_cmd(opt_x) == ERR) ? ErrUsage : 0;
} else if ((status = tigetflag(name)) != -1) {
return exit_code(BOOLEAN, status);
} else if ((status = tigetnum(name)) != CANCELLED_NUMERIC) {
}
}
#endif
- quit(4, "unknown terminfo capability '%s'", name);
+ quit(ErrCapName, "unknown terminfo capability '%s'", name);
} else if (VALID_STRING(s)) {
if (argc > 1) {
int k;
int fd;
TTY tty_settings;
bool opt_x = FALSE; /* clear scrollback if possible */
+ bool is_alias;
+ bool need_tty;
prg_name = check_aliases(_nc_rootname(argv[0]), TRUE);
break;
case 'T':
use_env(FALSE);
+ use_tioctl(TRUE);
term = optarg;
break;
case 'V':
}
}
+ is_alias = (is_clear || is_reset || is_init);
+ need_tty = (is_reset || is_init);
+
/*
* Modify the argument list to omit the options we processed.
*/
- if (is_clear || is_reset || is_init) {
+ if (is_alias) {
if (optind-- < argc) {
argc -= optind;
argv += optind;
}
if (term == 0 || *term == '\0')
- quit(2, "No value for $TERM and no -T specified");
+ quit(ErrUsage, "No value for $TERM and no -T specified");
- fd = save_tty_settings(&tty_settings);
+ fd = save_tty_settings(&tty_settings, need_tty);
if (setupterm(term, fd, &errret) != OK && errret <= 0)
- quit(3, "unknown terminal \"%s\"", term);
+ quit(ErrTermType, "unknown terminal \"%s\"", term);
if (cmdline) {
- if ((argc <= 0) && !(is_clear || is_reset || is_init))
+ if ((argc <= 0) && !is_alias)
usage();
ExitProgram(tput_cmd(fd, &tty_settings, opt_x, argc, argv));
}
if (argnum != 0
&& tput_cmd(fd, &tty_settings, opt_x, argnum, argvec) != 0) {
if (result == 0)
- result = 4; /* will return value >4 */
+ result = ErrSystem(0); /* will return value >4 */
++result;
}
}
char *ttyname(int fd);
#endif
-MODULE_ID("$Id: tset.c,v 1.118 2017/08/19 13:16:03 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.120 2017/10/08 00:01:29 tom Exp $")
#ifndef environ
extern char **environ;
int terasechar = -1; /* new erase character */
int intrchar = -1; /* new interrupt character */
int tkillchar = -1; /* new kill character */
- int my_fd = -1;
+ int my_fd;
bool opt_c = FALSE; /* set control-chars */
bool opt_w = FALSE; /* set window-size */
TTY mode, oldmode;
if (!opt_c && !opt_w)
opt_c = opt_w = TRUE;
- my_fd = save_tty_settings(&mode);
+ my_fd = save_tty_settings(&mode, TRUE);
oldmode = mode;
#ifdef TERMIOS
ospeed = (NCURSES_OSPEED) cfgetospeed(&mode);
/****************************************************************************
- * Copyright (c) 2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2016,2017 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 *
#include <fcntl.h>
-MODULE_ID("$Id: tty_settings.c,v 1.2 2016/12/24 19:31:11 tom Exp $")
+MODULE_ID("$Id: tty_settings.c,v 1.5 2017/10/07 20:55:57 tom Exp $")
static int my_fd;
static TTY original_settings;
static bool can_restore = FALSE;
-static void
-exit_error(void)
-{
- restore_tty_settings();
- (void) fprintf(stderr, "\n");
- ExitProgram(EXIT_FAILURE);
- /* NOTREACHED */
-}
-
static void
failed(const char *msg)
{
- char temp[BUFSIZ];
+ int code = errno;
- _nc_STRCPY(temp, _nc_progname, sizeof(temp));
- _nc_STRCAT(temp, ": ", sizeof(temp));
- _nc_STRNCAT(temp, msg, sizeof(temp), sizeof(temp) - strlen(temp) - 2);
- perror(temp);
- exit_error();
+ (void) fprintf(stderr, "%s: %s: %s\n", _nc_progname, msg, strerror(code));
+ restore_tty_settings();
+ (void) fprintf(stderr, "\n");
+ ExitProgram(ErrSystem(code));
/* NOTREACHED */
}
* stderr is less likely to be redirected than stdout; try that first.
*/
int
-save_tty_settings(TTY * tty_settings)
+save_tty_settings(TTY * tty_settings, bool need_tty)
{
if (!get_tty_settings(STDERR_FILENO, tty_settings) &&
!get_tty_settings(STDOUT_FILENO, tty_settings) &&
!get_tty_settings(STDIN_FILENO, tty_settings) &&
!get_tty_settings(open("/dev/tty", O_RDWR), tty_settings)) {
- failed("terminal attributes");
+ if (need_tty) {
+ failed("terminal attributes");
+ } else {
+ my_fd = fileno(stdout);
+ }
+ } else {
+ can_restore = TRUE;
+ original_settings = *tty_settings;
}
- can_restore = TRUE;
- original_settings = *tty_settings;
return my_fd;
}
/****************************************************************************
- * Copyright (c) 2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2016,2017 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 *
****************************************************************************/
/*
- * $Id: tty_settings.h,v 1.1 2016/12/24 18:17:44 tom Exp $
+ * $Id: tty_settings.h,v 1.2 2017/10/07 19:11:31 tom Exp $
*
* Utility functions for saving/restoring terminal settings.
*/
#include <progs.priv.h>
-extern int save_tty_settings(TTY * /* tty_settings */ );
+extern int save_tty_settings(TTY * /* tty_settings */, bool /* need_tty */ );
extern void restore_tty_settings(void);
extern void update_tty_settings(TTY * /* old_settings */, TTY * /* new_settings */ );
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.468 2017/10/01 00:14:01 tom Exp $
+$Id: ncurses.c,v 1.469 2017/10/01 18:22:48 tom Exp $
***************************************************************************/
}
#define Getchar() wGetchar(stdscr)
-#if HAVE_SLK_COLOR
+#if USE_SOFTKEYS
/* replaces wgetnstr(), since we want to be able to edit values */
static void
wGetstring(WINDOW *win, char *buffer, int limit)
/****************************************************************************
- * Copyright (c) 2007-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2007-2010,2017 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 *
* authorization. *
****************************************************************************/
/*
- * $Id: test_arrays.c,v 1.7 2017/09/20 00:21:22 tom Exp $
+ * $Id: test_arrays.c,v 1.8 2017/10/07 23:55:21 tom Exp $
*
* Author: Thomas E Dickey
*