Merge ^/head r358049 through r358074.

This commit is contained in:
Dimitry Andric 2020-02-18 17:59:37 +00:00
commit abaad9d77d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang1000-import/; revision=358075
447 changed files with 69412 additions and 37255 deletions

File diff suppressed because it is too large Load diff

View file

@ -2009,6 +2009,12 @@ COMMON ITEMS:
last couple of stable branches). See the top of this file when there's
an exception.
The update process will emit an error on an attempt to perform a build
or install from a FreeBSD version below the earliest supported version.
When updating from an older version the update should be performed one
major release at a time, including running `make delete-old` at each
step.
When upgrading a live system, having a root shell around before
installing anything can help undo problems. Not having a root shell
around can lead to problems if pam has changed too much from your

View file

@ -12,7 +12,7 @@ ippool \- user interface to the IPFilter pools
-A [-dnv] [-m <name>] [-o <role>] [-S <seed>] -t <type>
.br
.B ippool
-f <file> [-dnuv]
-f <file> [-dnuv] [-f <file [-dnuv]] ...
.br
.B ippool
-F [-dv] [-o <role>] [-t <type>]

View file

@ -381,13 +381,17 @@ loadpoolfile(argc, argv, infile)
{
int c;
while ((c = getopt(argc, argv, "dnuv")) != -1)
while ((c = getopt(argc, argv, "dnuvf:")) != -1)
switch (c)
{
case 'd' :
opts |= OPT_DEBUG;
ippool_yydebug++;
break;
case 'f' :
if (loadpoolfile(argc, argv, optarg) != 0)
return(-1);
break;
case 'n' :
opts |= OPT_DONOTHING|OPT_DONTOPEN;
break;

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright (c) 2006 Free Software Foundation, Inc. --
-- Copyright (c) 2006,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 --
@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: AUTHORS,v 1.2 2006/10/28 21:44:52 tom Exp $
-- $Id: AUTHORS,v 1.3 2017/02/04 15:20:52 tom Exp $
-------------------------------------------------------------------------------
These are the principal authors/contributors of ncurses since 1.9.9e,
in decreasing order of their contribution:
@ -36,3 +36,4 @@ ESR Eric S Raymond
AVL Alexander V Lukyanov
PB Philippe Blain
SV Sven Verdoolaege
NB Nicolas Boulenguez

View file

@ -1,4 +1,4 @@
Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.
Copyright (c) 1998-2019,2020 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
@ -25,4 +25,4 @@ sale, use or other dealings in this Software without prior written
authorization.
-- vile:txtmode fc=72
-- $Id: COPYING,v 1.2 2014/01/18 23:59:29 tom Exp $
-- $Id: COPYING,v 1.8 2020/01/04 14:49:29 tom Exp $

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. --
-- Copyright (c) 1998-2019,2020 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 --
@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: INSTALL,v 1.168 2013/08/03 23:15:23 tom Exp $
-- $Id: INSTALL,v 1.215 2020/01/18 17:02:13 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@ -196,17 +196,16 @@ INSTALLATION PROCEDURE:
NOTE: You must have installed the terminfo database, or set the
environment variable $TERMINFO to point to a SVr4-compatible terminfo
database before running the test programs. Not all vendors' terminfo
databases are SVr4-compatible, but most seem to be. Exceptions include
DEC's Digital Unix (formerly known as OSF/1).
databases are SVr4-compatible, but most seem to be.
It is possible to configure ncurses to use other terminfo database formats.
A few are provided as examples in the include-directory (see --with-caps).
If you run the test programs WITHOUT installing terminfo, ncurses may
read the termcap file and cache that in $HOME/.terminfo, which will
thereafter be used instead of the terminfo database. See the comments
on "--enable-getcap-cache", to see why this is a Bad Thing.
It is possible to configure ncurses to use other terminfo database formats.
A few are provided as examples in the include-directory (see --with-caps).
The ncurses program is designed specifically to test the ncurses library.
You can use it to verify that the screen highlights work correctly, that
cursor addressing and window scrolling works OK, etc.
@ -227,8 +226,7 @@ INSTALLATION PROCEDURE:
############################################################################
# CAVEAT EMPTOR: `install.data' run as root will NUKE any existing #
# terminfo database. If you have any custom or unusual entries SAVE them #
# before you install ncurses. I have a file called terminfo.custom for #
# this purpose. Don't forget to run tic on the file once you're done. #
# before you install ncurses. #
############################################################################
The terminfo(5) manual page must be preprocessed with tbl(1) before
@ -312,18 +310,27 @@ SUMMARY OF CONFIGURE OPTIONS:
and termcap data from disk. You can configure ncurses to have a
built-in database, aka "fallback" entries. Embedded applications may
have no need for an external database. Some, but not all of the
programs are useful in this configuration, e.g., reset and tput versus
programs are useful in this configuration, e.g., tset and tput versus
infocmp and tic.
--disable-db-install
Do not install the terminal database. This is used to omit features
for packages, as done with --without-progs.
--disable-echo
Use the option --disable-echo to make the build-log less verbose by
suppressing the display of the compile and link commands. This makes
it easier to see the compiler warnings. (You can always use "make -n"
to see the options that are used).
--disable-ext-funcs
Disable function-extensions. Configure ncurses without the functions
that are not specified by XSI. See ncurses/modules for the exact
list of library modules that would be suppressed.
--disable-gnat-projects
Disable GNAT projects even if usable, for testing old makefile rules.
--disable-hashmap
Compile without hashmap scrolling-optimization code. This algorithm is
the default.
@ -337,6 +344,30 @@ SUMMARY OF CONFIGURE OPTIONS:
--disable-largefile
Disable compiler flags needed to use large-file interfaces.
--disable-leaks
For testing, compile-in code that frees memory that normally would not
be freed, to simplify analysis of memory-leaks.
Any implementation of curses must not free the memory associated with
a screen, since (even after calling endwin()), it must be available
for use in the next call to refresh(). There are also chunks of
memory held for performance reasons. That makes it hard to analyze
curses applications for memory leaks. To work around this, build a
debugging version of the ncurses library which frees those chunks
which it can, and provides the _nc_free_and_exit() function to free
the remainder and then exit. The ncurses utility and test programs
use this feature, e.g., via the ExitProgram() macro.
Because this lies outside of the library's intended usage, it is not
normally considered part of the ABI. If there were some (as yet
unplanned) extension which frees memory in a manner that would let the
library resume and reallocate memory, then that would not use a "_nc_"
prefix.
--disable-lib-suffixes
Suppress the "w", "t" or "tw" suffixes which normally would be added
to the library names for the --enable-widec and --with-pthread options.
--disable-libtool-version
when using --with-libtool, control how the major/minor version numbers
are used for constructing the library name.
@ -348,19 +379,9 @@ SUMMARY OF CONFIGURE OPTIONS:
Use --disable-libtool-version to use the libtool -version-info feature.
This corresponds to the setting used before patch 20100515.
--disable-leaks
For testing, compile-in code that frees memory that normally would not
be freed, to simplify analysis of memory-leaks.
Any implementation of curses must not free the memory associated with
a screen, since (even after calling endwin()), it must be available
for use in the next call to refresh(). There are also chunks of
memory held for performance reasons. That makes it hard to analyze
curses applications for memory leaks. To work around this, build
a debugging version of the ncurses library which frees those chunks
which it can, and provides the _nc_free_and_exit() function to free
the remainder on exit. The ncurses utility and test programs use this
feature, e.g., via the ExitProgram() macro.
Starting with patch 20141115, using this option causes the configure
script to apply the top-level VERSION file to the ABI version used
for libtool.
--disable-lp64
The header files will ignore use of the _LP64 symbol to make chtype
@ -386,12 +407,51 @@ SUMMARY OF CONFIGURE OPTIONS:
rather than the include directory. This makes it simpler to avoid
compile-time conflicts with other versions of curses.h
Putting the header files into a subdirectory assumes that applications
will follow the (standard) practice of including the headers with
reference to the subdirectory name. For instance, the normal ncurses
header would be included using
#include <ncurses/curses.h>
#include <ncurses/term.h>
while the ncursesw headers would be found this way:
#include <ncursesw/curses.h>
#include <ncursesw/term.h>
In either case (with or without the --disable-overwrite option),
almost all applications are designed to include a related set of
curses header files from the same directory.
Manipulating the --includedir configure option to put header files
directly in a subdirectory of the normal include-directory defeats
this, and breaks builds of portable applications. Likewise, putting
some headers in /usr/include, and others in a subdirectory is a good
way to break builds.
When configured with --disable-overwrite, the installed header files'
embedded #include's are adjusted to use the same style of includes
noted above. In particular, the unctrl.h header is included from
curses.h, which means that a makefile which tells the compiler to
include directly from the subdirectory will fail to compile correctly.
Without some special effort, it will either fail to compile at all,
or the compiler may find a different unctrl.h file.
--disable-relink
If --enable-rpath is given, the generated makefiles normally will
rebuild the libraries during install. Use this option to simply
copy whatever the linked produced.
rebuild shared libraries during install. Use this option to simply
copy whatever the linker produced.
This option is ignored if --enable-rpath is not given.
Static libraries cannot simply be copied because tools use timestamps
to determine if the library's symbol table is up to date. If your
install program supports the "-p" (preserve timestamp) option, that
is used when --disable-relink is given, to avoid rebuilding the symbol
table.
Finally, some tools ignore the subsecond timestamps supported by some
filesystems. This option adds a 1-second sleep to help those tools
avoid unnecessary relinking during the install process.
--disable-root-environ
Compile with environment restriction, so certain environment variables
@ -409,6 +469,9 @@ SUMMARY OF CONFIGURE OPTIONS:
Compile without scroll-hints code. This option is ignored when
hashmap scrolling is configured, which is the default.
--disable-stripping
Do not strip installed executables.
--disable-tic-depends
When building shared libraries, normally the tic library is linked to
depend upon the ncurses library (or equivalently, on the tinfo-library
@ -427,6 +490,26 @@ SUMMARY OF CONFIGURE OPTIONS:
list documented in X/Open. ncurses provides varargs support for this
function. Use --disable-tparm-varargs to disable this support.
--disable-wattr-macros
The 6.0 ABI adds support for extended colors and for extended mouse.
The former is a noticeable problem when developers inadvertently
compile using the ncurses6 header files and link with an ncurses5
library, because the wattr* macros use a new field in the WINDOW
structure. These macros are used in several applications.
Since ncurses provides an actual function for each of these macros,
suppressing them from the curses.h header allows the ncurses5 libraries
to be used in most applications.
NOTE: The extended colors also are used in the cchar_t structure, but
fewer applications use that.
NOTE: This workaround does not help with mismatches in the ncurses
mouse version. The extended mouse feature uses one less fewer bit for
each button, so that only the first button will work as expected with
a mismatch between header and library. Again, most applications will
work, since most use only the first button.
--enable-assertions
For testing, compile-in assertion code. This is used only for a few
places where ncurses cannot easily recover by returning an error code.
@ -473,12 +556,6 @@ SUMMARY OF CONFIGURE OPTIONS:
issues arise when porting to SVr4 curses, which uses const in even
fewer places.
--enable-echo
Use the option --disable-echo to make the build-log less verbose by
suppressing the display of the compile and link commands. This makes
it easier to see the compiler warnings. (You can always use "make -n"
to see the options that are used).
--enable-expanded
For testing, generate functions for certain macros to make them visible
as such to the debugger. See also the --disable-macros option.
@ -501,6 +578,14 @@ SUMMARY OF CONFIGURE OPTIONS:
compatible with libncursesw 5.4. None of the interfaces change, but
applications which have mouse mask mmask_t's must be recompiled.
--enable-ext-putwin
Modify the file-format written by putwin() to use printable text rather
than binary files, allowing getwin() to read screen dumps written by
differently-configured ncurses libraries. The extended getwin() can
still read binary screen dumps from the "same" configuration of
ncurses. This does not change the ABI (the binary interface seen by
calling applications).
--enable-getcap
Use the 4.4BSD getcap code if available, or a bundled version of it to
fetch termcap entries. Entries read in this way cannot use (make
@ -546,6 +631,14 @@ SUMMARY OF CONFIGURE OPTIONS:
terminfo entries. This is the default, unless you have disabled the
extended functions.
--enable-opaque-curses
--enable-opaque-form
--enable-opaque-menu
--enable-opaque-panel
Define symbol in curses.h which controls whether some library
structures are treated as "opaque". The --enable-opaque-curses option
is overridden by the --enable-reentrant option.
--enable-pc-files
If pkg-config is found (see --with-pkg-config), generate ".pc" files
for each of the libraries, and install them in pkg-config's library
@ -556,9 +649,9 @@ SUMMARY OF CONFIGURE OPTIONS:
call can be interrupted for SIGWINCH.
--enable-reentrant
Compile experimental configuration which improves reentrant use of the
library by reducing global and static variables. This option is also
set if --with-pthread is used.
Compile configuration which improves reentrant use of the library by
reducing global and static variables. This option is also set if
--with-pthread is used.
Enabling this option adds a "t" to the library names, except for the
special case when --enable-weak-symbols is also used.
@ -582,14 +675,8 @@ SUMMARY OF CONFIGURE OPTIONS:
--enable-safe-sprintf
Compile with experimental safe-sprintf code. You may consider using
this if you are building ncurses for a system that has neither
vsnprintf() or vsprintf(). It is slow, however.
--enable-sigwinch
Compile support for ncurses' SIGWINCH handler. If your application has
its own SIGWINCH handler, ncurses will not use its own. The ncurses
handler causes wgetch() to return KEY_RESIZE when the screen-size
changes. This option is the default, unless you have disabled the
extended functions.
vsnprintf() or vsprintf(). It is slow, however, and is used only on
very old systems which lack vsnprintf().
--enable-signed-char
The term.h header declares a Booleans[] array typed "char". But it
@ -598,6 +685,13 @@ SUMMARY OF CONFIGURE OPTIONS:
is not strictly compatible. This option allows one to implement this
alteration without patching the source code.
--enable-sigwinch
Compile support for ncurses' SIGWINCH handler. If your application has
its own SIGWINCH handler, ncurses will not use its own. The ncurses
handler causes wgetch() to return KEY_RESIZE when the screen-size
changes. This option is the default, unless you have disabled the
extended functions.
--enable-sp-funcs
Compile-in support for extended functions which accept a SCREEN pointer,
reducing the need for juggling the global SP value with set_term() and
@ -684,6 +778,9 @@ SUMMARY OF CONFIGURE OPTIONS:
Tell where to install the Ada includes (default:
PREFIX/lib/ada/adainclude)
--with-ada-libname=NAME
Override the name of the Ada binding (default: "AdaCurses")
--with-ada-objects=DIR
Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib)
@ -700,10 +797,6 @@ SUMMARY OF CONFIGURE OPTIONS:
correspond with that in <stdbool.h>, or defaults to platform-specific
sizes).
--with-build-cpp=XXX
This option is provided by the same macro used for $BUILD_CC, etc.,
but is not directly used by ncurses.
--with-build-cc=XXX
If cross-compiling, specify a host C compiler, which is needed to
compile a few utilities which generate source modules for ncurses.
@ -718,6 +811,10 @@ SUMMARY OF CONFIGURE OPTIONS:
You can also set the environment variable $BUILD_CFLAGS rather than
use this option.
--with-build-cpp=XXX
This option is provided by the same macro used for $BUILD_CC, etc.,
but is not directly used by ncurses.
--with-build-cppflags=XXX
If cross-compiling, specify the host C preprocessor-flags. You might
need to do this if the target compiler has unusual flags which confuse
@ -762,6 +859,10 @@ SUMMARY OF CONFIGURE OPTIONS:
executables, e.g., by setting "--with-chtype=long" (the configure
script supplies "unsigned").
--with-config-suffix=XXX
Specify a suffix for the ncursesw6-config file, etc., used to work
around conflicts with packages.
--with-cxx-shared
When --with-shared is set, build libncurses++ as a shared library.
This implicitly relies upon building with gcc/g++, since other
@ -790,10 +891,23 @@ SUMMARY OF CONFIGURE OPTIONS:
For testing, compile and link with Gray Watson's dmalloc library.
This also sets the --disable-leaks option.
--with-export-syms[=XXX]
Limit exported symbols using libtool. The configure script
automatically chooses an appropriate ".sym" file, which lists the
symbols which are part of the ABI.
--with-extra-suffix[=XXX]
Add the given suffix to header- and library-names to simplify
installing incompatible ncurses libraries, e.g., those using a
different ABI. The renaming affects the name of the
include-subdirectory if --disable-overwrite is given.
--with-fallbacks=XXX
Specify a list of fallback terminal descriptions which will be
compiled into the ncurses library. See CONFIGURING FALLBACK ENTRIES.
See also "--with-tic-path" and "--with-infocmp-path".
--with-gpm
use Alessandro Rubini's GPM library to provide mouse support on the
Linux console. Prior to ncurses 5.5, this introduced a dependency on
@ -833,13 +947,22 @@ SUMMARY OF CONFIGURE OPTIONS:
filesystem-based terminfo entries.
Use the parameter value to give the install-prefix used for the
datbase, e.g.,
database, e.g.,
--with-hashed-db=/usr/local/BigBase
to find the corresponding include- and lib-directories under the
given directory.
given directory. Alternatively, you can specify a directory leaf
name, e.g.,
--with-hashed-db=db4
to make the configure script look for files in a subdirectory such as
/usr/include/db4/db.h
/usr/lib/db4/libdb.so
See also the --enable-getcap option.
--with-infocmp-path[=XXX]
Use this option to override the automatic detection of tic in your
$PATH when building fallbacks (see "--with-fallbacks").
--with-install-prefix=XXX
Allows you to specify an alternate location for installing ncurses
after building it. The value you specify is prepended to the "real"
@ -878,7 +1001,14 @@ SUMMARY OF CONFIGURE OPTIONS:
macros for libtool, e.g., AC_PROG_LIBTOOL. See the comments in
aclocal.m4 for CF_PROG_LIBTOOL, and ensure that you build configure
using the appropriate patch for autoconf from
http://invisible-island.net/autoconf/
https://invisible-island.net/autoconf/
--with-libtool-opts=XXX
Allow user to pass additional libtool options into the library creation
and link steps. The main use for this is to do something like
./configure --with-libtool-opts=-static
to get the same behavior as automake-flavored
./configure --enable-static
--with-manpage-aliases
Tell the configure script you wish to create entries in the
@ -908,7 +1038,7 @@ SUMMARY OF CONFIGURE OPTIONS:
copying the man-page for each alias.
--with-manpage-tbl
Tell the configure script that you with to preprocess the manpages
Tell the configure script that you wish to preprocess the manpages
by running them through tbl to generate tables understandable by
nroff.
@ -939,6 +1069,20 @@ SUMMARY OF CONFIGURE OPTIONS:
those using termcap, do not use the higher speeds. Your application
(or system, in general) may or may not.
--with-pc-suffix=SUFFIX
If ".pc" files are installed, optionally add a suffix to the files
and corresponding package names to separate unusual configurations.
If no option value is given (or if it is "none"), no suffix is added.
--with-pcre2
Add PCRE2 (Perl-compatible regular expressions v2) to the build if it
is available and the user requests it. Assume the application will
otherwise use the POSIX interface.
This is useful for MinGW builds because the usual POSIX interface is
not supplied by the development environment, while ncurses' form
library uses a regular expression feature for one of the field types.
--with-pkg-config=[DIR]
Check for pkg-config, optionally specifying its path.
@ -978,11 +1122,23 @@ SUMMARY OF CONFIGURE OPTIONS:
shared libraries, you may encounter problems with the linker.
For example, it may prevent you from running the build tree's
copy of tic (for installing the terminfo database) because it
loads the system's copy of the ncurses shared libraries. In that
case, using the misc/shlib script may be helpful, since it sets
$LD_LIBRARY_PATH to point to the build tree, e.g.,
loads the system's copy of the ncurses shared libraries.
In that case, using the misc/shlib script may be helpful, since it
sets $LD_LIBRARY_PATH to point to the build tree, e.g.,
./misc/shlib make install
Alternatively, for most platforms, the linker accepts a list of
directories which will be searched for libraries at run-time. The
configure script allows you to modify this list using the
RPATH_LIST environment variable. It is a colon-separated list of
directories (default: the "libdir" set via the configure script).
If you set that to put "../lib" first in the list, the linker will
look first at the build-directory, and avoid conflict with libraries
already installed. One drawback to this approach is that libraries
can be accidentally searched in any "../lib" directory.
NOTE: If you use the --with-ada-sharedlib option, you should also
set this option, to ensure that C-language modules needed for the
Ada binding use appropriate compiler options.
@ -1006,6 +1162,9 @@ SUMMARY OF CONFIGURE OPTIONS:
Specify a search-list of terminfo directories which will be compiled
into the ncurses library (default: DATADIR/terminfo)
This is a colon-separated list, like the TERMINFO_DIRS environment
variable.
--with-termlib[=XXX]
When building the ncurses library, organize this as two parts: the
curses library (libncurses) and the low-level terminfo library
@ -1023,6 +1182,10 @@ SUMMARY OF CONFIGURE OPTIONS:
Specify a search-list of termcap files which will be compiled into the
ncurses library (default: /etc/termcap:/usr/share/misc/termcap)
--with-tic-path[=XXX]
Use this option to override the automatic detection of tic in your
$PATH when building fallbacks (see "--with-fallbacks").
--with-ticlib[=XXX]
When building the ncurses library, build a separate library for
the modules that are used only by the utility programs. Normally
@ -1051,18 +1214,41 @@ SUMMARY OF CONFIGURE OPTIONS:
Configure the trace() function as part of the all models of the ncurses
library. Normally it is part of the debug (libncurses_g) library only.
--with-xterm-kbs=XXX
Configure xterm's terminfo entries to use either BS (^H, i.e., ASCII
backspace) or DEL (^?, or 127). XXX can be BS (or bs, 8) or DEL
(or del, 127).
During installation, the makefile and scripts modifies the "xterm+kbs"
terminfo entry to use this setting.
--with-valgrind
For testing, compile with debug option.
This also sets the --disable-leaks option.
--with-versioned-syms[=XXX]
The Solaris, GNU and reportedly some other linkers (ld) accept a
"--version-script" option which tells the linker to annotate the
resulting objects with version identifiers.
Use "objdump -T" on a library to see the annotations.
The configure script attempts to automatically apply a suitable ".map"
file to provide this information for Linux. Solaris mapfiles differ:
a) comments are not accepted
b) wildcards are not accepted, except for a special case of "_*".
c) each symbol listed in the map file must exist in the library
The Solaris limitations conflict with the development goal of providing
a small set of ".map" files as examples, which cover the most common
configurations. Because that coverage is done by merging together
several builds, some symbols will be listed in the the ".map" files
that do not happen to be present in one configuration or another.
The sample ".map" (and ".sym") files are generated using a set of
scripts which build several configurations for each release version,
checking to see which of the "_nc_" symbols can be made local. In
addition to the ncurses libraries and programs, the symbols used
by the "tack" program before version 1.08 are made global.
These sample ".map" files will not cover all possible combinations.
In some cases, e.g., when using the --with-weak-symbols option, you
may prefer to use a different ".map" file by setting this option's
value.
--with-wrap-prefix=XXX
When using the --enable-reentrant option, ncurses redefines variables
that would be global in curses, e.g., LINES, as a macro that calls a
@ -1074,6 +1260,19 @@ SUMMARY OF CONFIGURE OPTIONS:
which applications should not call even via a macro. This configure
option lets you choose the prefix for these wrapped variables.
--with-x11-rgb=FILE
Provide a pathname for the X11 rgb file, used by the picsmap program.
This overrides a configure check which usually works, but is needed
due to the lack of standardization for X11's files.
--with-xterm-kbs=XXX
Configure xterm's terminfo entries to use either BS (^H, i.e., ASCII
backspace) or DEL (^?, or 127). XXX can be BS (or bs, 8) or DEL
(or del, 127).
During installation, the makefile and scripts modifies the "xterm+kbs"
terminfo entry to use this setting.
--without-ada
Suppress the configure script's check for Ada95, do not build the
Ada95 binding and related demo.
@ -1113,6 +1312,11 @@ SUMMARY OF CONFIGURE OPTIONS:
programs (e.g., tic). The test applications will still be built if you
type "make", though not if you simply do "make install".
--without-tack
Suppress build/install with tack program, if it happens to be
in the same build-tree (tack was moved out of the ncurses source-tree
in 20070203).
--without-tests
Tell the configure script to suppress the build of ncurses' test
programs.
@ -1126,18 +1330,147 @@ SUMMARY OF CONFIGURE OPTIONS:
COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
--------------------------------------------
Because ncurses implements the X/Open Curses Specification, its interface
is fairly stable. That does not mean the interface does not change.
Changes are made to the documented interfaces when we find differences
between ncurses and X/Open or implementations which they certify (such as
Solaris). We add extensions to those interfaces to solve problems not
addressed by the original curses design, but those must not conflict with
the X/Open documentation.
Because ncurses implements X/Open Curses, its interface is fairly stable.
That does not mean the interface does not change. Changes are made to the
documented interfaces when we find differences between ncurses and X/Open
or implementations which largely correspond to X/Open (such as Solaris).
We add extensions to those interfaces to solve problems not addressed by
the original curses design, but those must not conflict with the X/Open
documentation.
Here are some of the major interface changes, and related problems which
you may encounter when building a system with different versions of
ncurses:
6.1 (Jan 27, 2018)
Interface changes:
+ X/Open Curses specifies a "reserved" void* parameter in several
functions, saying that it must be NULL. In this release, if the
parameter is non-NULL, it is interpreted as a point to an integer
containing a color pair. In previous releases, a non-NULL parameter
caused an error return. Portable applications are unaffected. Here
are the functions which have been extended:
attr_get
attr_off
attr_on
attr_set
chgat
color_set
mvchgat
mvwchgat
slk_attr_off
slk_attr_on
slk_attr_set
wattr_get
wattr_on
wattr_off
wattr_set
wchgat
wcolor_set
+ the TERMINAL structure declared in <term.h> has been made opaque,
and its size increased to handle the increased size of color pair
and color value, as well as other numeric capabilities.
A few applications required change, e.g., to use def_prog_mode;
only one application (tack) is known to have a valid reason for
accessing these internal details, and that was addressed by the
release of tack 1.08 in 2017. Internal functions marked as used
by tack will be deprecated in future releases.
Added extensions:
+ Several new functions were added to manipulate extended color pairs
and color values. These include:
alloc_pair
extended_color_content
extended_pair_content
extended_slk_color
find_pair
free_pair
init_extended_color
init_extended_pair
reset_color_pairs
as well as corresponding sp-functions.
+ A new terminfo capability "RGB" tells the ncurses library that the
color values are red/green/blue, to eliminate the need for palettes
in that special case for the color_content function.
Added internal functions (other than "_sp" variants):
_nc_copy_termtype2
_nc_export_termtype2
_nc_fallback2
_nc_find_prescr
_nc_forget_prescr
_nc_free_termtype2
_nc_read_entry2
_nc_write_object
Removed internal functions:
_nc_check_termtype
_nc_resolve_uses
Modified internal functions:
+ symbols are used by tic/infocmp/toe:
_nc_align_termtype - change parameters to TERMTYPE2*
_nc_check_termtype2 - change parameter to TERMTYPE2*
_nc_read_file_entry - change parameter to TERMTYPE2*
_nc_read_termtype - change parameter to TERMTYPE2*
_nc_trim_sgr0 - change parameter to TERMTYPE2*
_nc_write_entry - change parameter to TERMTYPE2*
+ symbols used only within the library:
_nc_fallback - change return type to TERMTYPE2*
_nc_init_termtype - change parameter to TERMTYPE2*
6.0 (Aug 08, 2015)
Interface changes:
+ The 6.0 ABI modifies the defaults for these configure options:
--enable-const
--enable-ext-colors
--enable-ext-mouse
--enable-ext-putwin
--enable-interop
--enable-lp64
--enable-sp-funcs
--with-chtype=uint32_t
--with-mmask_t=uint32_t
--with-tparm-arg=intptr_t
+ ncurses supports symbol versioning. If you use this feature, about
half of the "_nc_" private symbols are changed to local symbols.
+ a few applications may need to explicitly flush the standard output
when switching between printf's and (curses) printw.
Added extensions:
+ use_tioctl is an improvement over use_env
+ added wgetdelay to support the NCURSES_OPAQUE feature.
Added internal functions (other than "_sp" variants):
_nc_init_termtype
_nc_mvcur
_nc_putchar
_nc_setenv_num
_nc_trace_mmask_t
Removed internal functions:
none
Modified internal functions:
_nc_do_color - change parameters from short/bool to int
_nc_keypad - change parameter from bool to int
_nc_setupscreen - change parameter from bool to int
_nc_signal_handler - change parameter from bool to int
5.9 (Apr 04, 2011)
5.8 (Feb 26, 2011)
Interface changes:
@ -1688,9 +2021,10 @@ IF YOU ARE A SYSTEM INTEGRATOR:
Configuration and Installation:
On platforms where ncurses is assumed to be installed in /usr/lib,
the configure script uses "/usr" as a default:
the configure script uses "/usr" as a default. These include any
that use the Linux kernel, as well as these special cases:
GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
FreeBSD, NetBSD, OpenBSD, Cygwin, MinGW
For other platforms, the default is "/usr/local". See the discussion
of the "--disable-overwrite" option.
@ -1799,9 +2133,10 @@ CONFIGURING FALLBACK ENTRIES:
$TERMINFO \
../misc/terminfo.src \
`which tic` \
`which infocmp` \
linux vt100 xterm >fallback.c
The first three parameters of the script are normally supplied by
The first four parameters of the script are normally supplied by
the configured makefiles via the "--with-fallbacks" option. They
are
@ -1809,6 +2144,8 @@ CONFIGURING FALLBACK ENTRIES:
2) the source for the terminfo entries
3) the location of the tic program, used to create a terminfo
database.
4) the location of the infocmp program, used to print a terminfo
description.
Then just rebuild and reinstall the library as you would normally.
You can restore the default empty fallback list with
@ -1817,10 +2154,11 @@ CONFIGURING FALLBACK ENTRIES:
$TERMINFO \
../misc/terminfo.src \
`which tic` \
`which infocmp` \
>fallback.c
The overhead for an empty fallback list is one trivial stub function.
Any non-empty fallback list is const-ed and therefore lives in sharable
Any non-empty fallback list is const'd and therefore lives in shareable
text space. You can look at the comment trailing each initializer in
the generated ncurses/fallback.c file to see the core cost of the
fallbacks. A good rule of thumb for modern vt100-like entries is that
@ -1851,11 +2189,10 @@ installation), there are a couple of details you need to be aware of.
They have to do with the ncurses library, which uses terminfo rather
than termcap for describing terminal characteristics.
Though the ncurses library is terminfo-based, it will interpret your
Though the ncurses library is terminfo-based, it can interpret your
TERMCAP variable (if present), any local termcap files you reference
through it, and the system termcap file. However, in order to avoid
slowing down your application startup, it will only do this once per
terminal type!
through it, and the system termcap file. However, to avoid slowing
down your application startup, it does this only once per terminal type!
The first time you load a given terminal type from your termcap
database, the library initialization code will automatically write it
@ -1914,7 +2251,7 @@ USING NCURSES WITH GPM:
but the linker may not cooperate, producing mysterious errors.
See the FAQ, as well as the discussion under the --with-gpm option:
http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
https://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
BUILDING NCURSES WITH A CROSS-COMPILER
Ncurses can be built with a cross-compiler. Some parts must be built

View file

@ -94,7 +94,7 @@
./Ada95/samples/sample-curses_demo-mouse.ads
./Ada95/samples/sample-curses_demo.adb
./Ada95/samples/sample-curses_demo.ads
./Ada95/samples/sample-explanation.adb
./Ada95/samples/sample-explanation.adb_p
./Ada95/samples/sample-explanation.ads
./Ada95/samples/sample-form_demo-aux.adb
./Ada95/samples/sample-form_demo-aux.ads
@ -128,9 +128,12 @@
./Ada95/samples/tour.adb
./Ada95/samples/tour.ads
./Ada95/src/Makefile.in
./Ada95/src/c_threaded_variables.c
./Ada95/src/c_threaded_variables.h
./Ada95/src/c_varargs_to_ada.c
./Ada95/src/c_varargs_to_ada.h
./Ada95/src/library.gpr
./Ada95/src/library-cfg.sh
./Ada95/src/library.gpr.in
./Ada95/src/modules
./Ada95/src/ncurses_compat.c
./Ada95/src/terminal_interface-curses-aux.adb
@ -200,6 +203,7 @@
./README.MinGW
./README.emx
./TO-DO
./VERSION
./aclocal.m4
./announce.html.in
./c++/Makefile.in
@ -333,11 +337,12 @@
./doc/html/ada/terminal_interface-curses-trace__ads.htm
./doc/html/ada/terminal_interface-curses__adb.htm
./doc/html/ada/terminal_interface-curses__ads.htm
./doc/html/ada/terminal_interface-curses_constants__ads.htm
./doc/html/ada/terminal_interface__ads.htm
./doc/html/announce.html
./doc/html/hackguide.html
./doc/html/index.html
./doc/html/man/adacurses-config.1.html
./doc/html/man/adacurses6-config.1.html
./doc/html/man/captoinfo.1m.html
./doc/html/man/clear.1.html
./doc/html/man/curs_add_wch.3x.html
@ -458,9 +463,11 @@
./doc/html/man/mitem_value.3x.html
./doc/html/man/mitem_visible.3x.html
./doc/html/man/ncurses.3x.html
./doc/html/man/ncurses5-config.1.html
./doc/html/man/ncurses6-config.1.html
./doc/html/man/new_pair.3x.html
./doc/html/man/panel.3x.html
./doc/html/man/resizeterm.3x.html
./doc/html/man/scr_dump.5.html
./doc/html/man/tabs.1.html
./doc/html/man/term.5.html
./doc/html/man/term.7.html
@ -470,6 +477,7 @@
./doc/html/man/toe.1m.html
./doc/html/man/tput.1.html
./doc/html/man/tset.1.html
./doc/html/man/user_caps.5.html
./doc/html/man/wresize.3x.html
./doc/html/ncurses-intro.html
./doc/ncurses-intro.doc
@ -525,6 +533,7 @@
./form/llib-lformw
./form/modules
./include/Caps
./include/Caps-ncurses
./include/Caps.aix4
./include/Caps.hpux11
./include/Caps.keys
@ -686,8 +695,10 @@
./man/mitem_value.3x
./man/mitem_visible.3x
./man/ncurses.3x
./man/new_pair.3x
./man/panel.3x
./man/resizeterm.3x
./man/scr_dump.5
./man/tabs.1
./man/term.5
./man/term.7
@ -698,6 +709,7 @@
./man/toe.1m
./man/tput.1
./man/tset.1
./man/user_caps.5
./man/wresize.3x
./menu/Makefile.in
./menu/READ.ME
@ -748,6 +760,7 @@
./misc/form.ref
./misc/gen-pkgconfig.in
./misc/gen_edit.sh
./misc/magic
./misc/makedef.cmd
./misc/makellib
./misc/menu.def
@ -855,6 +868,7 @@
./ncurses/base/lib_winch.c
./ncurses/base/lib_window.c
./ncurses/base/nc_panel.c
./ncurses/base/new_pair.c
./ncurses/base/resizeterm.c
./ncurses/base/safe_sprintf.c
./ncurses/base/sigaction.c
@ -879,12 +893,15 @@
./ncurses/llib-ltinfotw
./ncurses/llib-ltinfow
./ncurses/modules
./ncurses/new_pair.h
./ncurses/report_offsets.c
./ncurses/tinfo/MKcaptab.awk
./ncurses/tinfo/MKcaptab.sh
./ncurses/tinfo/MKcodes.awk
./ncurses/tinfo/MKfallback.sh
./ncurses/tinfo/MKkeys_list.sh
./ncurses/tinfo/MKnames.awk
./ncurses/tinfo/MKuserdefs.sh
./ncurses/tinfo/README
./ncurses/tinfo/access.c
./ncurses/tinfo/add_tries.c
@ -984,6 +1001,7 @@
./package/debian-mingw/compat
./package/debian-mingw/control
./package/debian-mingw/copyright
./package/debian-mingw/mingw32-ncurses6.lintian-overrides
./package/debian-mingw/rules
./package/debian-mingw/source/format
./package/debian-mingw/watch
@ -991,6 +1009,7 @@
./package/debian-mingw64/compat
./package/debian-mingw64/control
./package/debian-mingw64/copyright
./package/debian-mingw64/mingw64-ncurses6.lintian-overrides
./package/debian-mingw64/rules
./package/debian-mingw64/source/format
./package/debian-mingw64/watch
@ -998,12 +1017,25 @@
./package/debian/compat
./package/debian/control
./package/debian/copyright
./package/debian/ncurses6.lintian-overrides
./package/debian/ncurses6.triggers
./package/debian/ncursest6.lintian-overrides
./package/debian/ncursest6.triggers
./package/debian/rules
./package/debian/source/format
./package/debian/watch
./package/mingw-ncurses.nsi
./package/mingw-ncurses.spec
./package/ncurses.map
./package/ncurses.spec
./package/ncurses.sym
./package/ncursest.map
./package/ncursest.spec
./package/ncursest.sym
./package/ncursestw.map
./package/ncursestw.sym
./package/ncursesw.map
./package/ncursesw.sym
./panel/Makefile.in
./panel/headers
./panel/llib-lpanel
@ -1033,17 +1065,25 @@
./progs/capconvert
./progs/clear.c
./progs/clear.sh
./progs/clear_cmd.c
./progs/clear_cmd.h
./progs/dump_entry.c
./progs/dump_entry.h
./progs/infocmp.c
./progs/modules
./progs/progs.priv.h
./progs/reset_cmd.c
./progs/reset_cmd.h
./progs/tabs.c
./progs/tic.c
./progs/toe.c
./progs/tparm_type.c
./progs/tparm_type.h
./progs/tput.c
./progs/transform.c
./progs/tset.c
./progs/tty_settings.c
./progs/tty_settings.h
./test/Makefile.in
./test/README
./test/aclocal.m4
@ -1051,11 +1091,13 @@
./test/blue.c
./test/bs.6
./test/bs.c
./test/bulgarian-utf8-tabs.txt
./test/bulgarian-utf8.txt
./test/cardfile.c
./test/cardfile.dat
./test/chgat.c
./test/clip_printw.c
./test/color_content.c
./test/color_name.h
./test/color_set.c
./test/configure
@ -1066,16 +1108,24 @@
./test/demo_forms.txt
./test/demo_keyok.c
./test/demo_menus.c
./test/demo_new_pair.c
./test/demo_panels.c
./test/demo_tabs.c
./test/demo_termcap.c
./test/demo_terminfo.c
./test/ditto.c
./test/dots.c
./test/dots_curses.c
./test/dots_mvcur.c
./test/dots_termcap.c
./test/dots_xcurses.c
./test/dump_window.c
./test/dump_window.h
./test/echochar.c
./test/edit_field.c
./test/edit_field.h
./test/escherknot.xbm
./test/extended_color.c
./test/filter.c
./test/firework.c
./test/firstlast.c
@ -1095,15 +1145,32 @@
./test/knight.c
./test/linedata.h
./test/linux-color.dat
./test/list_keys.c
./test/listused.sh
./test/lrtest.c
./test/make-tar.sh
./test/mensetmanus.xbm
./test/mini.xterm_48x48.xpm
./test/mk-test.awk
./test/modules
./test/movewindow.c
./test/ncurses.c
./test/ncurses_tst.hin
./test/newdemo.c
./test/package/debian-mingw/compat
./test/package/debian-mingw/control
./test/package/debian-mingw/copyright
./test/package/debian-mingw/docs
./test/package/debian-mingw/rules
./test/package/debian-mingw/source/format
./test/package/debian-mingw/watch
./test/package/debian-mingw64/compat
./test/package/debian-mingw64/control
./test/package/debian-mingw64/copyright
./test/package/debian-mingw64/docs
./test/package/debian-mingw64/rules
./test/package/debian-mingw64/source/format
./test/package/debian-mingw64/watch
./test/package/debian/compat
./test/package/debian/control
./test/package/debian/copyright
@ -1113,13 +1180,22 @@
./test/package/debian/watch
./test/package/mingw-ncurses-examples.spec
./test/package/ncurses-examples.spec
./test/padview.c
./test/pair_content.c
./test/parse_rgb.h
./test/picsmap.c
./test/picsmap.h
./test/popup_msg.c
./test/popup_msg.h
./test/programs
./test/railroad.c
./test/rain.c
./test/redraw.c
./test/savescreen.c
./test/savescreen.sh
./test/sp_tinfo.c
./test/tclock.c
./test/terminal.xbm
./test/test.priv.h
./test/test_add_wchstr.c
./test/test_addchstr.c
@ -1131,13 +1207,19 @@
./test/test_instr.c
./test/test_inwstr.c
./test/test_opaque.c
./test/test_setupterm.c
./test/test_sgr.c
./test/test_termattrs.c
./test/test_vid_puts.c
./test/test_vidputs.c
./test/testaddch.c
./test/testcurs.c
./test/testscanw.c
./test/tput-colorcube
./test/tput-initc
./test/tracemunch
./test/view.c
./test/widechars-utf8-tabs.txt
./test/widechars-utf8.txt
./test/widechars.h
./test/worm.c
@ -1145,3 +1227,4 @@
./test/xterm-16color.dat
./test/xterm-256color.dat
./test/xterm-88color.dat
./test/xterm-color_48x48.xpm

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.38 2014/01/18 20:19:45 tom Exp $
# $Id: Makefile.in,v 1.42 2019/01/06 00:35:11 tom Exp $
##############################################################################
# Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. #
# Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -31,7 +31,7 @@
#
# Master Makefile for ncurses library.
SHELL = /bin/sh
SHELL = @SHELL@
VPATH = @srcdir@
DESTDIR=@DESTDIR@
@ -57,6 +57,7 @@ includedir = @includedir@
includesubdir = @includesubdir@
libdir = @libdir@
mandir = @mandir@
pkgdir = @PKG_CONFIG_LIBDIR@
include_dir = ${includedir}${includesubdir}
@ -74,14 +75,16 @@ preinstall :
@ echo ''
@ echo '** Configuration summary for NCURSES $(NCURSES_MAJOR).$(NCURSES_MINOR) $(NCURSES_PATCH):'
@ echo ''
@ echo ' extended funcs: '`test @NCURSES_EXT_FUNCS@ != 0 && echo yes || echo no`
@ echo ' xterm terminfo: '@WHICH_XTERM@
@ echo ' extended funcs: '`test @NCURSES_EXT_FUNCS@ != 0 && echo yes || echo no`
@ echo ' xterm terminfo: '@WHICH_XTERM@
@ echo ''
@ echo ' bin directory: '$(bindir)
@ echo ' lib directory: '$(libdir)
@ echo ' include directory: '$(include_dir)
@ echo ' man directory: '$(mandir)
@MAKE_TERMINFO@ @ echo ' terminfo directory: '$(ticdir)
@ echo ' bin directory: '$(bindir)
@ echo ' lib directory: '$(libdir)
@ echo ' include directory: '$(include_dir)
@ echo ' man directory: '$(mandir)
@MAKE_TERMINFO@ @ echo ' terminfo directory: '$(ticdir)
@USE_FALLBACKS@ @ echo ' using fallback-list: '@FALLBACK_LIST@
@MAKE_PC_FILES@ @ echo ' pkg-config directory: '$(pkgdir)
@ echo ''
@ test "$(include_dir)" = "$(prefix)/include" || \
echo '** Include-directory is not in a standard location'
@ -95,6 +98,9 @@ preinstall :
distclean \
realclean ::
check:
@ echo The test-programs are interactive
# Put the common rules here so that we can easily construct the list of
# directories to visit.

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. --
-- Copyright (c) 1998-2012,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: README,v 1.25 2012/08/11 20:11:26 tom Exp $
-- $Id: README,v 1.27 2018/01/01 15:09:04 tom Exp $
-------------------------------------------------------------------------------
README file for the ncurses package
@ -161,7 +161,7 @@ Thomas Dickey (maintainer for 1.9.9g through 4.1, resuming with FSF's 5.0):
bug fixes -- more than half of those enumerated in NEWS beginning with
the internal release 1.8.9, see
http://invisible-island.net/personal/changelogs.html
https://invisible-island.net/personal/changelogs.html
Florian La Roche (official maintainer for FSF's ncurses 4.2)
Beginning with release 4.2, ncurses is distributed under an MIT-style

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. --
-- Copyright (c) 1998-2006,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: README.emx,v 1.8 2006/04/22 22:19:37 tom Exp $
-- $Id: README.emx,v 1.10 2018/01/01 15:09:55 tom Exp $
-- Author: Thomas Dickey
-------------------------------------------------------------------------------
@ -43,8 +43,8 @@ the EMX development tools, of course. Get these programs to start:
Apply the autoconf patches from
http://invisible-island.net/autoconf
ftp://invisible-island.net/autoconf
https://invisible-island.net/autoconf
ftp://ftp.invisible-island.net/autoconf
These are ordered by date:

1
contrib/ncurses/VERSION Normal file
View file

@ -0,0 +1 @@
5:0:10 6.1 20200118

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

15258
contrib/ncurses/configure vendored

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. #
# Copyright (c) 1998-2019,2020 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.973 2014/02/22 16:55:12 tom Exp $
# $Id: dist.mk,v 1.1325 2020/01/18 10:27:03 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -35,9 +35,9 @@
SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 9
NCURSES_PATCH = 20140222
NCURSES_MAJOR = 6
NCURSES_MINOR = 1
NCURSES_PATCH = 20200118
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@ -47,19 +47,19 @@ VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
# --without-manpage-renames
# on Debian/testing. The -scrollbar and -width options are used to make lynx
# use 79 columns as it did in 2.8.5 and before.
DUMP = lynx -dump -scrollbar=0 -width=79
DUMP = lynx -dump -scrollbar=0 -width=79 -display_charset=US-ASCII
DUMP2 = $(DUMP) -nolist
# gcc's file is "gnathtml.pl"
GNATHTML= gnathtml
# man2html 3.0.1 is a Perl script which assumes that pages are fixed size.
# man2html is a Perl script which assumes that pages are fixed size.
# Not all man programs agree with this assumption; some use half-spacing, which
# has the effect of lengthening the text portion of the page -- so man2html
# would remove some text. The man program on Redhat 6.1 appears to work with
# man2html if we set the top/bottom margins to 6 (the default is 7). Newer
# versions of 'man' leave no margin (and make it harder to sync with pages).
MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html'
MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html' -index
ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml
@ -83,12 +83,6 @@ doc/ncurses-intro.doc: doc/html/ncurses-intro.html
doc/hackguide.doc: doc/html/hackguide.html
$(DUMP2) doc/html/hackguide.html > $@
# This is the original command:
# MANPROG = tbl | nroff -man
#
# This happens to work for groff 1.18.1 on Debian. At some point groff's
# maintainer changed the line-length (we do not want/need that here).
#
# The distributed html files are formatted using
# configure --without-manpage-renames
#
@ -96,7 +90,7 @@ doc/hackguide.doc: doc/html/hackguide.html
# If that conflicts with the --without-manpage-renames, you can install those
# in a different location using the --with-install-prefix option of the
# configure script.
MANPROG = tbl | nroff -mandoc -rLL=65n -rLT=71n -Tascii
MANPROG = tbl | nroff -mandoc -rLL=78n -rLT=78n -Tascii
manhtml:
@for f in doc/html/man/*.html; do \
@ -124,7 +118,7 @@ manhtml:
@echo 's/<\/I>/<\/EM>/g' >> subst.tmp
@misc/csort < subst.tmp | uniq > subst.sed
@echo '/<\/TITLE>/a\' >> subst.sed
@echo '<link rev=made href="mailto:bug-ncurses@gnu.org">\' >> subst.sed
@echo '<link rel="author" href="mailto:bug-ncurses@gnu.org">\' >> subst.sed
@echo '<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1">' >> subst.sed
@rm -f subst.tmp
@for f in man/*.[0-9]* ; do \
@ -133,8 +127,7 @@ manhtml:
g=$${m}.html ;\
if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\
echo "Converting $$m to HTML" ;\
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">' > doc/html/man/$$g ;\
echo '<!-- ' >> doc/html/man/$$g ;\
echo '<!-- ' > doc/html/man/$$g ;\
egrep '^.\\"[^#]' $$f | \
sed -e 's/\$$/@/g' \
-e 's/^.../ */' \

View file

@ -111,7 +111,7 @@ How to Design Extensions
Our conventions are simple:
1. Maintain package-internal files in plain text. The expected viewer
for them more(1) or an editor window; there's no point in
for them more(1) or an editor window; there is no point in
elaborate mark-up.
2. Mark up manual pages in the man macros. These have to be viewable
through traditional man(1) programs.
@ -120,10 +120,10 @@ How to Design Extensions
When in doubt, HTMLize a master and use lynx(1) to generate plain
ASCII (as we do for the announcement document).
The reason for choosing HTML is that it's (a) well-adapted for on-line
browsing through viewers that are everywhere; (b) more easily readable
as plain text than most other mark-ups, if you don't have a viewer;
and (c) carries enough information that you can generate a
The reason for choosing HTML is that it is (a) well-adapted for
on-line browsing through viewers that are everywhere; (b) more easily
readable as plain text than most other mark-ups, if you do not have a
viewer; and (c) carries enough information that you can generate a
nice-looking printed version from it. Also, of course, it make
exporting things like the announcement document to WWW pretty trivial.
@ -135,16 +135,16 @@ How to Design Extensions
subscribe <name>@<host.domain>
The ncurses code is maintained by a small group of volunteers. While
we try our best to fix bugs promptly, we simply don't have a lot of
we try our best to fix bugs promptly, we simply do not have a lot of
hours to spend on elementary hand-holding. We rely on intelligent
cooperation from our users. If you think you have found a bug in
ncurses, there are some steps you can take before contacting us that
will help get the bug fixed quickly.
In order to use our bug-fixing time efficiently, we put people who
show us they've taken these steps at the head of our queue. This means
that if you don't, you'll probably end up at the tail end and have to
wait a while.
show us they have taken these steps at the head of our queue. This
means that if you do not, you will probably end up at the tail end and
have to wait a while.
1. Develop a recipe to reproduce the bug.
Bugs we can reproduce are likely to be fixed very quickly, often
within days. The most effective single thing you can do to get a
@ -155,17 +155,17 @@ How to Design Extensions
2. Try to reproduce the bug on a different terminal type.
In our experience, most of the behaviors people report as library
bugs are actually due to subtle problems in terminal descriptions.
This is especially likely to be true if you're using a traditional
asynchronous terminal or PC-based terminal emulator, rather than
xterm or a UNIX console entry.
It's therefore extremely helpful if you can tell us whether or not
your problem reproduces on other terminal types. Usually you'll
have both a console type and xterm available; please tell us
This is especially likely to be true if you are using a
traditional asynchronous terminal or PC-based terminal emulator,
rather than xterm or a UNIX console entry.
It is therefore extremely helpful if you can tell us whether or
not your problem reproduces on other terminal types. Usually you
will have both a console type and xterm available; please tell us
whether or not your bug reproduces on both.
If you have xterm available, it is also good to collect xterm
reports for different window sizes. This is especially true if you
normally use an unusual xterm window size -- a surprising number
of the bugs we've seen are either triggered or masked by these.
of the bugs we have seen are either triggered or masked by these.
3. Generate and examine a trace file for the broken behavior.
Recompile your program with the debugging versions of the
libraries. Insert a trace() call with the argument set to
@ -178,35 +178,35 @@ How to Design Extensions
tell you immediately if this is happening, and save you from the
possible embarrassment of being told that the bug is in your code
and is your problem rather than ours.
If the virtual-screen dumps look correct but the bug persists,
it's possible to crank up the trace level to give more and more
If the virtual-screen dumps look correct but the bug persists, it
is possible to crank up the trace level to give more and more
information about the library's update actions and the control
sequences it issues to perform them. The test directory of the
distribution contains a tool for digesting these logs to make them
less tedious to wade through.
Often you'll find terminfo problems at this stage by noticing that
the escape sequences put out for various capabilities are wrong.
If not, you're likely to learn enough to be able to characterize
any bug in the screen-update logic quite exactly.
Often you will find terminfo problems at this stage by noticing
that the escape sequences put out for various capabilities are
wrong. If not, you are likely to learn enough to be able to
characterize any bug in the screen-update logic quite exactly.
4. Report details and symptoms, not just interpretations.
If you do the preceding two steps, it is very likely that you'll
If you do the preceding two steps, it is very likely that you will
discover the nature of the problem yourself and be able to send us
a fix. This will create happy feelings all around and earn you
good karma for the first time you run into a bug you really can't
good karma for the first time you run into a bug you really cannot
characterize and fix yourself.
If you're still stuck, at least you'll know what to tell us.
If you are still stuck, at least you will know what to tell us.
Remember, we need details. If you guess about what is safe to
leave out, you are too likely to be wrong.
If your bug produces a bad update, include a trace file. Try to
make the trace at the least voluminous level that pins down the
bug. Logs that have been through tracemunch are OK, it doesn't
throw away any information (actually they're better than
un-munched ones because they're easier to read).
bug. Logs that have been through tracemunch are OK, it does not
throw away any information (actually they are better than
un-munched ones because they are easier to read).
If your bug produces a core-dump, please include a symbolic stack
trace generated by gdb(1) or your local equivalent.
Tell us about every terminal on which you've reproduced the bug --
and every terminal on which you can't. Ideally, sent us terminfo
sources for all of these (yours might differ from ours).
Tell us about every terminal on which you have reproduced the bug
-- and every terminal on which you cannot. Ideally, send us
terminfo sources for all of these (yours might differ from ours).
Include your ncurses version and your OS/machine type, of course!
You can find your ncurses version in the curses.h file.
@ -219,8 +219,8 @@ How to Design Extensions
The most important of these is mvcur, a test frame for the
cursor-movement optimization code. With this program, you can see
directly what control sequences will be emitted for any given cursor
movement or scroll/insert/delete operations. If you think you've got a
bad capability identified, you can disable it and test again. The
movement or scroll/insert/delete operations. If you think you have got
a bad capability identified, you can disable it and test again. The
program is command-driven and has on-line help.
If you think the vertical-scroll optimization is broken, or just want
@ -290,8 +290,9 @@ Library Overview
lib_mouse.c lib_mvcur.c lib_refresh.c lib_setup.c lib_vidattr.c
Most of the algorithmic complexity in the library lives in these
files. If there is a real bug in ncurses itself, it's probably here.
We'll tour some of these files in detail below (see The Engine Room).
files. If there is a real bug in ncurses itself, it is probably here.
We will tour some of these files in detail below (see The Engine
Room).
Finally, there is a group of files that is actually most of the
terminfo compiler. The reason this code lives in the ncurses library
@ -300,7 +301,7 @@ Library Overview
alloc_entry.c captoinfo.c comp_captab.c comp_error.c comp_hash.c
comp_parse.c comp_scan.c parse_entry.c read_termcap.c write_entry.c
We'll discuss these in the compiler tour.
We will discuss these in the compiler tour.
The Engine Room
@ -323,8 +324,9 @@ The Engine Room
Hackers bruised by previous encounters with variant select(2) calls
may find the code in lib_twait.c interesting. It deals with the
problem that some BSD selects don't return a reliable time-left value.
The function timed_wait() effectively simulates a System V select.
problem that some BSD selects do not return a reliable time-left
value. The function timed_wait() effectively simulates a System V
select.
Mouse Events
@ -341,19 +343,19 @@ The Engine Room
to imply having the prefix somewhere in the function-key capabilities
at terminal-type initialization.
This kluge only works because kmous isn't actually used by any
This kluge only works because kmous is not actually used by any
historic terminal type or curses implementation we know of. Best guess
is it's a relic of some forgotten experiment in-house at Bell Labs
that didn't leave any traces in the publicly-distributed System V
is it is a relic of some forgotten experiment in-house at Bell Labs
that did not leave any traces in the publicly-distributed System V
terminfo files. If System V or XPG4 ever gets serious about using it
again, this kluge may have to change.
Here are some more details about mouse event handling:
The lib_mouse()code is logically split into a lower level that accepts
event reports in a device-dependent format and an upper level that
parses mouse gestures and filters events. The mediating data structure
is a circular queue of event structures.
The lib_mouse() code is logically split into a lower level that
accepts event reports in a device-dependent format and an upper level
that parses mouse gestures and filters events. The mediating data
structure is a circular queue of event structures.
Functionally, the lower level's job is to pick up primitive events and
put them on the circular queue. This can happen in one of two ways:
@ -380,24 +382,23 @@ The Engine Room
The brains of this operation are the modules hashmap.c, hardscroll.c
and lib_doupdate.c; the latter two use lib_mvcur.c. Essentially, what
happens looks like this:
The hashmap.c module tries to detect vertical motion changes between
the real and virtual screens. This information is represented by the
oldindex members in the newscr structure. These are modified by
vertical-motion and clear operations, and both are re-initialized
after each update. To this change-journalling information, the hashmap
code adds deductions made using a modified Heckel algorithm on hash
values generated from the line contents.
The hardscroll.c module computes an optimum set of scroll, insertion,
and deletion operations to make the indices match. It calls
_nc_mvcur_scrolln() in lib_mvcur.c to do those motions.
Then lib_doupdate.c goes to work. Its job is to do line-by-line
transformations of curscr lines to newscr lines. Its main tool is the
routine mvcur() in lib_mvcur.c. This routine does cursor-movement
optimization, attempting to get from given screen location A to given
location B in the fewest output characters possible.
* The hashmap.c module tries to detect vertical motion changes
between the real and virtual screens. This information is
represented by the oldindex members in the newscr structure. These
are modified by vertical-motion and clear operations, and both are
re-initialized after each update. To this change-journalling
information, the hashmap code adds deductions made using a
modified Heckel algorithm on hash values generated from the line
contents.
* The hardscroll.c module computes an optimum set of scroll,
insertion, and deletion operations to make the indices match. It
calls _nc_mvcur_scrolln() in lib_mvcur.c to do those motions.
* Then lib_doupdate.c goes to work. Its job is to do line-by-line
transformations of curscr lines to newscr lines. Its main tool is
the routine mvcur() in lib_mvcur.c. This routine does
cursor-movement optimization, attempting to get from given screen
location A to given location B in the fewest output characters
possible.
If you want to work on screen optimizations, you should use the fact
that (in the trace-enabled version of the library) enabling the
@ -419,7 +420,7 @@ The Engine Room
TYPE_REGEXP will recognize.
The configuration code prefers the POSIX regex facility, modeled on
System V's, but will settle for BSD regexps if the former isn't
System V's, but will settle for BSD regexps if the former is not
available.
Historical note: the panels code was written primarily to assist in
@ -437,7 +438,7 @@ The Engine Room
The implementation therefore starts with a table-driven, dual-mode
lexical analyzer (in comp_scan.c). The lexer chooses its mode (termcap
or terminfo) based on the first `,' or `:' it finds in each entry. The
or terminfo) based on the first "," or ":" it finds in each entry. The
lexer does all the work of recognizing capability names and values;
the grammar above it is trivial, just "parse entries till you run out
of file".
@ -460,23 +461,23 @@ Translation of Non-use Capabilities
shareable text space).
Thus, adding a new capability is usually pretty trivial, just a matter
of adding one line to the include/Caps file. We'll have more to say
of adding one line to the include/Caps file. We will have more to say
about this in the section on Source-Form Translation.
Use Capability Resolution
The background problem that makes tic tricky isn't the capability
translation itself, it's the resolution of use capabilities. Older
The background problem that makes tic tricky is not the capability
translation itself, it is the resolution of use capabilities. Older
versions would not handle forward use references for this reason (that
is, a using terminal always had to follow its use target in the source
file). By doing this, they got away with a simple implementation
tactic; compile everything as it blows by, then resolve uses from
compiled entries.
This won't do for ncurses. The problem is that that the whole
This will not do for ncurses. The problem is that that the whole
compilation process has to be embeddable in the ncurses library so
that it can be called by the startup code to translate termcap entries
on the fly. The embedded version can't go promiscuously writing
on the fly. The embedded version cannot go promiscuously writing
everything it translates out to disk -- for one thing, it will
typically be running with non-root permissions.
@ -485,7 +486,7 @@ Use Capability Resolution
use resolution in-memory before writing everything out. This design
has other advantages: it makes forward and back use-references equally
easy (so we get the latter for free), and it makes checking for name
collisions before they're written out easy to do.
collisions before they are written out easy to do.
And this is exactly how the embedded version works. But the
stand-alone user-accessible version of tic partly reverts to the
@ -502,8 +503,8 @@ Use Capability Resolution
writes out the referenced entry if it has no use capabilities. The
compiler main loop refrains from adding the entry to the in-core list
when this hook fires. If some other entry later needs to reference an
entry that got written immediately, that's OK; the resolution code
will fetch it off disk when it can't find it in core.
entry that got written immediately, that is OK; the resolution code
will fetch it off disk when it cannot find it in core.
Name collisions will still be detected, just not as cleanly. The
write_entry() code complains before overwriting an entry that
@ -525,9 +526,9 @@ Source-Form Translation
The include/Caps file has a header comment describing ways you can
specify source translations for nonstandard capabilities just by
altering the master table. It's possible to set up capability aliasing
or tell the compiler to plain ignore a given capability without
writing any C code at all.
altering the master table. It is possible to set up capability
aliasing or tell the compiler to plain ignore a given capability
without writing any C code at all.
For circumstances where you need to do algorithmic translation, there
are functions in parse_entry.c called after the parse of each entry
@ -563,14 +564,14 @@ Source-Form Translation
Look for the string FIXME in source files to tag minor bugs and
potential problems that could use fixing.
Don't try to auto-detect OS features in the main body of the C code.
That's the job of the configuration system.
Do not try to auto-detect OS features in the main body of the C code.
That is the job of the configuration system.
To hold down complexity, do make your code data-driven. Especially, if
you can drive logic from a table filtered out of include/Caps, do it.
If you find you need to augment the data in that file in order to
generate the proper table, that's still preferable to ad-hoc code --
that's why the fifth field (flags) is there.
generate the proper table, that is still preferable to ad-hoc code --
that is why the fifth field (flags) is there.
Have fun!
@ -579,7 +580,7 @@ Source-Form Translation
The following notes are intended to be a first step towards DOS and
Macintosh ports of the ncurses libraries.
The following library modules are `pure curses'; they operate only on
The following library modules are "pure curses"; they operate only on
the curses internal structures, do all output through other curses
calls (not including tputs() and putp()) and do not call any other
UNIX routines such as signal(2) or the stdio library. Thus, they
@ -626,7 +627,7 @@ Source-Form Translation
Modules that would have to be modified for a port start here:
The following modules are `pure curses' but contain assumptions
The following modules are "pure curses" but contain assumptions
inappropriate for a memory-mapped port.
lib_longname.c

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -132,20 +132,36 @@
A Brief History of Curses
Historically, the first ancestor of curses was the routines written to
provide screen-handling for the game rogue; these used the
already-existing termcap database facility for describing terminal
provide screen-handling for the vi editor; these used the termcap
database facility (both released in 3BSD) for describing terminal
capabilities. These routines were abstracted into a documented library
and first released with the early BSD UNIX versions.
and first released with the early BSD UNIX versions. All of this work
was done by students at the University of California (Berkeley
campus). The curses library was first published in 4.0BSD, a year
after 3BSD (i.e., late 1980).
System III UNIX from Bell Labs featured a rewritten and much-improved
curses library. It introduced the terminfo format. Terminfo is based
on Berkeley's termcap database, but contains a number of improvements
and extensions. Parameterized capabilities strings were introduced,
making it possible to describe multiple video attributes, and colors
and to handle far more unusual terminals than possible with termcap.
In the later AT&T System V releases, curses evolved to use more
facilities and offer more capabilities, going far beyond BSD curses in
power and flexibility.
After graduation, one of those students went to work at AT&T Bell
Labs, and made an improved termcap library called terminfo (i.e.,
"libterm"), and adapted the curses library to use this. That was
subsequently released in System V Release 2 (early 1984). Thereafter,
other developers added to the curses and terminfo libraries. For
instance, a student at Cornell University wrote an improved terminfo
library as well as a tool (tic) to compile the terminal descriptions.
As a general rule, AT&T did not identify the developers in the
source-code or documentation; the tic and infocmp programs are the
exceptions.
System V Release 3 (System III UNIX) from Bell Labs featured a
rewritten and much-improved curses library, along with the tic program
(late 1986).
To recap, terminfo is based on Berkeley's termcap database, but
contains a number of improvements and extensions. Parameterized
capabilities strings were introduced, making it possible to describe
multiple video attributes, and colors and to handle far more unusual
terminals than possible with termcap. In the later AT&T System V
releases, curses evolved to use more facilities and offer more
capabilities, going far beyond BSD curses in power and flexibility.
Scope of This Document
@ -153,7 +169,7 @@ Scope of This Document
curses API with some clearly marked extensions. It includes the
following System V curses features:
* Support for multiple screen highlights (BSD curses could only
handle one `standout' highlight, usually reverse-video).
handle one "standout" highlight, usually reverse-video).
* Support for line- and box-drawing using forms characters.
* Recognition of function keys on input.
* Color support.
@ -164,7 +180,7 @@ Scope of This Document
character features of terminals so equipped, and determines how to
optimally use these features with no help from the programmer. It
allows arbitrary combinations of video attributes to be displayed,
even on terminals that leave ``magic cookies'' on the screen to mark
even on terminals that leave "magic cookies" on the screen to mark
changes in attributes.
The ncurses package can also capture and use event reports from a
@ -242,8 +258,8 @@ An Overview of Curses
standard screen) is provided by default to make changes on.
A window is a purely internal representation. It is used to build and
store a potential image of a portion of the terminal. It doesn't bear
any necessary relation to what is really on the terminal screen; it's
store a potential image of a portion of the terminal. It does not bear
any necessary relation to what is really on the terminal screen; it is
more like a scratchpad or write buffer.
To make the section of physical screen corresponding to a window
@ -253,7 +269,7 @@ An Overview of Curses
A given physical screen section may be within the scope of any number
of overlapping windows. Also, changes can be made to windows in any
order, without regard to motion efficiency. Then, at will, the
programmer can effectively say ``make it look like this,'' and let the
programmer can effectively say "make it look like this," and let the
package implementation determine the most efficient way to repaint the
screen.
@ -269,8 +285,8 @@ An Overview of Curses
Many functions are defined to use stdscr as a default screen. For
example, to add a character to stdscr, one calls addch() with the
desired character as argument. To write to a different window. use the
routine waddch() (for `w'indow-specific addch()) is provided. This
convention of prepending function names with a `w' when they are to be
routine waddch() (for window-specific addch()) is provided. This
convention of prepending function names with a "w" when they are to be
applied to specific windows is consistent. The only routines which do
not follow it are those for which a window must always be specified.
@ -278,7 +294,7 @@ An Overview of Curses
another, the routines move() and wmove() are provided. However, it is
often desirable to first move and then perform some I/O operation. In
order to avoid clumsiness, most I/O routines can be preceded by the
prefix 'mv' and the desired (y, x) coordinates prepended to the
prefix "mv" and the desired (y, x) coordinates prepended to the
arguments to the function. For example, the calls
move(y, x);
addch(ch);
@ -310,13 +326,13 @@ An Overview of Curses
general usefulness:
bool
boolean type, actually a `char' (e.g., bool doneit;)
boolean type, actually a "char" (e.g., bool doneit;)
TRUE
boolean `true' flag (1).
boolean "true" flag (1).
FALSE
boolean `false' flag (0).
boolean "false" flag (0).
ERR
error flag returned by routines on a failure (-1).
@ -332,7 +348,7 @@ Using the Library
function names and parameters as mentioned above.
Here is a sample program to motivate the discussion:
#include <curses.h>
#include <stdlib.h>
#include <curses.h>
#include <signal.h>
@ -381,7 +397,7 @@ main(int argc, char *argv[])
/* process the command keystroke */
}
finish(0); /* we're done */
finish(0); /* we are done */
}
static void finish(int sig)
@ -411,7 +427,7 @@ static void finish(int sig)
Once the screen windows have been allocated, you can set them up for
your program. If you want to, say, allow a screen to scroll, use
scrollok(). If you want the cursor to be left in place after the last
change, use leaveok(). If this isn't done, refresh() will move the
change, use leaveok(). If this is not done, refresh() will move the
cursor to the window's current (y, x) coordinates after updating it.
You can create new windows of your own using the functions newwin(),
@ -454,8 +470,8 @@ static void finish(int sig)
set, will call addch() to echo the character. Since the screen package
needs to know what is on the terminal at all times, if characters are
to be echoed, the tty must be in raw or cbreak mode. Since initially
the terminal has echoing enabled and is in ordinary ``cooked'' mode,
one or the other has to changed before calling getch(); otherwise, the
the terminal has echoing enabled and is in ordinary "cooked" mode, one
or the other has to changed before calling getch(); otherwise, the
program's output will be unpredictable.
When you need to accept line-oriented input in a window, the functions
@ -499,7 +515,7 @@ static void finish(int sig)
of the highlights you want into the character argument of an addch()
call, or any other output call that takes a chtype argument.
The other is to set the current-highlight value. This is logical-or'ed
The other is to set the current-highlight value. This is logical-ORed
with any highlight you specify the first way. You do this with the
functions attron(), attroff(), and attrset(); see the manual pages for
details. Color is a special kind of highlight. The package actually
@ -510,8 +526,8 @@ static void finish(int sig)
range of eight non-conflicting values could have been used as the
first arguments of the init_pair() values.
Once you've done an init_pair() that creates color-pair N, you can use
COLOR_PAIR(N) as a highlight that invokes that particular color
Once you have done an init_pair() that creates color-pair N, you can
use COLOR_PAIR(N) as a highlight that invokes that particular color
combination. Note that COLOR_PAIR(N), for constant N, is itself a
compile-time constant and can be used in initializers.
@ -550,11 +566,11 @@ static void finish(int sig)
otherwise another mouse event might come in and make the first one
inaccessible).
Each call to getmouse() fills a structure (the address of which you'll
pass it) with mouse event data. The event data includes zero-origin,
screen-relative character-cell coordinates of the mouse pointer. It
also includes an event mask. Bits in this mask will be set,
corresponding to the event type being reported.
Each call to getmouse() fills a structure (the address of which you
will pass it) with mouse event data. The event data includes
zero-origin, screen-relative character-cell coordinates of the mouse
pointer. It also includes an event mask. Bits in this mask will be
set, corresponding to the event type being reported.
The mouse structure contains two additional fields which may be
significant in the future as ncurses interfaces to new kinds of
@ -567,7 +583,7 @@ static void finish(int sig)
The class of visible events may be changed at any time via
mousemask(). Events that can be reported include presses, releases,
single-, double- and triple-clicks (you can set the maximum
button-down time for clicks). If you don't make clicks visible, they
button-down time for clicks). If you do not make clicks visible, they
will be reported as press-release pairs. In some environments, the
event mask may include bits reporting the state of shift, alt, and
ctrl keys on the keyboard during the event.
@ -701,7 +717,7 @@ Function Descriptions
more terminals at once. Setupterm() also stores the names
section of the terminal description in the global character
array ttytype[]. Subsequent calls to setupterm() will overwrite
this array, so you'll have to save it yourself if need be.
this array, so you will have to save it yourself if need be.
Debugging
@ -710,7 +726,7 @@ Function Descriptions
trace()
This function can be used to explicitly set a trace level. If
the trace level is nonzero, execution of your program will
generate a file called `trace' in the current working directory
generate a file called "trace" in the current working directory
containing a report on the library's actions. Higher trace
levels enable more detailed (and verbose) reporting -- see
comments attached to TRACE_ defines in the curses.h file for
@ -740,7 +756,7 @@ Hints, Tips, and Tricks
Some Notes of Caution
If you find yourself thinking you need to use noraw() or nocbreak(),
think again and move carefully. It's probably better design to use
think again and move carefully. It is probably better design to use
getstr() or one of its relatives to simulate cooked mode. The noraw()
and nocbreak() functions try to restore cooked mode, but they may end
up clobbering some control bits set before you started your
@ -748,7 +764,7 @@ Hints, Tips, and Tricks
likely to hurt your application's usability with other curses
libraries.
Bear in mind that refresh() is a synonym for wrefresh(stdscr). Don't
Bear in mind that refresh() is a synonym for wrefresh(stdscr). Do not
try to mix use of stdscr with use of windows declared by newwin(); a
refresh() call will blow them off the screen. The right way to handle
this is to use subwin(), or not touch stdscr at all and tile your
@ -774,7 +790,7 @@ Hints, Tips, and Tricks
Temporarily Leaving NCURSES Mode
Sometimes you will want to write a program that spends most of its
time in screen mode, but occasionally returns to ordinary `cooked'
time in screen mode, but occasionally returns to ordinary "cooked"
mode. A common reason for this is to support shell-out. This behavior
is simple to arrange in ncurses.
@ -839,8 +855,8 @@ Hints, Tips, and Tricks
tigetflag(), tigetnum(), and tigetstr() to do your testing.
A particularly useful case of this often comes up when you want to
test whether a given terminal type should be treated as `smart'
(cursor-addressable) or `stupid'. The right way to test this is to see
test whether a given terminal type should be treated as "smart"
(cursor-addressable) or "stupid". The right way to test this is to see
if the return value of tigetstr("cup") is non-NULL. Alternatively, you
can include the term.h file and test the value of the macro
cursor_address.
@ -848,8 +864,8 @@ Hints, Tips, and Tricks
Tuning for Speed
Use the addchstr() family of functions for fast screen-painting of
text when you know the text doesn't contain any control characters.
Try to make attribute changes infrequent on your screens. Don't use
text when you know the text does not contain any control characters.
Try to make attribute changes infrequent on your screens. Do not use
the immedok() option!
Special Features of NCURSES
@ -913,7 +929,7 @@ Compatibility with Older Versions
they do change copy or entire copy. We know that System V release 3
curses has logic in it that looks like an attempt to do change copy,
but the surrounding logic and data representations are sufficiently
complex, and our knowledge sufficiently indirect, that it's hard to
complex, and our knowledge sufficiently indirect, that it is hard to
know whether this is reliable. It is not clear what the SVr4
documentation and XSI standard intend. The XSI Curses standard barely
mentions wnoutrefresh(); the SVr4 documents seem to be describing
@ -997,8 +1013,8 @@ Overview of Panels
in the proper order to resolve overlaps. The standard window, stdscr,
is considered below all panels.
Details on the panels functions are available in the man pages. We'll
just hit the highlights here.
Details on the panels functions are available in the man pages. We
will just hit the highlights here.
You create a panel from a window by calling new_panel() on a window
pointer. It then becomes the top of the deck. The panel's window is
@ -1009,11 +1025,11 @@ Overview of Panels
This will not deallocate the associated window; you have to do that
yourself. You can replace a panel's window with a different window by
calling replace_window. The new window may be of different size; the
panel code will re-compute all overlaps. This operation doesn't change
the panel's position in the deck.
panel code will re-compute all overlaps. This operation does not
change the panel's position in the deck.
To move a panel's window, use move_panel(). The mvwin() function on
the panel's window isn't sufficient because it doesn't update the
the panel's window is not sufficient because it does not update the
panels library's representation of where the windows are. This
operation leaves the panel's depth, contents, and size unchanged.
@ -1028,12 +1044,12 @@ Overview of Panels
Typically, you will want to call update_panels() and doupdate() just
before accepting command input, once in each cycle of interaction with
the user. If you call update_panels() after each and every panel
write, you'll generate a lot of unnecessary refresh activity and
write, you will generate a lot of unnecessary refresh activity and
screen flicker.
Panels, Input, and the Standard Screen
You shouldn't mix wnoutrefresh() or wrefresh() operations with panels
You should not mix wnoutrefresh() or wrefresh() operations with panels
code; this will work only if the argument window is either in the top
panel or unobscured by any other panels.
@ -1051,7 +1067,7 @@ Panels, Input, and the Standard Screen
Hiding Panels
It's possible to remove a panel from the deck temporarily; use
It is possible to remove a panel from the deck temporarily; use
hide_panel for this. Use show_panel() to render it visible again. The
predicate function panel_hidden tests whether or not a panel is
hidden.
@ -1062,7 +1078,7 @@ Hiding Panels
Miscellaneous Other Facilities
It's possible to navigate the deck using the functions panel_above()
It is possible to navigate the deck using the functions panel_above()
and panel_below. Handed a panel pointer, they return the panel above
or below that panel. Handed NULL, they return the bottom-most or
top-most panel.
@ -1156,7 +1172,7 @@ Menu Display
The actual menu page may be smaller than the format size. This depends
on the item number and size and whether O_ROWMAJOR is on. This option
(on by default) causes menu items to be displayed in a `raster-scan'
(on by default) causes menu items to be displayed in a "raster-scan"
pattern, so that if more than one item will fit horizontally the first
couple of items are side-by-side in the top row. The alternative is
column-major display, which tries to put the first several items in
@ -1222,7 +1238,7 @@ Processing Menu Input
REQ_SCR_DPAGE, and REQ_SCR_UPAGE.
The REQ_TOGGLE_ITEM selects or deselects the current item. It is for
use in multi-valued menus; if you use it with O_ONEVALUE on, you'll
use in multi-valued menus; if you use it with O_ONEVALUE on, you will
get an error return (E_REQUEST_DENIED).
Each menu has an associated pattern buffer. The menu_driver() logic
@ -1326,7 +1342,7 @@ Overview of Forms
obviously designed to resemble that of the menu library wherever
possible.
In forms programs, however, the `process user requests' is somewhat
In forms programs, however, the "process user requests" is somewhat
more complicated than for menus. Besides menu-like navigation
operations, the menu driver loop has to support field editing and data
validation.
@ -1348,7 +1364,7 @@ FIELD *new_field(int height, int width, /* new field size */
the screen (the third and fourth arguments, which must be zero or
greater). Note that these coordinates are relative to the form
subwindow, which will coincide with stdscr by default but need not be
stdscr if you've done an explicit set_form_win() call.
stdscr if you have done an explicit set_form_win() call.
The fifth argument allows you to specify a number of off-screen rows.
If this is zero, the entire field will always be displayed. If it is
@ -1593,7 +1609,7 @@ int field_status(FIELD *field); /* fetch mode of field */
Calling field_status() on a field not currently selected for input
will return a correct value. Calling field_status() on a field that is
currently selected for input may not necessarily give a correct field
status value, because entered data isn't necessarily copied to buffer
status value, because entered data is not necessarily copied to buffer
zero before the exit validation check. To guarantee that the returned
status value reflects reality, call field_status() either (1) in the
field's exit validation check routine, (2) from the field's or form's
@ -1662,7 +1678,7 @@ Field Validation
By default, a field will accept any data that will fit in its input
buffer. However, it is possible to attach a validation type to a
field. If you do this, any attempt to leave the field while it
contains data that doesn't match the validation type will fail. Some
contains data that does not match the validation type will fail. Some
validation types also have a character-validity check for each time a
character is entered in the field.
@ -1696,10 +1712,10 @@ int set_field_type(FIELD *field, /* field to alter */
TYPE_ALPHA, /* type to associate */
int width); /* maximum width of field */
The width argument sets a minimum width of data. Typically you'll want
to set this to the field width; if it's greater than the field width,
the validation check will always fail. A minimum width of zero makes
field completion optional.
The width argument sets a minimum width of data. Typically you will
want to set this to the field width; if it is greater than the field
width, the validation check will always fail. A minimum width of zero
makes field completion optional.
TYPE_ALNUM
@ -1711,9 +1727,9 @@ int set_field_type(FIELD *field, /* field to alter */
int width); /* maximum width of field */
The width argument sets a minimum width of data. As with TYPE_ALPHA,
typically you'll want to set this to the field width; if it's greater
than the field width, the validation check will always fail. A minimum
width of zero makes field completion optional.
typically you will want to set this to the field width; if it is
greater than the field width, the validation check will always fail. A
minimum width of zero makes field completion optional.
TYPE_ENUM
@ -1802,7 +1818,7 @@ char *field_buffer(FIELD *field, /* field to query */
int bufindex); /* number of buffer to query */
Normally, the state of the zero-numbered buffer for each field is set
by the user's editing actions on that field. It's sometimes useful to
by the user's editing actions on that field. It is sometimes useful to
be able to set the value of the zero-numbered (or some other) buffer
from your application:
int set_field_buffer(FIELD *field, /* field to alter */
@ -1817,7 +1833,7 @@ int set_field_buffer(FIELD *field, /* field to alter */
Calling field_buffer() on a field not currently selected for input
will return a correct value. Calling field_buffer() on a field that is
currently selected for input may not necessarily give a correct field
buffer value, because entered data isn't necessarily copied to buffer
buffer value, because entered data is not necessarily copied to buffer
zero before the exit validation check. To guarantee that the returned
buffer value reflects on-screen reality, call field_buffer() either
(1) in the field's exit validation check routine, (2) from the field's
@ -1877,7 +1893,7 @@ Control of Form Display
erased at post/unpost time. The inner window or subwindow is where the
current form page is actually displayed.
In order to declare your own frame window for a form, you'll need to
In order to declare your own frame window for a form, you will need to
know the size of the form's bounding rectangle. You can get this
information with:
int scale_form(FORM *form, /* form to query */
@ -2389,13 +2405,12 @@ FIELD *link_fieldtype(FIELDTYPE *type1,
entered.
* A field-validation function to be applied on exit from the field.
Here's how you do that:
Here is how you do that:
typedef int (*HOOK)(); /* pointer to function returning int */
FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */
HOOK c_validate) /* character validator */
int free_fieldtype(FIELDTYPE *ftype); /* type to free */
At least one of the arguments of new_fieldtype() must be non-NULL. The
@ -2419,7 +2434,7 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */
Your field- and character- validation functions will be passed a
second argument as well. This second argument is the address of a
structure (which we'll call a pile) built from any of the
structure (which we will call a pile) built from any of the
field-type-specific arguments passed to set_field_type(). If no such
arguments are defined for the field type, this pile pointer argument
will be NULL.
@ -2469,7 +2484,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */
Some custom field types are simply ordered in the same well-defined
way that TYPE_ENUM is. For such types, it is possible to define
successor and predecessor functions to support the REQ_NEXT_CHOICE and
REQ_PREV_CHOICE requests. Here's how:
REQ_PREV_CHOICE requests. Here is how:
typedef int (*INTHOOK)(); /* pointer to function returning int */
int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.56 2013/08/04 20:23:20 tom Exp $
# $Id: Makefile.in,v 1.64 2018/01/15 19:28:45 tom Exp $
##############################################################################
# Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. #
# Copyright (c) 1998-2015,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -42,7 +42,7 @@
# turn off _all_ suffix rules; we'll generate our own
.SUFFIXES:
SHELL = /bin/sh
SHELL = @SHELL@
VPATH = @srcdir@
THIS = Makefile
@ -51,6 +51,7 @@ o = .@OBJEXT@
MODEL = @DFT_LWR_MODEL@
DESTDIR = @DESTDIR@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@ -61,7 +62,10 @@ includesubdir = @includesubdir@
INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
PACKAGE = @PACKAGE@
LIBTOOL = @LIBTOOL@
LIBTOOL_OPTS = @LIBTOOL_OPTS@ @EXPORT_SYMS@
LIBTOOL_CLEAN = @LIB_CLEAN@
LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
@ -71,7 +75,7 @@ LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_PROG = @INSTALL_PROGRAM@ @INSTALL_OPT_S@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
@ -87,7 +91,7 @@ CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
CPPFLAGS = -I@top_srcdir@/ncurses -DHAVE_CONFIG_H @CPPFLAGS@
CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
@ -103,9 +107,11 @@ LINK = $(LIBTOOL_LINK)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
RPATH_LIST = @RPATH_LIST@
RESULTING_SYMS = @RESULTING_SYMS@
VERSIONED_SYMS = @VERSIONED_SYMS@
MK_SHARED_LIB = @MK_SHARED_LIB@
NCURSES_MAJOR = @NCURSES_MAJOR@
@ -162,6 +168,7 @@ clean :: mostlyclean
distclean :: clean
-rm -f Makefile
-rm -rf .libs *.dSYM
realclean :: distclean

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2004,2010 Free Software Foundation, Inc. *
* Copyright (c) 2004-2016,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: f_trace.c,v 1.2 2010/01/23 21:14:36 tom Exp $")
MODULE_ID("$Id: f_trace.c,v 1.4 2018/12/16 00:13:36 tom Exp $")
NCURSES_EXPORT(FIELD **)
_nc_retrace_field_ptr(FIELD **code)
@ -65,6 +65,7 @@ _nc_retrace_form(FORM *code)
NCURSES_EXPORT(Form_Hook)
_nc_retrace_form_hook(Form_Hook code)
{
T((T_RETURN("%p"), code));
TR_FUNC_BFR(1);
T((T_RETURN("%s"), TR_FUNC_ARG(0, code)));
return code;
}

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2016,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_arg.c,v 1.13 2012/06/10 00:27:49 tom Exp $")
MODULE_ID("$Id: fld_arg.c,v 1.15 2018/12/16 00:13:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -66,8 +66,13 @@ set_fieldtype_arg(FIELDTYPE *typ,
void *(*const copy_arg)(const void *),
void (*const free_arg) (void *))
{
T((T_CALLED("set_fieldtype_arg(%p,%p,%p,%p)"),
(void *)typ, make_arg, copy_arg, free_arg));
TR_FUNC_BFR(3);
T((T_CALLED("set_fieldtype_arg(%p,%s,%s,%s)"),
(void *)typ,
TR_FUNC_ARG(0, make_arg),
TR_FUNC_ARG(1, copy_arg),
TR_FUNC_ARG(2, free_arg)));
if (typ != 0 && make_arg != (void *)0)
{

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* Copyright (c) 1998-2010,2016 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_attr.c,v 1.11 2010/01/23 21:12:08 tom Exp $")
MODULE_ID("$Id: fld_attr.c,v 1.12 2016/01/23 21:32:00 tom Exp $")
/*----------------------------------------------------------------------------
Field-Attribute manipulation routines
@ -42,7 +42,7 @@ MODULE_ID("$Id: fld_attr.c,v 1.11 2010/01/23 21:12:08 tom Exp $")
NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
{\
int res = E_BAD_ARGUMENT;\
T((T_CALLED("set_field_" #name "(%p,%s)"), field, _traceattr(attr)));\
T((T_CALLED("set_field_" #name "(%p,%s)"), (void *)field, _traceattr(attr)));\
if ( attr==A_NORMAL || ((attr & A_ATTRIBUTES)==attr) )\
{\
Normalize_Field( field );\

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* Copyright (c) 1998-2010,2016 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_current.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
MODULE_ID("$Id: fld_current.c,v 1.14 2016/10/29 22:30:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -76,7 +76,7 @@ set_current_field(FORM *form, FIELD *field)
{
if (form->current != field)
{
if (!_nc_Internal_Validation(form))
if (form->current && !_nc_Internal_Validation(form))
{
err = E_INVALID_FIELD;
}
@ -102,6 +102,32 @@ set_current_field(FORM *form, FIELD *field)
RETURN(err);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int unfocus_current_field(FORM * form)
|
| Description : Removes focus from the current field.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid form pointer
| E_REQUEST_DENIED - there is no current field to unfocus
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
unfocus_current_field(FORM *const form)
{
T((T_CALLED("unfocus_current_field(%p)"), (const void *)form));
if (form == 0)
{
RETURN(E_BAD_ARGUMENT);
}
else if (form->current == 0)
{
RETURN(E_REQUEST_DENIED);
}
_nc_Unset_Current_Field(form);
RETURN(E_OK);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : FIELD *current_field(const FORM * form)

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2012,2014 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_def.c,v 1.40 2012/03/11 00:37:16 tom Exp $")
MODULE_ID("$Id: fld_def.c,v 1.41 2014/07/26 21:08:55 tom Exp $")
/* this can't be readonly */
static FIELD default_field =
@ -53,7 +53,7 @@ static FIELD default_field =
(int)' ', /* pad */
A_NORMAL, /* fore */
A_NORMAL, /* back */
ALL_FIELD_OPTS, /* opts */
STD_FIELD_OPTS, /* opts */
(FIELD *)0, /* snext */
(FIELD *)0, /* sprev */
(FIELD *)0, /* link */
@ -294,14 +294,14 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
{
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = default_field;
New_Field->rows = (short) rows;
New_Field->cols = (short) cols;
New_Field->rows = (short)rows;
New_Field->cols = (short)cols;
New_Field->drows = rows + nrow;
New_Field->dcols = cols;
New_Field->frow = (short) frow;
New_Field->fcol = (short) fcol;
New_Field->frow = (short)frow;
New_Field->fcol = (short)fcol;
New_Field->nrow = nrow;
New_Field->nbuf = (short) nbuf;
New_Field->nbuf = (short)nbuf;
New_Field->link = New_Field;
#if USE_WIDEC_SUPPORT

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2016,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftchoice.c,v 1.13 2012/06/10 00:27:49 tom Exp $")
MODULE_ID("$Id: fld_ftchoice.c,v 1.15 2018/12/16 00:14:26 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -51,7 +51,12 @@ set_fieldtype_choice(FIELDTYPE *typ,
bool (*const next_choice) (FIELD *, const void *),
bool (*const prev_choice) (FIELD *, const void *))
{
T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), (void *)typ, next_choice, prev_choice));
TR_FUNC_BFR(2);
T((T_CALLED("set_fieldtype_choice(%p,%s,%s)"),
(void *)typ,
TR_FUNC_ARG(0, next_choice),
TR_FUNC_ARG(1, prev_choice)));
if (!typ || !next_choice || !prev_choice)
RETURN(E_BAD_ARGUMENT);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* Copyright (c) 1998-2013,2019 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_max.c,v 1.13 2013/08/24 22:59:28 tom Exp $")
MODULE_ID("$Id: fld_max.c,v 1.15 2019/01/26 22:18:08 Leon.Winter Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -57,11 +57,16 @@ set_max_field(FIELD *field, int maxgrow)
if (maxgrow > 0)
{
if ((single_line_field && (maxgrow < field->dcols)) ||
(!single_line_field && (maxgrow < field->drows)))
if (((single_line_field && (maxgrow < field->dcols)) ||
(!single_line_field && (maxgrow < field->drows))) &&
!Field_Has_Option(field, O_INPUT_LIMIT))
RETURN(E_BAD_ARGUMENT);
}
field->maxgrow = maxgrow;
/* shrink */
if (maxgrow > 0 && Field_Has_Option(field, O_INPUT_LIMIT) &&
field->dcols > maxgrow)
field->dcols = maxgrow;
ClrStatus(field, _MAY_GROW);
if (!((unsigned)field->opts & O_STATIC))
{

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* Copyright (c) 1998-2016,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_newftyp.c,v 1.19 2010/01/23 21:14:36 tom Exp $")
MODULE_ID("$Id: fld_newftyp.c,v 1.21 2018/12/16 00:14:22 tom Exp $")
static FIELDTYPE default_fieldtype =
{
@ -53,7 +53,7 @@ static FIELDTYPE default_fieldtype =
};
NCURSES_EXPORT_VAR(FIELDTYPE *)
_nc_Default_FieldType = &default_fieldtype;
_nc_Default_FieldType = &default_fieldtype;
/*---------------------------------------------------------------------------
| Facility : libnform
@ -76,7 +76,12 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
{
FIELDTYPE *nftyp = (FIELDTYPE *)0;
T((T_CALLED("new_fieldtype(%p,%p)"), field_check, char_check));
TR_FUNC_BFR(2);
T((T_CALLED("new_fieldtype(%s,%s)"),
TR_FUNC_ARG(0, field_check),
TR_FUNC_ARG(1, char_check)));
if ((field_check) || (char_check))
{
nftyp = typeMalloc(FIELDTYPE, 1);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2009,2013 Free Software Foundation, Inc. *
* Copyright (c) 1998-2018,2019 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 *
@ -30,10 +30,11 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.h,v 0.23 2013/12/07 17:57:32 tom Exp $ */
/* $Id: form.h,v 0.29 2019/01/19 21:26:13 Leon.Winter Exp $ */
#ifndef FORM_H
#define FORM_H
/* *INDENT-OFF*/
#include <curses.h>
#include <eti.h>
@ -57,18 +58,24 @@ typedef int Field_Options;
* _PAGE *
**********/
typedef struct {
typedef struct pagenode
#if !NCURSES_OPAQUE_FORM
{
short pmin; /* index of first field on page */
short pmax; /* index of last field on page */
short smin; /* index of top leftmost field on page */
short smax; /* index of bottom rightmost field on page */
} _PAGE;
}
#endif /* !NCURSES_OPAQUE_FORM */
_PAGE;
/**********
* FIELD *
**********/
typedef struct fieldnode {
typedef struct fieldnode
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
{
unsigned short status; /* flags */
short rows; /* size in rows */
short cols; /* size in cols */
@ -97,20 +104,24 @@ typedef struct fieldnode {
/*
* The wide-character configuration requires extra information. Because
* there are existing applications that manipulate the members of FIELD
* directly, we cannot make the struct opaque. Offsets of members up to
* this point are the same in the narrow- and wide-character configuration.
* But note that the type of buf depends on the configuration, and is made
* opaque for that reason.
* directly, we cannot make the struct opaque, except by changing the ABI.
* Offsets of members up to this point are the same in the narrow- and
* wide-character configuration. But note that the type of buf depends on
* the configuration, and is made opaque for that reason.
*/
NCURSES_FIELD_INTERNALS
} FIELD;
}
#endif /* NCURSES_OPAQUE_FORM */
FIELD;
/*********
* FORM *
*********/
typedef struct formnode {
typedef struct formnode
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
{
unsigned short status; /* flags */
short rows; /* size in rows */
short cols; /* size in cols */
@ -135,14 +146,18 @@ typedef struct formnode {
void (*fieldinit)(struct formnode *);
void (*fieldterm)(struct formnode *);
} FORM;
}
#endif /* !NCURSES_OPAQUE_FORM */
FORM;
/**************
* FIELDTYPE *
**************/
typedef struct typenode {
typedef struct typenode
#if !NCURSES_OPAQUE_FORM
{
unsigned short status; /* flags */
long ref; /* reference count */
struct typenode * left; /* ptr to operand for | */
@ -178,7 +193,9 @@ typedef struct typenode {
bool (*next)(FIELD *,const void *); /* enumerate next value */
bool (*prev)(FIELD *,const void *); /* enumerate prev value */
#endif
} FIELDTYPE;
}
#endif /* !NCURSES_OPAQUE_FORM */
FIELDTYPE;
typedef void (*Form_Hook)(FORM *);
@ -203,6 +220,10 @@ typedef void (*Form_Hook)(FORM *);
#define O_NULLOK (0x0080U)
#define O_PASSOK (0x0100U)
#define O_STATIC (0x0200U)
#define O_DYNAMIC_JUSTIFY (0x0400U) /* ncurses extension */
#define O_NO_LEFT_STRIP (0x0800U) /* ncurses extension */
#define O_EDGE_INSERT_STAY (0x1000U) /* ncurses extension */
#define O_INPUT_LIMIT (0x2000U) /* ncurses extension */
/* form options */
#define O_NL_OVERLOAD (0x0001U)
@ -384,6 +405,7 @@ extern NCURSES_EXPORT(int) field_count (const FORM *);
extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *);
extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *);
extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *);
extern NCURSES_EXPORT(int) unfocus_current_field (FORM *);
extern NCURSES_EXPORT(int) field_index (const FIELD *);
extern NCURSES_EXPORT(int) set_form_page (FORM *,int);
extern NCURSES_EXPORT(int) form_page (const FORM *);
@ -421,5 +443,6 @@ extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
#ifdef __cplusplus
}
#endif
/* *INDENT-ON*/
#endif /* FORM_H */
#endif /* FORM_H */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2009,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2018,2019 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 *
@ -30,12 +30,15 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.priv.h,v 0.33 2012/03/11 00:37:46 tom Exp $ */
/* $Id: form.priv.h,v 0.44 2019/01/26 22:17:48 Leon.Winter Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
/* *INDENT-OFF*/
#include "curses.priv.h"
#define NCURSES_OPAQUE_FORM 0
#include "mf_common.h"
#if USE_WIDEC_SUPPORT
@ -125,6 +128,8 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
#define Single_Line_Field(field) \
(((field)->rows + (field)->nrow) == 1)
#define Field_Has_Option(f,o) ((((unsigned)(f)->opts) & o) != 0)
/* Logic to determine whether or not a field is selectable */
#define Field_Is_Selectable(f) (((unsigned)((f)->opts) & O_SELECTABLE)==O_SELECTABLE)
#define Field_Is_Not_Selectable(f) (((unsigned)((f)->opts) & O_SELECTABLE)!=O_SELECTABLE)
@ -146,7 +151,7 @@ TypeArgument;
O_NL_OVERLOAD |\
O_BS_OVERLOAD )
#define ALL_FIELD_OPTS (Field_Options)( \
#define STD_FIELD_OPTS (Field_Options)( \
O_VISIBLE |\
O_ACTIVE |\
O_PUBLIC |\
@ -156,7 +161,14 @@ TypeArgument;
O_AUTOSKIP|\
O_NULLOK |\
O_PASSOK |\
O_STATIC )
O_STATIC)
#define ALL_FIELD_OPTS (Field_Options)( \
STD_FIELD_OPTS |\
O_DYNAMIC_JUSTIFY |\
O_NO_LEFT_STRIP |\
O_EDGE_INSERT_STAY |\
O_INPUT_LIMIT)
#define C_BLANK ' '
#define is_blank(c) ((c)==C_BLANK)
@ -177,6 +189,7 @@ extern NCURSES_EXPORT(FIELD *) _nc_First_Active_Field (FORM*);
extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*);
extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
extern NCURSES_EXPORT(void) _nc_Unset_Current_Field(FORM *form);
#if NCURSES_INTEROP_FUNCS
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
@ -214,11 +227,11 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
#ifdef TRACE
#define returnField(code) TRACE_RETURN(code,field)
#define returnFieldPtr(code) TRACE_RETURN(code,field_ptr)
#define returnForm(code) TRACE_RETURN(code,form)
#define returnFieldType(code) TRACE_RETURN(code,field_type)
#define returnFormHook(code) TRACE_RETURN(code,form_hook)
#define returnField(code) TRACE_RETURN1(code,field)
#define returnFieldPtr(code) TRACE_RETURN1(code,field_ptr)
#define returnForm(code) TRACE_RETURN1(code,form)
#define returnFieldType(code) TRACE_RETURN1(code,field_type)
#define returnFormHook(code) TRACE_RETURN1(code,form_hook)
extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **);
extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* Copyright (c) 1998-2018,2019 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_driver.c,v 1.110 2014/02/10 00:42:48 tom Exp $")
MODULE_ID("$Id: frm_driver.c,v 1.128 2019/01/20 01:25:02 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@ -99,9 +99,9 @@ Perhaps at some time we will make this configurable at runtime.
#define GROW_IF_NAVIGATE (1)
#if USE_WIDEC_SUPPORT
#define myADDNSTR(w, s, n) wadd_wchnstr(w, s, n)
#define myINSNSTR(w, s, n) wins_wchnstr(w, s, n)
#define myINNSTR(w, s, n) fix_wchnstr(w, s, n)
#define myADDNSTR(w, s, n) wide_waddnstr(w, s, n)
#define myINSNSTR(w, s, n) wide_winsnstr(w, s, n)
#define myINNSTR(w, s, n) wide_winnstr(w, s, n)
#define myWCWIDTH(w, y, x) cell_width(w, y, x)
#else
#define myADDNSTR(w, s, n) waddnstr(w, s, n)
@ -172,15 +172,16 @@ static int FE_Delete_Previous(FORM *);
instead of a derived window because it contains invisible parts.
This is true for non-public fields and for scrollable fields. */
#define Has_Invisible_Parts(field) \
(!((unsigned)(field)->opts & O_PUBLIC) || \
(!(Field_Has_Option(field, O_PUBLIC)) || \
Is_Scroll_Field(field))
/* Logic to decide whether or not a field needs justification */
#define Justification_Allowed(field) \
(((field)->just != NO_JUSTIFICATION) && \
(Single_Line_Field(field)) && \
(((field)->dcols == (field)->cols) && \
((unsigned)(field)->opts & O_STATIC)))
((Field_Has_Option(field, O_STATIC) && \
((field)->dcols == (field)->cols)) || \
Field_Has_Option(field, O_DYNAMIC_JUSTIFY)))
/* Logic to determine whether or not a dynamic field may still grow */
#define Growable(field) ((field)->status & _MAY_GROW)
@ -194,7 +195,7 @@ static int FE_Delete_Previous(FORM *);
#define Field_Really_Appears(field) \
((field->form) &&\
(field->form->status & _POSTED) &&\
((unsigned)field->opts & O_VISIBLE) &&\
(Field_Has_Option(field, O_VISIBLE)) &&\
(field->page == field->form->curpage))
/* Logic to determine whether or not we are on the first position in the
@ -238,9 +239,29 @@ check_pos(FORM *form, int lineno)
Wide-character special functions
--------------------------------------------------------------------------*/
#if USE_WIDEC_SUPPORT
/* like winsnstr */
/* add like waddnstr, but using cchar_t* rather than char*
*/
static int
wins_wchnstr(WINDOW *w, cchar_t *s, int n)
wide_waddnstr(WINDOW *w, const cchar_t *s, int n)
{
int rc = OK;
while (n-- > 0)
{
if ((rc = wadd_wch(w, s)) != OK)
break;
++s;
}
return rc;
}
/* insert like winsnstr, but using cchar_t* rather than char*
*
* X/Open Curses has no close equivalent; inserts are done only with wchar_t
* strings.
*/
static int
wide_winsnstr(WINDOW *w, const cchar_t *s, int n)
{
int code = ERR;
int y, x;
@ -256,11 +277,13 @@ wins_wchnstr(WINDOW *w, cchar_t *s, int n)
return code;
}
/* win_wchnstr is inconsistent with winnstr, since it returns OK rather than
* the number of items transferred.
/* retrieve like winnstr, but using cchar_t*, rather than char*.
*
* X/Open Curses' closest equivalent, win_wchnstr(), is inconsistent with
* winnstr(), since it returns OK rather than the number of items transferred.
*/
static int
fix_wchnstr(WINDOW *w, cchar_t *s, int n)
wide_winnstr(WINDOW *w, cchar_t *s, int n)
{
int x;
@ -843,11 +866,13 @@ _nc_Position_Form_Cursor(FORM *form)
| E_BAD_ARGUMENT - invalid form pointer
| E_SYSTEM_ERROR - general error
+--------------------------------------------------------------------------*/
static bool move_after_insert = TRUE;
NCURSES_EXPORT(int)
_nc_Refresh_Current_Field(FORM *form)
{
WINDOW *formwin;
FIELD *field;
bool is_public;
T((T_CALLED("_nc_Refresh_Current_Field(%p)"), (void *)form));
@ -860,102 +885,105 @@ _nc_Refresh_Current_Field(FORM *form)
field = form->current;
formwin = Get_Form_Window(form);
if ((unsigned)field->opts & O_PUBLIC)
is_public = Field_Has_Option(field, O_PUBLIC);
if (Is_Scroll_Field(field))
{
if (Is_Scroll_Field(field))
/* Again, in this case the fieldwin isn't derived from formwin,
so we have to perform a copy operation. */
if (Single_Line_Field(field))
{
/* Again, in this case the fieldwin isn't derived from formwin,
so we have to perform a copy operation. */
if (Single_Line_Field(field))
{
/* horizontal scrolling */
if (form->curcol < form->begincol)
form->begincol = form->curcol;
else
{
if (form->curcol >= (form->begincol + field->cols))
form->begincol = form->curcol - field->cols + 1;
}
copywin(form->w,
formwin,
0,
form->begincol,
field->frow,
field->fcol,
field->frow,
field->cols + field->fcol - 1,
0);
}
/* horizontal scrolling */
if (form->curcol < form->begincol)
form->begincol = form->curcol;
else
{
/* A multi-line, i.e. vertical scrolling field */
int row_after_bottom, first_modified_row, first_unmodified_row;
if (field->drows > field->rows)
{
row_after_bottom = form->toprow + field->rows;
if (form->currow < form->toprow)
{
form->toprow = form->currow;
SetStatus(field, _NEWTOP);
}
if (form->currow >= row_after_bottom)
{
form->toprow = form->currow - field->rows + 1;
SetStatus(field, _NEWTOP);
}
if (field->status & _NEWTOP)
{
/* means we have to copy whole range */
first_modified_row = form->toprow;
first_unmodified_row = first_modified_row + field->rows;
ClrStatus(field, _NEWTOP);
}
else
{
/* we try to optimize : finding the range of touched
lines */
first_modified_row = form->toprow;
while (first_modified_row < row_after_bottom)
{
if (is_linetouched(form->w, first_modified_row))
break;
first_modified_row++;
}
first_unmodified_row = first_modified_row;
while (first_unmodified_row < row_after_bottom)
{
if (!is_linetouched(form->w, first_unmodified_row))
break;
first_unmodified_row++;
}
}
}
else
{
first_modified_row = form->toprow;
first_unmodified_row = first_modified_row + field->rows;
}
if (first_unmodified_row != first_modified_row)
copywin(form->w,
formwin,
first_modified_row,
0,
field->frow + first_modified_row - form->toprow,
field->fcol,
field->frow + first_unmodified_row - form->toprow - 1,
field->cols + field->fcol - 1,
0);
if (form->curcol >= (form->begincol + field->cols))
form->begincol = form->curcol - field->cols
+ (move_after_insert ? 1 : 0);
}
wsyncup(formwin);
if (is_public)
copywin(form->w,
formwin,
0,
form->begincol,
field->frow,
field->fcol,
field->frow,
field->cols + field->fcol - 1,
0);
}
else
{
/* if the field-window is simply a derived window, i.e. contains no
* invisible parts, the whole thing is trivial
*/
wsyncup(form->w);
/* A multi-line, i.e. vertical scrolling field */
int row_after_bottom, first_modified_row, first_unmodified_row;
if (field->drows > field->rows)
{
row_after_bottom = form->toprow + field->rows;
if (form->currow < form->toprow)
{
form->toprow = form->currow;
SetStatus(field, _NEWTOP);
}
if (form->currow >= row_after_bottom)
{
form->toprow = form->currow - field->rows + 1;
SetStatus(field, _NEWTOP);
}
if (field->status & _NEWTOP)
{
/* means we have to copy whole range */
first_modified_row = form->toprow;
first_unmodified_row = first_modified_row + field->rows;
ClrStatus(field, _NEWTOP);
}
else
{
/* we try to optimize : finding the range of touched
lines */
first_modified_row = form->toprow;
while (first_modified_row < row_after_bottom)
{
if (is_linetouched(form->w, first_modified_row))
break;
first_modified_row++;
}
first_unmodified_row = first_modified_row;
while (first_unmodified_row < row_after_bottom)
{
if (!is_linetouched(form->w, first_unmodified_row))
break;
first_unmodified_row++;
}
}
}
else
{
first_modified_row = form->toprow;
first_unmodified_row = first_modified_row + field->rows;
}
if (first_unmodified_row != first_modified_row && is_public)
copywin(form->w,
formwin,
first_modified_row,
0,
field->frow + first_modified_row - form->toprow,
field->fcol,
field->frow + first_unmodified_row - form->toprow - 1,
field->cols + field->fcol - 1,
0);
}
if (is_public)
wsyncup(formwin);
}
else
{
/* if the field-window is simply a derived window, i.e. contains no
* invisible parts, the whole thing is trivial
*/
if (is_public)
wsyncup(form->w);
}
untouchwin(form->w);
returnCode(_nc_Position_Form_Cursor(form));
@ -978,26 +1006,29 @@ Perform_Justification(FIELD *field, WINDOW *win)
int len;
int col = 0;
bp = Get_Start_Of_Data(field->buf, Buffer_Length(field));
bp = (Field_Has_Option(field, O_NO_LEFT_STRIP)
? field->buf
: Get_Start_Of_Data(field->buf, Buffer_Length(field)));
len = (int)(After_End_Of_Data(field->buf, Buffer_Length(field)) - bp);
if (len > 0)
{
assert(win && (field->drows == 1) && (field->dcols == field->cols));
assert(win && (field->drows == 1));
switch (field->just)
{
case JUSTIFY_LEFT:
break;
case JUSTIFY_CENTER:
col = (field->cols - len) / 2;
break;
case JUSTIFY_RIGHT:
col = field->cols - len;
break;
default:
break;
}
if (field->cols - len >= 0)
switch (field->just)
{
case JUSTIFY_LEFT:
break;
case JUSTIFY_CENTER:
col = (field->cols - len) / 2;
break;
case JUSTIFY_RIGHT:
col = field->cols - len;
break;
default:
break;
}
wmove(win, 0, col);
myADDNSTR(win, bp, len);
@ -1019,9 +1050,14 @@ static void
Undo_Justification(FIELD *field, WINDOW *win)
{
FIELD_CELL *bp;
int y, x;
int len;
bp = Get_Start_Of_Data(field->buf, Buffer_Length(field));
getyx(win, y, x);
bp = (Field_Has_Option(field, O_NO_LEFT_STRIP)
? field->buf
: Get_Start_Of_Data(field->buf, Buffer_Length(field)));
len = (int)(After_End_Of_Data(field->buf, Buffer_Length(field)) - bp);
if (len > 0)
@ -1030,6 +1066,7 @@ Undo_Justification(FIELD *field, WINDOW *win)
wmove(win, 0, 0);
myADDNSTR(win, bp, len);
}
wmove(win, y, x);
}
/*---------------------------------------------------------------------------
@ -1111,7 +1148,7 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag)
return E_SYSTEM_ERROR;
else
{
if ((unsigned)field->opts & O_VISIBLE)
if (Field_Has_Option(field, O_VISIBLE))
{
Set_Field_Window_Attributes(field, win);
}
@ -1124,7 +1161,7 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag)
if (!bEraseFlag)
{
if ((unsigned)field->opts & O_PUBLIC)
if (Field_Has_Option(field, O_PUBLIC))
{
if (Justification_Allowed(field))
Perform_Justification(field, win);
@ -1170,7 +1207,7 @@ Synchronize_Field(FIELD *field)
form->currow = form->curcol = form->toprow = form->begincol = 0;
werase(form->w);
if (((unsigned)field->opts & O_PUBLIC) && Justification_Allowed(field))
if ((Field_Has_Option(field, O_PUBLIC)) && Justification_Allowed(field))
Undo_Justification(field, form->w);
else
Buffer_To_Window(field, form->w);
@ -1256,7 +1293,7 @@ _nc_Synchronize_Attributes(FIELD *field)
werase(form->w);
wmove(form->w, form->currow, form->curcol);
if ((unsigned)field->opts & O_PUBLIC)
if (Field_Has_Option(field, O_PUBLIC))
{
if (Justification_Allowed(field))
Undo_Justification(field, form->w);
@ -1269,7 +1306,8 @@ _nc_Synchronize_Attributes(FIELD *field)
copywin(form->w, formwin,
0, 0,
field->frow, field->fcol,
field->rows - 1, field->cols - 1, 0);
field->frow + field->rows - 1,
field->fcol + field->cols - 1, 0);
wsyncup(formwin);
Buffer_To_Window(field, form->w);
SetStatus(field, _NEWTOP); /* fake refresh to paint all */
@ -1389,6 +1427,57 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
returnCode(res);
}
/*
* Removes the focus from the current field of the form.
*/
void
_nc_Unset_Current_Field(FORM *form)
{
FIELD *field = form->current;
_nc_Refresh_Current_Field(form);
if (Field_Has_Option(field, O_PUBLIC))
{
if (field->drows > field->rows)
{
if (form->toprow == 0)
ClrStatus(field, _NEWTOP);
else
SetStatus(field, _NEWTOP);
}
else
{
if (Justification_Allowed(field))
{
Window_To_Buffer(form, field);
werase(form->w);
Perform_Justification(field, form->w);
if (Field_Has_Option(field, O_DYNAMIC_JUSTIFY) &&
(form->w->_parent == 0))
{
copywin(form->w,
Get_Form_Window(form),
0,
0,
field->frow,
field->fcol,
field->frow,
field->cols + field->fcol - 1,
0);
wsyncup(Get_Form_Window(form));
}
else
{
wsyncup(form->w);
}
}
}
}
delwin(form->w);
form->w = (WINDOW *)0;
form->current = 0;
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int _nc_Set_Current_Field(FORM * form,
@ -1409,7 +1498,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), (void *)form, (void *)newfield));
if (!form || !newfield || !form->current || (newfield->form != form))
if (!form || !newfield || (newfield->form != form))
returnCode(E_BAD_ARGUMENT);
if ((form->status & _IN_DRIVER))
@ -1423,34 +1512,10 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
if ((field != newfield) ||
!(form->status & _POSTED))
{
if ((form->w) &&
((unsigned)field->opts & O_VISIBLE) &&
if (field && (form->w) &&
(Field_Has_Option(field, O_VISIBLE)) &&
(field->form->curpage == field->page))
{
_nc_Refresh_Current_Field(form);
if ((unsigned)field->opts & O_PUBLIC)
{
if (field->drows > field->rows)
{
if (form->toprow == 0)
ClrStatus(field, _NEWTOP);
else
SetStatus(field, _NEWTOP);
}
else
{
if (Justification_Allowed(field))
{
Window_To_Buffer(form, field);
werase(form->w);
Perform_Justification(field, form->w);
wsyncup(form->w);
}
}
}
delwin(form->w);
form->w = (WINDOW *)0;
}
_nc_Unset_Current_Field(form);
field = newfield;
@ -1998,7 +2063,7 @@ Vertical_Scrolling(int (*const fct) (FORM *), FORM *form)
{
res = fct(form);
if (res == E_OK)
SetStatus(form, _NEWTOP);
SetStatus(form->current, _NEWTOP);
}
return (res);
}
@ -2430,7 +2495,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form)
int result = E_REQUEST_DENIED;
bool Last_Row = ((field->drows - 1) == form->currow);
if (((unsigned)field->opts & O_WRAP) && /* wrapping wanted */
if ((Field_Has_Option(field, O_WRAP)) && /* wrapping wanted */
(!Single_Line_Field(field)) && /* must be multi-line */
(There_Is_No_Room_For_A_Char_In_Line(form)) && /* line is full */
(!Last_Row || Growable(field))) /* there are more lines */
@ -3111,7 +3176,7 @@ Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (typ)
{
if ((unsigned)field->opts & O_NULLOK)
if (Field_Has_Option(field, O_NULLOK))
{
FIELD_CELL *bp = field->buf;
@ -3168,7 +3233,7 @@ _nc_Internal_Validation(FORM *form)
Synchronize_Buffer(form);
if ((form->status & _FCHECK_REQUIRED) ||
(!((unsigned)field->opts & O_PASSOK)))
(!(Field_Has_Option(field, O_PASSOK))))
{
if (!Check_Field(form, field->type, field, (TypeArgument *)(field->arg)))
return FALSE;
@ -3273,7 +3338,7 @@ _nc_First_Active_Field(FORM *form)
do
{
field = (field == last_on_page) ? first : field + 1;
if (((unsigned)(*field)->opts & O_VISIBLE))
if (Field_Has_Option(*field, O_VISIBLE))
break;
}
while (proposed != (*field));
@ -4001,9 +4066,9 @@ Data_Entry_w(FORM *form, wchar_t c)
int result = E_REQUEST_DENIED;
T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
if (((unsigned)field->opts & O_EDIT)
if ((Field_Has_Option(field, O_EDIT))
#if FIX_FORM_INACTIVE_BUG
&& ((unsigned)field->opts & O_ACTIVE)
&& (Field_Has_Option(field, O_ACTIVE))
#endif
)
{
@ -4011,9 +4076,9 @@ Data_Entry_w(FORM *form, wchar_t c)
cchar_t temp_ch;
given[0] = c;
given[1] = 1;
given[1] = 0;
setcchar(&temp_ch, given, 0, 0, (void *)0);
if (((unsigned)field->opts & O_BLANK) &&
if ((Field_Has_Option(field, O_BLANK)) &&
First_Position_In_Current_Field(form) &&
!(form->status & _FCHECK_REQUIRED) &&
!(form->status & _WINDOW_MODIFIED))
@ -4044,7 +4109,7 @@ Data_Entry_w(FORM *form, wchar_t c)
((field->dcols - 1) == form->curcol));
form->status |= _WINDOW_MODIFIED;
if (End_Of_Field && !Growable(field) && ((unsigned)field->opts & O_AUTOSKIP))
if (End_Of_Field && !Growable(field) && (Field_Has_Option(field, O_AUTOSKIP)))
result = Inter_Field_Navigation(FN_Next_Field, form);
else
{
@ -4088,13 +4153,13 @@ Data_Entry(FORM *form, int c)
int result = E_REQUEST_DENIED;
T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
if (((unsigned)field->opts & O_EDIT)
if ((Field_Has_Option(field, O_EDIT))
#if FIX_FORM_INACTIVE_BUG
&& ((unsigned)field->opts & O_ACTIVE)
&& (Field_Has_Option(field, O_ACTIVE))
#endif
)
{
if (((unsigned)field->opts & O_BLANK) &&
if ((Field_Has_Option(field, O_BLANK)) &&
First_Position_In_Current_Field(form) &&
!(form->status & _FCHECK_REQUIRED) &&
!(form->status & _WINDOW_MODIFIED))
@ -4124,8 +4189,14 @@ Data_Entry(FORM *form, int c)
bool End_Of_Field = (((field->drows - 1) == form->currow) &&
((field->dcols - 1) == form->curcol));
if (Field_Has_Option(field, O_EDGE_INSERT_STAY))
move_after_insert = !!(form->curcol
- form->begincol
- field->cols
+ 1);
SetStatus(form, _WINDOW_MODIFIED);
if (End_Of_Field && !Growable(field) && ((unsigned)field->opts & O_AUTOSKIP))
if (End_Of_Field && !Growable(field) && (Field_Has_Option(field, O_AUTOSKIP)))
result = Inter_Field_Navigation(FN_Next_Field, form);
else
{
@ -4288,12 +4359,14 @@ form_driver(FORM *form, int c)
const Binding_Info *BI = (Binding_Info *) 0;
int res = E_UNKNOWN_COMMAND;
move_after_insert = TRUE;
T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
if (!form)
RETURN(E_BAD_ARGUMENT);
if (!(form->field))
if (!(form->field) || !(form->current))
RETURN(E_NOT_CONNECTED);
assert(form->page);
@ -4493,7 +4566,7 @@ form_driver_w(FORM *form, int type, wchar_t c)
const Binding_Info *BI = (Binding_Info *) 0;
int res = E_UNKNOWN_COMMAND;
T((T_CALLED("form_driver(%p,%d)"), (void *)form, (int) c));
T((T_CALLED("form_driver(%p,%d)"), (void *)form, (int)c));
if (!form)
RETURN(E_BAD_ARGUMENT);
@ -4905,7 +4978,7 @@ _nc_Widen_String(char *source, int *lengthp)
{
if (pass)
{
result[need] = source[passed];
result[need] = (wchar_t)source[passed];
}
++need;
++passed;

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2016,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -32,13 +32,14 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_hook.c,v 1.16 2012/03/11 00:37:16 tom Exp $")
MODULE_ID("$Id: frm_hook.c,v 1.18 2018/12/16 00:13:36 tom Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\
{\
T((T_CALLED("set_" #typ"_"#name"(%p,%p)"), (void *) form, func));\
TR_FUNC_BFR(1); \
T((T_CALLED("set_" #typ"_"#name"(%p,%s)"), (void *) form, TR_FUNC_ARG(0, func)));\
(Normalize_Form( form ) -> typ ## name) = func ;\
RETURN(E_OK);\
}

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2012,2020 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 *
@ -32,12 +32,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_post.c,v 1.11 2012/06/10 00:27:49 tom Exp $")
MODULE_ID("$Id: frm_post.c,v 1.12 2020/01/18 17:05:03 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int post_form(FORM * form)
|
|
| Description : Writes the form into its associated subwindow.
|
| Return Values : E_OK - success
@ -69,7 +69,7 @@ post_form(FORM *form)
if ((form->cols > getmaxx(formwin)) || (form->rows > getmaxy(formwin)))
RETURN(E_NO_ROOM);
/* reset form->curpage to an invald value. This forces Set_Form_Page
/* reset form->curpage to an invalid value. This forces Set_Form_Page
to do the page initialization which is required by post_form.
*/
page = form->curpage;
@ -87,9 +87,9 @@ post_form(FORM *form)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int unpost_form(FORM * form)
|
|
| Description : Erase form from its associated subwindow.
|
| Return Values : E_OK - success

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2009,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2012,2015 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 *
@ -37,73 +37,77 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_req_name.c,v 1.18 2012/07/21 23:17:23 tom Exp $")
MODULE_ID("$Id: frm_req_name.c,v 1.19 2015/04/04 17:11:46 tom Exp $")
static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
#define DATA(s) { s }
static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] =
{
"NEXT_PAGE",
"PREV_PAGE",
"FIRST_PAGE",
"LAST_PAGE",
DATA("NEXT_PAGE"),
DATA("PREV_PAGE"),
DATA("FIRST_PAGE"),
DATA("LAST_PAGE"),
"NEXT_FIELD",
"PREV_FIELD",
"FIRST_FIELD",
"LAST_FIELD",
"SNEXT_FIELD",
"SPREV_FIELD",
"SFIRST_FIELD",
"SLAST_FIELD",
"LEFT_FIELD",
"RIGHT_FIELD",
"UP_FIELD",
"DOWN_FIELD",
DATA("NEXT_FIELD"),
DATA("PREV_FIELD"),
DATA("FIRST_FIELD"),
DATA("LAST_FIELD"),
DATA("SNEXT_FIELD"),
DATA("SPREV_FIELD"),
DATA("SFIRST_FIELD"),
DATA("SLAST_FIELD"),
DATA("LEFT_FIELD"),
DATA("RIGHT_FIELD"),
DATA("UP_FIELD"),
DATA("DOWN_FIELD"),
"NEXT_CHAR",
"PREV_CHAR",
"NEXT_LINE",
"PREV_LINE",
"NEXT_WORD",
"PREV_WORD",
"BEG_FIELD",
"END_FIELD",
"BEG_LINE",
"END_LINE",
"LEFT_CHAR",
"RIGHT_CHAR",
"UP_CHAR",
"DOWN_CHAR",
DATA("NEXT_CHAR"),
DATA("PREV_CHAR"),
DATA("NEXT_LINE"),
DATA("PREV_LINE"),
DATA("NEXT_WORD"),
DATA("PREV_WORD"),
DATA("BEG_FIELD"),
DATA("END_FIELD"),
DATA("BEG_LINE"),
DATA("END_LINE"),
DATA("LEFT_CHAR"),
DATA("RIGHT_CHAR"),
DATA("UP_CHAR"),
DATA("DOWN_CHAR"),
"NEW_LINE",
"INS_CHAR",
"INS_LINE",
"DEL_CHAR",
"DEL_PREV",
"DEL_LINE",
"DEL_WORD",
"CLR_EOL",
"CLR_EOF",
"CLR_FIELD",
"OVL_MODE",
"INS_MODE",
"SCR_FLINE",
"SCR_BLINE",
"SCR_FPAGE",
"SCR_BPAGE",
"SCR_FHPAGE",
"SCR_BHPAGE",
"SCR_FCHAR",
"SCR_BCHAR",
"SCR_HFLINE",
"SCR_HBLINE",
"SCR_HFHALF",
"SCR_HBHALF",
DATA("NEW_LINE"),
DATA("INS_CHAR"),
DATA("INS_LINE"),
DATA("DEL_CHAR"),
DATA("DEL_PREV"),
DATA("DEL_LINE"),
DATA("DEL_WORD"),
DATA("CLR_EOL"),
DATA("CLR_EOF"),
DATA("CLR_FIELD"),
DATA("OVL_MODE"),
DATA("INS_MODE"),
DATA("SCR_FLINE"),
DATA("SCR_BLINE"),
DATA("SCR_FPAGE"),
DATA("SCR_BPAGE"),
DATA("SCR_FHPAGE"),
DATA("SCR_BHPAGE"),
DATA("SCR_FCHAR"),
DATA("SCR_BCHAR"),
DATA("SCR_HFLINE"),
DATA("SCR_HBLINE"),
DATA("SCR_HFHALF"),
DATA("SCR_HBHALF"),
"VALIDATION",
"NEXT_CHOICE",
"PREV_CHOICE"
DATA("VALIDATION"),
DATA("NEXT_CHOICE"),
DATA("PREV_CHOICE")
};
#undef DATA
#define A_SIZE (sizeof(request_names)/sizeof(request_names[0]))
/*---------------------------------------------------------------------------

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2008-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 2008-2018,2020 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 *
@ -34,7 +34,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_generic.c,v 1.6 2012/06/10 00:27:49 tom Exp $")
MODULE_ID("$Id: fty_generic.c,v 1.9 2020/01/18 17:08:04 tom Exp $")
/*
* This is not a full implementation of a field type, but adds some
@ -55,15 +55,15 @@ MODULE_ID("$Id: fty_generic.c,v 1.6 2012/06/10 00:27:49 tom Exp $")
* fieldtype they register with the forms library using this call.
*
* For that purpose we have extended the fieldtype struc by a new element
* that gets the arguments from a single struct passed by the caller.
*
* that gets the arguments from a single struct passed by the caller.
*
*/
#if NCURSES_INTEROP_FUNCS
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Generic_This_Type( void * arg )
|
|
| Description : We interpret the passed arg just as a handle the
| calling language uses to keep track of its allocated
| argument structures. We can simply copy it back.
@ -89,7 +89,7 @@ Generic_This_Type(void *arg)
| write a field_check and a char_check function and give
| them as input to this call. A callback to allow the
| release of the allocated memory must also be provided.
| For generic field types, we provide some more
| For generic field types, we provide some more
| information about the field as parameters.
|
| If an error occurs, errno is set to
@ -109,8 +109,14 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
int code = E_SYSTEM_ERROR;
FIELDTYPE *res = (FIELDTYPE *)0;
T((T_CALLED("_nc_generic_fieldtype(%p,%p,%p,%p,%p)"),
field_check, char_check, next, prev, freecallback));
TR_FUNC_BFR(5);
T((T_CALLED("_nc_generic_fieldtype(%s,%s,%s,%s,%s)"),
TR_FUNC_ARG(0, field_check),
TR_FUNC_ARG(1, char_check),
TR_FUNC_ARG(2, next),
TR_FUNC_ARG(3, prev),
TR_FUNC_ARG(4, freecallback)));
if (field_check || char_check)
{
@ -139,16 +145,16 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static TypeArgument *GenericArgument(
| const FIELDTYPE* typ,
| int (*argiterator)(void**),
| int* err)
|
|
| Description : The iterator callback must browse through all fieldtype
| parameters that have an argument associated with the
| type. The iterator returns 1 if the operation to get
| the next element was successfull, 0 otherwise. If the
| the next element was successful, 0 otherwise. If the
| iterator could move to the next argument, it fills
| the void* pointer representing the argument into the
| location provided as argument to the iterator.
@ -200,14 +206,14 @@ GenericArgument(const FIELDTYPE *typ,
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int _nc_set_generic_fieldtype(
| FIELD* field,
| FIELDTYPE* ftyp,
| int (*argiterator)(void**))
|
|
| Description : Assign the fieldtype to the field and use the iterator
| mechanism to get the arguments when a check is
| mechanism to get the arguments when a check is
| performed.
|
| Return Values : E_OK if all went well
@ -258,11 +264,11 @@ _nc_set_generic_fieldtype(FIELD *field,
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : WINDOW* _nc_form_cursor(
| FORM* form,
| int *pRow, int *pCol)
|
|
| Description : Get the current position of the form cursor position
| We also return the field window
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2012,2019 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 *
@ -34,13 +34,13 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_num.c,v 1.29 2012/02/23 10:02:15 tom Exp $")
MODULE_ID("$Id: fty_num.c,v 1.31 2019/03/30 21:20:04 tom Exp $")
#if HAVE_LOCALE_H
#include <locale.h>
#endif
#if HAVE_LOCALE_H
#if HAVE_LOCALE_H && HAVE_LOCALECONV
#define isDecimalPoint(c) ((c) == ((L && L->decimal_point) ? *(L->decimal_point) : '.'))
#else
#define isDecimalPoint(c) ((c) == '.')
@ -96,7 +96,7 @@ Generic_This_Type(void *arg)
argn->low = args->low;
argn->high = args->high;
#if HAVE_LOCALE_H
#if HAVE_LOCALE_H && HAVE_LOCALECONV
argn->L = localeconv();
#else
argn->L = NULL;

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2015,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -34,10 +34,17 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_regex.c,v 1.25 2012/10/27 20:12:53 tom Exp $")
MODULE_ID("$Id: fty_regex.c,v 1.27 2018/07/14 21:41:39 tom Exp $")
#if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */
#if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */
#if HAVE_PCRE2_POSIX_H
#include <pcre2-posix.h>
#elif HAVE_PCREPOSIX_H
#include <pcreposix.h>
#else
#include <regex.h>
#endif
typedef struct
{
@ -113,7 +120,7 @@ Generic_RegularExpression_Type(void *arg MAYBE_UNUSED)
if (rx)
{
preg = typeMalloc(RegExp_Arg, 1);
preg = typeCalloc(RegExp_Arg, 1);
if (preg)
{
@ -264,6 +271,7 @@ Free_RegularExpression_Type(void *argp MAYBE_UNUSED)
{
free(ap->refCount);
regfree(ap->pRegExp);
free(ap->pRegExp);
}
#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
if (ap->compiled_expression)

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* Copyright (c) 1998-2015,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 *
@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey 1996-2005,2010 *
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* LINTLIBRARY */
@ -110,6 +110,11 @@ int set_current_field(
FIELD *field)
{ return(*(int *)0); }
#undef unfocus_current_field
int unfocus_current_field(
FORM *const form)
{ return(*(int *)0); }
#undef current_field
FIELD *current_field(
const FORM *form)
@ -458,6 +463,11 @@ int _nc_Synchronize_Options(
Field_Options newopts)
{ return(*(int *)0); }
#undef _nc_Unset_Current_Field
void _nc_Unset_Current_Field(
FORM *form)
{ /* void */ }
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
@ -674,6 +684,10 @@ alnumARG;
#undef TYPE_ALNUM
FIELDTYPE *TYPE_ALNUM;
#undef _nc_TYPE_ALNUM
FIELDTYPE *_nc_TYPE_ALNUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_alpha.c */
typedef struct
@ -685,6 +699,10 @@ alphaARG;
#undef TYPE_ALPHA
FIELDTYPE *TYPE_ALPHA;
#undef _nc_TYPE_ALPHA
FIELDTYPE *_nc_TYPE_ALPHA(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_enum.c */
typedef struct
@ -707,11 +725,49 @@ enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
#undef _nc_TYPE_ENUM
FIELDTYPE *_nc_TYPE_ENUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
void (*freecallback)(
void *p1))
{ return(*(FIELDTYPE **)0); }
#undef _nc_set_generic_fieldtype
int _nc_set_generic_fieldtype(
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }
/* ./fty_int.c */
@ -734,13 +790,20 @@ integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
#undef _nc_TYPE_INTEGER
FIELDTYPE *_nc_TYPE_INTEGER(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_ipv4.c */
#undef TYPE_IPV4
FIELDTYPE *TYPE_IPV4;
/* ./fty_num.c */
#undef _nc_TYPE_IPV4
FIELDTYPE *_nc_TYPE_IPV4(void)
{ return(*(FIELDTYPE **)0); }
#include <locale.h>
/* ./fty_num.c */
typedef struct
{
@ -762,9 +825,11 @@ thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
/* ./fty_regex.c */
#undef _nc_TYPE_NUMERIC
FIELDTYPE *_nc_TYPE_NUMERIC(void)
{ return(*(FIELDTYPE **)0); }
#include <regex.h>
/* ./fty_regex.c */
typedef struct
{
@ -775,3 +840,7 @@ RegExp_Arg;
#undef TYPE_REGEXP
FIELDTYPE *TYPE_REGEXP;
#undef _nc_TYPE_REGEXP
FIELDTYPE *_nc_TYPE_REGEXP(void)
{ return(*(FIELDTYPE **)0); }

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2010 Free Software Foundation, Inc. *
* Copyright (c) 2010-2015,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 *
@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey 2010 *
* Author: Thomas E. Dickey 2010-on *
****************************************************************************/
/* LINTLIBRARY */
@ -110,6 +110,11 @@ int set_current_field(
FIELD *field)
{ return(*(int *)0); }
#undef unfocus_current_field
int unfocus_current_field(
FORM *const form)
{ return(*(int *)0); }
#undef current_field
FIELD *current_field(
const FORM *form)
@ -458,6 +463,11 @@ int _nc_Synchronize_Options(
Field_Options newopts)
{ return(*(int *)0); }
#undef _nc_Unset_Current_Field
void _nc_Unset_Current_Field(
FORM *form)
{ /* void */ }
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
@ -674,6 +684,10 @@ alnumARG;
#undef TYPE_ALNUM
FIELDTYPE *TYPE_ALNUM;
#undef _nc_TYPE_ALNUM
FIELDTYPE *_nc_TYPE_ALNUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_alpha.c */
typedef struct
@ -685,6 +699,10 @@ alphaARG;
#undef TYPE_ALPHA
FIELDTYPE *TYPE_ALPHA;
#undef _nc_TYPE_ALPHA
FIELDTYPE *_nc_TYPE_ALPHA(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_enum.c */
typedef struct
@ -707,11 +725,49 @@ enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
#undef _nc_TYPE_ENUM
FIELDTYPE *_nc_TYPE_ENUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
void (*freecallback)(
void *p1))
{ return(*(FIELDTYPE **)0); }
#undef _nc_set_generic_fieldtype
int _nc_set_generic_fieldtype(
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }
/* ./fty_int.c */
@ -734,13 +790,20 @@ integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
#undef _nc_TYPE_INTEGER
FIELDTYPE *_nc_TYPE_INTEGER(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_ipv4.c */
#undef TYPE_IPV4
FIELDTYPE *TYPE_IPV4;
/* ./fty_num.c */
#undef _nc_TYPE_IPV4
FIELDTYPE *_nc_TYPE_IPV4(void)
{ return(*(FIELDTYPE **)0); }
#include <locale.h>
/* ./fty_num.c */
typedef struct
{
@ -762,9 +825,11 @@ thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
/* ./fty_regex.c */
#undef _nc_TYPE_NUMERIC
FIELDTYPE *_nc_TYPE_NUMERIC(void)
{ return(*(FIELDTYPE **)0); }
#include <regex.h>
/* ./fty_regex.c */
typedef struct
{
@ -775,3 +840,7 @@ RegExp_Arg;
#undef TYPE_REGEXP
FIELDTYPE *TYPE_REGEXP;
#undef _nc_TYPE_REGEXP
FIELDTYPE *_nc_TYPE_REGEXP(void)
{ return(*(FIELDTYPE **)0); }

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2010,2013 Free Software Foundation, Inc. *
* Copyright (c) 2010-2015,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 *
@ -110,6 +110,11 @@ int set_current_field(
FIELD *field)
{ return(*(int *)0); }
#undef unfocus_current_field
int unfocus_current_field(
FORM *const form)
{ return(*(int *)0); }
#undef current_field
FIELD *current_field(
const FORM *form)
@ -458,6 +463,11 @@ int _nc_Synchronize_Options(
Field_Options newopts)
{ return(*(int *)0); }
#undef _nc_Unset_Current_Field
void _nc_Unset_Current_Field(
FORM *form)
{ /* void */ }
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
@ -687,6 +697,10 @@ alnumARG;
#undef TYPE_ALNUM
FIELDTYPE *TYPE_ALNUM;
#undef _nc_TYPE_ALNUM
FIELDTYPE *_nc_TYPE_ALNUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_alpha.c */
typedef struct
@ -698,6 +712,10 @@ alphaARG;
#undef TYPE_ALPHA
FIELDTYPE *TYPE_ALPHA;
#undef _nc_TYPE_ALPHA
FIELDTYPE *_nc_TYPE_ALPHA(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_enum.c */
typedef struct
@ -720,11 +738,49 @@ enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
#undef _nc_TYPE_ENUM
FIELDTYPE *_nc_TYPE_ENUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
void (*freecallback)(
void *p1))
{ return(*(FIELDTYPE **)0); }
#undef _nc_set_generic_fieldtype
int _nc_set_generic_fieldtype(
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }
/* ./fty_int.c */
@ -747,13 +803,20 @@ integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
#undef _nc_TYPE_INTEGER
FIELDTYPE *_nc_TYPE_INTEGER(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_ipv4.c */
#undef TYPE_IPV4
FIELDTYPE *TYPE_IPV4;
/* ./fty_num.c */
#undef _nc_TYPE_IPV4
FIELDTYPE *_nc_TYPE_IPV4(void)
{ return(*(FIELDTYPE **)0); }
#include <locale.h>
/* ./fty_num.c */
typedef struct
{
@ -775,9 +838,11 @@ thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
/* ./fty_regex.c */
#undef _nc_TYPE_NUMERIC
FIELDTYPE *_nc_TYPE_NUMERIC(void)
{ return(*(FIELDTYPE **)0); }
#include <regex.h>
/* ./fty_regex.c */
typedef struct
{
@ -788,3 +853,7 @@ RegExp_Arg;
#undef TYPE_REGEXP
FIELDTYPE *TYPE_REGEXP;
#undef _nc_TYPE_REGEXP
FIELDTYPE *_nc_TYPE_REGEXP(void)
{ return(*(FIELDTYPE **)0); }

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2002-2010,2013 Free Software Foundation, Inc. *
* Copyright (c) 2002-2015,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 *
@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey 2002-on *
* Author: Thomas E. Dickey 2002-on *
****************************************************************************/
/* LINTLIBRARY */
@ -110,6 +110,11 @@ int set_current_field(
FIELD *field)
{ return(*(int *)0); }
#undef unfocus_current_field
int unfocus_current_field(
FORM *const form)
{ return(*(int *)0); }
#undef current_field
FIELD *current_field(
const FORM *form)
@ -458,6 +463,11 @@ int _nc_Synchronize_Options(
Field_Options newopts)
{ return(*(int *)0); }
#undef _nc_Unset_Current_Field
void _nc_Unset_Current_Field(
FORM *form)
{ /* void */ }
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
@ -687,6 +697,10 @@ alnumARG;
#undef TYPE_ALNUM
FIELDTYPE *TYPE_ALNUM;
#undef _nc_TYPE_ALNUM
FIELDTYPE *_nc_TYPE_ALNUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_alpha.c */
typedef struct
@ -698,6 +712,10 @@ alphaARG;
#undef TYPE_ALPHA
FIELDTYPE *TYPE_ALPHA;
#undef _nc_TYPE_ALPHA
FIELDTYPE *_nc_TYPE_ALPHA(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_enum.c */
typedef struct
@ -720,11 +738,49 @@ enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
#undef _nc_TYPE_ENUM
FIELDTYPE *_nc_TYPE_ENUM(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
void (*freecallback)(
void *p1))
{ return(*(FIELDTYPE **)0); }
#undef _nc_set_generic_fieldtype
int _nc_set_generic_fieldtype(
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }
/* ./fty_int.c */
@ -747,13 +803,20 @@ integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
#undef _nc_TYPE_INTEGER
FIELDTYPE *_nc_TYPE_INTEGER(void)
{ return(*(FIELDTYPE **)0); }
/* ./fty_ipv4.c */
#undef TYPE_IPV4
FIELDTYPE *TYPE_IPV4;
/* ./fty_num.c */
#undef _nc_TYPE_IPV4
FIELDTYPE *_nc_TYPE_IPV4(void)
{ return(*(FIELDTYPE **)0); }
#include <locale.h>
/* ./fty_num.c */
typedef struct
{
@ -775,9 +838,11 @@ thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
/* ./fty_regex.c */
#undef _nc_TYPE_NUMERIC
FIELDTYPE *_nc_TYPE_NUMERIC(void)
{ return(*(FIELDTYPE **)0); }
#include <regex.h>
/* ./fty_regex.c */
typedef struct
{
@ -788,3 +853,7 @@ RegExp_Arg;
#undef TYPE_REGEXP
FIELDTYPE *TYPE_REGEXP;
#undef _nc_TYPE_REGEXP
FIELDTYPE *_nc_TYPE_REGEXP(void)
{ return(*(FIELDTYPE **)0); }

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
# Copyright (c) 1998-2016,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -29,12 +29,12 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
# $Id: Caps,v 1.38 2011/10/15 23:10:18 tom Exp $
# $Id: Caps,v 1.44 2019/07/27 00:36:44 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
# This table is used to generate initializers for tables that drive tic,
# infocmp, and the library compilation code used to support the termcap
# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@ -97,7 +97,7 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
# as a terminfo object, and breaking this would be bad. It's up the ncurses
# as a terminfo object, and breaking this would be bad. It's up to the ncurses
# library what to do with the terminfo data after it's read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@ -119,14 +119,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# CONTROLLING ENTRY LENGTH
# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
# the set of keys the `joe' editor will be upset if it can't see. So don't
# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@ -147,7 +147,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
# into history and GNU termcap's application base shrinks towards being GNU
# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@ -166,7 +166,7 @@
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
@ -227,7 +227,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@ -271,7 +271,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
maximum_windows wnum num MW - - ----- maximum number of defineable windows
maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@ -719,7 +719,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@ -826,7 +826,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@ -843,9 +843,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# The `ma' capability seems to have been designed to map between the rogue(2)
# motion keys (including jkhl) and characters emitted by arrow keys on some
# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
# The `ma' capability was a 4.0BSD feature used by vi version 2.
# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@ -871,7 +871,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@ -887,7 +887,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
# in the mytinfo tables.
# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@ -936,7 +936,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
# (via IGNORE aliases further down). We don't want to do normal pad
# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@ -958,303 +958,9 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is almost all comments. What it's mainly for is to describe
# what capabilities need to be squeezed out to get down to the XSI Curses
# standard set. They are flagged with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
# IBM extensions
#
# These extensions follow ptr_non (replacing everything after it) in IBM
# terminfo files.
#
# The places in the box[12] capabilities correspond to acsc characters, here is
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
# box1[5] = ACS_LLCORNER
# box1[6] = ACS_TTEE
# box1[7] = ACS_RTEE
# box1[8] = ACS_BTEE
# box1[9] = ACS_LTEE
# box1[10] = ACS_PLUS
#
# The box2 characters are the double-line versions of these forms graphics.
#
box_chars_1 box1 str bx - - ----K box characters primary set
#box_chars_2 box2 str by - - ----K box characters secondary set
#box_attr_1 batt1 str Bx - - ----K attributes for box1
#box_attr_2 batt2 str By - - ----K attributes for box2
#color_bg_0 colb0 str d0 - - ----K background color 0
#color_bg_1 colb1 str d1 - - ----K background color 1
#color_bg_2 colb2 str d2 - - ----K background color 2
#color_bg_3 colb3 str d3 - - ----K background color 3
#color_bg_4 colb4 str d4 - - ----K background color 4
#color_bg_5 colb5 str d5 - - ----K background color 5
#color_bg_6 colb6 str d6 - - ----K background color 6
#color_bg_7 colb7 str d7 - - ----K background color 7
#color_fg_0 colf0 str c0 - - ----K foreground color 0
#color_fg_1 colf1 str c1 - - ----K foreground color 1
#color_fg_2 colf2 str c2 - - ----K foreground color 2
#color_fg_3 colf3 str c3 - - ----K foreground color 3
#color_fg_4 colf4 str c4 - - ----K foreground color 4
#color_fg_5 colf5 str c5 - - ----K foreground color 5
#color_fg_6 colf6 str c6 - - ----K foreground color 6
#color_fg_7 colf7 str c7 - - ----K foreground color 7
#font_0 font0 str f0 - - ----- select font 0
#font_1 font1 str f1 - - ----- select font 1
#font_2 font2 str f2 - - ----- select font 2
#font_3 font3 str f3 - - ----- select font 3
#font_4 font4 str f4 - - ----K select font 4
#font_5 font5 str f5 - - ----K select font 5
#font_6 font6 str f6 - - ----K select font 6
#font_7 font7 str f7 - - ----K select font 7
#key_back_tab kbtab str k0 - - ----- backtab key
#key_do kdo str ki - - ----K do request key
#key_command kcmd str kd - - ----K command-request key
#key_command_pane kcpn str kW - - ----K command-pane key
#key_end kend str kw - - ----- end key
#key_help khlp str kq - - ----- help key
#key_newline knl str nl - - ----K newline key
#key_next_pane knpn str kv - - ----K next-pane key
#key_prev_cmd kppn str kp - - ----K previous-command key
#key_prev_pane kppn str kV - - ----K previous-pane key
#key_quit kquit str kQ - - ----K quit key
#key_select ksel str kU - - ----- select key
#key_scroll_left kscl str kz - - ----K scroll left
#key_scroll_right kscr str kZ - - ----K scroll right
#key_tab ktab str ko - - ----K tab key
#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
#appl_defined_str apstr str za - - ----K application-defined string
# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
# the IBM manual pages, so the cap name strings are guesses. The terminfo
# names are almost certainly right, the termcap ones almost certainly wrong.
#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
# Undocumented capabilities end here
#key_sf1 ksf1 str S1 - - ----K special function key 1
#key_sf2 ksf2 str S2 - - ----K special function key 2
#key_sf3 ksf3 str S3 - - ----K special function key 3
#key_sf4 ksf4 str S4 - - ----K special function key 4
#key_sf5 ksf5 str S5 - - ----K special function key 5
#key_sf6 ksf6 str S6 - - ----K special function key 6
#key_sf7 ksf7 str S7 - - ----K special function key 7
#key_sf8 ksf8 str S8 - - ----K special function key 8
#key_sf9 ksf9 str S9 - - ----K special function key 9
#key_sf10 ksf10 str SA - - ----K special function key 10
# AIX version 3 documents different codes for F11, F12 and does not mention
# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
#key_f11 kf11 str k< - - ----- function key 11
#key_f12 kf12 str k> - - ----- function key 12
# Undocumented capabilities end here.
#key_action kact str kJ - - ----K sent by action key
# The IBM docs say these capabilities are for table-drawing, and are
# valid only for aixterm descriptions.
#enter_topline_mode topl str tp - - ----K start top-line mode
#enter_bottom_mode btml str bm - - ----K start bottom-line mode
#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################

View file

@ -0,0 +1,451 @@
##############################################################################
# Copyright (c) 2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
# to deal in the Software without restriction, including without limitation #
# the rights to use, copy, modify, merge, publish, distribute, distribute #
# with modifications, sublicense, and/or sell copies of the Software, and to #
# permit persons to whom the Software is furnished to do so, subject to the #
# following conditions: #
# #
# The above copyright notice and this permission notice shall be included in #
# all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
# DEALINGS IN THE SOFTWARE. #
# #
# Except as contained in this notice, the name(s) of the above copyright #
# holders shall not be used in advertising or otherwise to promote the sale, #
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
#
# Author: Thomas E. Dickey
#
# $Id: Caps-ncurses,v 1.7 2019/05/04 14:10:54 tom Exp $
#
#############################################################################
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is all comments (selected lines are copied/uncommented into
# specific "Caps" files). The section describes what capabilities need to be
# squeezed out to get down to the XSI Curses standard set. They are flagged
# with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
#
#memory_lock meml str ml - - ----K lock memory above cursor
#memory_unlock memu str mu - - ----K unlock memory
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
# IBM extensions
#
# These extensions follow ptr_non (replacing everything after it) in IBM
# terminfo files.
#
# The places in the box[12] capabilities correspond to acsc characters, here is
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
# box1[5] = ACS_LLCORNER
# box1[6] = ACS_TTEE
# box1[7] = ACS_RTEE
# box1[8] = ACS_BTEE
# box1[9] = ACS_LTEE
# box1[10] = ACS_PLUS
#
# The box2 characters are the double-line versions of these forms graphics.
#
#box_chars_1 box1 str bx - - ----K box characters primary set
#box_chars_2 box2 str by - - ----K box characters secondary set
#box_attr_1 batt1 str Bx - - ----K attributes for box1
#box_attr_2 batt2 str By - - ----K attributes for box2
#color_bg_0 colb0 str d0 - - ----K background color 0
#color_bg_1 colb1 str d1 - - ----K background color 1
#color_bg_2 colb2 str d2 - - ----K background color 2
#color_bg_3 colb3 str d3 - - ----K background color 3
#color_bg_4 colb4 str d4 - - ----K background color 4
#color_bg_5 colb5 str d5 - - ----K background color 5
#color_bg_6 colb6 str d6 - - ----K background color 6
#color_bg_7 colb7 str d7 - - ----K background color 7
#color_fg_0 colf0 str c0 - - ----K foreground color 0
#color_fg_1 colf1 str c1 - - ----K foreground color 1
#color_fg_2 colf2 str c2 - - ----K foreground color 2
#color_fg_3 colf3 str c3 - - ----K foreground color 3
#color_fg_4 colf4 str c4 - - ----K foreground color 4
#color_fg_5 colf5 str c5 - - ----K foreground color 5
#color_fg_6 colf6 str c6 - - ----K foreground color 6
#color_fg_7 colf7 str c7 - - ----K foreground color 7
#font_0 font0 str f0 - - ----- select font 0
#font_1 font1 str f1 - - ----- select font 1
#font_2 font2 str f2 - - ----- select font 2
#font_3 font3 str f3 - - ----- select font 3
#font_4 font4 str f4 - - ----K select font 4
#font_5 font5 str f5 - - ----K select font 5
#font_6 font6 str f6 - - ----K select font 6
#font_7 font7 str f7 - - ----K select font 7
#key_back_tab kbtab str k0 - - ----- backtab key
#key_do kdo str ki - - ----K do request key
#key_command kcmd str kd - - ----K command-request key
#key_command_pane kcpn str kW - - ----K command-pane key
#key_end kend str kw - - ----- end key
#key_help khlp str kq - - ----- help key
#key_newline knl str nl - - ----K newline key
#key_next_pane knpn str kv - - ----K next-pane key
#key_prev_cmd kppn str kp - - ----K previous-command key
#key_prev_pane kppn str kV - - ----K previous-pane key
#key_quit kquit str kQ - - ----K quit key
#key_select ksel str kU - - ----- select key
#key_scroll_left kscl str kz - - ----K scroll left
#key_scroll_right kscr str kZ - - ----K scroll right
#key_tab ktab str ko - - ----K tab key
#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
#appl_defined_str apstr str za - - ----K application-defined string
# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
# the IBM manual pages, so the cap name strings are guesses. The terminfo
# names are almost certainly right, the termcap ones almost certainly wrong.
#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
# Undocumented capabilities end here
#key_sf1 ksf1 str S1 - - ----K special function key 1
#key_sf2 ksf2 str S2 - - ----K special function key 2
#key_sf3 ksf3 str S3 - - ----K special function key 3
#key_sf4 ksf4 str S4 - - ----K special function key 4
#key_sf5 ksf5 str S5 - - ----K special function key 5
#key_sf6 ksf6 str S6 - - ----K special function key 6
#key_sf7 ksf7 str S7 - - ----K special function key 7
#key_sf8 ksf8 str S8 - - ----K special function key 8
#key_sf9 ksf9 str S9 - - ----K special function key 9
#key_sf10 ksf10 str SA - - ----K special function key 10
# AIX version 3 documents different codes for F11, F12 and does not mention
# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
#key_f11 kf11 str k< - - ----- function key 11
#key_f12 kf12 str k> - - ----- function key 12
# Undocumented capabilities end here.
#key_action kact str kJ - - ----K sent by action key
# The IBM docs say these capabilities are for table-drawing, and are
# valid only for aixterm descriptions.
#enter_topline_mode topl str tp - - ----K start top-line mode
#enter_bottom_mode btml str bm - - ----K start bottom-line mode
#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
# This is a table of ncurses user-definable capabilities which applications
# developers may have used. ncurses may use the table to check consistency of
# types/parameters. Applications may have defined others (such as screen's
# LP and NF), but where a standard capability is available, those alternatives
# are not listed here.
#
used_by ncurses
userdef E3 str - clears the terminal's scrollback buffer.
userdef RGB bool - use direct colors with 1/3 of color-pair bits per color.
userdef RGB num n use direct colors with given number of bits per color.
userdef RGB str - use direct colors with given bit-layout.
userdef TS str - like "tsl", but uses no parameter.
userdef U8 num n terminal does/does not support VT100 SI/SO when processing UTF-8 encoding.
userdef XM str n initialize alternate xterm mouse mode
userdef grbom str - disable real bold (not intensity bright) mode.
userdef gsbom str - enable real bold (not intensity bright) mode.
userdef xm str - mouse response, no parameters
userdef xm str n mouse response, p1 = y-ordinate
userdef xm str nn mouse response, p2 = x-ordinate
userdef xm str nnn mouse response, p3 = button
userdef xm str nnns mouse response, p4 = state, e.g., pressed or released
userdef xm str nnnsn mouse response, p5 = y-ordinate starting region
userdef xm str nnnsnn mouse response, p6 = x-ordinate starting region
userdef xm str nnnsnnn mouse response, p7 = y-ordinate ending region
userdef xm str nnnsnnnn mouse response, p8 = x-ordinate ending region
#
used_by screen
userdef AN bool - turn on autonuke.
userdef AX bool - understands ANSI set default fg/bg color (\E[39m / \E[49m).
userdef C0 str - use the string as a conversion table for font '0', like acsc.
userdef C8 bool - terminal shows bold as high-intensity colors.
userdef CE str - switch cursor-keys back to normal mode.
userdef CS str - switch cursor-keys to application mode.
userdef E0 str - switch charset 'G0' back to standard charset. Default is '\E(B'.
userdef G0 bool - terminal can deal with ISO 2022 font selection sequences.
userdef KJ str s set the encoding of the terminal.
userdef OL num n set the screen program's output buffer limit.
userdef S0 str s switch charset 'G0' to the specified charset. Default is '\E(%.'.
userdef TF bool - add missing capabilities to screen's termcap/info entry. (Set by default).
userdef WS str nn resize display. This capability has the desired width and height as arguments. SunView(tm) example: '\E[8;%d;%dt'.
userdef XC str s describe a translation of characters to strings depending on the current font.
userdef XT bool - terminal understands special xterm sequences (OSC, mouse tracking).
userdef Z0 str - change width to 132 columns.
userdef Z1 str - change width to 80 columns.
#
used_by tmux
userdef Cr str - restore the default cursor color.
userdef Cs str s set the cursor color.
userdef Csr str n change the cursor style, overriding Ss.
userdef Ms str ss store the current buffer in the host terminal's selection (clipboard).
userdef Se str - reset the cursor style to the terminal initial state.
userdef Smulx str n modify the appearance of underlines in VTE.
userdef Ss str n change the cursor style.
userdef rmxx str - reset ECMA-48 strikeout/crossed-out attributes.
userdef smxx str - set ECMA-48 strikeout/crossed-out attributes.
#
used_by xterm
userdef kDC3 str - alt delete-character
userdef kDC4 str - shift+alt delete-character
userdef kDC5 str - control delete-character
userdef kDC6 str - shift+control delete-character
userdef kDC7 str - alt+control delete-character
userdef kDN str - shift down-cursor
userdef kDN3 str - alt down-cursor
userdef kDN4 str - shift+alt down-cursor
userdef kDN5 str - control down-cursor
userdef kDN6 str - shift+control down-cursor
userdef kDN7 str - alt+control down-cursor
userdef kEND3 str - alt end
userdef kEND4 str - shift+alt end
userdef kEND5 str - control end
userdef kEND6 str - shift+control end
userdef kEND7 str - alt+control end
userdef kHOM3 str - alt home
userdef kHOM4 str - shift+alt home
userdef kHOM5 str - control home
userdef kHOM6 str - shift+control home
userdef kHOM7 str - alt+control home
userdef kIC3 str - alt insert-character
userdef kIC4 str - shift+alt insert-character
userdef kIC5 str - control insert-character
userdef kIC6 str - shift+control insert-character
userdef kIC7 str - alt+control insert-character
userdef kLFT3 str - alt left-cursor
userdef kLFT4 str - shift+alt left-cursor
userdef kLFT5 str - control left-cursor
userdef kLFT6 str - shift+control left-cursor
userdef kLFT7 str - alt+control left-cursor
userdef kNXT3 str - alt next
userdef kNXT4 str - shift+alt next
userdef kNXT5 str - control next
userdef kNXT6 str - shift+control next
userdef kNXT7 str - alt+control next
userdef kPRV3 str - alt previous
userdef kPRV4 str - shift+alt previous
userdef kPRV5 str - control previous
userdef kPRV6 str - shift+control previous
userdef kPRV7 str - alt+control previous
userdef kRIT3 str - alt right-cursor
userdef kRIT4 str - shift+alt right-cursor
userdef kRIT5 str - control right-cursor
userdef kRIT6 str - shift+control right-cursor
userdef kRIT7 str - alt+control right-cursor
userdef kUP str - shift up-cursor
userdef kUP3 str - alt up-cursor
userdef kUP4 str - shift+alt up-cursor
userdef kUP5 str - control up-cursor
userdef kUP6 str - shift+control up-cursor
userdef kUP7 str - alt+control up-cursor
userdef ka2 str - vt220-keypad extensions
userdef kb1 str - vt220-keypad extensions
userdef kb3 str - vt220-keypad extensions
userdef kc2 str - vt220-keypad extensions
#############################################################################

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2001-2010,2011 Free Software Foundation, Inc. #
# Copyright (c) 2001-2016,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,13 +28,13 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.aix4,v 1.9 2011/10/15 23:19:16 tom Exp $
# $Id: Caps.aix4,v 1.16 2019/07/27 00:36:44 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
#
# This table is used to generate initializers for tables that drive tic,
# infocmp, and the library compilation code used to support the termcap
# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@ -97,7 +97,7 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
# as a terminfo object, and breaking this would be bad. It's up the ncurses
# as a terminfo object, and breaking this would be bad. It's up to the ncurses
# library what to do with the terminfo data after it's read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@ -119,14 +119,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# CONTROLLING ENTRY LENGTH
# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
# the set of keys the `joe' editor will be upset if it can't see. So don't
# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@ -147,7 +147,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
# into history and GNU termcap's application base shrinks towards being GNU
# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@ -166,7 +166,7 @@
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
@ -227,7 +227,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@ -271,7 +271,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
maximum_windows wnum num MW - - ----- maximum number of defineable windows
maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@ -476,7 +476,7 @@ prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
@ -517,15 +517,15 @@ font_4 font4 str f4 - - ----K select font 4
font_5 font5 str f5 - - ----K select font 5
font_6 font6 str f6 - - ----K select font 6
font_7 font7 str f7 - - ----K select font 7
key_back_tab kbtab str k0 - - ----K backtab key
key_back_tab kbtab str kO - - ----K backtab key
key_do kdo str ki - - ----K do request key
key_command kcmd str kd - - ----K command-request key
key_command kcmd str @4 - - ----K command-request key
key_command_pane kcpn str kW - - ----K command-pane key
key_end kend str kw KEY_END 0550 ----- end key
key_help khlp str kq - - ----- help key
key_newline knl str nl - - ----K newline key
key_end kend str @7 KEY_END 0550 ----- end key
key_help khlp str %1 - - ----- help key
key_newline knl str kn - - ----K newline key
key_next_pane knpn str kv - - ----K next-pane key
key_prev_cmd kppn str kp - - ----K previous-command key
key_prev_cmd kpcmd str kp - - ----K previous-command key
key_prev_pane kppn str kV - - ----K previous-pane key
key_quit kquit str kQ - - ----K quit key
key_select_aix ksel str kU - - ----- select key
@ -543,13 +543,13 @@ key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
appl_defined_str apstr str za - - ----K application-defined string
key_smap_in6 kmpf6 str kr - - ----K special mapped key 6 input
key_smap_in6 kmpf6 str Kr - - ----K special mapped key 6 input
key_smap_out6 kmpt6 str KR - - ----K special mapped key 6 output
key_smap_in7 kmpf7 str ks - - ----K special mapped key 7 input
key_smap_in7 kmpf7 str Ks - - ----K special mapped key 7 input
key_smap_out7 kmpt7 str KS - - ----K special mapped key 7 output
key_smap_in8 kmpf8 str kt - - ----K special mapped key 8 input
key_smap_in8 kmpf8 str Kt - - ----K special mapped key 8 input
key_smap_out8 kmpt8 str KT - - ----K special mapped key 8 output
key_smap_in9 kmpf9 str ku - - ----K special mapped key 9 input
key_smap_in9 kmpf9 str Ku - - ----K special mapped key 9 input
key_smap_out9 kmpt9 str KU - - ----K special mapped key 9 output
key_sf1 ksf1 str S1 - - ----K special function key 1
key_sf2 ksf2 str S2 - - ----K special function key 2
@ -821,7 +821,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@ -857,13 +857,13 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
#enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
#enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
#enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
#enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
#enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
#enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
#set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
#%.TE
#%.ad
@ -928,7 +928,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@ -945,9 +945,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# The `ma' capability seems to have been designed to map between the rogue(2)
# motion keys (including jkhl) and characters emitted by arrow keys on some
# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
# The `ma' capability was a 4.0BSD feature used by vi version 2.
# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@ -973,7 +973,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@ -989,7 +989,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
# in the mytinfo tables.
# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@ -1038,7 +1038,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
# (via IGNORE aliases further down). We don't want to do normal pad
# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@ -1060,192 +1060,9 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is almost all comments. What it's mainly for is to describe
# what capabilities need to be squeezed out to get down to the XSI Curses
# standard set. They are flagged with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2002-2010,2011 Free Software Foundation, Inc. #
# Copyright (c) 2002-2016,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,13 +28,13 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.hpux11,v 1.6 2011/10/15 23:20:04 tom Exp $
# $Id: Caps.hpux11,v 1.14 2019/07/27 00:36:44 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
#
# This table is used to generate initializers for tables that drive tic,
# infocmp, and the library compilation code used to support the termcap
# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@ -97,7 +97,7 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
# as a terminfo object, and breaking this would be bad. It's up the ncurses
# as a terminfo object, and breaking this would be bad. It's up to the ncurses
# library what to do with the terminfo data after it's read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@ -119,14 +119,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# CONTROLLING ENTRY LENGTH
# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
# the set of keys the `joe' editor will be upset if it can't see. So don't
# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@ -147,7 +147,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
# into history and GNU termcap's application base shrinks towards being GNU
# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@ -166,7 +166,7 @@
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
@ -227,7 +227,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
# end booleans for HPUX 9, 10 (non-color curses)
@ -273,7 +273,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
maximum_windows wnum num MW - - ----- maximum number of defineable windows
maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@ -298,7 +298,7 @@ dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
micro_col_size mcs num Yf - - ----- character step size when in micro mode
micro_char_size mcs num Yf - - ----- character step size when in micro mode
micro_line_size mls num Yg - - ----- line step size when in micro mode
number_of_pins npins num Yh - - ----- numbers of pins in print-head
output_res_char orc num Yi - - ----- horizontal resolution in units per line
@ -727,7 +727,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@ -755,6 +755,8 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%AIX and Solaris do not provide termcap names for these; HPUX does.
#%
#%.na
#%.TS H
#%center expand;
@ -764,19 +766,19 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
set_pglen_inch slength str YI - - ----- Set page length to #1 hundredth of an inch (some implementations use sL for termcap).
enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
exit_horizontal_hl_mode rhhlm str XH - - ----K Exit horizontal highlight mode
exit_left_hl_mode rlhlm str XL - - ----K Exit left highlight mode
exit_low_hl_mode rlohlm str XO - - ----K Exit low highlight mode
exit_right_hl_mode rrhlm str XR - - ----K Exit right highlight mode
exit_top_hl_mode rthlm str XT - - ----K Exit top highlight mode
exit_vertical_hl_mode rvhlm str XV - - ----K Exit vertical highlight mode
enter_horizontal_hl_mode ehhlm str Q1 - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Q2 - - ----- Enter left highlight mode
enter_low_hl_mode elohlm str Q3 - - ----- Enter low highlight mode
enter_right_hl_mode erhlm str Q4 - - ----- Enter right highlight mode
enter_top_hl_mode ethlm str Q5 - - ----- Enter top highlight mode
enter_vertical_hl_mode evhlm str Q6 - - ----- Enter vertical highlight mode
set_a_attributes sgr1 str Q7 - - ----- Define second set of video attributes #1-#6
exit_horizontal_hl_mode rmhhlm str Q8 - - ----K Exit horizontal highlight mode
exit_left_hl_mode rmlhlm str Q9 - - ----K Exit left highlight mode
exit_low_hl_mode rmlohlm str Qa - - ----K Exit low highlight mode
exit_right_hl_mode rmrhlm str Qb - - ----K Exit right highlight mode
exit_top_hl_mode rmthlm str Qc - - ----K Exit top highlight mode
exit_vertical_hl_mode rmvhlm str Qd - - ----K Exit vertical highlight mode
#%.TE
#%.ad
#
@ -840,7 +842,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@ -857,9 +859,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# The `ma' capability seems to have been designed to map between the rogue(2)
# motion keys (including jkhl) and characters emitted by arrow keys on some
# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
# The `ma' capability was a 4.0BSD feature used by vi version 2.
# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@ -885,7 +887,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@ -901,7 +903,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
# in the mytinfo tables.
# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@ -950,7 +952,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
# (via IGNORE aliases further down). We don't want to do normal pad
# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@ -972,303 +974,8 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is almost all comments. What it's mainly for is to describe
# what capabilities need to be squeezed out to get down to the XSI Curses
# standard set. They are flagged with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
#
#memory_lock meml str ml - - ----K memory lock above
#memory_unlock memu str mu - - ----K memory unlock
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
# IBM extensions
#
# These extensions follow ptr_non (replacing everything after it) in IBM
# terminfo files.
#
# The places in the box[12] capabilities correspond to acsc characters, here is
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
# box1[5] = ACS_LLCORNER
# box1[6] = ACS_TTEE
# box1[7] = ACS_RTEE
# box1[8] = ACS_BTEE
# box1[9] = ACS_LTEE
# box1[10] = ACS_PLUS
#
# The box2 characters are the double-line versions of these forms graphics.
# (see Caps-ncurses for the complete set of comments)
#
box_chars_1 box1 str bx - - ----K box characters primary set
#box_chars_2 box2 str by - - ----K box characters secondary set
#box_attr_1 batt1 str Bx - - ----K attributes for box1
#box_attr_2 batt2 str By - - ----K attributes for box2
#color_bg_0 colb0 str d0 - - ----K background color 0
#color_bg_1 colb1 str d1 - - ----K background color 1
#color_bg_2 colb2 str d2 - - ----K background color 2
#color_bg_3 colb3 str d3 - - ----K background color 3
#color_bg_4 colb4 str d4 - - ----K background color 4
#color_bg_5 colb5 str d5 - - ----K background color 5
#color_bg_6 colb6 str d6 - - ----K background color 6
#color_bg_7 colb7 str d7 - - ----K background color 7
#color_fg_0 colf0 str c0 - - ----K foreground color 0
#color_fg_1 colf1 str c1 - - ----K foreground color 1
#color_fg_2 colf2 str c2 - - ----K foreground color 2
#color_fg_3 colf3 str c3 - - ----K foreground color 3
#color_fg_4 colf4 str c4 - - ----K foreground color 4
#color_fg_5 colf5 str c5 - - ----K foreground color 5
#color_fg_6 colf6 str c6 - - ----K foreground color 6
#color_fg_7 colf7 str c7 - - ----K foreground color 7
#font_0 font0 str f0 - - ----- select font 0
#font_1 font1 str f1 - - ----- select font 1
#font_2 font2 str f2 - - ----- select font 2
#font_3 font3 str f3 - - ----- select font 3
#font_4 font4 str f4 - - ----K select font 4
#font_5 font5 str f5 - - ----K select font 5
#font_6 font6 str f6 - - ----K select font 6
#font_7 font7 str f7 - - ----K select font 7
#key_back_tab kbtab str k0 - - ----- backtab key
#key_do kdo str ki - - ----K do request key
#key_command kcmd str kd - - ----K command-request key
#key_command_pane kcpn str kW - - ----K command-pane key
#key_end kend str kw - - ----- end key
#key_help khlp str kq - - ----- help key
#key_newline knl str nl - - ----K newline key
#key_next_pane knpn str kv - - ----K next-pane key
#key_prev_cmd kppn str kp - - ----K previous-command key
#key_prev_pane kppn str kV - - ----K previous-pane key
#key_quit kquit str kQ - - ----K quit key
#key_select ksel str kU - - ----- select key
#key_scroll_left kscl str kz - - ----K scroll left
#key_scroll_right kscr str kZ - - ----K scroll right
#key_tab ktab str ko - - ----K tab key
#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
#appl_defined_str apstr str za - - ----K application-defined string
# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
# the IBM manual pages, so the cap name strings are guesses. The terminfo
# names are almost certainly right, the termcap ones almost certainly wrong.
#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
# Undocumented capabilities end here
#key_sf1 ksf1 str S1 - - ----K special function key 1
#key_sf2 ksf2 str S2 - - ----K special function key 2
#key_sf3 ksf3 str S3 - - ----K special function key 3
#key_sf4 ksf4 str S4 - - ----K special function key 4
#key_sf5 ksf5 str S5 - - ----K special function key 5
#key_sf6 ksf6 str S6 - - ----K special function key 6
#key_sf7 ksf7 str S7 - - ----K special function key 7
#key_sf8 ksf8 str S8 - - ----K special function key 8
#key_sf9 ksf9 str S9 - - ----K special function key 9
#key_sf10 ksf10 str SA - - ----K special function key 10
# AIX version 3 documents different codes for F11, F12 and does not mention
# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
#key_f11 kf11 str k< - - ----- function key 11
#key_f12 kf12 str k> - - ----- function key 12
# Undocumented capabilities end here.
#key_action kact str kJ - - ----K sent by action key
# The IBM docs say these capabilities are for table-drawing, and are
# valid only for aixterm descriptions.
#enter_topline_mode topl str tp - - ----K start top-line mode
#enter_bottom_mode btml str bm - - ----K start bottom-line mode
#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2001-2011,2013 Free Software Foundation, Inc. #
# Copyright (c) 2001-2016,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -29,14 +29,14 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
# $Id: Caps.keys,v 1.7 2013/07/20 17:59:24 tom Exp $
# $Id: Caps.keys,v 1.13 2019/07/27 00:36:44 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
# control-modifiers applied to function and normal keys, as done on IBM pc's.
#
# This table is used to generate initializers for tables that drive tic,
# infocmp, and the library compilation code used to support the termcap
# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@ -99,7 +99,7 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
# as a terminfo object, and breaking this would be bad. It's up the ncurses
# as a terminfo object, and breaking this would be bad. It's up to the ncurses
# library what to do with the terminfo data after it's read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@ -121,14 +121,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# CONTROLLING ENTRY LENGTH
# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
# the set of keys the `joe' editor will be upset if it can't see. So don't
# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@ -149,7 +149,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
# into history and GNU termcap's application base shrinks towards being GNU
# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@ -168,7 +168,7 @@
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
@ -229,7 +229,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@ -273,7 +273,7 @@ num_labels nlab num Nl - - ----- number of labels on screen
label_height lh num lh - - ----- rows in each label
label_width lw num lw - - ----- columns in each label
max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
maximum_windows wnum num MW - - ----- maximum number of defineable windows
maximum_windows wnum num MW - - ----- maximum number of definable windows
# These came in with SVr4's color support
max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
@ -809,7 +809,7 @@ bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
bit_image_newline binel str Zz - - ----- Move to next row of the bit image
bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
color_names colornm str Yw - - ----- Give name for color #1
define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
end_bit_image_region endbi str Yy - - ----- End a bit-image region
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_page_length slines str YZ - - ----- Set page length to #1 lines
@ -916,7 +916,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@ -933,9 +933,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# The `ma' capability seems to have been designed to map between the rogue(2)
# motion keys (including jkhl) and characters emitted by arrow keys on some
# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
# The `ma' capability was a 4.0BSD feature used by vi version 2.
# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@ -961,7 +961,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@ -977,7 +977,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
# in the mytinfo tables.
# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@ -1026,7 +1026,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
# (via IGNORE aliases further down). We don't want to do normal pad
# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@ -1048,303 +1048,10 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is almost all comments. What it's mainly for is to describe
# what capabilities need to be squeezed out to get down to the XSI Curses
# standard set. They are flagged with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
# IBM extensions
#
# These extensions follow ptr_non (replacing everything after it) in IBM
# terminfo files.
#
# The places in the box[12] capabilities correspond to acsc characters, here is
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
# box1[5] = ACS_LLCORNER
# box1[6] = ACS_TTEE
# box1[7] = ACS_RTEE
# box1[8] = ACS_BTEE
# box1[9] = ACS_LTEE
# box1[10] = ACS_PLUS
#
# The box2 characters are the double-line versions of these forms graphics.
#
box_chars_1 box1 str bx - - ----K box characters primary set
#box_chars_2 box2 str by - - ----K box characters secondary set
#box_attr_1 batt1 str Bx - - ----K attributes for box1
#box_attr_2 batt2 str By - - ----K attributes for box2
#color_bg_0 colb0 str d0 - - ----K background color 0
#color_bg_1 colb1 str d1 - - ----K background color 1
#color_bg_2 colb2 str d2 - - ----K background color 2
#color_bg_3 colb3 str d3 - - ----K background color 3
#color_bg_4 colb4 str d4 - - ----K background color 4
#color_bg_5 colb5 str d5 - - ----K background color 5
#color_bg_6 colb6 str d6 - - ----K background color 6
#color_bg_7 colb7 str d7 - - ----K background color 7
#color_fg_0 colf0 str c0 - - ----K foreground color 0
#color_fg_1 colf1 str c1 - - ----K foreground color 1
#color_fg_2 colf2 str c2 - - ----K foreground color 2
#color_fg_3 colf3 str c3 - - ----K foreground color 3
#color_fg_4 colf4 str c4 - - ----K foreground color 4
#color_fg_5 colf5 str c5 - - ----K foreground color 5
#color_fg_6 colf6 str c6 - - ----K foreground color 6
#color_fg_7 colf7 str c7 - - ----K foreground color 7
#font_0 font0 str f0 - - ----- select font 0
#font_1 font1 str f1 - - ----- select font 1
#font_2 font2 str f2 - - ----- select font 2
#font_3 font3 str f3 - - ----- select font 3
#font_4 font4 str f4 - - ----K select font 4
#font_5 font5 str f5 - - ----K select font 5
#font_6 font6 str f6 - - ----K select font 6
#font_7 font7 str f7 - - ----K select font 7
#key_back_tab kbtab str k0 - - ----- backtab key
#key_do kdo str ki - - ----K do request key
#key_command kcmd str kd - - ----K command-request key
#key_command_pane kcpn str kW - - ----K command-pane key
#key_end kend str kw - - ----- end key
#key_help khlp str kq - - ----- help key
#key_newline knl str nl - - ----K newline key
#key_next_pane knpn str kv - - ----K next-pane key
#key_prev_cmd kppn str kp - - ----K previous-command key
#key_prev_pane kppn str kV - - ----K previous-pane key
#key_quit kquit str kQ - - ----K quit key
#key_select ksel str kU - - ----- select key
#key_scroll_left kscl str kz - - ----K scroll left
#key_scroll_right kscr str kZ - - ----K scroll right
#key_tab ktab str ko - - ----K tab key
#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
#appl_defined_str apstr str za - - ----K application-defined string
# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
# the IBM manual pages, so the cap name strings are guesses. The terminfo
# names are almost certainly right, the termcap ones almost certainly wrong.
#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
# Undocumented capabilities end here
#key_sf1 ksf1 str S1 - - ----K special function key 1
#key_sf2 ksf2 str S2 - - ----K special function key 2
#key_sf3 ksf3 str S3 - - ----K special function key 3
#key_sf4 ksf4 str S4 - - ----K special function key 4
#key_sf5 ksf5 str S5 - - ----K special function key 5
#key_sf6 ksf6 str S6 - - ----K special function key 6
#key_sf7 ksf7 str S7 - - ----K special function key 7
#key_sf8 ksf8 str S8 - - ----K special function key 8
#key_sf9 ksf9 str S9 - - ----K special function key 9
#key_sf10 ksf10 str SA - - ----K special function key 10
# AIX version 3 documents different codes for F11, F12 and does not mention
# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
#key_f11 kf11 str k< - - ----- function key 11
#key_f12 kf12 str k> - - ----- function key 12
# Undocumented capabilities end here.
#key_action kact str kJ - - ----K sent by action key
# The IBM docs say these capabilities are for table-drawing, and are
# valid only for aixterm descriptions.
#enter_topline_mode topl str tp - - ----K start top-line mode
#enter_bottom_mode btml str bm - - ----K start bottom-line mode
#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2002-2010,2011 Free Software Foundation, Inc. #
# Copyright (c) 2002-2016,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,13 +28,13 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.osf1r5,v 1.6 2011/10/15 22:52:09 tom Exp $
# $Id: Caps.osf1r5,v 1.12 2019/07/27 00:36:44 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
#
# This table is used to generate initializers for tables that drive tic,
# infocmp, and the library compilation code used to support the termcap
# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@ -97,7 +97,7 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
# as a terminfo object, and breaking this would be bad. It's up the ncurses
# as a terminfo object, and breaking this would be bad. It's up to the ncurses
# library what to do with the terminfo data after it's read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@ -119,14 +119,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# CONTROLLING ENTRY LENGTH
# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
# the set of keys the `joe' editor will be upset if it can't see. So don't
# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@ -147,7 +147,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
# into history and GNU termcap's application base shrinks towards being GNU
# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@ -166,7 +166,7 @@
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
@ -227,7 +227,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
back_color_erase bce bool ut - - ----- screen erased with background color
@ -280,7 +280,7 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
maximum_windows wnum num MW - - ----- maximum number of defineable windows
maximum_windows wnum num MW - - ----- maximum number of definable windows
micro_col_size mcs num Yf - - ----- character step size when in micro mode
micro_line_size mls num Yg - - ----- line step size when in micro mode
no_color_video ncv num NC - - ----- video attributes that can not be used with colors
@ -574,7 +574,7 @@ clr_bol el1 str cb - - ----- Clear to beginning of line
code_set_init csin str ci - - ----- Init sequence for multiple codesets
color_names colornm str Yw - - ----- Give name for color #1
create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
define_bit_image_region defbi str Yx - - ----- Define rectangular bit image region
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
device_type devt str dv - - ----- Indicate language/codeset support
dial_phone dial str DI - - ----- dial number #1
@ -834,7 +834,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@ -851,9 +851,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# The `ma' capability seems to have been designed to map between the rogue(2)
# motion keys (including jkhl) and characters emitted by arrow keys on some
# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
# The `ma' capability was a 4.0BSD feature used by vi version 2.
# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@ -879,7 +879,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@ -895,7 +895,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
# in the mytinfo tables.
# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@ -944,7 +944,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
# (via IGNORE aliases further down). We don't want to do normal pad
# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@ -966,303 +966,9 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is almost all comments. What it's mainly for is to describe
# what capabilities need to be squeezed out to get down to the XSI Curses
# standard set. They are flagged with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
# IBM extensions
#
# These extensions follow ptr_non (replacing everything after it) in IBM
# terminfo files.
#
# The places in the box[12] capabilities correspond to acsc characters, here is
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
# box1[5] = ACS_LLCORNER
# box1[6] = ACS_TTEE
# box1[7] = ACS_RTEE
# box1[8] = ACS_BTEE
# box1[9] = ACS_LTEE
# box1[10] = ACS_PLUS
#
# The box2 characters are the double-line versions of these forms graphics.
#
#box_chars_1 box1 str bx - - ----K box characters primary set
#box_chars_2 box2 str by - - ----K box characters secondary set
#box_attr_1 batt1 str Bx - - ----K attributes for box1
#box_attr_2 batt2 str By - - ----K attributes for box2
#color_bg_0 colb0 str d0 - - ----K background color 0
#color_bg_1 colb1 str d1 - - ----K background color 1
#color_bg_2 colb2 str d2 - - ----K background color 2
#color_bg_3 colb3 str d3 - - ----K background color 3
#color_bg_4 colb4 str d4 - - ----K background color 4
#color_bg_5 colb5 str d5 - - ----K background color 5
#color_bg_6 colb6 str d6 - - ----K background color 6
#color_bg_7 colb7 str d7 - - ----K background color 7
#color_fg_0 colf0 str c0 - - ----K foreground color 0
#color_fg_1 colf1 str c1 - - ----K foreground color 1
#color_fg_2 colf2 str c2 - - ----K foreground color 2
#color_fg_3 colf3 str c3 - - ----K foreground color 3
#color_fg_4 colf4 str c4 - - ----K foreground color 4
#color_fg_5 colf5 str c5 - - ----K foreground color 5
#color_fg_6 colf6 str c6 - - ----K foreground color 6
#color_fg_7 colf7 str c7 - - ----K foreground color 7
#font_0 font0 str f0 - - ----- select font 0
#font_1 font1 str f1 - - ----- select font 1
#font_2 font2 str f2 - - ----- select font 2
#font_3 font3 str f3 - - ----- select font 3
#font_4 font4 str f4 - - ----K select font 4
#font_5 font5 str f5 - - ----K select font 5
#font_6 font6 str f6 - - ----K select font 6
#font_7 font7 str f7 - - ----K select font 7
#key_back_tab kbtab str k0 - - ----- backtab key
#key_do kdo str ki - - ----K do request key
#key_command kcmd str kd - - ----K command-request key
#key_command_pane kcpn str kW - - ----K command-pane key
#key_end kend str kw - - ----- end key
#key_help khlp str kq - - ----- help key
#key_newline knl str nl - - ----K newline key
#key_next_pane knpn str kv - - ----K next-pane key
#key_prev_cmd kppn str kp - - ----K previous-command key
#key_prev_pane kppn str kV - - ----K previous-pane key
#key_quit kquit str kQ - - ----K quit key
#key_select ksel str kU - - ----- select key
#key_scroll_left kscl str kz - - ----K scroll left
#key_scroll_right kscr str kZ - - ----K scroll right
#key_tab ktab str ko - - ----K tab key
#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
#appl_defined_str apstr str za - - ----K application-defined string
# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
# the IBM manual pages, so the cap name strings are guesses. The terminfo
# names are almost certainly right, the termcap ones almost certainly wrong.
#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
# Undocumented capabilities end here
#key_sf1 ksf1 str S1 - - ----K special function key 1
#key_sf2 ksf2 str S2 - - ----K special function key 2
#key_sf3 ksf3 str S3 - - ----K special function key 3
#key_sf4 ksf4 str S4 - - ----K special function key 4
#key_sf5 ksf5 str S5 - - ----K special function key 5
#key_sf6 ksf6 str S6 - - ----K special function key 6
#key_sf7 ksf7 str S7 - - ----K special function key 7
#key_sf8 ksf8 str S8 - - ----K special function key 8
#key_sf9 ksf9 str S9 - - ----K special function key 9
#key_sf10 ksf10 str SA - - ----K special function key 10
# AIX version 3 documents different codes for F11, F12 and does not mention
# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
#key_f11 kf11 str k< - - ----- function key 11
#key_f12 kf12 str k> - - ----- function key 12
# Undocumented capabilities end here.
#key_action kact str kJ - - ----K sent by action key
# The IBM docs say these capabilities are for table-drawing, and are
# valid only for aixterm descriptions.
#enter_topline_mode topl str tp - - ----K start top-line mode
#enter_bottom_mode btml str bm - - ----K start bottom-line mode
#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
# Copyright (c) 2001-2016,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,13 +28,13 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.uwin,v 1.5 2010/12/04 18:49:20 tom Exp $
# $Id: Caps.uwin,v 1.11 2019/07/27 00:36:44 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
#
# This table is used to generate initializers for tables that drive tic,
# infocmp, and the library compilation code used to support the termcap
# infocmp, and the library compilation code used to support the termcap
# compatibility hack. It is also used to generate the tabular portion of the
# terminfo(5) man page; lines beginning with `#%' are passed through to become
# the terminfo table.
@ -97,7 +97,7 @@
# 3. List it in the standard table. You almost certainly do *not* want
# to do this -- the capabilities in that one, and their order, have been
# carefully chosen to be SVr4-binary-compatible when they're written out
# as a terminfo object, and breaking this would be bad. It's up the ncurses
# as a terminfo object, and breaking this would be bad. It's up to the ncurses
# library what to do with the terminfo data after it's read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
@ -119,14 +119,14 @@
# You'll need to write custom code, probably in postprocess_termcap() or
# postprocess_terminfo(), to handle the translation.
#
# CONTROLLING ENTRY LENGTH
# CONTROLLING ENTRY LENGTH
#
# Notes on specific elisions made to fit translations within 1023 bytes:
#
# Machines with IBM PC-like keyboards want to be able to define the following
# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
# only environments for End or Home-Down), key_dc, and key_ic. This is also
# the set of keys the `joe' editor will be upset if it can't see. So don't
# the set of keys the `joe' editor will be upset if it can't see. So don't
# trim those out of the set to be translated to termcap, or various users of
# the termcap file will become irate.
#
@ -147,7 +147,7 @@
#
# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
# translations go back over critical if we do this. As 4.4BSD curses fades
# into history and GNU termcap's application base shrinks towards being GNU
# into history and GNU termcap's application base shrinks towards being GNU
# Emacs only, we'll probably elide out some BSD-only capabilities in order
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
@ -166,7 +166,7 @@
#%The \fBcapname\fR is the short name used in the text of the database,
#%and is used by a person updating the database.
#%Whenever possible, capnames are chosen to be the same as or similar to
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
@ -227,7 +227,7 @@ move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
over_strike os bool os - - YBCG- terminal can overstrike
status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
tilde_glitch hz bool hz - - YB-GE cannot print ~'s (Hazeltine)
transparent_underline ul bool ul - - YBCGE underline character overstrikes
xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
@ -650,7 +650,7 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# GNU termcap *does* include the following extended capability, Only the
# now-obsolete Ann Arbor terminals used it.
#
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
#
# The following comments describe capnames so ancient that I believe no
# software uses them any longer. Some of these have to go because they
@ -667,9 +667,9 @@ gnu_has_meta_key OTMT bool MT - - ----E has meta key
# comma-separated list of capabilities for which there are corresponding keys.
# The `kn' code is accepted but ignored.
#
# The `ma' capability seems to have been designed to map between the rogue(2)
# motion keys (including jkhl) and characters emitted by arrow keys on some
# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
# The `ma' capability was a 4.0BSD feature used by vi version 2.
# It consists of pairs of characters corresponding to kl, kr, ku, kd, and kh.
# Besides being obsolete, that interpretation conflicts with max_attributes.
#
# Here is a description of memory_lock_above and memory_unlock:
# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
@ -695,7 +695,7 @@ horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
number_of_function_keys OTkn num kn - - -B-G- count of function keys
other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
arrow_key_map OTma str ma - - YBC-- map motion-keys for vi version 2
# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
@ -711,7 +711,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# University of Waterloo termcap extensions (as described in mytinfo).
# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
# be resolved by a type check. The descriptions are guesses from what was
# in the mytinfo tables.
# in the mytinfo tables.
#
# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
# key_kill_char OTkk str kk - - ----- string set by kill key (?)
@ -760,7 +760,7 @@ return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# Gv 186 \272 M-: double vertical line
#
# The compiler will translate the single-line caps and discard the others
# (via IGNORE aliases further down). We don't want to do normal pad
# (via IGNORE aliases further down). We don't want to do normal pad
# translation on these, they're often single-character printable ASCII
# strings that happen to be numerics. There's awk code in parametrized.sh
# that detects the acs_ prefix and uses it to suppress pad translation.
@ -782,303 +782,10 @@ acs_plus OTGC str GC - - ----- single intersection
#
# TERMINFO EXTENSION CAPABILITIES
#
# This section is almost all comments. What it's mainly for is to describe
# what capabilities need to be squeezed out to get down to the XSI Curses
# standard set. They are flagged with K.
#
# HP extensions
#
# These extensions follow ptr_non (replacing everything after it) in HP
# terminfo files. Except for memory_lock and memory_unlock, they are
# functionally identical to SVr4 extensions, but they make the binary format
# different. Grrr....
# (see Caps-ncurses for the complete set of comments)
#
memory_lock meml str ml - - ----K lock memory above cursor
memory_unlock memu str mu - - ----K unlock memory
#plab_norm pln str pn - - ----- program label #1 to show string #2
#label_on smln str LO - - ----- turn on soft labels
#label_off rmln str LF - - ----- turn off soft labels
#key_f11 kf11 str F1 - - ----- F11 function key
#key_f12 kf12 str F2 - - ----- F12 function key
#key_f13 kf13 str F3 - - ----- F13 function key
#key_f14 kf14 str F4 - - ----- F14 function key
#key_f15 kf15 str F5 - - ----- F15 function key
#key_f16 kf16 str F6 - - ----- F16 function key
#key_f17 kf17 str F7 - - ----- F17 function key
#key_f18 kf18 str F8 - - ----- F18 function key
#key_f19 kf19 str F9 - - ----- F19 function key
#key_f20 kf20 str FA - - ----- F20 function key
#key_f21 kf21 str FB - - ----- F21 function key
#key_f22 kf22 str FC - - ----- F22 function key
#key_f23 kf23 str FD - - ----- F23 function key
#key_f24 kf24 str FE - - ----- F24 function key
#key_f25 kf25 str FF - - ----- F25 function key
#key_f26 kf26 str FG - - ----- F26 function key
#key_f27 kf27 str FH - - ----- F27 function key
#key_f28 kf28 str FI - - ----- F28 function key
#key_f29 kf29 str FJ - - ----- F29 function key
#key_f30 kf30 str FK - - ----- F30 function key
#key_f31 kf31 str FL - - ----- F31 function key
#key_f32 kf32 str FM - - ----- F32 function key
#key_f33 kf33 str FN - - ----- F33 function key
#key_f34 kf34 str FO - - ----- F34 function key
#key_f35 kf35 str FP - - ----- F35 function key
#key_f36 kf36 str FQ - - ----- F36 function key
#key_f37 kf37 str FR - - ----- F37 function key
#key_f38 kf38 str FS - - ----- F38 function key
#key_f39 kf39 str FT - - ----- F39 function key
#key_f40 kf40 str FU - - ----- F40 function key
#key_f41 kf41 str FV - - ----- F41 function key
#key_f42 kf42 str FW - - ----- F42 function key
#key_f43 kf43 str FX - - ----- F43 function key
#key_f44 kf44 str FY - - ----- F44 function key
#key_f45 kf45 str FZ - - ----- F45 function key
#key_f46 kf46 str Fa - - ----- F46 function key
#key_f47 kf47 str Fb - - ----- F47 function key
#key_f48 kf48 str Fc - - ----- F48 function key
#key_f49 kf49 str Fd - - ----- F49 function key
#key_f50 kf50 str Fe - - ----- F50 function key
#key_f51 kf51 str Ff - - ----- F51 function key
#key_f52 kf52 str Fg - - ----- F52 function key
#key_f53 kf53 str Fh - - ----- F53 function key
#key_f54 kf54 str Fi - - ----- F54 function key
#key_f55 kf55 str Fj - - ----- F55 function key
#key_f56 kf56 str Fk - - ----- F56 function key
#key_f57 kf57 str Fl - - ----- F57 function key
#key_f58 kf58 str Fm - - ----- F58 function key
#key_f59 kf59 str Fn - - ----- F59 function key
#key_f60 kf60 str Fo - - ----- F60 function key
#key_f61 kf61 str Fp - - ----- F61 function key
#key_f62 kf62 str Fq - - ----- F62 function key
#key_f63 kf63 str Fr - - ----- F63 function key
#
# IBM extensions
#
# These extensions follow ptr_non (replacing everything after it) in IBM
# terminfo files.
#
# The places in the box[12] capabilities correspond to acsc characters, here is
# the mapping:
#
# box1[0] = ACS_ULCORNER
# box1[1] = ACS_HLINE
# box1[2] = ACS_URCORNER
# box1[3] = ACS_VLINE
# box1[4] = ACS_LRCORNER
# box1[5] = ACS_LLCORNER
# box1[6] = ACS_TTEE
# box1[7] = ACS_RTEE
# box1[8] = ACS_BTEE
# box1[9] = ACS_LTEE
# box1[10] = ACS_PLUS
#
# The box2 characters are the double-line versions of these forms graphics.
#
box_chars_1 box1 str bx - - ----K box characters primary set
#box_chars_2 box2 str by - - ----K box characters secondary set
#box_attr_1 batt1 str Bx - - ----K attributes for box1
#box_attr_2 batt2 str By - - ----K attributes for box2
#color_bg_0 colb0 str d0 - - ----K background color 0
#color_bg_1 colb1 str d1 - - ----K background color 1
#color_bg_2 colb2 str d2 - - ----K background color 2
#color_bg_3 colb3 str d3 - - ----K background color 3
#color_bg_4 colb4 str d4 - - ----K background color 4
#color_bg_5 colb5 str d5 - - ----K background color 5
#color_bg_6 colb6 str d6 - - ----K background color 6
#color_bg_7 colb7 str d7 - - ----K background color 7
#color_fg_0 colf0 str c0 - - ----K foreground color 0
#color_fg_1 colf1 str c1 - - ----K foreground color 1
#color_fg_2 colf2 str c2 - - ----K foreground color 2
#color_fg_3 colf3 str c3 - - ----K foreground color 3
#color_fg_4 colf4 str c4 - - ----K foreground color 4
#color_fg_5 colf5 str c5 - - ----K foreground color 5
#color_fg_6 colf6 str c6 - - ----K foreground color 6
#color_fg_7 colf7 str c7 - - ----K foreground color 7
#font_0 font0 str f0 - - ----- select font 0
#font_1 font1 str f1 - - ----- select font 1
#font_2 font2 str f2 - - ----- select font 2
#font_3 font3 str f3 - - ----- select font 3
#font_4 font4 str f4 - - ----K select font 4
#font_5 font5 str f5 - - ----K select font 5
#font_6 font6 str f6 - - ----K select font 6
#font_7 font7 str f7 - - ----K select font 7
#key_back_tab kbtab str k0 - - ----- backtab key
#key_do kdo str ki - - ----K do request key
#key_command kcmd str kd - - ----K command-request key
#key_command_pane kcpn str kW - - ----K command-pane key
#key_end kend str kw - - ----- end key
#key_help khlp str kq - - ----- help key
#key_newline knl str nl - - ----K newline key
#key_next_pane knpn str kv - - ----K next-pane key
#key_prev_cmd kppn str kp - - ----K previous-command key
#key_prev_pane kppn str kV - - ----K previous-pane key
#key_quit kquit str kQ - - ----K quit key
#key_select ksel str kU - - ----- select key
#key_scroll_left kscl str kz - - ----K scroll left
#key_scroll_right kscr str kZ - - ----K scroll right
#key_tab ktab str ko - - ----K tab key
#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
#appl_defined_str apstr str za - - ----K application-defined string
# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
# the IBM manual pages, so the cap name strings are guesses. The terminfo
# names are almost certainly right, the termcap ones almost certainly wrong.
#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
# Undocumented capabilities end here
#key_sf1 ksf1 str S1 - - ----K special function key 1
#key_sf2 ksf2 str S2 - - ----K special function key 2
#key_sf3 ksf3 str S3 - - ----K special function key 3
#key_sf4 ksf4 str S4 - - ----K special function key 4
#key_sf5 ksf5 str S5 - - ----K special function key 5
#key_sf6 ksf6 str S6 - - ----K special function key 6
#key_sf7 ksf7 str S7 - - ----K special function key 7
#key_sf8 ksf8 str S8 - - ----K special function key 8
#key_sf9 ksf9 str S9 - - ----K special function key 9
#key_sf10 ksf10 str SA - - ----K special function key 10
# AIX version 3 documents different codes for F11, F12 and does not mention
# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
#key_f11 kf11 str k< - - ----- function key 11
#key_f12 kf12 str k> - - ----- function key 12
# Undocumented capabilities end here.
#key_action kact str kJ - - ----K sent by action key
# The IBM docs say these capabilities are for table-drawing, and are
# valid only for aixterm descriptions.
#enter_topline_mode topl str tp - - ----K start top-line mode
#enter_bottom_mode btml str bm - - ----K start bottom-line mode
#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
#
#############################################################################
#
# ALIAS DECLARATIONS
#
# Here we set up aliases for translating extensions into standard terminfo.
#
#---------------------------------- Termcap aliases -------------------------
#
# BSD aliases:
#
# This is a common error in many termcap files. We'll get notified during
# translation when this (or any other alias) fires.
#
capalias sb sr BSD scroll text down
#
# AT&T extensions:
#
# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
# nonstandard capabilities. Its signature is the KM capability, used to name
# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
# set. Comments in the original, and a little cross-checking with other AT&T
# documentation, seem to establish the following mappings:
#
capalias BO mr AT&T enter_reverse_mode
capalias CI vi AT&T cursor_invisible
capalias CV ve AT&T cursor_normal
capalias DS mh AT&T enter_dim_mode
#capalias EE me AT&T exit_attribute_mode
capalias FE LF AT&T label_on
capalias FL LO AT&T label_off
capalias XS mk AT&T enter_secure_mode
#
# We comment out EE because the conflicting XENIX EE is more common in
# old entries.
#
# XENIX extensions:
#
# These are the ones we know how to translate directly:
#
capalias EE mh XENIX exit_attribute_mode
capalias GE ae XENIX exit_alt_charset_mode
capalias GS as XENIX enter_alt_charset_mode
capalias CF vi XENIX cursor_invis
capalias CO ve XENIX cursor_normal
capalias EN @7 XENIX key_end
capalias HM kh XENIX key_home
capalias LD kL XENIX key_dl
capalias PD kN XENIX key_npage
capalias PN po XENIX prtr_off
capalias PS pf XENIX prtr_on
capalias PU kP XENIX key_ppage
capalias RT @8 XENIX kent
capalias UP ku XENIX kcuu1
capalias G6 IGNORE XENIX double-ACS_ULCORNER
capalias G7 IGNORE XENIX double-ACS_LLCORNER
capalias G5 IGNORE XENIX double-ACS_URCORNER
capalias G8 IGNORE XENIX double-ACS_LRCORNER
capalias Gr IGNORE XENIX double-ACS_LTEE
capalias Gr IGNORE XENIX double-ACS_RTEE
capalias Gu IGNORE XENIX double-ACS_BTEE
capalias Gd IGNORE XENIX double ACS_TTEE
capalias Gh IGNORE XENIX double-ACS_HLINE
capalias Gv IGNORE XENIX double-ACS_VLINE
capalias Gc IGNORE XENIX double-ACS_PLUS
capalias GG IGNORE XENIX acs-glitch
#
# IBM extensions:
#
capalias kq %1 IBM key_help
#
# Iris extensions:
#
capalias HS mh IRIS enter_dim_mode
#
# Tektronix extensions:
#
capalias KA k; Tek key_f10
capalias KB F1 Tek key_f11
capalias KC F2 Tek key_f12
capalias KD F3 Tek key_f13
capalias KE F4 Tek key_f14
capalias KF F5 Tek key_f15
capalias BC Sb Tek set_background
capalias FC Sf Tek set_foreground
#
# There are also the following:
#
# XENIX XENIX variable name name clash with terminfo?
# ----- ------------------- -------------------------
# CL key_char_left
# CR key_char_right
# CW key_change_window
# HP ??
# LF key_linefeed label_off
# NU key_next_unlocked_cell
# PL ??
# PR ??
# RC key_recalc remove_clock
# RF key_toggle_ref req_for_input
# WL key_word_left
# WR key_word_right
#
# If you know what any of the question-marked ones mean, please tell us.
#
#--------------------------------- Terminfo aliases ------------------------
#
# IBM extensions:
#
infoalias font0 s0ds IBM set0_des_seq
infoalias font1 s1ds IBM set1_des_seq
infoalias font2 s2ds IBM set2_des_seq
infoalias font3 s3ds IBM set3_des_seq
infoalias kbtab kcbt IBM key_backtab
infoalias ksel kslt IBM key_select
#
# Some others are identical to SVr4/XPG4 capabilities, in particular:
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################

View file

@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
# Copyright (c) 1998,2006 Free Software Foundation, Inc. #
# Copyright (c) 1998-2006,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: MKhashsize.sh,v 1.7 2006/10/22 00:45:39 tom Exp $
# $Id: MKhashsize.sh,v 1.8 2019/04/06 22:53:17 tom Exp $
#
# MKhashsize.sh --- generate size include for hash functions
#
@ -34,8 +34,8 @@ echo "/*"
echo " * hashsize.h -- hash and token table constants"
echo " */"
CAPS="${1-Caps}"
TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
test $# = 0 && set Caps
TABSIZE=`cat "$@" | grep -v '^[ #]' | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | grep -v "^userdef" | grep -v "^used_by" | wc -l`
echo ""
echo "#define CAPTABSIZE ${TABSIZE}"

View file

@ -1,7 +1,7 @@
#! /bin/sh
# $Id: MKkey_defs.sh,v 1.15 2013/03/09 16:32:01 tom Exp $
# $Id: MKkey_defs.sh,v 1.18 2019/04/06 23:38:16 tom Exp $
##############################################################################
# Copyright (c) 2001-2003,2013 Free Software Foundation, Inc. #
# Copyright (c) 2001-2017,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -35,25 +35,26 @@
# Extract function-key definitions from the Caps file
#
: ${AWK-awk}
DATA=${1-Caps}
test $# = 0 && set Caps
data=data$$
pass1=pass1_$$
pass2=pass2_$$
pass3=pass3_$$
pass4=pass4_$$
trap 'rm -f $data pass[1234]_$$' 0 1 2 5 15
trap 'rm -f $data pass[1234]_$$' EXIT INT QUIT TERM HUP
# change repeated tabs (used for readability) to single tabs (needed to make
# awk see the right field alignment of the corresponding columns):
if sort -k 6 $DATA >$data 2>/dev/null
if sort -k 6 "$@" >$data 2>/dev/null
then
# POSIX
sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n -k 6 >$data
elif sort -n +5 $DATA >$data 2>/dev/null
sed -e 's/[ ][ ]*/ /g' "$@" |sort -n -k 6 >$data
elif sort -n +5 "$@" >$data 2>/dev/null
then
# SunOS (and SVr4, marked as obsolete but still recognized)
sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n +5 >$data
sed -e 's/[ ][ ]*/ /g' "$@" |sort -n +5 >$data
else
echo "Your sort utility is broken. Please install one that works." >&2
exit 1
@ -66,11 +67,10 @@ key_event kv1 str V1 KEY_EVENT + ----- We were interrupted by an event
EOF
THIS=./`basename $0`
PARM=./`basename $DATA`
cat <<EOF
/*
* These definitions were generated by $THIS $PARM
* These definitions were generated by $THIS $*
*/
EOF
@ -124,6 +124,8 @@ BEGIN {
/^#/ {next;}
/^capalias/ {next;}
/^infoalias/ {next;}
/^used_by/ {next;}
/^userdef/ {next;}
$5 != "-" && $6 != "-" {
if ($6 == "+") {

View file

@ -1,7 +1,7 @@
#! /bin/sh
# $Id: MKncurses_def.sh,v 1.2 2003/10/25 16:19:46 tom Exp $
# $Id: MKncurses_def.sh,v 1.3 2003/10/25 16:19:46 tom Exp $
##############################################################################
# Copyright (c) 2000 Free Software Foundation, Inc. #
# Copyright (c) 2000,2003 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #

View file

@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
# Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. #
# Copyright (c) 1998-2017,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -26,15 +26,18 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: MKparametrized.sh,v 1.6 2006/04/22 21:36:16 tom Exp $
# $Id: MKparametrized.sh,v 1.9 2019/04/13 20:36:24 tom Exp $
#
# MKparametrized.sh -- generate indirection vectors for various sort methods
#
# The output of this script is C source for an array specifying whether
# termcap strings should undergo parameter and padding translation.
#
CAPS="${1-Caps}"
[ $# = 0 ] && set - Caps
cat <<EOF
#ifndef PARAMETRIZED_H
#define PARAMETRIZED_H 1
/*
* parametrized.h --- is a termcap capability parametrized?
*
@ -52,11 +55,20 @@ EOF
# XENIX acs_* capabilities. Maybe someday we'll dedicate a flag field for
# this, that would be cleaner....
${AWK-awk} <$CAPS '
$3 != "str" {next;}
$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
$0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
{print "0,\t/* ", $2, " */"; count++;}
END {printf("} /* %d entries */;\n\n", count);}
cat "$@" | ${AWK-awk} '
/^#/ { next ; }
/^capalias/ { next ; }
/^infoalias/ { next ; }
/^used_by/ { next ; }
/^userdef/ { next ; }
$3 != "str" {next;}
$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
$1 ~ /^label_format/ {print "-1,\t/* ", $2, " */"; count++; next;}
$0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
{print "0,\t/* ", $2, " */"; count++;}
END {printf("} /* %d entries */;\n\n", count);}
'
echo "#endif /* PARAMETRIZED_H */"

View file

@ -1,334 +1,390 @@
# vile:awkmode
BEGIN {
print "/****************************************************************************"
print " * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
print " * copy of this software and associated documentation files (the *"
print " * \"Software\"), to deal in the Software without restriction, including *"
print " * without limitation the rights to use, copy, modify, merge, publish, *"
print " * distribute, distribute with modifications, sublicense, and/or sell *"
print " * copies of the Software, and to permit persons to whom the Software is *"
print " * furnished to do so, subject to the following conditions: *"
print " * *"
print " * The above copyright notice and this permission notice shall be included *"
print " * in all copies or substantial portions of the Software. *"
print " * *"
print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
print " * *"
print " * Except as contained in this notice, the name(s) of the above copyright *"
print " * holders shall not be used in advertising or otherwise to promote the *"
print " * sale, use or other dealings in this Software without prior written *"
print " * authorization. *"
print " ****************************************************************************/"
print ""
print "/****************************************************************************/"
print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
print "/* $Id: MKterm.h.awk.in,v 1.62 2013/08/17 19:21:56 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
print "*/"
print ""
print "#ifndef NCURSES_TERM_H_incl"
print "#define NCURSES_TERM_H_incl 1"
print ""
print "#undef NCURSES_VERSION"
print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
print ""
print "#include <ncurses_dll.h>"
print ""
print "#ifdef __cplusplus"
print "extern \"C\" {"
print "#endif"
print ""
print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
print " * definition (based on the system for which this was configured)."
print " */"
print ""
print "#undef NCURSES_CONST"
print "#define NCURSES_CONST @NCURSES_CONST@"
print ""
print "#undef NCURSES_SBOOL"
print "#define NCURSES_SBOOL @NCURSES_SBOOL@"
print ""
print "#undef NCURSES_USE_DATABASE"
print "#define NCURSES_USE_DATABASE @NCURSES_USE_DATABASE@"
print ""
print "#undef NCURSES_USE_TERMCAP"
print "#define NCURSES_USE_TERMCAP @NCURSES_USE_TERMCAP@"
print ""
print "#undef NCURSES_XNAMES"
print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
print ""
print "/* We will use these symbols to hide differences between"
print " * termios/termio/sgttyb interfaces."
print " */"
print "#undef TTY"
print "#undef SET_TTY"
print "#undef GET_TTY"
print ""
print "/* Assume POSIX termio if we have the header and function */"
print "/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */"
print "#if @HAVE_TERMIOS_H@ && @HAVE_TCGETATTR@"
print ""
print "#undef TERMIOS"
print "#define TERMIOS 1"
print ""
print "#include <termios.h>"
print "#define TTY struct termios"
print ""
print "#else /* !HAVE_TERMIOS_H */"
print ""
print "/* #if HAVE_TERMIO_H */"
print "#if @HAVE_TERMIO_H@"
print ""
print "#undef TERMIOS"
print "#define TERMIOS 1"
print ""
print "#include <termio.h>"
print "#define TTY struct termio"
print ""
print "#else /* !HAVE_TERMIO_H */"
print ""
print "#if __MINGW32__"
print "# include <ncurses_mingw.h>"
print "# define TTY struct termios"
print "#else"
print "#undef TERMIOS"
print "#include <sgtty.h>"
print "#include <sys/ioctl.h>"
print "#define TTY struct sgttyb"
print "#endif /* MINGW32 */"
print "#endif /* HAVE_TERMIO_H */"
print ""
print "#endif /* HAVE_TERMIOS_H */"
print ""
print "#ifdef TERMIOS"
print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
print "#else"
print "#define GET_TTY(fd, buf) gtty(fd, buf)"
print "#define SET_TTY(fd, buf) stty(fd, buf)"
print "#endif"
print ""
print "#define NAMESIZE 256"
print ""
print "#define CUR cur_term->type."
print ""
}
function declare_termtype(number,suffix) {
printf "typedef struct termtype%s { /* in-core form of terminfo data */\n", suffix;
print " char *term_names; /* str_table offset of term names */"
print " char *str_table; /* pointer to string table */"
print " NCURSES_SBOOL *Booleans; /* array of boolean values */"
printf " %-5s *Numbers; /* array of integer values */\n", number;
print " char **Strings; /* array of string offsets */"
print ""
print "#if NCURSES_XNAMES"
print " char *ext_str_table; /* pointer to extended string table */"
print " char **ext_Names; /* corresponding names */"
print ""
print " unsigned short num_Booleans;/* count total Booleans */";
print " unsigned short num_Numbers; /* count total Numbers */";
print " unsigned short num_Strings; /* count total Strings */";
print ""
print " unsigned short ext_Booleans;/* count extensions to Booleans */";
print " unsigned short ext_Numbers; /* count extensions to Numbers */";
print " unsigned short ext_Strings; /* count extensions to Strings */";
print "#endif /* NCURSES_XNAMES */"
print ""
printf "} TERMTYPE%s;\n", suffix;
}
BEGIN {
lcurl = "{";
rcurl = "}";
print "/****************************************************************************"
print " * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
print " * copy of this software and associated documentation files (the *"
print " * \"Software\"), to deal in the Software without restriction, including *"
print " * without limitation the rights to use, copy, modify, merge, publish, *"
print " * distribute, distribute with modifications, sublicense, and/or sell *"
print " * copies of the Software, and to permit persons to whom the Software is *"
print " * furnished to do so, subject to the following conditions: *"
print " * *"
print " * The above copyright notice and this permission notice shall be included *"
print " * in all copies or substantial portions of the Software. *"
print " * *"
print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
print " * *"
print " * Except as contained in this notice, the name(s) of the above copyright *"
print " * holders shall not be used in advertising or otherwise to promote the *"
print " * sale, use or other dealings in this Software without prior written *"
print " * authorization. *"
print " ****************************************************************************/"
print ""
print "/****************************************************************************/"
print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
print "/* $Id: MKterm.h.awk.in,v 1.73 2019/12/21 18:29:09 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
print "*/"
print ""
print "#ifndef NCURSES_TERM_H_incl"
print "#define NCURSES_TERM_H_incl 1"
print ""
print "#undef NCURSES_VERSION"
print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
print ""
print "#include <ncurses_dll.h>"
print ""
print "#ifdef __cplusplus"
printf "extern \"C\" %s\n", lcurl;
print "#endif"
print ""
print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
print " * definition (based on the system for which this was configured)."
print " */"
print ""
print "#undef NCURSES_CONST"
print "#define NCURSES_CONST @NCURSES_CONST@"
print ""
print "#undef NCURSES_SBOOL"
print "#define NCURSES_SBOOL @NCURSES_SBOOL@"
print ""
print "#undef NCURSES_USE_DATABASE"
print "#define NCURSES_USE_DATABASE @NCURSES_USE_DATABASE@"
print ""
print "#undef NCURSES_USE_TERMCAP"
print "#define NCURSES_USE_TERMCAP @NCURSES_USE_TERMCAP@"
print ""
print "#undef NCURSES_XNAMES"
print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
print ""
print "/* We will use these symbols to hide differences between"
print " * termios/termio/sgttyb interfaces."
print " */"
print "#undef TTY"
print "#undef SET_TTY"
print "#undef GET_TTY"
print ""
print "/* Assume POSIX termio if we have the header and function */"
print "/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */"
print "#if @HAVE_TERMIOS_H@ && @HAVE_TCGETATTR@"
print ""
print "#undef TERMIOS"
print "#define TERMIOS 1"
print ""
print "#include <termios.h>"
print "#define TTY struct termios"
print ""
print "#else /* !HAVE_TERMIOS_H */"
print ""
print "/* #if HAVE_TERMIO_H */"
print "#if @HAVE_TERMIO_H@"
print ""
print "#undef TERMIOS"
print "#define TERMIOS 1"
print ""
print "#include <termio.h>"
print "#define TTY struct termio"
print ""
print "#else /* !HAVE_TERMIO_H */"
print ""
print "#if _WIN32"
print "# include <ncurses_mingw.h>"
print "# define TTY struct termios"
print "#else"
print "#undef TERMIOS"
print "#include <sgtty.h>"
print "#include <sys/ioctl.h>"
print "#define TTY struct sgttyb"
print "#endif /* MINGW32 */"
print "#endif /* HAVE_TERMIO_H */"
print ""
print "#endif /* HAVE_TERMIOS_H */"
print ""
print "#ifdef TERMIOS"
print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
print "#else"
print "#define GET_TTY(fd, buf) gtty(fd, buf)"
print "#define SET_TTY(fd, buf) stty(fd, buf)"
print "#endif"
print ""
print "#ifndef GCC_NORETURN"
print "#define GCC_NORETURN /* nothing */"
print "#endif"
print ""
print "#define NAMESIZE 256"
print ""
print "/* The cast works because TERMTYPE is the first data in TERMINAL */"
print "#define CUR ((TERMTYPE *)(cur_term))->"
print ""
}
$2 == "%%-STOP-HERE-%%" {
print ""
printf "#define BOOLWRITE %d\n", BoolCount
printf "#define NUMWRITE %d\n", NumberCount
printf "#define STRWRITE %d\n", StringCount
print ""
print "/* older synonyms for some capabilities */"
print "#define beehive_glitch no_esc_ctlc"
print "#define teleray_glitch dest_tabs_magic_smso"
print "#define micro_char_size micro_col_size"
print ""
print "#ifdef __INTERNAL_CAPS_VISIBLE"
}
$2 == "%%-STOP-HERE-%%" {
print ""
printf "#define BOOLWRITE %d\n", BoolCount
printf "#define NUMWRITE %d\n", NumberCount
printf "#define STRWRITE %d\n", StringCount
print ""
print "/* older synonyms for some capabilities */"
print "#define beehive_glitch no_esc_ctlc"
print "#define teleray_glitch dest_tabs_magic_smso"
print ""
print "/* HPUX-11 uses this name rather than the standard one */"
print "#ifndef micro_char_size"
print "#define micro_char_size micro_col_size"
print "#endif"
print ""
print "#ifdef __INTERNAL_CAPS_VISIBLE"
}
/^#/ {next;}
/^#/ { next; }
$1 == "acs_chars" {acsindex = StringCount}
/^used_by/ { next ; }
/^userdef/ { next ; }
$3 == "bool" {
printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
}
$1 == "acs_chars" {
acsindex = StringCount;
}
$3 == "num" {
printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
}
$3 == "bool" {
printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
}
$3 == "str" {
printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++
}
$3 == "num" {
printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
}
END {
print "#endif /* __INTERNAL_CAPS_VISIBLE */"
print ""
print ""
print "/*"
print " * Predefined terminfo array sizes"
print " */"
printf "#define BOOLCOUNT %d\n", BoolCount
printf "#define NUMCOUNT %d\n", NumberCount
printf "#define STRCOUNT %d\n", StringCount
print ""
print "/* used by code for comparing entries */"
print "#define acs_chars_index ", acsindex
print ""
print "typedef struct termtype { /* in-core form of terminfo data */"
print " char *term_names; /* str_table offset of term names */"
print " char *str_table; /* pointer to string table */"
print " NCURSES_SBOOL *Booleans; /* array of boolean values */"
print " short *Numbers; /* array of integer values */"
print " char **Strings; /* array of string offsets */"
print ""
print "#if NCURSES_XNAMES"
print " char *ext_str_table; /* pointer to extended string table */"
print " char **ext_Names; /* corresponding names */"
print ""
print " unsigned short num_Booleans;/* count total Booleans */"
print " unsigned short num_Numbers; /* count total Numbers */"
print " unsigned short num_Strings; /* count total Strings */"
print ""
print " unsigned short ext_Booleans;/* count extensions to Booleans */"
print " unsigned short ext_Numbers; /* count extensions to Numbers */"
print " unsigned short ext_Strings; /* count extensions to Strings */"
print "#endif /* NCURSES_XNAMES */"
print ""
print "} TERMTYPE;"
print ""
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
print " short Filedes; /* file description being written to */"
print " TTY Ottyb, /* original state of the terminal */"
print " Nttyb; /* current state of the terminal */"
print " int _baudrate; /* used to compute padding */"
print " char * _termname; /* used for termname() */"
print "} TERMINAL;"
print ""
print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#elif @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
print "#else"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#endif"
print ""
print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
print ""
print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
print "#define numnames NCURSES_PUBLIC_VAR(numnames())"
print "#define numcodes NCURSES_PUBLIC_VAR(numcodes())"
print "#define numfnames NCURSES_PUBLIC_VAR(numfnames())"
print "#define strnames NCURSES_PUBLIC_VAR(strnames())"
print "#define strcodes NCURSES_PUBLIC_VAR(strcodes())"
print "#define strfnames NCURSES_PUBLIC_VAR(strfnames())"
print ""
print "#else"
print ""
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];"
print ""
print "#endif"
print ""
print "/* internals */"
print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);"
print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);"
print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);"
print "extern NCURSES_EXPORT(void) _nc_init_termtype (TERMTYPE *const);"
print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE *, char *, int);"
print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
print ""
print "/* entry points */"
print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);"
print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);"
print ""
print "/* miscellaneous entry points */"
print "extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);"
print "extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *);"
print ""
print "/* terminfo entry points, also declared in curses.h */"
print "#if !defined(__NCURSES_H)"
print "extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);"
print "extern NCURSES_EXPORT_VAR(char) ttytype[];"
print "extern NCURSES_EXPORT(int) putp (const char *);"
print "extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);"
print ""
print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */"
print "#endif"
print ""
print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
print ""
print "#endif /* __NCURSES_H */"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
print "#if !defined(NCURSES_TERMCAP_H_incl)"
print "extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);"
print "extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);"
print "extern NCURSES_EXPORT(int) tgetent (char *, const char *);"
print "extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
print "#endif /* NCURSES_TERMCAP_H_incl */"
print ""
print "/*"
print " * Include curses.h before term.h to enable these extensions."
print " */"
print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
print ""
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);"
print ""
print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
print "#endif"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
print ""
print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
print ""
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
print "#endif /* NCURSES_SP_FUNCS */"
print ""
print "#ifdef __cplusplus"
print "}"
print "#endif"
print ""
print "#endif /* NCURSES_TERM_H_incl */"
}
$3 == "str" {
printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++
}
END {
print "#endif /* __INTERNAL_CAPS_VISIBLE */"
print ""
print ""
print "/*"
print " * Predefined terminfo array sizes"
print " */"
printf "#define BOOLCOUNT %d\n", BoolCount
printf "#define NUMCOUNT %d\n", NumberCount
printf "#define STRCOUNT %d\n", StringCount
print ""
print "/* used by code for comparing entries */"
print "#define acs_chars_index ", acsindex
print ""
declare_termtype("short","");
print ""
print "/*"
print " * The only reason these structures are visible is for read-only use."
print " * Programs which modify the data are not, never were, portable across"
print " * curses implementations."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
if (@NCURSES_EXT_COLORS@) {
declare_termtype("int","2");
} else {
print "typedef TERMTYPE TERMTYPE2;"
}
print ""
print "typedef struct term { /* describe an actual terminal */"
print " TERMTYPE type; /* terminal type description */"
print " short Filedes; /* file description being written to */"
print " TTY Ottyb; /* original state of the terminal */"
print " TTY Nttyb; /* current state of the terminal */"
print " int _baudrate; /* used to compute padding */"
print " char * _termname; /* used for termname() */"
if (@NCURSES_EXT_COLORS@) {
print " TERMTYPE2 type2; /* extended terminal type description */"
}
print "} TERMINAL;"
print "#else"
print "typedef struct term TERMINAL;"
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#elif @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
print "#else"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#endif"
print ""
print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
print ""
print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
print "#define numnames NCURSES_PUBLIC_VAR(numnames())"
print "#define numcodes NCURSES_PUBLIC_VAR(numcodes())"
print "#define numfnames NCURSES_PUBLIC_VAR(numfnames())"
print "#define strnames NCURSES_PUBLIC_VAR(strnames())"
print "#define strcodes NCURSES_PUBLIC_VAR(strcodes())"
print "#define strfnames NCURSES_PUBLIC_VAR(strfnames())"
print ""
print "#else"
print ""
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];"
print ""
print "#endif"
print ""
print "/*"
print " * These entrypoints are used only by the ncurses utilities such as tic."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);"
print "extern NCURSES_EXPORT(int) _nc_read_entry2 (const char * const, char * const, TERMTYPE2 *const);"
print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE2 *);"
print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);"
print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
print "/*"
print " * These entrypoints are used by tack 1.07."
print " */"
print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
print ""
print "/*"
print " * Normal entry points"
print " */"
print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);"
print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);"
print ""
print "/* miscellaneous entry points */"
print "extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);"
print "extern NCURSES_EXPORT(int) setupterm (const char *,int,int *);"
print ""
print "/* terminfo entry points, also declared in curses.h */"
print "#if !defined(__NCURSES_H)"
print "extern NCURSES_EXPORT(char *) tigetstr (const char *);"
print "extern NCURSES_EXPORT_VAR(char) ttytype[];"
print "extern NCURSES_EXPORT(int) putp (const char *);"
print "extern NCURSES_EXPORT(int) tigetflag (const char *);"
print "extern NCURSES_EXPORT(int) tigetnum (const char *);"
print ""
print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
print "extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */"
print "#endif"
print ""
print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
print ""
print "#endif /* __NCURSES_H */"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
print "#if !defined(NCURSES_TERMCAP_H_incl)"
print "extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);"
print "extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);"
print "extern NCURSES_EXPORT(int) tgetent (char *, const char *);"
print "extern NCURSES_EXPORT(int) tgetflag (const char *);"
print "extern NCURSES_EXPORT(int) tgetnum (const char *);"
print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
print "#endif /* NCURSES_TERMCAP_H_incl */"
print ""
print "/*"
print " * Include curses.h before term.h to enable these extensions."
print " */"
print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
print ""
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);"
print ""
print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, const char *, ...); /* special */"
print "#endif"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, const char *, char **);"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
print ""
print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
print ""
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
print "#endif /* NCURSES_SP_FUNCS */"
print ""
print "/*"
print " * Debugging features."
print " */"
print "extern NCURSES_EXPORT(void) exit_terminfo(int) GCC_NORETURN;"
print ""
print "#ifdef __cplusplus"
printf "%s\n", rcurl;
print "#endif"
print ""
print "#endif /* NCURSES_TERM_H_incl */"
}

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.41 2013/08/03 23:10:51 tom Exp $
# $Id: Makefile.in,v 1.45 2019/03/03 01:41:21 tom Exp $
##############################################################################
# Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. #
# Copyright (c) 1998-2015,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -39,7 +39,7 @@
# turn off _all_ suffix rules; we'll generate our own
.SUFFIXES:
SHELL = /bin/sh
SHELL = @SHELL@
VPATH = @srcdir@
THIS = Makefile
@ -66,6 +66,8 @@ VERSION = @cf_cv_rel_version@
# The "Caps" file specifies the terminfo database format, as well as the list
# of function keys.
TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@
CAPLIST = $(TERMINFO_CAPS) \
$(srcdir)/Caps-ncurses
# These files are generated by the configure script
CONFIG_SRC = \
@ -91,27 +93,30 @@ depend \
sources \
install :: $(AUTO_SRC)
curses.h : $(TERMINFO_CAPS) \
curses.h : $(CAPLIST) \
curses.head \
$(srcdir)/curses.tail \
$(srcdir)/MKkey_defs.sh
cat curses.head >$@
AWK=$(AWK) sh $(srcdir)/MKkey_defs.sh $(TERMINFO_CAPS) >>$@
sh -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@
$(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
cat $(srcdir)/curses.tail >>$@
term.h: $(TERMINFO_CAPS) MKterm.h.awk
$(AWK) -f MKterm.h.awk $(TERMINFO_CAPS) > $@
sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
term.h: $(CAPLIST) \
MKterm.h.awk
$(AWK) -f MKterm.h.awk $(CAPLIST) > $@
$(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
hashsize.h: $(TERMINFO_CAPS) $(srcdir)/MKhashsize.sh
sh $(srcdir)/MKhashsize.sh $(TERMINFO_CAPS) >$@
hashsize.h: $(CAPLIST) \
$(srcdir)/MKhashsize.sh
$(SHELL) $(srcdir)/MKhashsize.sh $(CAPLIST) >$@
ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
AWK=$(AWK) sh $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
parametrized.h: $(TERMINFO_CAPS) $(srcdir)/MKparametrized.sh
AWK=$(AWK) sh $(srcdir)/MKparametrized.sh $(TERMINFO_CAPS) >$@
parametrized.h: $(CAPLIST) \
$(srcdir)/MKparametrized.sh
AWK=$(AWK) $(SHELL) $(srcdir)/MKparametrized.sh $(CAPLIST) >$@
# This is required by pthread.h on MinGW
config.h:
@ -128,6 +133,7 @@ mostlyclean ::
clean :: mostlyclean
-rm -f $(AUTO_SRC)
-rm -rf *.dSYM
distclean :: clean
-rm -f Makefile $(CONFIG_SRC) config.h

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* Copyright (c) 1998-2018,2019 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 *
@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: curses.h.in,v 1.237 2014/02/01 22:08:12 tom Exp $ */
/* $Id: curses.h.in,v 1.264 2019/03/23 23:06:46 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@ -59,6 +59,10 @@
*/
#include <ncurses_dll.h>
#if @HAVE_STDINT_H@
#include <stdint.h>
#endif
/*
* User-definable tweak to disable the include of <stdbool.h>.
*/
@ -70,12 +74,6 @@
* NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses
* configured using --disable-macros.
*/
#ifdef NCURSES_NOMACROS
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T attr_t
#endif
#endif /* NCURSES_NOMACROS */
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T int
#endif
@ -91,13 +89,13 @@
#define NCURSES_INLINE @NCURSES_INLINE@
/*
* The internal type used for color values, and for color-pairs. The latter
* The standard type used for color values, and for color-pairs. The latter
* allows the curses library to enumerate the combinations of foreground and
* background colors used by an application, and is normally the product of the
* total foreground and background colors.
*
* X/Open uses "short" for both of these types, ultimately because they are
* numbers from the terminal database, which uses 16-bit signed values.
* numbers from the SVr4 terminal database, which uses 16-bit signed values.
*/
#undef NCURSES_COLOR_T
#define NCURSES_COLOR_T short
@ -106,10 +104,22 @@
#define NCURSES_PAIRS_T short
/*
* Definition used to make WINDOW and similar structs opaque.
* Definitions used to make WINDOW and similar structs opaque.
*/
#ifndef @cf_cv_enable_opaque@
#define NCURSES_OPAQUE @NCURSES_OPAQUE@
#ifndef NCURSES_INTERNALS
#define NCURSES_OPAQUE @NCURSES_OPAQUE@
#define NCURSES_OPAQUE_FORM @NCURSES_OPAQUE_FORM@
#define NCURSES_OPAQUE_MENU @NCURSES_OPAQUE_MENU@
#define NCURSES_OPAQUE_PANEL @NCURSES_OPAQUE_PANEL@
#endif
/*
* Definition used to optionally suppress wattr* macros to help with the
* transition from ncurses5 to ncurses6 by allowing the header files to
* be shared across development packages for ncursesw in both ABIs.
*/
#ifndef NCURSES_WATTR_MACROS
#define NCURSES_WATTR_MACROS @NCURSES_WATTR_MACROS@
#endif
/*
@ -144,6 +154,13 @@
#undef NCURSES_TPARM_ARG
#define NCURSES_TPARM_ARG @NCURSES_TPARM_ARG@
/*
* Control whether ncurses uses wcwidth() for checking width of line-drawing
* characters.
*/
#undef NCURSES_WCWIDTH_GRAPHICS
#define NCURSES_WCWIDTH_GRAPHICS @NCURSES_WCWIDTH_GRAPHICS@
/*
* NCURSES_CH_T is used in building the library, but not used otherwise in
* this header file, since that would make the normal/wide-character versions
@ -156,8 +173,8 @@
typedef unsigned chtype;
typedef unsigned mmask_t;
#else
typedef unsigned @cf_cv_typeof_chtype@ chtype;
typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
typedef @cf_cv_typeof_chtype@ chtype;
typedef @cf_cv_typeof_mmask_t@ mmask_t;
#endif
/*
@ -231,6 +248,8 @@ extern "C" {
#define NCURSES_CAST(type,value) (type)(value)
#endif
#define NCURSES_OK_ADDR(p) (0 != NCURSES_CAST(const void *, (p)))
/*
* X/Open attributes. In the ncurses implementation, they are identical to the
* A_ attributes.
@ -561,6 +580,13 @@ extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *)
#define GCC_UNUSED /* nothing */
#endif
#undef GCC_DEPRECATED
#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))
#define GCC_DEPRECATED(msg) __attribute__((deprecated))
#else
#define GCC_DEPRECATED(msg) /* nothing */
#endif
/*
* Curses uses a helper function. Define our type for this to simplify
* extending it for the sp-funcs feature.
@ -682,7 +708,7 @@ extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */
extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */
extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */
GCC_PRINTFLIKE(3,4);
extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */
extern NCURSES_EXPORT(int) mvscanw (int,int, const char *,...) /* implemented */
GCC_SCANFLIKE(3,4);
extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */
extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */
@ -707,13 +733,13 @@ extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* gene
extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */
extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */
GCC_PRINTFLIKE(4,5);
extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */
extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, const char *,...) /* implemented */
GCC_SCANFLIKE(4,5);
extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */
extern NCURSES_EXPORT(int) napms (int); /* implemented */
extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */
extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */
extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */
extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */
extern NCURSES_EXPORT(SCREEN *) newterm (const char *,FILE *,FILE *); /* implemented */
extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */
extern NCURSES_EXPORT(int) nl (void); /* implemented */
extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */
extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */
@ -741,7 +767,7 @@ extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */
extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */
extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */
extern NCURSES_EXPORT(int) savetty (void); /* implemented */
extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */
extern NCURSES_EXPORT(int) scanw (const char *,...) /* implemented */
GCC_SCANFLIKE(1,2);
extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */
extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */
@ -767,7 +793,7 @@ extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */
extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */
extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */
extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */
extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */
extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */
extern NCURSES_EXPORT(int) standout (void); /* generated */
extern NCURSES_EXPORT(int) standend (void); /* generated */
extern NCURSES_EXPORT(int) start_color (void); /* implemented */
@ -787,10 +813,10 @@ extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */
extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */
extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */
extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */
extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */
extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */
extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* generated */
extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list) GCC_DEPRECATED(use vw_printw); /* implemented */
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* implemented */
extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *,va_list) GCC_DEPRECATED(use vw_scanw); /* implemented */
extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *,va_list); /* implemented */
extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */
extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */
extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */
@ -836,7 +862,7 @@ extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented
GCC_PRINTFLIKE(2,3);
extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */
extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */
extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */
extern NCURSES_EXPORT(int) wscanw (WINDOW *, const char *,...) /* implemented */
GCC_SCANFLIKE(2,3);
extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */
extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */
@ -851,16 +877,16 @@ extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */
/*
* These are also declared in <term.h>:
*/
extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */
extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */
extern NCURSES_EXPORT(int) tigetflag (const char *); /* implemented */
extern NCURSES_EXPORT(int) tigetnum (const char *); /* implemented */
extern NCURSES_EXPORT(char *) tigetstr (const char *); /* implemented */
extern NCURSES_EXPORT(int) putp (const char *); /* implemented */
#if NCURSES_TPARM_VARARGS
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */
extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
#else
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */
extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */
extern NCURSES_EXPORT(char *) tparm (const char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */
extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
@ -896,11 +922,20 @@ typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);
extern NCURSES_EXPORT(bool) is_term_resized (int, int);
extern NCURSES_EXPORT(char *) keybound (int, int);
extern NCURSES_EXPORT(const char *) curses_version (void);
extern NCURSES_EXPORT(int) alloc_pair (int, int);
extern NCURSES_EXPORT(int) assume_default_colors (int, int);
extern NCURSES_EXPORT(int) define_key (const char *, int);
extern NCURSES_EXPORT(int) extended_color_content(int, int *, int *, int *);
extern NCURSES_EXPORT(int) extended_pair_content(int, int *, int *);
extern NCURSES_EXPORT(int) extended_slk_color(int);
extern NCURSES_EXPORT(int) find_pair (int, int);
extern NCURSES_EXPORT(int) free_pair (int);
extern NCURSES_EXPORT(int) get_escdelay (void);
extern NCURSES_EXPORT(int) init_extended_color(int, int, int, int);
extern NCURSES_EXPORT(int) init_extended_pair(int, int, int);
extern NCURSES_EXPORT(int) key_defined (const char *);
extern NCURSES_EXPORT(int) keyok (int, bool);
extern NCURSES_EXPORT(void) reset_color_pairs (void);
extern NCURSES_EXPORT(int) resize_term (int, int);
extern NCURSES_EXPORT(int) resizeterm (int, int);
extern NCURSES_EXPORT(int) set_escdelay (int);
@ -930,6 +965,7 @@ extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ *
extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(int) wgetdelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
#else
@ -982,7 +1018,7 @@ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemente
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, const char *, FILE *, FILE *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */
@ -1026,13 +1062,22 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implem
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
#if @NCURSES_EXT_FUNCS@
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(alloc_pair) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_color_content) (SCREEN*, int, int *, int *, int *); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_pair_content) (SCREEN*, int, int *, int *); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_slk_color) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(find_pair) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(free_pair) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_extended_color) (SCREEN*, int, int, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_extended_pair) (SCREEN*, int, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(reset_color_pairs) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
@ -1086,7 +1131,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* These pseudo functions are always implemented as macros:
*/
#define getyx(win,y,x) (y = getcury(win), x = getcurx(win))
#define getyx(win,y,x) (y = getcury(win), x = getcurx(win))
#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win))
#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win))
#define getparyx(win,y,x) (y = getpary(win), x = getparx(win))
@ -1129,36 +1174,40 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
/* It seems older SYSV curses versions define these */
#if !NCURSES_OPAQUE
#define getattrs(win) NCURSES_CAST(int, (win) ? (win)->_attrs : A_NORMAL)
#define getcurx(win) ((win) ? (win)->_curx : ERR)
#define getcury(win) ((win) ? (win)->_cury : ERR)
#define getbegx(win) ((win) ? (win)->_begx : ERR)
#define getbegy(win) ((win) ? (win)->_begy : ERR)
#define getmaxx(win) ((win) ? ((win)->_maxx + 1) : ERR)
#define getmaxy(win) ((win) ? ((win)->_maxy + 1) : ERR)
#define getparx(win) ((win) ? (win)->_parx : ERR)
#define getpary(win) ((win) ? (win)->_pary : ERR)
#define getattrs(win) NCURSES_CAST(int, NCURSES_OK_ADDR(win) ? (win)->_attrs : A_NORMAL)
#define getcurx(win) (NCURSES_OK_ADDR(win) ? (win)->_curx : ERR)
#define getcury(win) (NCURSES_OK_ADDR(win) ? (win)->_cury : ERR)
#define getbegx(win) (NCURSES_OK_ADDR(win) ? (win)->_begx : ERR)
#define getbegy(win) (NCURSES_OK_ADDR(win) ? (win)->_begy : ERR)
#define getmaxx(win) (NCURSES_OK_ADDR(win) ? ((win)->_maxx + 1) : ERR)
#define getmaxy(win) (NCURSES_OK_ADDR(win) ? ((win)->_maxy + 1) : ERR)
#define getparx(win) (NCURSES_OK_ADDR(win) ? (win)->_parx : ERR)
#define getpary(win) (NCURSES_OK_ADDR(win) ? (win)->_pary : ERR)
#endif /* NCURSES_OPAQUE */
#define wstandout(win) (wattrset(win,A_STANDOUT))
#define wstandend(win) (wattrset(win,A_NORMAL))
#define wstandout(win) (wattrset(win,A_STANDOUT))
#define wstandend(win) (wattrset(win,A_NORMAL))
#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL)
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
#if !NCURSES_OPAQUE
#if NCURSES_WATTR_MACROS
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win) \
? ((win)->_color = PAIR_NUMBER(at), \
(win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
#define wattrset(win,at) \
(NCURSES_OK_ADDR(win) \
? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \
(win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
#else
#define wattrset(win,at) ((win) \
? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
#define wattrset(win,at) \
(NCURSES_OK_ADDR(win) \
? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
#endif
#endif /* NCURSES_WATTR_MACROS */
#endif /* NCURSES_OPAQUE */
#define scroll(win) wscrl(win,1)
@ -1177,7 +1226,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define winsstr(w, s) winsnstr(w, s, -1)
#if !NCURSES_OPAQUE
#define redrawwin(win) wredrawln(win, 0, ((win) ? (win)->_maxy+1 : -1))
#define redrawwin(win) wredrawln(win, 0, (NCURSES_OK_ADDR(win) ? (win)->_maxy+1 : -1))
#endif /* NCURSES_OPAQUE */
#define waddstr(win,str) waddnstr(win,str,-1)
@ -1186,7 +1235,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
/*
* These apply to the first 256 color pairs.
*/
#define COLOR_PAIR(n) NCURSES_BITS((n), 0)
#define COLOR_PAIR(n) (NCURSES_BITS((n), 0) & A_COLOR)
#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,(a)) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
/*
@ -1198,13 +1247,13 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define addchstr(str) waddchstr(stdscr,(str))
#define addnstr(str,n) waddnstr(stdscr,(str),(n))
#define addstr(str) waddnstr(stdscr,(str),-1)
#define attroff(at) wattroff(stdscr,(at))
#define attron(at) wattron(stdscr,(at))
#define attrset(at) wattrset(stdscr,(at))
#define attr_get(ap,cp,o) wattr_get(stdscr,(ap),(cp),(o))
#define attr_off(a,o) wattr_off(stdscr,(a),(o))
#define attr_on(a,o) wattr_on(stdscr,(a),(o))
#define attr_set(a,c,o) wattr_set(stdscr,(a),(c),(o))
#define attroff(at) wattroff(stdscr,(at))
#define attron(at) wattron(stdscr,(at))
#define attrset(at) wattrset(stdscr,(at))
#define bkgd(ch) wbkgd(stdscr,(ch))
#define bkgdset(ch) wbkgdset(stdscr,(ch))
#define chgat(n,a,c,o) wchgat(stdscr,(n),(a),(c),(o))
@ -1247,8 +1296,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#define mvwaddchstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),-1))
#define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n)))
#define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1))
#define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win))
#define mvwchgat(win,y,x,n,a,c,o) (wmove((win),(y),(x)) == ERR ? ERR : wchgat((win),(n),(a),(c),(o)))
#define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win))
#define mvwgetch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wgetch(win))
#define mvwgetnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : wgetnstr((win),(str),(n)))
#define mvwgetstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : wgetstr((win),(str)))
@ -1288,31 +1337,53 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* Some wide-character functions can be implemented without the extensions.
*/
#if !NCURSES_OPAQUE
#define getbkgd(win) ((win) ? ((win)->_bkgd) : 0)
#define getbkgd(win) (NCURSES_OK_ADDR(win) ? ((win)->_bkgd) : 0)
#endif /* NCURSES_OPAQUE */
#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a))
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
#if !NCURSES_OPAQUE
#if NCURSES_WATTR_MACROS
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
#define wattr_set(win,a,p,opts) (((win) \
? ((win)->_attrs = ((a) & ~A_COLOR), \
(win)->_color = (p)) \
: OK), \
OK)
#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \
(void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? (win)->_color : 0)) : OK), \
OK)
#else
#define wattr_set(win,a,p,opts) (((win) \
? ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p))) \
: OK), \
OK)
#define wattr_get(win,a,p,opts) ((void)(((a) != (void *)0) ? (*(a) = (win) ? (win)->_attrs : 0) : OK), \
(void)(((p) != (void *)0) ? (*(p) = (NCURSES_PAIRS_T) ((win) ? PAIR_NUMBER((win)->_attrs) : 0)) : OK), \
OK)
#endif
#define wattr_set(win,a,p,opts) \
(NCURSES_OK_ADDR(win) \
? ((void)((win)->_attrs = ((a) & ~A_COLOR), \
(win)->_color = (opts) ? *(int *)(opts) : (p)), \
OK) \
: ERR)
#define wattr_get(win,a,p,opts) \
(NCURSES_OK_ADDR(win) \
? ((void)(NCURSES_OK_ADDR(a) \
? (*(a) = (win)->_attrs) \
: OK), \
(void)(NCURSES_OK_ADDR(p) \
? (*(p) = (NCURSES_PAIRS_T) (win)->_color) \
: OK), \
(void)(NCURSES_OK_ADDR(opts) \
? (*(int *)(opts) = (win)->_color) \
: OK), \
OK) \
: ERR)
#else /* !(NCURSES_WIDECHAR && NCURSES_EXE_COLORS) */
#define wattr_set(win,a,p,opts) \
(NCURSES_OK_ADDR(win) \
? ((void)((win)->_attrs = (((a) & ~A_COLOR) | \
(attr_t)COLOR_PAIR(p))), \
OK) \
: ERR)
#define wattr_get(win,a,p,opts) \
(NCURSES_OK_ADDR(win) \
? ((void)(NCURSES_OK_ADDR(a) \
? (*(a) = (win)->_attrs) \
: OK), \
(void)(NCURSES_OK_ADDR(p) \
? (*(p) = (NCURSES_PAIRS_T) PAIR_NUMBER((win)->_attrs)) \
: OK), \
OK) \
: ERR)
#endif /* (NCURSES_WIDECHAR && NCURSES_EXE_COLORS) */
#endif /* NCURSES_WATTR_MACROS */
#endif /* NCURSES_OPAQUE */
/*
@ -1321,8 +1392,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
* use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already
* use stdarg.h, so...
*/
#define vw_printw vwprintw
#define vw_scanw vwscanw
/* define vw_printw vwprintw */
/* define vw_scanw vwscanw */
/*
* Export fallback function for use in C++ binding.
@ -1337,23 +1408,30 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
*/
#if @NCURSES_EXT_FUNCS@
#if !NCURSES_OPAQUE
#define is_cleared(win) ((win) ? (win)->_clear : FALSE)
#define is_idcok(win) ((win) ? (win)->_idcok : FALSE)
#define is_idlok(win) ((win) ? (win)->_idlok : FALSE)
#define is_immedok(win) ((win) ? (win)->_immed : FALSE)
#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE)
#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE)
#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE)
#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE)
#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE)
#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
#define is_syncok(win) ((win) ? (win)->_sync : FALSE)
#define wgetparent(win) ((win) ? (win)->_parent : 0)
#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#define is_cleared(win) (NCURSES_OK_ADDR(win) ? (win)->_clear : FALSE)
#define is_idcok(win) (NCURSES_OK_ADDR(win) ? (win)->_idcok : FALSE)
#define is_idlok(win) (NCURSES_OK_ADDR(win) ? (win)->_idlok : FALSE)
#define is_immedok(win) (NCURSES_OK_ADDR(win) ? (win)->_immed : FALSE)
#define is_keypad(win) (NCURSES_OK_ADDR(win) ? (win)->_use_keypad : FALSE)
#define is_leaveok(win) (NCURSES_OK_ADDR(win) ? (win)->_leaveok : FALSE)
#define is_nodelay(win) (NCURSES_OK_ADDR(win) ? ((win)->_delay == 0) : FALSE)
#define is_notimeout(win) (NCURSES_OK_ADDR(win) ? (win)->_notimeout : FALSE)
#define is_pad(win) (NCURSES_OK_ADDR(win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
#define is_scrollok(win) (NCURSES_OK_ADDR(win) ? (win)->_scroll : FALSE)
#define is_subwin(win) (NCURSES_OK_ADDR(win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
#define is_syncok(win) (NCURSES_OK_ADDR(win) ? (win)->_sync : FALSE)
#define wgetdelay(win) (NCURSES_OK_ADDR(win) ? (win)->_delay : 0)
#define wgetparent(win) (NCURSES_OK_ADDR(win) ? (win)->_parent : 0)
#define wgetscrreg(win,t,b) (NCURSES_OK_ADDR(win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#endif
#endif
/*
* X/Open says this returns a bool; SVr4 also checked for out-of-range line.
* The macro provides compatibility:
*/
#define is_linetouched(w,l) ((!(w) || ((l) > getmaxy(w)) || ((l) < 0)) ? ERR : (is_linetouched)((w),(l)))
#endif /* NCURSES_NOMACROS */
/*

View file

@ -1,4 +1,4 @@
/* $Id: curses.tail,v 1.21 2011/10/29 20:03:22 tom Exp $ */
/* $Id: curses.tail,v 1.25 2019/12/14 22:28:39 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@ -111,7 +111,9 @@ extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mma
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
#endif
#ifndef NCURSES_NOMACROS
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
#endif
/* other non-XSI functions */
@ -126,10 +128,8 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* d
/* Debugging : use with libncurses_g.a */
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *);
extern NCURSES_EXPORT(char *) _traceattr (attr_t);
extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype);
extern NCURSES_EXPORT(char *) _nc_tracebits (void);
extern NCURSES_EXPORT(char *) _tracechar (int);
extern NCURSES_EXPORT(char *) _tracechtype (chtype);
extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype);
@ -142,8 +142,8 @@ extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *);
#define _tracech_t _tracechtype
#define _tracech_t2 _tracechtype2
#endif
extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *);
extern NCURSES_EXPORT(void) trace (const unsigned int);
extern NCURSES_EXPORT(void) trace (const unsigned) GCC_DEPRECATED("use curses_trace");
extern NCURSES_EXPORT(unsigned) curses_trace (const unsigned);
/* trace masks */
#define TRACE_DISABLE 0x0000 /* turn off tracing */
@ -174,6 +174,8 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */
#endif
extern NCURSES_EXPORT(void) exit_curses (int) GCC_NORETURN;
#include <unctrl.h>
#ifdef __cplusplus

View file

@ -1,4 +1,4 @@
/* $Id: curses.wide,v 1.46 2014/02/01 22:00:32 tom Exp $ */
/* $Id: curses.wide,v 1.50 2017/03/26 16:05:21 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@ -204,7 +204,7 @@ extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implement
extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */
extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); /* implemented */
extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *, wint_t *, int); /* implemented */
extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */
extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */
@ -261,7 +261,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_P
#define wins_wstr(w,t) wins_nwstr((w),(t),-1)
#if !NCURSES_OPAQUE
#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK)
#define wgetbkgrnd(win,wch) (NCURSES_OK_ADDR(wch) ? ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK) : ERR)
#endif
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c))

View file

@ -1,7 +1,7 @@
#!/bin/sh
# $Id: edit_cfg.sh,v 1.12 2001/12/23 00:52:40 tom Exp $
# $Id: edit_cfg.sh,v 1.13 2017/08/12 12:22:06 tom Exp $
##############################################################################
# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
# Copyright (c) 2000,2001,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 "Software"), #
@ -38,7 +38,7 @@
#
BAK=save$$
TMP=edit$$
trap "rm -f $BAK $TMP" 0 1 2 5 15
trap "rm -f $BAK $TMP" 0 1 2 3 15
for name in \
HAVE_TCGETATTR \
HAVE_TERMIOS_H \

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2006 Free Software Foundation, Inc. *
* Copyright (c) 2006-2014,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 *
@ -31,19 +31,23 @@
****************************************************************************/
/*
* $Id: hashed_db.h,v 1.5 2006/08/19 15:58:34 tom Exp $
* $Id: hashed_db.h,v 1.8 2017/07/22 16:22:49 tom Exp $
*/
#ifndef HASHED_DB_H
#define HASHED_DB_H 1
#include <ncurses_cfg.h>
#include <curses.h>
#if USE_HASHED_DB
#define DB_DBM_HSEARCH 0 /* quiet gcc -Wundef with db6 */
#include <db.h>
#ifndef DBN_SUFFIX
#ifndef DBM_SUFFIX
#define DBM_SUFFIX ".db"
#endif

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* Copyright (c) 1998-2017,2019 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 *
@ -29,12 +29,15 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: nc_alloc.h,v 1.22 2013/01/26 21:56:51 tom Exp $ */
/* $Id: nc_alloc.h,v 1.24 2019/12/15 01:00:51 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
/* *INDENT-OFF* */
#include <ncurses_cfg.h>
#include <curses.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -69,8 +72,9 @@ extern "C" {
#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS
#define HAVE_NC_FREEALL 1
struct termtype;
extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN GCC_DEPRECATED("use exit_terminfo");
#ifdef NCURSES_INTERNALS
extern NCURSES_EXPORT(void) _nc_free_tic(int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_tparm(void);
extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
@ -79,8 +83,13 @@ extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
#endif
extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
#define ExitProgram(code) _nc_free_and_exit(code)
#else /* !NCURSES_INTERNALS */
extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN GCC_DEPRECATED("use exit_curses");
#endif
#define ExitProgram(code) exit_curses(code)
#endif /* NO_LEAKS, etc */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
* Copyright (c) 2008-2018,2019 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -27,19 +27,19 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas Dickey, 2008-on *
* *
* Author: Thomas Dickey, 2008-on *
****************************************************************************/
/* $Id: nc_mingw.h,v 1.3 2010/09/25 22:16:12 juergen Exp $ */
/* $Id: nc_mingw.h,v 1.6 2019/06/23 19:55:08 tom Exp $ */
#ifndef NC_MINGW_H
#define NC_MINGW_H 1
#ifdef _WIN32
#ifdef WINVER
# if WINVER < 0x0501
# error WINVER must at least be 0x0501
# endif
# endif
#else
# define WINVER 0x0501
#endif
@ -51,7 +51,7 @@
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#include <sys/time.h> /* for struct timeval */
#include <sys/time.h> /* for struct timeval */
extern int _nc_gettimeofday(struct timeval *, void *);
@ -63,7 +63,9 @@ extern int _nc_gettimeofday(struct timeval *, void *);
#define getlogin() "username"
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth(ucs)
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
extern int _nc_wcwidth(wchar_t);
#endif /* _WIN32 */
#endif /* NC_MINGW_H */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,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 *
@ -32,7 +32,7 @@
****************************************************************************/
/*
* $Id: nc_panel.h,v 1.7 2009/07/04 18:20:02 tom Exp $
* $Id: nc_panel.h,v 1.9 2017/07/22 17:06:03 tom Exp $
*
* nc_panel.h
*
@ -43,6 +43,9 @@
#ifndef NC_PANEL_H
#define NC_PANEL_H 1
#include <ncurses_cfg.h>
#include <curses.h>
#ifdef __cplusplus
extern "C"
{

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2012,2013 Free Software Foundation, Inc. *
* Copyright (c) 2012-2013,2016 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 *
@ -35,8 +35,12 @@
#include <ncurses_cfg.h>
#if HAVE_BSD_STRING_H
#include <bsd/string.h>
#endif
/*
* $Id: nc_string.h,v 1.4 2013/12/15 01:09:19 tom Exp $
* $Id: nc_string.h,v 1.7 2016/09/10 19:57:15 tom Exp $
*
* String-hacks. Use these macros to stifle warnings on (presumably) correct
* uses of strcat, strcpy and sprintf.
@ -56,14 +60,18 @@
#if USE_STRING_HACKS && HAVE_STRLCAT
#define _nc_STRCAT(d,s,n) NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,n))
#define _nc_STRNCAT(d,s,m,n) NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,m))
#else
#define _nc_STRCAT(d,s,n) NCURSES_VOID strcat((d),(s))
#define _nc_STRNCAT(d,s,m,n) NCURSES_VOID strncat((d),(s),(n))
#endif
#if USE_STRING_HACKS && HAVE_STRLCPY
#define _nc_STRCPY(d,s,n) NCURSES_VOID strlcpy((d),(s),NCURSES_CAST(size_t,n))
#define _nc_STRNCPY(d,s,n) NCURSES_VOID strlcpy((d),(s),NCURSES_CAST(size_t,n))
#else
#define _nc_STRCPY(d,s,n) NCURSES_VOID strcpy((d),(s))
#define _nc_STRNCPY(d,s,n) NCURSES_VOID strncpy((d),(s),(n))
#endif
#if USE_STRING_HACKS && HAVE_SNPRINTF

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2011 Free Software Foundation, Inc. *
* Copyright (c) 2011-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -30,11 +30,13 @@
* Author: Thomas E. Dickey 2011 *
****************************************************************************/
/* $Id: nc_termios.h,v 1.2 2011/06/25 20:44:05 tom Exp $ */
/* $Id: nc_termios.h,v 1.6 2018/06/24 00:06:37 tom Exp $ */
#ifndef NC_TERMIOS_included
#define NC_TERMIOS_included 1
#include <ncurses_cfg.h>
#if HAVE_TERMIOS_H && HAVE_TCGETATTR
#else /* !HAVE_TERMIOS_H */
@ -69,101 +71,91 @@
#else /* !HAVE_TERMIO_H */
#if __MINGW32__
#if _WIN32
/* c_cc chars */
#define VINTR 0
#define VQUIT 1
#define VERASE 2
#define VKILL 3
#define VEOF 4
#define VTIME 5
#define VMIN 6
/* lflag bits */
#define ISIG 0x0001
#define ICANON 0x0002
#define ECHO 0x0004
#define ECHOE 0x0008
#define ECHOK 0x0010
#define ECHONL 0x0020
#define NOFLSH 0x0040
#define IEXTEN 0x0100
/* c_iflag bits */
#define ISTRIP 0000040
#define INLCR 0000100
#define IGNCR 0000200
#define ICRNL 0000400
#define BRKINT 0000002
#define PARMRK 0000010
#define IXON 0002000
#define IGNBRK 0000001
#define IGNPAR 0000004
#define INPCK 0000020
#define IXOFF 0010000
#define VEOF 4
#define VERASE 5
#define VINTR 6
#define VKILL 7
#define VMIN 9
#define VQUIT 10
#define VTIME 16
/* c_oflag bits */
#define OPOST 0000001
/* iflag bits */
#define IGNBRK 0x00001
#define BRKINT 0x00002
#define IGNPAR 0x00004
#define INPCK 0x00010
#define ISTRIP 0x00020
#define INLCR 0x00040
#define IGNCR 0x00080
#define ICRNL 0x00100
#define IXON 0x00400
#define IXOFF 0x01000
#define PARMRK 0x10000
/* c_cflag bit meaning */
#define CBAUD 0010017
#define CSIZE 0000060
#define CS8 0000060
#define B0 0000000
#define B50 0000001
#define B75 0000002
#define B110 0000003
#define B134 0000004
#define B150 0000005
#define B200 0000006
#define B300 0000007
#define B600 0000010
#define B1200 0000011
#define B1800 0000012
#define B2400 0000013
#define B4800 0000014
#define B9600 0000015
#define CLOCAL 0004000
#define CREAD 0000200
#define CSTOPB 0000100
#define HUPCL 0002000
#define PARENB 0000400
#define PARODD 0001000
/* oflag bits */
#define OPOST 0x00001
/* c_lflag bits */
#define ECHO 0000010
#define ECHONL 0000100
#define ISIG 0000001
#define IEXTEN 0100000
#define ICANON 0000002
#define NOFLSH 0000200
#define ECHOE 0000020
#define ECHOK 0000040
/* cflag bits */
#define CBAUD 0x0100f
#define B0 0x00000
#define B50 0x00001
#define B75 0x00002
#define B110 0x00003
#define B134 0x00004
#define B150 0x00005
#define B200 0x00006
#define B300 0x00007
#define B600 0x00008
#define B1200 0x00009
#define B1800 0x0000a
#define B2400 0x0000b
#define B4800 0x0000c
#define B9600 0x0000d
/* tcflush() */
#define TCIFLUSH 0
#define CSIZE 0x00030
#define CS8 0x00030
#define CSTOPB 0x00040
#define CREAD 0x00080
#define PARENB 0x00100
#define PARODD 0x00200
#define HUPCL 0x00400
#define CLOCAL 0x00800
/* tcsetattr uses these */
#define TCSADRAIN 1
/* ioctls */
#define TCGETA 0x5405
#define TCFLSH 0x540B
#define TIOCGWINSZ 0x5413
#define TCIFLUSH 0
#define TCSADRAIN 3
#ifndef cfgetospeed
#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
#endif
#ifndef tcsetattr
#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg)
#define tcsetattr(fd, opt, arg) _nc_mingw_tcsetattr(fd, opt, arg)
#endif
#ifndef tcgetattr
#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg)
#define tcgetattr(fd, arg) _nc_mingw_tcgetattr(fd, arg)
#endif
#ifndef tcflush
#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg)
#define tcflush(fd, queue) _nc_mingw_tcflush(fd, queue)
#endif
#undef ttyname
#define ttyname(fd) NULL
#else
#endif /* __MINGW32__ */
#endif /* _WIN32 */
#endif /* HAVE_TERMIO_H */
#endif /* HAVE_TERMIOS_H */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2006-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 2006-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -30,11 +30,14 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
/* $Id: nc_tparm.h,v 1.6 2012/02/18 21:34:42 tom Exp $ */
/* $Id: nc_tparm.h,v 1.9 2018/03/17 19:19:58 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
#include <ncurses_cfg.h>
#include <curses.h>
/*
* Cast parameters past the formatting-string for tparm() to match the
* assumption of the varargs code.
@ -70,7 +73,6 @@
#define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0)
#define TPARM_2(a,b,c) TPARM_3(a,b,c,0)
#define TPARM_1(a,b) TPARM_2(a,b,0)
#define TPARM_1(a,b) TPARM_2(a,b,0)
#define TPARM_0(a) TPARM_1(a,0)
#endif

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-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 *
@ -27,10 +27,13 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey <dickey@clark.net> 1997 *
* Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
* $Id: ncurses_cfg.hin,v 1.7 2005/01/02 01:26:58 tom Exp $
* $Id: ncurses_cfg.hin,v 1.11 2017/12/09 20:41:54 tom Exp $
*
* Both ncurses_cfg.h and ncurses_def.h are internal header-files used when
* building ncurses.
*
* This is a template-file used to generate the "ncurses_cfg.h" file.
*
@ -40,7 +43,7 @@
*
* See:
* http://invisible-island.net/autoconf/
* ftp://invisible-island.net/autoconf/
* ftp://ftp.invisible-island.net/autoconf/
*/
#ifndef NC_CONFIG_H
#define NC_CONFIG_H
@ -52,11 +55,6 @@
#ifdef __cplusplus
#undef const
#undef inline
#else
#if defined(lint) || defined(TRACE)
#undef inline
#define inline /* nothing */
#endif
#endif
/* On HP-UX, the C compiler doesn't grok mbstate_t without
@ -69,4 +67,7 @@
#endif
#endif
/*
* vile:cmode
*/
#endif /* NC_CONFIG_H */

View file

@ -1,6 +1,6 @@
# $Id: ncurses_defs,v 1.62 2013/12/14 23:52:07 tom Exp $
# $Id: ncurses_defs,v 1.91 2019/06/23 15:19:43 tom Exp $
##############################################################################
# Copyright (c) 2000-2012,2013 Free Software Foundation, Inc. #
# Copyright (c) 2000-2018,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -41,15 +41,26 @@ DECL_ERRNO
ETIP_NEEDS_MATH_H
GCC_NORETURN /* nothing */
GCC_UNUSED /* nothing */
HAVE_ALLOC_PAIR
HAVE_ASSUME_DEFAULT_COLORS
HAVE_BIG_CORE
HAVE_BSD_CGETENT
HAVE_BSD_SIGNAL_H
HAVE_BSD_STRING_H
HAVE_BTOWC
HAVE_BUILTIN_H
HAVE_CHGAT 1
HAVE_COLOR_CONTENT 1
HAVE_COLOR_SET 1
HAVE_CONSISTENT_GETENV
HAVE_COPYWIN 1
HAVE_CURSCR 1
HAVE_CURSES_DATA_TABSIZE 1
HAVE_CURSES_DATA_TTYTYPE 1
HAVE_DELSCREEN 1
HAVE_DERWIN 1
HAVE_DIRENT_H
HAVE_DUPWIN 1
HAVE_ERRNO
HAVE_FCNTL_H
HAVE_FILTER 1
@ -69,7 +80,9 @@ HAVE_GETWIN 1
HAVE_GPM_H
HAVE_GPP_BUILTIN_H
HAVE_GXX_BUILTIN_H
HAVE_HALFDELAY 1
HAVE_HAS_KEY
HAVE_INIT_EXTENDED_COLOR
HAVE_INTTYPES_H
HAVE_IOSTREAM
HAVE_ISASCII
@ -83,8 +96,10 @@ HAVE_LIBGPM
HAVE_LIBMENU
HAVE_LIBMPATROL
HAVE_LIBPANEL
HAVE_LIB_PCRE2
HAVE_LIMITS_H
HAVE_LINK
HAVE_LOCALECONV
HAVE_LOCALE_H
HAVE_LONG_FILE_NAMES
HAVE_MATH_H
@ -96,11 +111,16 @@ HAVE_MBSTOWCS
HAVE_MBTOWC
HAVE_MENU_H
HAVE_MKSTEMP
HAVE_MVDERWIN 1
HAVE_MVVLINE 1
HAVE_MVWIN 1
HAVE_MVWVLINE 1
HAVE_NANOSLEEP
HAVE_NC_ALLOC_H
HAVE_NEWPAD 1
HAVE_PANEL_H
HAVE_PCRE2_POSIX_H
HAVE_PCREPOSIX_H
HAVE_POLL
HAVE_POLL_H
HAVE_PURIFY
@ -111,8 +131,10 @@ HAVE_REGEXPR_H_FUNCS
HAVE_REGEXP_H_FUNCS
HAVE_REGEX_H_FUNCS
HAVE_REMOVE
HAVE_RESET_COLOR_PAIRS
HAVE_RESIZETERM
HAVE_RESIZE_TERM
HAVE_RESTARTTERM 1
HAVE_RIPOFFLINE 1
HAVE_SCR_DUMP 1
HAVE_SELECT
@ -134,6 +156,7 @@ HAVE_STRLCAT
HAVE_STRLCPY
HAVE_STRSTR
HAVE_SYMLINK
HAVE_SYSCONF
HAVE_SYS_BSDTYPES_H
HAVE_SYS_IOCTL_H
HAVE_SYS_PARAM_H
@ -147,6 +170,7 @@ HAVE_TCGETATTR
HAVE_TCGETPGRP
HAVE_TELL
HAVE_TERMATTRS 1
HAVE_TERMCAP_H 1
HAVE_TERMIOS_H
HAVE_TERMIO_H
HAVE_TERMNAME 1
@ -156,6 +180,8 @@ HAVE_TGETENT 1
HAVE_TIGETNUM 1
HAVE_TIGETSTR 1
HAVE_TIMES
HAVE_TPUTS_SP
HAVE_TSEARCH
HAVE_TTYENT_H
HAVE_TYPEAHEAD 1
HAVE_TYPEINFO
@ -165,26 +191,35 @@ HAVE_UNCTRL_H 1
HAVE_UNISTD_H
HAVE_UNLINK
HAVE_USE_DEFAULT_COLORS
HAVE_USE_ENV 1
HAVE_USE_EXTENDED_NAMES
HAVE_USE_SCREEN
HAVE_USE_WINDOW
HAVE_VFSCANF
HAVE_VIDPUTS 1
HAVE_VID_PUTS 1
HAVE_VSNPRINTF
HAVE_VSSCANF
HAVE_VW_PRINTW 1
HAVE_WCHGAT 1
HAVE_WCSRTOMBS
HAVE_WCSTOMBS
HAVE_WCTOB
HAVE_WCTOMB
HAVE_WCTYPE_H
HAVE_WINSDELLN 1
HAVE_WINSSTR 1
HAVE_WORKING_POLL
HAVE_WRESIZE
HAVE_WSYNCDOWN 1
HAVE__DOSCAN
HAVE__TRACEF
MIXEDCASE_FILENAMES
NCURSES_CHAR_EQ
NCURSES_EXPANDED
NCURSES_EXT_COLORS
NCURSES_EXT_FUNCS
NCURSES_EXT_PUTWIN
NCURSES_NO_PADDING
NCURSES_OSPEED_COMPAT
NCURSES_PATHSEP ':'
@ -201,6 +236,7 @@ TERMPATH "none"
TIME_WITH_SYS_TIME
TYPEOF_CHTYPE
USE_COLORFGBG
USE_FOPEN_BIN_R
USE_GETCAP
USE_GETCAP_CACHE
USE_HARD_TABS

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* Copyright (c) 1998-2014,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -25,11 +25,41 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */
/* $Id: ncurses_dll.h.in,v 1.11 2018/06/23 21:38:14 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
/*
* MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64.
*/
#if defined(__MINGW64__)
#ifndef _WIN64
#define _WIN64 1
#endif
#elif defined(__MINGW32__)
#ifndef _WIN32
#define _WIN32 1
#endif
/* 2014-08-02 workaround for broken MinGW compiler.
* Oddly, only TRACE is mapped to trace - the other -D's are okay.
* suggest TDM as an alternative.
*/
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#ifdef trace
#undef trace
#define TRACE
#endif
#endif /* broken compiler */
#endif /* MingW */
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.
@ -44,7 +74,7 @@
#undef NCURSES_DLL
#define NCURSES_STATIC
#if defined(__CYGWIN__) || defined(__MINGW32__)
#if defined(__CYGWIN__) || defined(_WIN32)
# if defined(NCURSES_DLL)
# if defined(NCURSES_STATIC)
# undef NCURSES_STATIC

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. *
* Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -28,17 +28,16 @@
/****************************************************************************
* Author: Juergen Pfeifer, 2008-on *
* *
****************************************************************************/
/* $Id: ncurses_mingw.h,v 1.2 2011/06/25 20:51:00 tom Exp $ */
/* $Id: ncurses_mingw.h,v 1.5 2018/06/24 00:07:35 tom Exp $ */
/*
* This is a placeholder up to now and describes what needs to be implemented
* to support I/O to external terminals with ncurses on the Windows OS.
*/
#if __MINGW32__
#ifdef _WIN32
#ifndef _NC_MINGWH
#define _NC_MINGWH
@ -47,28 +46,36 @@
#undef TERMIOS
#define TERMIOS 1
#define InvalidHandle ((TERM_HANDLE)-1)
#define InvalidConsoleHandle(s) ((s)==InvalidHandle)
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
typedef unsigned int speed_t;
typedef unsigned short otcflag_t;
typedef unsigned char ospeed_t;
#define NCCS 32
#define NCCS 18
struct termios
{
tcflag_t c_iflag; /* input mode */
tcflag_t c_oflag; /* output mode */
tcflag_t c_cflag; /* control mode */
tcflag_t c_lflag; /* local mode */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* c_ospeed */
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
char c_line;
cc_t c_cc[NCCS];
speed_t c_ispeed;
speed_t c_ospeed;
};
extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg);
extern void _nc_set_term_driver(void* term);
extern NCURSES_EXPORT(int) _nc_mingw_tcsetattr(
int fd,
int optional_actions,
const struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcgetattr(
int fd,
struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
int fd,
int queue);
extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);
#endif /* _NC_MINGWH */
#endif /* __MINGW32__ */
#endif /* _WIN32 */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* Copyright (c) 1998-2018,2019 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 *
@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
/* $Id: term_entry.h,v 1.44 2013/05/25 20:13:38 tom Exp $ */
/* $Id: term_entry.h,v 1.58 2019/12/07 16:11:15 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@ -40,53 +40,18 @@
#ifndef NCURSES_TERM_ENTRY_H_incl
#define NCURSES_TERM_ENTRY_H_incl 1
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
#include <curses.h>
#include <term.h>
/*
* see db_iterator.c - this enumeration lists the places searched for a
* terminal description and defines the order in which they are searched.
*/
typedef enum {
dbdTIC = 0, /* special, used by tic when writing entry */
#if NCURSES_USE_DATABASE
dbdEnvOnce, /* the $TERMINFO environment variable */
dbdHome, /* $HOME/.terminfo */
dbdEnvList, /* the $TERMINFO_DIRS environment variable */
dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
dbdCfgOnce, /* the compiled-in TERMINFO value */
#endif
#if NCURSES_USE_TERMCAP
dbdEnvOnce2, /* the $TERMCAP environment variable */
dbdEnvList2, /* the $TERMPATH environment variable */
dbdCfgList2, /* the compiled-in TERMPATH */
#endif
dbdLAST
} DBDIRS;
#define MAX_USES 32
#define MAX_CROSSLINKS 16
typedef struct entry {
TERMTYPE tterm;
unsigned nuses;
struct {
char *name;
struct entry *link;
long line;
} uses[MAX_USES];
int ncrosslinks;
struct entry *crosslinks[MAX_CROSSLINKS];
long cstart, cend;
long startline;
struct entry *next;
struct entry *last;
} ENTRY;
/* *INDENT-OFF* */
/*
* These macros may be used by programs that know about TERMTYPE:
*/
#if NCURSES_XNAMES
#define NUM_BOOLEANS(tp) (tp)->num_Booleans
#define NUM_NUMBERS(tp) (tp)->num_Numbers
@ -106,15 +71,66 @@ extern "C" {
#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
#if NCURSES_XNAMES
#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; n < NUM_BOOLEANS(tp); n++)
#define for_each_ext_number(n,tp) for(n = NUMCOUNT; n < NUM_NUMBERS(tp); n++)
#define for_each_ext_string(n,tp) for(n = STRCOUNT; n < NUM_STRINGS(tp); n++)
#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; (int) n < (int) NUM_BOOLEANS(tp); n++)
#define for_each_ext_number(n,tp) for(n = NUMCOUNT; (int) n < (int) NUM_NUMBERS(tp); n++)
#define for_each_ext_string(n,tp) for(n = STRCOUNT; (int) n < (int) NUM_STRINGS(tp); n++)
#endif
#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
/*
* The remaining type-definitions and macros are used only internally by the
* ncurses utilities.
*/
#ifdef NCURSES_INTERNALS
/*
* see db_iterator.c - this enumeration lists the places searched for a
* terminal description and defines the order in which they are searched.
*/
typedef enum {
dbdTIC = 0, /* special, used by tic when writing entry */
#if NCURSES_USE_DATABASE
dbdEnvOnce, /* the $TERMINFO environment variable */
dbdHome, /* $HOME/.terminfo */
dbdEnvList, /* the $TERMINFO_DIRS environment variable */
dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
dbdCfgOnce, /* the compiled-in TERMINFO value */
#endif
#if NCURSES_USE_TERMCAP
dbdEnvOnce2, /* the $TERMCAP environment variable */
dbdEnvList2, /* the $TERMPATH environment variable */
dbdCfgList2, /* the compiled-in TERMPATH */
#endif
dbdLAST
} DBDIRS;
#define MAX_USES 32
#define MAX_CROSSLINKS 16
typedef struct entry ENTRY;
typedef struct {
char *name;
ENTRY *link;
long line;
} ENTRY_USES;
struct entry {
TERMTYPE2 tterm;
unsigned nuses;
ENTRY_USES uses[MAX_USES];
int ncrosslinks;
ENTRY *crosslinks[MAX_CROSSLINKS];
long cstart;
long cend;
long startline;
ENTRY *next;
ENTRY *last;
};
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
@ -131,7 +147,10 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
#define ANDMISSING(p,q) \
{if (PRESENT(p) && !PRESENT(q)) _nc_warning(#p " but no " #q);}
{ \
if (PRESENT(p) && !PRESENT(q)) \
_nc_warning(#p " but no " #q); \
}
#define PAIRED(p,q) \
{ \
@ -141,25 +160,25 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
_nc_warning(#p " but no " #q); \
}
/*
* These entrypoints are used only by the ncurses utilities such as tic.
*/
/* alloc_entry.c: elementary allocation code */
extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
extern NCURSES_EXPORT(void) _nc_init_entry (TERMTYPE *const);
extern NCURSES_EXPORT(void) _nc_merge_entry (TERMTYPE *const, TERMTYPE *const);
extern NCURSES_EXPORT(void) _nc_init_entry (ENTRY *const);
extern NCURSES_EXPORT(void) _nc_merge_entry (ENTRY *const, ENTRY *const);
extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
/* alloc_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE *, TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
/* free_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
/* lib_acs.c */
extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
/* lib_termcap.c: trim sgr0 string for termcap users */
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE *);
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
/* parse_entry.c: entry-parsing code */
#if NCURSES_XNAMES
@ -170,8 +189,9 @@ extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
/* write_entry.c: writing an entry to the file system */
extern NCURSES_EXPORT(void) _nc_set_writedir (char *);
extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const);
extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE2 *const);
extern NCURSES_EXPORT(int) _nc_write_object (TERMTYPE2 *, char *, unsigned *, unsigned);
/* comp_parse.c: entry list handling */
extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
@ -180,13 +200,37 @@ extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE *, bool);
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE2 *, bool);
/* trace_xnames.c */
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
/* *INDENT-ON* */
#endif /* NCURSES_INTERNALS */
/*
* These entrypoints were used by tack before 1.08.
*/
#undef NCURSES_TACK_1_08
#ifdef NCURSES_INTERNALS
#define NCURSES_TACK_1_08 /* nothing */
#else
#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08")
#endif
/* alloc_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *) NCURSES_TACK_1_08;
/* lib_acs.c */
extern NCURSES_EXPORT(void) _nc_init_acs (void) NCURSES_TACK_1_08; /* corresponds to traditional 'init_acs()' */
/* free_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *) NCURSES_TACK_1_08;
#ifdef __cplusplus
}
#endif
#endif /* NCURSES_TERM_ENTRY_H_incl */
/* *INDENT-ON* */
#endif /* NCURSES_TERM_ENTRY_H_incl */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* Copyright (c) 1998-2001,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -31,7 +31,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: termcap.h.in,v 1.16 2001/03/24 21:53:27 tom Exp $ */
/* $Id: termcap.h.in,v 1.18 2018/04/07 20:46:20 tom Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
@ -48,9 +48,6 @@ extern "C"
#include <sys/types.h>
#undef NCURSES_CONST
#define NCURSES_CONST @NCURSES_CONST@
#undef NCURSES_OSPEED
#define NCURSES_OSPEED @NCURSES_OSPEED@
@ -60,11 +57,11 @@ extern NCURSES_EXPORT_VAR(char *) BC;
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
#if !defined(NCURSES_TERM_H_incl)
extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);
extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);
extern NCURSES_EXPORT(int) tgetflag (const char *);
extern NCURSES_EXPORT(int) tgetnum (const char *);
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
#endif

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2018,2019 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 *
@ -33,9 +33,8 @@
****************************************************************************/
/*
* $Id: tic.h,v 1.69 2012/03/17 18:22:10 tom Exp $
* tic.h - Global variables and structures for the terminfo
* compiler.
* $Id: tic.h,v 1.80 2019/12/07 16:05:22 tom Exp $
* tic.h - Global variables and structures for the terminfo compiler.
*/
#ifndef __TIC_H
@ -45,10 +44,12 @@
extern "C" {
#endif
#include <ncurses_cfg.h>
#include <curses.h> /* for the _tracef() prototype, ERR/OK, bool defs */
/*
** The format of compiled terminfo files is as follows:
** The format of SVr2 compiled terminfo files is as follows:
**
** Header (12 bytes), containing information given below
** Names Section, containing the names of the terminal
@ -64,6 +65,11 @@ extern "C" {
** String Table, containing the actual characters of the string
** capabilities.
**
** In the SVr2 format, "short" means signed 16-bit numbers, which is sometimes
** inconvenient. The numbers are signed, to provide for absent and canceled
** values. ncurses6.1 introduced an extension to this compiled format, by
** making the Number Section a list of signed 32-bit integers.
**
** NOTE that all short integers in the file are stored using VAX/PDP-style
** byte-order, i.e., least-significant byte first.
**
@ -76,6 +82,7 @@ extern "C" {
*/
#define MAGIC 0432 /* first two bytes of a compiled entry */
#define MAGIC2 01036 /* first two bytes of a compiled 32-bit entry */
#undef BYTE
#define BYTE(p,n) (unsigned char)((p)[n])
@ -84,14 +91,23 @@ extern "C" {
#define IS_NEG2(p) ((BYTE(p,0) == 0376) && (BYTE(p,1) == 0377))
#define LOW_MSB(p) (BYTE(p,0) + 256*BYTE(p,1))
#define IS_TIC_MAGIC(p) (LOW_MSB(p) == MAGIC)
#define IS_TIC_MAGIC(p) (LOW_MSB(p) == MAGIC || LOW_MSB(p) == MAGIC2)
#define quick_prefix(s) (!strncmp((s), "b64:", (size_t)4) || !strncmp((s), "hex:", (size_t)4))
/*
* The "maximum" here is misleading; XSI guarantees minimum values, which a
* given implementation may exceed.
*/
#define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */
#define MAX_ENTRY_SIZE 4096 /* maximum legal entry size */
#define MAX_ENTRY_SIZE1 4096 /* maximum legal entry size (SVr2) */
#define MAX_ENTRY_SIZE2 32768 /* maximum legal entry size (ncurses6.1) */
#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR
#define MAX_ENTRY_SIZE MAX_ENTRY_SIZE2
#else
#define MAX_ENTRY_SIZE MAX_ENTRY_SIZE1
#endif
/*
* The maximum size of individual name or alias is guaranteed in XSI to be at
@ -118,7 +134,8 @@ extern "C" {
#define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT)
#define set_trace_level(n) \
_nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL), \
_nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \
+ DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \
_nc_tracing |= DEBUG_LEVEL(n)
#ifdef TRACE
@ -127,11 +144,6 @@ extern "C" {
#define DEBUG(n, a) /*nothing*/
#endif
extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
extern NCURSES_EXPORT(void) _nc_tracef (char *, ...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
/*
* These are the types of tokens returned by the scanner. The first
* three are also used in the hash table of capability names. The scanner
@ -148,49 +160,33 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
#define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */
/*
* The global structure in which the specific parts of a
* scanned token are returned.
*
*/
/*
* The global structure in which the specific parts of a
* scanned token are returned.
*/
struct token
{
char *tk_name; /* name of capability */
char *tk_name; /* name of capability */
int tk_valnumber; /* value of capability (if a number) */
char *tk_valstring; /* value of capability (if a string) */
};
extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
/*
* Offsets to string capabilities, with the corresponding functionkey
* codes.
*/
/*
* Offsets to string capabilities, with the corresponding functionkey codes.
*/
struct tinfo_fkeys {
unsigned offset;
chtype code;
};
#if BROKEN_LINKER
#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
#else
extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
#endif
typedef short HashValue;
/*
* The file comp_captab.c contains an array of these structures, one
* per possible capability. These are indexed by a hash table array of
* pointers to the same structures for use by the parser.
*/
/*
* The file comp_captab.c contains an array of these structures, one per
* possible capability. These are indexed by a hash table array of pointers to
* the same structures for use by the parser.
*/
struct name_table_entry
{
const char *nte_name; /* name to hash on */
@ -199,10 +195,9 @@ struct name_table_entry
HashValue nte_link; /* index in table of next hash, or -1 */
};
/*
* Use this structure to hide differences between terminfo and termcap
* tables.
*/
/*
* Use this structure to hide differences between terminfo and termcap tables.
*/
typedef struct {
unsigned table_size;
const HashValue *table_data;
@ -217,13 +212,23 @@ struct alias
const char *source;
};
extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#define NOTFOUND ((struct name_table_entry *) 0)
/*
* The file comp_userdefs.c contains an array of these structures, one per
* possible capability. These are indexed by a hash table array of pointers to
* the same structures for use by the parser.
*/
struct user_table_entry
{
const char *ute_name; /* name to hash on */
int ute_type; /* mask (BOOLEAN, NUMBER, STRING) */
unsigned ute_argc; /* number of parameters */
unsigned ute_args; /* bit-mask for string parameters */
HashValue ute_index; /* index of associated variable in its array */
HashValue ute_link; /* index in table of next hash, or -1 */
};
/*
* The casts are required for correct sign-propagation with systems such as
* AIX, IRIX64, Solaris which default to unsigned characters. The C standard
@ -256,6 +261,10 @@ extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#ifdef NCURSES_TERM_ENTRY_H_incl
/*
* These entrypoints are used only by the ncurses utilities such as tic.
*/
#ifdef NCURSES_INTERNALS
/* access.c */
extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *);
extern NCURSES_EXPORT(bool) _nc_is_abs_path (const char *);
@ -264,17 +273,21 @@ extern NCURSES_EXPORT(bool) _nc_is_file_path (const char *);
extern NCURSES_EXPORT(char *) _nc_basename (char *);
extern NCURSES_EXPORT(char *) _nc_rootname (char *);
/* comp_captab.c */
extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
/* comp_hash.c: name lookup */
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
(const char *, const HashValue *);
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
(const char *, int, bool);
extern NCURSES_EXPORT(struct user_table_entry const *) _nc_find_user_entry
(const char *);
/* comp_scan.c: lexical analysis */
extern NCURSES_EXPORT(int) _nc_get_token (bool);
extern NCURSES_EXPORT(void) _nc_panic_mode (char);
extern NCURSES_EXPORT(void) _nc_push_token (int);
extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
extern NCURSES_EXPORT_VAR(int) _nc_curr_col;
extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
extern NCURSES_EXPORT_VAR(int) _nc_syntax;
@ -296,11 +309,12 @@ extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFL
extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
/* comp_expand.c: expand string into readable form */
extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
/* comp_scan.c */
extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
/* comp_scan.c: decode string from readable form */
extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *);
/* comp_userdefs.c */
NCURSES_EXPORT(const struct user_table_entry *) _nc_get_userdefs_table (void);
NCURSES_EXPORT(const HashData *) _nc_get_hash_user (void);
/* captoinfo.c: capability conversion */
extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const);
@ -309,6 +323,14 @@ extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int con
/* home_terminfo.c */
extern NCURSES_EXPORT(char *) _nc_home_terminfo (void);
/* init_keytry.c */
#if BROKEN_LINKER
#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
#else
extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
#endif
/* lib_tparm.c */
#define NUM_PARM 9
@ -316,8 +338,13 @@ extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *);
/* lib_trace.c */
extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
/* lib_tputs.c */
extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
/* comp_main.c: compiler main */
extern const char * _nc_progname;
@ -331,6 +358,33 @@ extern NCURSES_EXPORT(void) _nc_last_db(void);
/* write_entry.c */
extern NCURSES_EXPORT(int) _nc_tic_written (void);
#endif /* NCURSES_INTERNALS */
/*
* These entrypoints were used by tack before 1.08.
*/
#undef NCURSES_TACK_1_08
#ifdef NCURSES_INTERNALS
#define NCURSES_TACK_1_08 /* nothing */
#else
#define NCURSES_TACK_1_08 GCC_DEPRECATED("upgrade to tack 1.08")
#endif
/* comp_hash.c: name lookup */
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
(const char *, const HashValue *) NCURSES_TACK_1_08;
extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool) NCURSES_TACK_1_08;
/* comp_scan.c: lexical analysis */
extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *) NCURSES_TACK_1_08;
/* comp_expand.c: expand string into readable form */
extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int) NCURSES_TACK_1_08;
/* comp_scan.c: decode string from readable form */
extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *) NCURSES_TACK_1_08;
#endif /* NCURSES_TERM_ENTRY_H_incl */
#ifdef __cplusplus

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2010,2011 Free Software Foundation, Inc. *
.\" Copyright (c) 2010-2016,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,30 +26,96 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: MKada_config.in,v 1.5 2011/03/26 14:44:51 tom Exp $
.\" $Id: MKada_config.in,v 1.11 2019/09/07 20:22:51 tom Exp $
.ds C adacurses@USE_CFG_SUFFIX@\-config
.TH ADACURSES "1" "" "" "User Commands"
.SH NAME
adacurses\-config \- helper script for AdaCurses libraries
adacurses@USE_CFG_SUFFIX@\-config \- helper script for @ADA_LIBNAME@ libraries
.SH SYNOPSIS
.B adacurses\-config
.B \*C
[\fIoptions\fR]
.SH DESCRIPTION
This is a shell script which simplifies configuring an application to use
the AdaCurses library binding to ncurses.
the @ADA_LIBNAME@ library binding to ncurses.
.SH OPTIONS
.TP
\fB\-\-cflags\fR
echos the gnat (Ada compiler) flags needed to compile with AdaCurses.
echos the gnat (Ada compiler) flags needed to compile with @ADA_LIBNAME@.
.TP
\fB\-\-libs\fR
echos the gnat libraries needed to link with AdaCurses.
echos the gnat libraries needed to link with @ADA_LIBNAME@.
.TP
\fB\-\-version\fR
echos the release+patchdate version of the ncurses libraries used
to configure and build AdaCurses.
to configure and build @ADA_LIBNAME@.
.TP
\fB\-\-help\fR
prints a list of the \fBadacurses\-config\fP script's options.
prints a list of the \fB\*C\fP script's options.
.PP
If no options are given, \fB\*C\fP prints the combination
of
\fB\-\-cflags\fR and
\fB\-\-libs\fR
that \fBgnatmake\fP expects (see example).
.SH EXAMPLE
.PP
For example, supposing that you want to compile the "Hello World!"
program for @ADA_LIBNAME@.
Make a file named "hello.adb":
.RS
.nf
.ft CW
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
procedure Hello is
Visibility : Cursor_Visibility := Invisible;
done : Boolean := False;
c : Key_Code;
begin
Init_Screen;
Set_Echo_Mode (False);
Set_Cursor_Visibility (Visibility);
Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2);
Add (Str => "Hello World!");
while not done loop
c := Get_Keystroke (Standard_Window);
case c is
when Character'Pos ('q') => done := True;
when others => null;
end case;
Nap_Milli_Seconds (50);
end loop;
End_Windows;
end Hello;
.fi
.RE
.PP
Then, using
.RS
.ft CW
gnatmake `adacurses-config --cflags` hello -largs `adacurses-config --libs`
.ft
.RE
.PP
or (simpler):
.RS
.ft CW
gnatmake hello `adacurses-config`
.ft
.RE
.PP
you will compile and link the program.
.SH "SEE ALSO"
\fBcurses\fR(3X)
.PP

View file

@ -1,10 +1,10 @@
#!/bin/sh
# $Id: MKterminfo.sh,v 1.12 2003/01/11 21:42:12 tom Exp $
# $Id: MKterminfo.sh,v 1.17 2019/03/02 22:18:27 tom Exp $
#
# MKterminfo.sh -- generate terminfo.5 from Caps tabular data
#
#***************************************************************************
# Copyright (c) 1998,2002,2003 Free Software Foundation, Inc. *
# Copyright (c) 1998-2018,2019 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 *
@ -50,25 +50,34 @@ if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi
#
head=$1
caps=$2
tail=$3
cat <<'EOF'
'\" t
.\" DO NOT EDIT THIS FILE BY HAND!
.\" It is generated from terminfo.head, Caps, and terminfo.tail.
.\"
.\" Note: this must be run through tbl before nroff.
.\" The magic cookie on the first line triggers this under some man programs.
shift 1
caps=
while test $# -gt 1
do
caps="$caps $1"
shift 1
done
tail=$1
cat <<EOF
'\\" t
.\\" DO NOT EDIT THIS FILE BY HAND!
.\\" It is generated from terminfo.head, $caps, and terminfo.tail.
.\\"
.\\" Note: this must be run through tbl before nroff.
.\\" The magic cookie on the first line triggers this under some man programs.
EOF
cat $head
temp=temp$$
sorted=sorted$$
unsorted=unsorted$$
trap "rm -f $sorted $temp $unsorted; exit 99" 1 2 5 15
trap "code=\$?; rm -f $sorted $temp $unsorted; exit \$code" EXIT HUP INT QUIT TERM
rm -f $sorted $temp $unsorted
sed -n <$caps "\
cat $caps | sed -n "\
/%%-STOP-HERE-%%/q
/^#%center/s, expand,,
/^#%lw25/s, lw6 , lw7 ,
/^#%/s/#%//p
/^#/d
s/[ ][ ]*/ /g
@ -105,6 +114,7 @@ done <$unsorted
test $saved = yes && sort $temp >>$sorted
sed -e 's/^\.\.$//' $sorted | tr "\005\006" "\012\134"
cat $tail
rm -f $sorted $temp $unsorted
sed -e '/^center expand;/s, expand,,' \
-e '/^\.TS/,/^\\/s, lw[1-9][0-9]*\., l.,' \
$tail

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.47 2013/08/04 20:23:20 tom Exp $
# $Id: Makefile.in,v 1.49 2019/03/02 22:18:27 tom Exp $
##############################################################################
# Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. #
# Copyright (c) 1998-2015,2019 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -34,7 +34,7 @@
# NOTE: When you add or rename a man page, make sure you update both
# the top-level MANIFEST and any man/*.renames files!
SHELL = /bin/sh
SHELL = @SHELL@
VPATH = @srcdir@
DESTDIR = @DESTDIR@
@ -62,15 +62,20 @@ $(DESTDIR)$(mandir) :
EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 *-config.1 $(srcdir)/*.[0-9]*
install install.man : terminfo.5 $(DESTDIR)$(mandir)
sh ../edit_man.sh normal installing $(EDITARGS)
$(SHELL) ../edit_man.sh normal installing $(EDITARGS)
uninstall uninstall.man :
-sh ../edit_man.sh normal removing $(EDITARGS)
-$(SHELL) ../edit_man.sh normal removing $(EDITARGS)
# We compose terminfo.5 from the real sources...
CAPLIST=$(srcdir)/../include/@TERMINFO_CAPS@
terminfo.5: $(srcdir)/terminfo.head $(CAPLIST) $(srcdir)/terminfo.tail Makefile $(srcdir)/MKterminfo.sh
sh $(srcdir)/MKterminfo.sh $(srcdir)/terminfo.head $(CAPLIST) $(srcdir)/terminfo.tail >terminfo.5
CAPLIST = \
$(srcdir)/../include/@TERMINFO_CAPS@ \
$(srcdir)/../include/Caps-ncurses
terminfo.5: $(srcdir)/terminfo.head \
$(CAPLIST) \
$(srcdir)/terminfo.tail \
Makefile $(srcdir)/MKterminfo.sh
$(SHELL) $(srcdir)/MKterminfo.sh $(srcdir)/terminfo.head $(CAPLIST) $(srcdir)/terminfo.tail >terminfo.5
mostlyclean :
-rm -f core tags TAGS *~ *.bak *.ln *.atac trace
@ -79,7 +84,7 @@ clean: mostlyclean
rm -f terminfo.5
../edit_man.sed : make_sed.sh @MANPAGE_RENAMES@
sh $(srcdir)/make_sed.sh @MANPAGE_RENAMES@ >../edit_man.sed
$(SHELL) $(srcdir)/make_sed.sh @MANPAGE_RENAMES@ >../edit_man.sed
distclean realclean: clean
rm -f Makefile *-config.1 ../edit_man.* ../man_alias.*

View file

@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -27,14 +27,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: captoinfo.1m,v 1.25 2010/12/04 18:36:44 tom Exp $
.\" $Id: captoinfo.1m,v 1.29 2019/10/12 21:10:00 tom Exp $
.TH @CAPTOINFO@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
\fB@CAPTOINFO@\fR \- convert a \fItermcap\fR description into a \fIterminfo\fR description
.SH SYNOPSIS
\fB@CAPTOINFO@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . .
\fB@CAPTOINFO@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR ...
.SH DESCRIPTION
\fB@CAPTOINFO@\fR looks in each given text
\fIfile\fR for \fBtermcap\fR descriptions.
@ -152,7 +152,7 @@ GG acs magic cookie count
.TE
.PP
If the single-line capabilities occur in an entry, they will automatically
be composed into an \fIacsc\fR string.
be composed into an \fBacsc\fR string.
The double-line capabilities and
\fBGG\fR are discarded with a warning message.
.PP
@ -174,18 +174,24 @@ font3 s3ds
.TE
.PP
Additionally, the AIX \fIbox1\fR capability will be automatically translated to
an \fIacsc\fR string.
an \fBacsc\fR string.
.PP
Hewlett-Packard's terminfo library supports two nonstandard terminfo
capabilities \fImeml\fR (memory lock) and \fImemu\fR (memory unlock).
capabilities \fBmeml\fR (memory lock) and \fBmemu\fR (memory unlock).
These will be discarded with a warning message.
.SH NOTES
This utility is actually a link to \fB@TIC@\fR(1M), running in \fI\-I\fR mode.
You can use other \fB@TIC@\fR options such as \fB\-f\fR and \fB\-x\fR.
.PP
The trace option is not identical to SVr4's.
The verbose option is not identical to SVr4's.
Under SVr4, instead of following
the \fB\-v\fR with a trace level n, you repeat it n times.
.SH PORTABILITY
X/Open Curses, Issue 7 (2009) describes \fBtic\fP briefly,
but omits this program.
SVr4 systems provide \fBcaptoinfo\fP as a separate application from \fBtic\fP.
.PP
NetBSD does not provide this application.
.SH SEE ALSO
\fB@INFOCMP@\fR(1M),
\fBcurses\fR(3X),

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,21 +26,135 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: clear.1,v 1.10 2013/06/22 22:22:11 tom Exp $
.\" $Id: clear.1,v 1.22 2018/07/28 21:45:40 tom Exp $
.TH @CLEAR@ 1 ""
.\" these would be fallbacks for DS/DE,
.\" but groff changed the meaning of the macros.
.de NS
.ie n .sp
.el .sp .5
.ie n .in +4
.el .in +2
.nf
.ft C \" Courier
..
.de NE
.fi
.ft R
.ie n .in -4
.el .in -2
..
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.ds n 5
.SH NAME
\fB@CLEAR@\fR \- clear the terminal screen
.SH SYNOPSIS
\fB@CLEAR@\fR
\fB@CLEAR@\fR [\fB\-T\fR\fItype\fR] [\fB\-V\fP] [\fB\-x\fP]
.br
.SH DESCRIPTION
\fB@CLEAR@\fR clears your screen if this is possible,
including its scrollback buffer (if the extended "E3" capability is defined).
\fB@CLEAR@\fR looks in the environment for the terminal type and then in the
including its scrollback buffer
(if the extended \*(``E3\*('' capability is defined).
\fB@CLEAR@\fR looks in the environment for the terminal type
given by the environment variable \fBTERM\fP,
and then in the
\fBterminfo\fR database to determine how to clear the screen.
.PP
\fB@CLEAR@\fR ignores any command-line parameters that may be present.
\fB@CLEAR@\fR writes to the standard output.
You can redirect the standard output to a file (which prevents
\fB@CLEAR@\fR from actually clearing the screen),
and later \fBcat\fP the file to the screen, clearing it at that point.
.SH OPTIONS
.PP
.TP 5
.B \-T \fItype\fP
indicates the \fItype\fR of terminal.
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.
The options are as follows:
.TP
.B \-x
do not attempt to clear the terminal's scrollback buffer
using the extended \*(``E3\*('' capability.
.SH HISTORY
A \fBclear\fP command appeared in 2.79BSD dated February 24, 1979.
Later that was provided in Unix 8th edition (1985).
.PP
AT&T adapted a different BSD program (\fBtset\fP) to make
a new command (\fBtput\fP),
and used this to replace the \fBclear\fP command with a shell script
which calls \fBtput clear\fP, e.g.,
.NS
/usr/bin/tput ${1:+-T$1} clear 2> /dev/null
exit
.NE
.PP
In 1989, when Keith Bostic revised the BSD \fBtput\fP command
to make it similar to the AT&T \fBtput\fP,
he added a shell script for the \fBclear\fP command:
.NS
exec tput clear
.NE
.PP
The remainder of the script in each case is a copyright notice.
.PP
The ncurses \fBclear\fP command began in 1995 by adapting the original
BSD \fBclear\fP command (with terminfo, of course).
.PP
The \fBE3\fP extension came later:
.bP
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
.NS
printf '\\033[2J'
.NE
.IP
one could clear the \fIscrollback\fP using
.NS
printf '\\033[\fB3\fPJ'
.NE
.IP
This is documented in \fIXTerm Control Sequences\fP as a feature originating
with xterm.
.bP
A few other terminal developers adopted the feature, e.g., PuTTY in 2006.
.bP
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.
.bP
Again, a few other terminal developers adopted the feature.
But the
next relevant step was a change to the \fBclear\fP program in 2013
to incorporate this extension.
.bP
In 2013, the \fBE3\fP extension was overlooked in \fB@TPUT@\fP with
the \*(``clear\*('' parameter.
That was addressed in 2016 by reorganizing \fB@TPUT@\fP to share
its logic with \fB@CLEAR@\fP and \fB@TSET@\fP.
.SH PORTABILITY
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@.
.PP
The latter documents \fBtput\fP, which could be used to replace this utility
either via a shell script or by an alias (such as a symbolic link) to
run \fB@TPUT@\fP as \fB@CLEAR@\fP.
.SH SEE ALSO
\fB@TPUT@\fR(1), \fBterminfo\fR(\*n)
.PP

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2001-2011,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 2001-2017,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,10 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_add_wch.3x,v 1.15 2012/11/03 23:03:59 tom Exp $
.\" $Id: curs_add_wch.3x,v 1.25 2019/10/27 00:07:13 tom Exp $
.TH curs_add_wch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.IP \(bu 4
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.SH NAME
\fBadd_wch\fP,
@ -55,6 +60,7 @@
.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );"
.br
.SH DESCRIPTION
.SS add_wch
.PP
The
\fBadd_wch\fP,
@ -83,12 +89,13 @@ and the rendition specified by \fIwch\fP is ignored.
If the character part of \fIwch\fP is
a tab, newline, backspace or other control character,
the window is updated and the cursor moves as if \fBaddch\fR were called.
.SS echo_wchar
.PP
The \fBecho_wchar\fP
function is functionally equivalent to a call to
\fBadd_wch\fP
followed by a call to
\fBrefresh\fP.
\fBrefresh\fP(3X).
Similarly, the
\fBwecho_wchar\fP
is functionally equivalent to a call to
@ -107,80 +114,104 @@ These symbols correspond to the same VT100 line-drawing set as
\fBaddch\fP(3X).
.PP
.TS
l l l l
_ _ _ _
lw(1.5i) lw7 lw7 lw20.
\fIName\fR \fIUnicode\fP \fIDefault\fR \fIDescription\fR
WACS_BLOCK 0x25ae # solid square block
WACS_BOARD 0x2592 # board of squares
WACS_BTEE 0x2534 + bottom tee
WACS_BULLET 0x00b7 o bullet
WACS_CKBOARD 0x2592 : checker board (stipple)
WACS_DARROW 0x2193 v arrow pointing down
WACS_DEGREE 0x00b0 ' degree symbol
WACS_DIAMOND 0x25c6 + diamond
WACS_GEQUAL 0x2265 > greater-than-or-equal-to
WACS_HLINE 0x2500 \- horizontal line
WACS_LANTERN 0x2603 # lantern symbol
WACS_LARROW 0x2190 < arrow pointing left
WACS_LEQUAL 0x2264 < less-than-or-equal-to
WACS_LLCORNER 0x2514 + lower left-hand corner
WACS_LRCORNER 0x2518 + lower right-hand corner
WACS_LTEE 0x2524 + left tee
WACS_NEQUAL 0x2260 ! not-equal
WACS_PI 0x03c0 * greek pi
WACS_PLMINUS 0x00b1 # plus/minus
WACS_PLUS 0x253c + plus
WACS_RARROW 0x2192 > arrow pointing right
WACS_RTEE 0x251c + right tee
WACS_S1 0x23ba \- scan line 1
WACS_S3 0x23bb \- scan line 3
WACS_S7 0x23bc \- scan line 7
WACS_S9 0x23bd \&_ scan line 9
WACS_STERLING 0x00a3 f pound-sterling symbol
WACS_TTEE 0x252c + top tee
WACS_UARROW 0x2191 ^ arrow pointing up
WACS_ULCORNER 0x250c + upper left-hand corner
WACS_URCORNER 0x2510 + upper right-hand corner
WACS_VLINE 0x2502 | vertical line
l l l l l
l l l l l
_ _ _ _ _
lw(1.5i) lw5 lw5 lw5 lw20.
\fBACS\fR \fBUnicode\fP \fBASCII\fR \fBacsc\fP \fBGlyph\fR
\fBName\fR \fBDefault\fP \fBDefault\fR \fBchar\fP \fBName\fR
WACS_BLOCK 0x25ae # 0 solid square block
WACS_BOARD 0x2592 # h board of squares
WACS_BTEE 0x2534 + v bottom tee
WACS_BULLET 0x00b7 o ~ bullet
WACS_CKBOARD 0x2592 : a checker board (stipple)
WACS_DARROW 0x2193 v . arrow pointing down
WACS_DEGREE 0x00b0 ' f degree symbol
WACS_DIAMOND 0x25c6 + ` diamond
WACS_GEQUAL 0x2265 > > greater-than-or-equal-to
WACS_HLINE 0x2500 \- q horizontal line
WACS_LANTERN 0x2603 # i lantern symbol
WACS_LARROW 0x2190 < , arrow pointing left
WACS_LEQUAL 0x2264 < y less-than-or-equal-to
WACS_LLCORNER 0x2514 + m lower left-hand corner
WACS_LRCORNER 0x2518 + j lower right-hand corner
WACS_LTEE 0x2524 + t left tee
WACS_NEQUAL 0x2260 ! | not-equal
WACS_PI 0x03c0 * { greek pi
WACS_PLMINUS 0x00b1 # g plus/minus
WACS_PLUS 0x253c + n plus
WACS_RARROW 0x2192 > + arrow pointing right
WACS_RTEE 0x251c + u right tee
WACS_S1 0x23ba \- o scan line 1
WACS_S3 0x23bb \- p scan line 3
WACS_S7 0x23bc \- r scan line 7
WACS_S9 0x23bd \&_ s scan line 9
WACS_STERLING 0x00a3 f } pound-sterling symbol
WACS_TTEE 0x252c + w top tee
WACS_UARROW 0x2191 ^ \- arrow pointing up
WACS_ULCORNER 0x250c + l upper left-hand corner
WACS_URCORNER 0x2510 + k upper right-hand corner
WACS_VLINE 0x2502 | x vertical line
.TE
.PP
The wide-character configuration of ncurses also defines symbols
for thick- and double-lines:
for thick lines (\fBacsc\fP \*(``J\*('' to \*(``V\*(''):
.TS
l l l l l
l l l l l
_ _ _ _ _
lw(1.5i) lw5 lw5 lw5 lw20.
\fBACS\fR \fBUnicode\fP \fBASCII\fR \fBacsc\fP \fBGlyph\fR
\fBName\fR \fBDefault\fP \fBDefault\fR \fBchar\fP \fBName\fR
WACS_T_BTEE 0x253b + V thick tee pointing up
WACS_T_HLINE 0x2501 - Q thick horizontal line
WACS_T_LLCORNER 0x2517 + M thick lower left corner
WACS_T_LRCORNER 0x251b + J thick lower right corner
WACS_T_LTEE 0x252b + T thick tee pointing right
WACS_T_PLUS 0x254b + N thick large plus
WACS_T_RTEE 0x2523 + U thick tee pointing left
WACS_T_TTEE 0x2533 + W thick tee pointing down
WACS_T_ULCORNER 0x250f + L thick upper left corner
WACS_T_URCORNER 0x2513 + K thick upper right corner
WACS_T_VLINE 0x2503 | X thick vertical line
.TE
.PP
and for double-lines (\fBacsc\fP \*(``A\*('' to \*(``I\*(''):
.PP
.TS
l l l l
_ _ _ _
lw(1.5i) lw7 lw7 lw20.
\fIName\fR \fIUnicode\fP \fIDefault\fR \fIDescription\fR
WACS_T_ULCORNER 0x250f + thick upper left corner
WACS_T_LLCORNER 0x2517 + thick lower left corner
WACS_T_URCORNER 0x2513 + thick upper right corner
WACS_T_LRCORNER 0x251b + thick lower right corner
WACS_T_LTEE 0x252b + thick tee pointing right
WACS_T_RTEE 0x2523 + thick tee pointing left
WACS_T_BTEE 0x253b + thick tee pointing up
WACS_T_TTEE 0x2533 + thick tee pointing down
WACS_T_HLINE 0x2501 - thick horizontal line
WACS_T_VLINE 0x2503 | thick vertical line
WACS_T_PLUS 0x254b + thick large plus or crossover
WACS_D_ULCORNER 0x2554 + double upper left corner
WACS_D_LLCORNER 0x255a + double lower left corner
WACS_D_URCORNER 0x2557 + double upper right corner
WACS_D_LRCORNER 0x255d + double lower right corner
WACS_D_RTEE 0x2563 + double tee pointing left
WACS_D_LTEE 0x2560 + double tee pointing right
WACS_D_BTEE 0x2569 + double tee pointing up
WACS_D_TTEE 0x2566 + double tee pointing down
WACS_D_HLINE 0x2550 - double horizontal line
WACS_D_VLINE 0x2551 | double vertical line
WACS_D_PLUS 0x256c + double large plus or crossover
l l l l l
l l l l l
_ _ _ _ _
lw(1.5i) lw5 lw5 lw5 lw20.
\fBACS\fR \fBUnicode\fP \fBASCII\fR \fBacsc\fP \fBGlyph\fR
\fBName\fR \fBDefault\fP \fBDefault\fR \fBchar\fP \fBName\fR
WACS_D_BTEE 0x2569 + H double tee pointing up
WACS_D_HLINE 0x2550 - R double horizontal line
WACS_D_LLCORNER 0x255a + D double lower left corner
WACS_D_LRCORNER 0x255d + A double lower right corner
WACS_D_LTEE 0x2560 + F double tee pointing right
WACS_D_PLUS 0x256c + E double large plus
WACS_D_RTEE 0x2563 + G double tee pointing left
WACS_D_TTEE 0x2566 + I double tee pointing down
WACS_D_ULCORNER 0x2554 + C double upper left corner
WACS_D_URCORNER 0x2557 + B double upper right corner
WACS_D_VLINE 0x2551 | Y double vertical line
.TE
.PP
Unicode's descriptions for these characters differs slightly from ncurses,
by introducing the term \*(``light\*('' (along with less important details).
Here are its descriptions for the normal, thick, and double horizontal lines:
.bP
U+2500 BOX DRAWINGS LIGHT HORIZONTAL
.bP
U+2501 BOX DRAWINGS HEAVY HORIZONTAL
.bP
U+2550 BOX DRAWINGS DOUBLE HORIZONTAL
.SH RETURN VALUE
.PP
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
@ -213,7 +244,66 @@ SVr4 curses implementations defined their line-drawing symbols in
terms of intermediate symbols.
This implementation extends those symbols, providing new definitions
which are not in the SVr4 implementations.
.PP
Not all Unicode-capable terminals provide support for VT100-style
alternate character sets (i.e., the \fBacsc\fP capability),
with their corresponding line-drawing characters.
X/Open Curses did not address the aspect of integrating Unicode with
line-drawing characters.
Existing implementations of Unix curses (AIX, HPUX, Solaris)
use only the \fBacsc\fP character-mapping to provide this feature.
As a result, those implementations can only use single-byte line-drawing
characters.
Ncurses 5.3 (2002) provided a table of Unicode values to solve these problems.
NetBSD curses incorporated that table in 2010.
.PP
In this implementation, the Unicode values are used instead of the
terminal description's \fBacsc\fP mapping as discussed in ncurses(3X)
for the environment variable \fBNCURSES_NO_UTF8_ACS\fP.
In contrast, for the same cases, the line-drawing characters
described in \fBcurs_addch\fP(3X) will use only the ASCII default values.
.PP
Having Unicode available does not solve all of the problems with
line-drawing for curses:
.bP
The closest Unicode equivalents to the
VT100 graphics \fIS1\fP, \fIS3\fP, \fIS7\fP and \fIS9\fP
frequently are not displayed at
the regular intervals which the terminal used.
.bP
The \fIlantern\fP is a special case.
It originated with the AT&T 4410 terminal in the early 1980s.
There is no accessible documentation depicting the lantern symbol
on the AT&T terminal.
.IP
Lacking documentation, most readers assume that a \fIstorm lantern\fP
was intended.
But there are several possibilities, all with problems.
.IP
Unicode 6.0 (2010) does provide two lantern symbols: U+1F383 and U+1F3EE.
Those were not available in 2002, and are irrelevant since
they lie outside the BMP and as a result are not generally available
in terminals.
They are not storm lanterns, in any case.
.IP
Most \fIstorm lanterns\fP have a tapering glass chimney
(to guard against tipping);
some have a wire grid protecting the chimney.
.IP
For the tapering appearance, \[u2603] U+2603 was adequate.
In use on a terminal, no one can tell what the image represents.
Unicode calls it a snowman.
.IP
Others have suggested these alternatives:
\[sc] U+00A7 (section mark),
\[u0398] U+0398 (theta),
\[u03A6] U+03A6 (phi),
\[u03B4] U+03B4 (delta),
\[u2327] U+2327 (x in a rectangle),
\[u256C] U+256C (forms double vertical and horizontal), and
\[u2612] U+2612 (ballot box with x).
.SH SEE ALSO
.na
.PP
\fBcurses\fR(3X),
\fBcurs_addch\fR(3X),

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 2002-2017,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,10 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_add_wchstr.3x,v 1.10 2012/11/03 22:54:43 tom Exp $
.\" $Id: curs_add_wchstr.3x,v 1.12 2019/11/30 21:06:30 tom Exp $
.TH curs_add_wchstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.IP \(bu 4
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.na
.hy 0
@ -101,7 +106,7 @@ X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES

View file

@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
.\" Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -27,8 +27,16 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addch.3x,v 1.32 2011/01/15 14:15:10 tom Exp $
.\" $Id: curs_addch.3x,v 1.50 2019/11/30 20:07:00 tom Exp $
.TH curs_addch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.SH NAME
\fBaddch\fR,
\fBwaddch\fR,
@ -52,93 +60,118 @@
\fBint wechochar(WINDOW *win, const chtype ch);\fR
.br
.SH DESCRIPTION
.SS Adding characters
The \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR and \fBmvwaddch\fR routines put
the character \fIch\fR into the given window at its current window position,
which is then advanced. They are analogous to \fBputchar\fR in \fBstdio\fR(3).
If the advance is at the right margin, the cursor automatically wraps to the
beginning of the next line. At the bottom of the current scrolling region, if
\fBscrollok\fR is enabled, the scrolling region is scrolled up one line.
which is then advanced.
They are analogous to \fBputchar\fR(3) in \fBstdio\fR(3).
If the advance is at the right margin:
.bP
The cursor automatically wraps to the beginning of the next line.
.bP
At the bottom of the current scrolling region,
and if \fBscrollok\fR is enabled,
the scrolling region is scrolled up one line.
.bP
If \fBscrollok\fR is not enabled,
writing a character at the lower right margin succeeds.
However, an error is returned because
it is not possible to wrap to a new line
.PP
If \fIch\fR is a tab, newline, or backspace,
the cursor is moved appropriately within the window.
If \fIch\fR is a tab, newline, carriage return or backspace,
the cursor is moved appropriately within the window:
.bP
Backspace moves the cursor one character left; at the left
edge of a window it does nothing.
.bP
Carriage return moves the cursor to the window left margin on the current line.
.bP
Newline does a \fBclrtoeol\fR,
then moves the cursor to the window left margin on the next line,
scrolling the window if on the last line.
.bP
Tabs are considered to be at every eighth column.
The tab interval may be altered by setting the \fBTABSIZE\fR variable.
.PP
If \fIch\fR is any control character other than tab, newline, or backspace, it
is drawn in \fB^\fR\fIX\fR notation. Calling \fBwinch\fR after adding a
If \fIch\fR is any other control character, it
is drawn in \fB^\fR\fIX\fR notation.
Calling \fBwinch\fR after adding a
control character does not return the character itself, but instead returns
the ^-representation of the control character.
.PP
Video attributes can be combined with a character argument passed to
\fBaddch\fR or related functions by logical-ORing them into the character.
(Thus, text, including attributes, can be copied from one place to another
using \fBinch\fR and \fBaddch\fR.) See the \fBcurs_attr\fR(3X) page for
using \fBinch\fR(3X) and \fBaddch\fR.) See the \fBcurs_attr\fR(3X) page for
values of predefined video attribute constants that can be usefully OR'ed
into characters.
.SS Echoing characters
.PP
The \fBechochar\fR and \fBwechochar\fR routines are equivalent to a call to
\fBaddch\fR followed by a call to \fBrefresh\fR, or a call to \fBwaddch\fR
followed by a call to \fBwrefresh\fR. The knowledge that only a single
\fBaddch\fR followed by a call to \fBrefresh\fR(3X), or a call to \fBwaddch\fR
followed by a call to \fBwrefresh\fR.
The knowledge that only a single
character is being output is used and, for non-control characters, a
considerable performance gain may be seen by using these routines instead of
their equivalents.
.SS Line Graphics
The following variables may be used to add line drawing characters to the
screen with routines of the \fBaddch\fR family. The default character listed
screen with routines of the \fBaddch\fR family.
The default character listed
below is used if the \fBacsc\fR capability does not define a terminal-specific
replacement for it.
replacement for it,
or if the terminal and locale configuration requires Unicode but the
library is unable to use Unicode.
.PP
The names are taken from VT100 nomenclature.
.PP
.TS
l l l
_ _ _
l l l.
\fIName\fR \fIDefault\fR \fIDescription\fR
ACS_BLOCK # solid square block
ACS_BOARD # board of squares
ACS_BTEE + bottom tee
ACS_BULLET o bullet
ACS_CKBOARD : checker board (stipple)
ACS_DARROW v arrow pointing down
ACS_DEGREE ' degree symbol
ACS_DIAMOND + diamond
ACS_GEQUAL > greater-than-or-equal-to
ACS_HLINE \- horizontal line
ACS_LANTERN # lantern symbol
ACS_LARROW < arrow pointing left
ACS_LEQUAL < less-than-or-equal-to
ACS_LLCORNER + lower left-hand corner
ACS_LRCORNER + lower right-hand corner
ACS_LTEE + left tee
ACS_NEQUAL ! not-equal
ACS_PI * greek pi
ACS_PLMINUS # plus/minus
ACS_PLUS + plus
ACS_RARROW > arrow pointing right
ACS_RTEE + right tee
ACS_S1 \- scan line 1
ACS_S3 \- scan line 3
ACS_S7 \- scan line 7
ACS_S9 \&_ scan line 9
ACS_STERLING f pound-sterling symbol
ACS_TTEE + top tee
ACS_UARROW ^ arrow pointing up
ACS_ULCORNER + upper left-hand corner
ACS_URCORNER + upper right-hand corner
ACS_VLINE | vertical line
l l l l
l l l l
_ _ _ _
l l l l.
\fBACS\fR \fBACS\fR \fBacsc\fP \fBGlyph\fR
\fBName\fR \fBDefault\fR \fBchar\fP \fBName\fR
ACS_BLOCK # 0 solid square block
ACS_BOARD # h board of squares
ACS_BTEE + v bottom tee
ACS_BULLET o ~ bullet
ACS_CKBOARD : a checker board (stipple)
ACS_DARROW v . arrow pointing down
ACS_DEGREE ' f degree symbol
ACS_DIAMOND + ` diamond
ACS_GEQUAL > > greater-than-or-equal-to
ACS_HLINE \- q horizontal line
ACS_LANTERN # i lantern symbol
ACS_LARROW < , arrow pointing left
ACS_LEQUAL < y less-than-or-equal-to
ACS_LLCORNER + m lower left-hand corner
ACS_LRCORNER + j lower right-hand corner
ACS_LTEE + t left tee
ACS_NEQUAL ! | not-equal
ACS_PI * { greek pi
ACS_PLMINUS # g plus/minus
ACS_PLUS + n plus
ACS_RARROW > + arrow pointing right
ACS_RTEE + u right tee
ACS_S1 \- o scan line 1
ACS_S3 \- p scan line 3
ACS_S7 \- r scan line 7
ACS_S9 \&_ s scan line 9
ACS_STERLING f } pound-sterling symbol
ACS_TTEE + w top tee
ACS_UARROW ^ \- arrow pointing up
ACS_ULCORNER + l upper left-hand corner
ACS_URCORNER + k upper right-hand corner
ACS_VLINE | x vertical line
.TE
.SH RETURN VALUE
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
successful completion, unless otherwise noted in the preceding routine
descriptions.
(the SVr4 manuals specify only
\*(``an integer value other than \fBERR\fR\*('') upon successful completion,
unless otherwise noted in the preceding routine descriptions.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
@ -147,10 +180,36 @@ Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
.SH PORTABILITY
All these functions are described in the XSI Curses standard, Issue 4.
The defaults specified for forms-drawing characters apply in the POSIX locale.
.SS ACS Symbols
.LP
X/Open Curses states that the \fIACS_\fP definitions are \fBchar\fP constants.
For the wide-character implementation (see \fBcurs_add_wch\fP),
there are analogous \fIWACS_\fP definitions which are \fBcchar_t\fP constants.
Some implementations are problematic:
.bP
Some implementations define the ACS symbols to a constant
(such as Solaris), while others define those to entries in an array.
.IP
This implementation uses an array \fBacs_map\fP, as done in SVr4 curses.
NetBSD also uses an array, actually named \fB_acs_char\fP, with a \fB#define\fP
for compatibility.
.bP
HPUX curses equates some of the \fIACS_\fP symbols
to the analogous \fIWACS_\fP symbols as if the \fIACS_\fP symbols were
wide characters.
The misdefined symbols are the arrows
and other symbols which are not used for line-drawing.
.bP
X/Open Curses (issues 2 through 7) has a typographical error
for the ACS_LANTERN symbol, equating its \*(``VT100+ Character\*(''
to \fBI\fP (capital I), while the header files for SVr4 curses
and the various implementations use \fBi\fP (lowercase).
.IP
None of the terminal descriptions on Unix platforms use uppercase-I,
except for Solaris (i.e., \fIscreen\fP's terminal description,
apparently based on the X/Open documentation around 1995).
On the other hand, the terminal description \fIgs6300\fP
(AT&T PC6300 with EMOTS Terminal Emulator) uses lowercase-i.
.LP
Some ACS symbols
(ACS_S3,
@ -161,13 +220,66 @@ ACS_PI,
ACS_NEQUAL,
ACS_STERLING)
were not documented in
any publicly released System V. However, many publicly available terminfos
any publicly released System V.
However, many publicly available terminfos
include \fBacsc\fR strings in which their key characters (pryz{|}) are
embedded, and a second-hand list of their character descriptions has come
to light. The ACS-prefixed names for them were invented for \fBncurses\fR(3X).
to light.
The ACS-prefixed names for them were invented for \fBncurses\fR(3X).
.LP
The \fBTABSIZE\fR variable is implemented in some versions of curses,
but is not part of X/Open curses.
The \fIdisplayed\fP values for the \fIACS_\fP and \fIWACS_\fP constants
depend on
.bP
the library configuration, i.e., \fBncurses\fP versus \fBncursesw\fP,
where the latter is capable of displaying Unicode while the former is not, and
.bP
whether the \fIlocale\fP uses UTF-8 encoding.
.LP
In certain cases, the terminal is unable to display line-drawing characters
except by using UTF-8 (see the discussion of \fBNCURSES_NO_UTF8_ACS\fP in
ncurses(3X)).
.SS Character Set
X/Open Curses assumes that the parameter passed to \fBwaddch\fP contains
a single character.
As discussed in \fBcurs_attr\fP(3X), that character may have been
more than eight bits in an SVr3 or SVr4 implementation,
but in the X/Open Curses model, the details are not given.
The important distinction between SVr4 curses and X/Open Curses is
that the non-character information (attributes and color) was
separated from the character information which is packed in a \fBchtype\fP
to pass to \fBwaddch\fP.
.PP
In this implementation, \fBchtype\fP holds an eight-bit character.
But ncurses allows multibyte characters to be passed in a succession
of calls to \fBwaddch\fP.
The other implementations do not do this;
a call to \fBwaddch\fP passes exactly one character
which may be rendered as one or more cells on the screen
depending on whether it is printable.
.PP
Depending on the locale settings,
ncurses will inspect the byte passed in each call to \fBwaddch\fP,
and check if the latest call will continue a multibyte sequence.
When a character is \fIcomplete\fP,
ncurses displays the character and moves to the next position in the screen.
.PP
If the calling application interrupts the succession of bytes in
a multibyte character by moving the current location (e.g., using \fBwmove\fP),
ncurses discards the partially built character,
starting over again.
.PP
For portability to other implementations,
do not rely upon this behavior:
.bP
check if a character can be represented as a single byte in the current locale
before attempting call \fBwaddch\fP, and
.bP
call \fBwadd_wch\fP for characters which cannot be handled by \fBwaddch\fP.
.SS TABSIZE
.LP
The \fBTABSIZE\fR variable is implemented in SVr4 and other versions of curses,
but is not part of X/Open curses
(see \fBcurs_variables\fR(3X) for more details).
.LP
If \fIch\fR is a carriage return,
the cursor is moved to the beginning of the current row of the window.

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2017,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,10 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addchstr.3x,v 1.16 2012/11/03 22:54:43 tom Exp $
.\" $Id: curs_addchstr.3x,v 1.18 2019/11/30 21:06:30 tom Exp $
.TH curs_addchstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.IP \(bu 4
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.na
.hy 0
@ -95,7 +100,7 @@ X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2017,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,10 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addstr.3x,v 1.17 2012/11/03 22:57:31 tom Exp $
.\" $Id: curs_addstr.3x,v 1.19 2019/11/30 21:06:30 tom Exp $
.TH curs_addstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.IP \(bu 4
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.na
.hy 0
@ -89,7 +94,7 @@ if the string pointer is null or
.bP
if the corresponding calls to \fBwaddch\fP return an error.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 2002-2017,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,10 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addwstr.3x,v 1.11 2012/11/03 22:57:31 tom Exp $
.\" $Id: curs_addwstr.3x,v 1.13 2019/11/30 21:06:30 tom Exp $
.TH curs_addwstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.IP \(bu 4
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.na
.hy 0
@ -91,7 +96,7 @@ if the string pointer is null or
.bP
if the corresponding calls to \fBwadd_wch\fP return an error.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES

View file

@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
.\" Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -27,146 +27,256 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_attr.3x,v 1.39 2013/09/21 20:39:49 Sven.Joachim Exp $
.\" $Id: curs_attr.3x,v 1.65 2019/11/30 21:06:30 tom Exp $
.TH curs_attr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de NS
.ie n .sp
.el .sp .5
.ie n .in +4
.el .in +2
.nf
.ft C \" Courier
..
.de NE
.fi
.ft R
.ie n .in -4
.el .in -2
..
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.na
.hy 0
.\" ---------------------------------------------------------------------------
.SH NAME
.\" attr_get
\fBattr_get\fR,
\fBwattr_get\fR,
\fBattr_set\fR,
\fBwattr_set\fR,
.\" .br
\fBattr_off\fR,
\fBwattr_off\fR,
\fBattr_on\fR,
\fBwattr_on\fR,
.\" .br
\fBattroff\fR,
\fBwattroff\fR,
\fBattron\fR,
\fBwattron\fR,
\fBattrset\fR,
\fBwattrset\fR,
\fBcolor_set\fR,
\fBwcolor_set\fR,
\fBstandend\fR,
\fBwstandend\fR,
\fBstandout\fR,
\fBwstandout\fR,
\fBattr_get\fR,
\fBwattr_get\fR,
\fBattr_off\fR,
\fBwattr_off\fR,
\fBattr_on\fR,
\fBwattr_on\fR,
\fBattr_set\fR,
\fBwattr_set\fR,
.\" .br
\fBchgat\fR,
\fBwchgat\fR,
\fBmvchgat\fR,
\fBmvwchgat\fR,
\fBPAIR_NUMBER\fR \- \fBcurses\fR character and window attribute control routines
.\" .br
\fBcolor_set\fR,
\fBwcolor_set\fR,
.\" .br
\fBstandend\fR,
\fBwstandend\fR,
\fBstandout\fR,
\fBwstandout\fR \- \fBcurses\fR character and window attribute control routines
.ad
.hy
.\" ---------------------------------------------------------------------------
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
\fBint attr_get(attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR
.br
\fBint attroff(int attrs);\fR
\fBint wattr_get(WINDOW *\fP\fIwin\fP\fB, attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB,\fR \fBvoid *\fP\fIopts\fP\fB);\fR
.br
\fBint wattroff(WINDOW *win, int attrs);\fR
\fBint attr_set(attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR
.br
\fBint attron(int attrs);\fR
\fBint wattr_set(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR
.sp
\fBint attr_off(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
.br
\fBint wattron(WINDOW *win, int attrs);\fR
\fBint wattr_off(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
.br
\fBint attrset(int attrs);\fR
\fBint attr_on(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
.br
\fBint wattrset(WINDOW *win, int attrs);\fR
\fBint wattr_on(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
.sp
\fBint attroff(int \fP\fIattrs);\fR
.br
\fBint color_set(short color_pair_number, void* opts);\fR
\fBint wattroff(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR
.br
\fBint wcolor_set(WINDOW *win, short color_pair_number,\fR
\fBvoid* opts);\fR
\fBint attron(int \fP\fIattrs\fP\fB);\fR
.br
\fBint wattron(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR
.br
\fBint attrset(int \fP\fIattrs\fP\fB);\fR
.br
\fBint wattrset(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR
.sp
\fBint chgat(int \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB,\fR \fBconst void *\fP\fIopts\fP\fB);\fR
.br
\fBint wchgat(WINDOW *\fP\fIwin\fP\fB,\fP
\fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fR \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR
.br
\fBint mvchgat(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB,\fP
\fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fR \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR
.br
\fBint mvwchgat(WINDOW *\fP\fIwin, int \fP\fIy, int \fP\fIx\fP\fB,\fP
\fBint \fP\fIn,\fR \fBattr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR
.sp
\fBint color_set(short \fP\fIpair\fP\fB, void* \fP\fIopts\fP\fB);\fR
.br
\fBint wcolor_set(WINDOW *\fP\fIwin\fP\fB, short \fP\fIpair\fP\fB,\fR \fBvoid* \fP\fIopts);\fR
.sp
\fBint standend(void);\fR
.br
\fBint wstandend(WINDOW *win);\fR
\fBint wstandend(WINDOW *\fP\fIwin\fP\fB);\fR
.br
\fBint standout(void);\fR
.br
\fBint wstandout(WINDOW *win);\fR
.br
\fBint attr_get(attr_t *attrs, short *pair, void *opts);\fR
.br
\fBint wattr_get(WINDOW *win, attr_t *attrs, short *pair,\fR
\fBvoid *opts);\fR
.br
\fBint attr_off(attr_t attrs, void *opts);\fR
.br
\fBint wattr_off(WINDOW *win, attr_t attrs, void *opts);\fR
.br
\fBint attr_on(attr_t attrs, void *opts);\fR
.br
\fBint wattr_on(WINDOW *win, attr_t attrs, void *opts);\fR
.br
\fBint attr_set(attr_t attrs, short pair, void *opts);\fR
.br
\fBint wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);\fR
.br
\fBint chgat(int n, attr_t attr, short color,\fR
\fBconst void *opts)\fR
.br
\fBint wchgat(WINDOW *win, int n, attr_t attr,\fR
\fBshort color, const void *opts)\fR
.br
\fBint mvchgat(int y, int x, int n, attr_t attr,\fR
\fBshort color, const void *opts)\fR
.br
\fBint mvwchgat(WINDOW *win, int y, int x, int n,\fR
\fBattr_t attr, short color, const void *opts)\fR
.br
\fBint wstandout(WINDOW *\fP\fIwin\fP\fB);\fR
.\" ---------------------------------------------------------------------------
.SH DESCRIPTION
These routines manipulate the current attributes of the named window. The
current attributes of a window apply to all characters that are written into
the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR. Attributes are
.PP
These routines manipulate the current attributes of the named window,
which then apply to all characters that are written into
the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR.
Attributes are
a property of the character, and move with the character through any scrolling
and insert/delete line/character operations. To the extent possible, they are
and insert/delete line/character operations.
To the extent possible, they are
displayed as appropriate modifications to the graphic rendition of characters
put on the screen.
.PP
The routine \fBattrset\fR sets the current attributes of the given window to
\fIattrs\fR. The routine \fBattroff\fR turns off the named attributes without
turning any other attributes on or off. The routine \fBattron\fR turns on the
named attributes without affecting any others. The routine \fBstandout\fR is
the same as \fBattron(A_STANDOUT)\fR. The routine \fBstandend\fR is the same
as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all
attributes.
.PP
The \fBattrset\fR and related routines do not affect the attributes used
These routines do not affect the attributes used
when erasing portions of the window.
See \fBcurs_bkgd\fR(3X) for functions which modify the attributes used for
erasing and clearing.
.PP
The routine \fBcolor_set\fR sets the current color of the given window to the
foreground/background combination described by the color_pair_number. The
parameter opts is reserved for future use, applications must supply a null
pointer.
Routines which do not have a \fBWINDOW*\fP parameter apply to \fBstdscr\fP.
For example,
\fBattr_set\fP is the \fBstdscr\fP variant of \fBwattr_set\fP.
.\" ---------------------------------------------------------------------------
.SS Window attributes
.PP
The routine \fBwattr_get\fR returns the current attribute and color pair for
the given window; \fBattr_get\fR returns the current attribute and color pair
for \fBstdscr\fR.
The remaining \fBattr_\fR* functions operate exactly like the corresponding
\fBattr\fR* functions, except that they take arguments of type \fBattr_t\fR
rather than \fBint\fR.
There are two sets of functions:
.bP
functions for manipulating the window attributes and color:
\fBwattr_set\fP and \fBwattr_get\fP.
.bP
functions for manipulating only the window attributes (not color):
\fBwattr_on\fP and \fBwattr_off\fP.
.PP
The \fBwattr_set\fP function sets the current attributes
of the given window to \fIattrs\fP, with color specified by \fIpair\fP.
.PP
Use \fBwattr_get\fP to retrieve attributes for the given window.
.PP
Use \fBattr_on\fP and \fBwattr_on\fP to turn on window attributes, i.e.,
values OR'd together in \fIattr\fP,
without affecting other attributes.
Use \fBattr_off\fP and \fBwattr_off\fP to turn off window attributes,
again values OR'd together in \fIattr\fP,
without affecting other attributes.
.\" ---------------------------------------------------------------------------
.SS Legacy window attributes
The X/Open window attribute routines which \fIset\fP or \fIget\fP,
turn \fIon\fP or \fIoff\fP
are extensions of older routines
which assume that color pairs are OR'd into the attribute parameter.
These newer routines use similar names, because
X/Open simply added an underscore (\fB_\fP) for the newer names.
.PP
The \fBint\fP datatype used in the legacy routines is treated as if
it is the same size as \fBchtype\fP (used by \fBaddch\fP(3X)).
It holds the common video attributes (such as bold, reverse),
as well as a few bits for color.
Those bits correspond to the \fBA_COLOR\fP symbol.
The \fBCOLOR_PAIR\fP macro provides a value which can be OR'd into
the attribute parameter.
For example,
as long as that value fits into the \fBA_COLOR\fP mask,
then these calls produce similar results:
.NS
attrset(A_BOLD | COLOR_PAIR(\fIpair\fP));
attr_set(A_BOLD, \fIpair\fP, NULL);
.NE
.PP
However, if the value does not fit, then the \fBCOLOR_PAIR\fP macro
uses only the bits that fit.
For example, because in ncurses \fBA_COLOR\fP has eight (8) bits,
then \fBCOLOR_PAIR(\fP\fI259\fP\fB)\fP is 4
(i.e., 259 is 4 more than the limit 255).
.PP
The \fBPAIR_NUMBER\fP macro extracts a pair number from an \fBint\fP
(or \fBchtype\fP).
For example, the \fIinput\fP and \fIoutput\fP values in these statements
would be the same:
.NS
int value = A_BOLD | COLOR_PAIR(\fIinput\fP);
int \fIoutput\fP = PAIR_NUMBER(value);
.NE
.PP
The \fBattrset\fP routine is a legacy feature predating SVr4 curses
but kept in X/Open Curses for the same reason that SVr4 curses kept it:
compatibility.
.PP
The remaining \fBattr\fR* functions operate exactly like the corresponding
\fBattr_\fR* functions, except that they take arguments of type \fBint\fR
rather than \fBattr_t\fR.
.PP
There is no corresponding \fBattrget\fP function as such in X/Open Curses,
although ncurses provides \fBgetattrs\fP (see curs_legacy(3X)).
.\" ---------------------------------------------------------------------------
.SS Change character rendition
.PP
The routine \fBchgat\fR changes the attributes of a given number of characters
starting at the current cursor location of \fBstdscr\fR. It does not update
the cursor and does not perform wrapping. A character count of \-1 or greater
starting at the current cursor location of \fBstdscr\fR.
It does not update
the cursor and does not perform wrapping.
A character count of \-1 or greater
than the remaining window width means to change attributes all the way to the
end of the current line. The \fBwchgat\fR function generalizes this to any
window; the \fBmvwchgat\fR function does a cursor move before acting. In these
functions, the color argument is a color-pair index (as in the first argument
of \fIinit_pair\fR, see \fBcurs_color\fR(3X)). The \fBopts\fR argument is not
presently used, but is reserved for the future (leave it \fBNULL\fR).
.SS Attributes
end of the current line.
The \fBwchgat\fR function generalizes this to any window;
the \fBmvwchgat\fR function does a cursor move before acting.
.PP
In these functions,
the color \fIpair\fP argument is a color-pair index
(as in the first argument of \fBinit_pair\fR, see \fBcurs_color\fR(3X)).
.\" ---------------------------------------------------------------------------
.SS Change window color
The routine \fBcolor_set\fR sets the current color of the given window to the
foreground/background combination described by the color \fIpair\fP parameter.
.\" ---------------------------------------------------------------------------
.SS Standout
.PP
The routine \fBstandout\fR is
the same as \fBattron(A_STANDOUT)\fR.
The routine \fBstandend\fR is the same
as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all
attributes.
.PP
X/Open does not mark these \*(``restricted\*('', because
.bP
they have well established legacy use, and
.bP
there is no ambiguity about the way the attributes
might be combined with a color pair.
.\" ---------------------------------------------------------------------------
.SH VIDEO ATTRIBUTES
The following video attributes, defined in \fB<curses.h>\fR, can be passed to
the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR'd with the
characters passed to \fBaddch\fR.
characters passed to \fBaddch\fR (see \fBcurs_addch\fR(3X)).
.PP
.RS
.TS
l l
l l
_ _ _
l l .
\fIName\fR \fIDescription\fR
@ -182,7 +292,7 @@ l l .
\fBA_ALTCHARSET\fR Alternate character set
\fBA_ITALIC\fR Italics (non-X/Open extension)
\fBA_CHARTEXT\fR Bit-mask to extract a character
\fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR Color-pair number \fIn\fR
\fBA_COLOR\fR Bit-mask to extract a color (legacy routines)
.TE
.RE
.PP
@ -190,7 +300,7 @@ These video attributes are supported by \fBattr_on\fP and related functions
(which also support the attributes recognized by \fBattron\fP, etc.):
.RS
.TS
l l
l l
_ _ _
l l .
\fIName\fR \fIDescription\fR
@ -203,59 +313,226 @@ l l .
.TE
.RE
.PP
For consistency
.PP
The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR:
.PP
.br
\fBPAIR_NUMBER(\fR\fIattrs\fR) Returns the pair number associated
with the \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR attribute.
.br
.PP
The return values of many of these routines are not meaningful (they are
implemented as macro-expanded assignments and simply return their argument).
The SVr4 manual page claims (falsely) that these routines always return \fB1\fR.
.\" ---------------------------------------------------------------------------
.SH NOTES
Note that \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR may be macros.
These functions may be macros:
.sp
.RS
\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR.
.RE
.PP
\fBCOLOR_PAIR\fP values can only be OR'd with attributes if the pair
Color pair values can only be OR'd with attributes if the pair
number is less than 256.
The alternate functions such as \fBcolor_set\fP can pass a color pair
value directly.
However, ncurses ABI 4 and 5 simply OR this value within the alternate functions.
However, ncurses ABI 4 and 5 simply OR this value
within the alternate functions.
You must use ncurses ABI 6 to support more than 256 color pairs.
.\" ---------------------------------------------------------------------------
.SH HISTORY
X/Open Curses is largely based on SVr4 curses,
adding support for \*(``wide-characters\*('' (not specific to Unicode).
Some of the X/Open differences from SVr4 curses address the way
video attributes can be applied to wide-characters.
But aside from that, \fBattrset\fP and \fBattr_set\fP are similar.
SVr4 curses provided the basic features for manipulating video attributes.
However, earlier versions of curses provided a part of these features.
.PP
As seen in 2.8BSD, curses assumed 7-bit characters,
using the eighth bit of a byte to represent the \fIstandout\fP
feature (often implemented as bold and/or reverse video).
The BSD curses library provided functions \fBstandout\fP and \fBstandend\fP
which were carried along into X/Open Curses due to their pervasive use
in legacy applications.
.PP
Some terminals in the 1980s could support a variety of video attributes,
although the BSD curses library could do nothing with those.
System V (1983) provided an improved curses library.
It defined the \fBA_\fP symbols for use by applications to manipulate the
other attributes.
There are few useful references for the chronology.
.PP
Goodheart's book
\fIUNIX Curses Explained\fP (1991) describes SVr3 (1987),
commenting on several functions:
.bP
the \fBattron\fP, \fBattroff\fP, \fBattrset\fP functions
(and most of the functions found in SVr4 but not in BSD curses) were
introduced by System V,
.bP
the alternate character set feature with \fBA_ALTCHARSET\fP was
added in SVr2 and improved in SVr3 (by adding \fBacs_map[]\fP),
.bP
\fBstart_color\fP and related color-functions were introduced by System V.3.2,
.bP
pads, soft-keys were added in SVr3, and
.PP
Goodheart did not mention the background character or the \fBcchar_t\fP type.
Those are respectively SVr4 and X/Open features.
He did mention the \fBA_\fP constants, but did not indicate their values.
Those were not the same in different systems,
even for those marked as System V.
.PP
Different Unix systems used different sizes for the bit-fields in \fBchtype\fP
for \fIcharacters\fP and \fIcolors\fP, and took into account the different
integer sizes (32-bit versus 64-bit).
.PP
This table showing the number of bits for \fBA_COLOR\fP
and \fBA_CHARTEXT\fP
was gleaned from the curses header files for
various operating systems and architectures.
The inferred architecture and notes reflect
the format and size of the defined constants
as well as clues such as the alternate character set implementation.
A 32-bit library can be used on a 64-bit system,
but not necessarily the reverse.
.RS
.TS
l l l l l l
_ _ _ _ _ _
l l l l l l .
\fIYear\fR \fISystem\fR \fIArch\fP \fIColor\fR \fIChar\fR \fINotes\fR
1992 Solaris 5.2 32 6 17 SVr4 curses
1992 HPUX 9 32 no 8 SVr2 curses
1992 AIX 3.2 32 no 23 SVr2 curses
1994 OSF/1 r3 32 no 23 SVr2 curses
1995 HP-UX 10.00 32 6 16 SVr3 \*(``curses_colr\*(''
1995 HP-UX 10.00 32 6 8 SVr4, X/Open curses
1995 Solaris 5.4 32/64 7 16 X/Open curses
1996 AIX 4.2 32 7 16 X/Open curses
1996 OSF/1 r4 32 6 16 X/Open curses
1997 HP-UX 11.00 32 6 8 X/Open curses
2000 U/Win 32/64 7/31 16 uses \fBchtype\fP
.TE
.RE
.PP
Notes:
.RS 3
.PP
Regarding HP-UX,
.bP
HP-UX 10.20 (1996) added support for 64-bit PA-RISC processors in 1996.
.bP
HP-UX 10.30 (1997) marked \*(``curses_colr\*('' obsolete.
That version of curses was dropped with HP-UX 11.30 in 2006.
.PP
Regarding OSF/1 (and Tru64),
.bP
These used 64-bit hardware.
Like ncurses, the OSF/1 curses interface is not customized for 32-bit
and 64-bit versions.
.bP
Unlike other systems which evolved from AT&T code,
OSF/1 provided a new implementation for X/Open curses.
.PP
Regarding Solaris,
.bP
The initial release of Solaris was in 1992.
.bP
The \fIxpg4\fP (X/Open) curses was developed by MKS from 1990 to 1995.
Sun's copyright began in 1996.
.bP
Sun updated the X/Open curses interface
after 64-bit support was introduced in 1997,
but did not modify the SVr4 curses interface.
.PP
Regarding U/Win,
.bP
Development of the curses library began in 1991, stopped in 2000.
.bP
Color support was added in 1998.
.bP
The library uses only \fBchtype\fP (no \fBcchar_t\fP).
.RE
.PP
Once X/Open curses was adopted in the mid-1990s, the constraint of
a 32-bit interface with many colors and wide-characters for \fBchtype\fP
became a moot point.
The \fBcchar_t\fP structure (whose size and
members are not specified in X/Open Curses) could be extended as needed.
.PP
Other interfaces are rarely used now:
.bP
BSD curses was improved slightly in 1993/1994 using Keith Bostic's
modification to make the library 8-bit clean for \fBnvi\fP.
He moved \fIstandout\fP attribute to a structure member.
.IP
The resulting 4.4BSD curses was replaced by ncurses over the next ten years.
.bP
U/Win is rarely used now.
.\" ---------------------------------------------------------------------------
.SH EXTENSIONS
.PP
This implementation provides the \fBA_ITALIC\fP attribute for terminals
which have the \fBenter_italics_mode\fP (\fBsitm\fP)
and \fBexit_italics_mode\fP (\fBritm\fP) capabilities.
Italics are not mentioned in X/Open Curses.
Unlike the other video attributes, \fBA_ITALIC\fP is unrelated
to the \fBset_attributes\fP capabilities.
This implementation makes the assumption that
\fBexit_attribute_mode\fP may also reset italics.
.PP
Each of the functions added by XSI Curses has a parameter \fIopts\fP,
which X/Open Curses still (after more than twenty years) documents
as reserved for future use, saying that it should be \fBNULL\fP.
This implementation uses that parameter in ABI 6 for the functions which
have a color-pair parameter to support \fIextended color pairs\fP:
.bP
For functions which modify the color, e.g.,
\fBwattr_set\fP,
if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter.
.bP
For functions which retrieve the color, e.g.,
\fBwattr_get\fP,
if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
and used to retrieve the color pair as an \fBint\fP value,
in addition
retrieving it via the standard pointer to \fBshort\fP parameter.
.PP
The remaining functions which have \fIopts\fP,
but do not manipulate color,
e.g., \fBwattr_on\fP and \fBwattr_off\fP
are not used by this implementation except to check that they are \fBNULL\fP.
.\" ---------------------------------------------------------------------------
.SH PORTABILITY
These functions are supported in the XSI Curses standard, Issue 4. The
standard defined the dedicated type for highlights, \fBattr_t\fR, which is not
defined in SVr4 curses. The functions taking \fBattr_t\fR arguments are
not supported under SVr4.
These functions are supported in the XSI Curses standard, Issue 4.
The standard defined the dedicated type for highlights,
\fBattr_t\fR, which was not defined in SVr4 curses.
The functions taking \fBattr_t\fR arguments were not supported under SVr4.
.PP
Very old versions of this library did not force an update of the screen
when changing the attributes.
Use \fBtouchwin\fR to force the screen to match the updated attributes.
.PP
The XSI Curses standard states that whether the traditional functions
\fBattron\fR/\fBattroff\fR/\fBattrset\fR can manipulate attributes other than
\fBA_BLINK\fR, \fBA_BOLD\fR, \fBA_DIM\fR, \fBA_REVERSE\fR, \fBA_STANDOUT\fR, or
\fBA_UNDERLINE\fR is "unspecified". Under this implementation as well as
\fBA_UNDERLINE\fR is \*(``unspecified\*(''.
Under this implementation as well as
SVr4 curses, these functions correctly manipulate all other highlights
(specifically, \fBA_ALTCHARSET\fR, \fBA_PROTECT\fR, and \fBA_INVIS\fR).
.PP
This implementation provides the \fBA_ITALIC\fP attribute for terminals
which have the \fIenter_italics_mode\fP (sitm) and \fIexit_italics_mode\fP (ritm) capabilities.
Italics are not mentioned in X/Open Curses.
Unlike the other video attributes, \fBI_ITALIC\fP is unrelated
to the \fIset_attributes\fP capabilities.
This implementation makes the assumption that
\fIexit_attribute_mode\fP may also reset italics.
.PP
XSI Curses added the new entry points, \fBattr_get\fR, \fBattr_on\fR,
XSI Curses added these entry points:
.sp
.RS
\fBattr_get\fR, \fBattr_on\fR,
\fBattr_off\fR, \fBattr_set\fR, \fBwattr_on\fR, \fBwattr_off\fR,
\fBwattr_get\fR, \fBwattr_set\fR. These are intended to work with
\fBwattr_get\fR, \fBwattr_set\fR
.RE
.PP
The new functions are intended to work with
a new series of highlight macros prefixed with \fBWA_\fR.
The older macros have direct counterparts in the newer set of names:
.PP
.RS
.ne 9
.TS
l l
l l
_ _ _
l l .
\fIName\fR \fIDescription\fR
@ -270,13 +547,26 @@ l l .
.TE
.RE
.PP
Older versions of this library did not force an update of the screen
when changing the attributes.
Use \fBtouchwin\fR to force the screen to match the updated attributes.
.PP
XSI curses does not assign values to these symbols,
nor does it state whether or not they are related to the
similarly-named A_NORMAL, etc.:
.bP
The XSI curses standard specifies that each pair of corresponding \fBA_\fR
and \fBWA_\fR-using functions operates on the same current-highlight
information.
.bP
However, in some implementations, those symbols have unrelated values.
.IP
For example, the Solaris \fIxpg4\fP (X/Open) curses declares
\fBattr_t\fP to be an unsigned short integer (16-bits),
while \fBchtype\fP is a unsigned integer (32-bits).
The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols
because they are used for a smaller datatype which does not
represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP.
.IP
In this implementation (as in many others), the values happen to be
the same because it simplifies copying information between
\fBchtype\fP and \fBcchar_t\fP variables.
.PP
The XSI standard extended conformance level adds new highlights
\fBA_HORIZONTAL\fR, \fBA_LEFT\fR, \fBA_LOW\fR, \fBA_RIGHT\fR, \fBA_TOP\fR,
@ -284,23 +574,28 @@ The XSI standard extended conformance level adds new highlights
As of August 2013,
no known terminal provides these highlights
(i.e., via the \fBsgr1\fP capability).
.\" ---------------------------------------------------------------------------
.SH RETURN VALUE
All routines return the integer \fBOK\fR on success, or \fBERR\fP on failure.
.PP
X/Open does not define any error conditions.
.PP
This implementation returns an error
if the window pointer is null.
The \fBwcolor_set\fP function returns an error if the color pair parameter
is outside the range 0..COLOR_PAIRS\-1.
This implementation also provides
\fBgetattrs\fR
for compatibility with older versions of curses.
This implementation
.bP
returns an error if the window pointer is null.
.bP
returns an error if the color pair parameter
for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1.
.bP
does not return an error if either of the parameters of \fBwattr_get\fP
used for retrieving attribute or color-pair values is \fBNULL\fP.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.\" ---------------------------------------------------------------------------
.SH SEE ALSO
.na
\fBcurses\fR(3X),
\fBcurs_addch\fR(3X),
\fBcurs_addstr\fR(3X),

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_beep.3x,v 1.12 2010/12/04 18:36:44 tom Exp $
.\" $Id: curs_beep.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
.TH curs_beep 3X ""
.SH NAME
\fBbeep\fR, \fBflash\fR \- \fBcurses\fR bell and screen flash routines
@ -40,9 +40,12 @@
.SH DESCRIPTION
The \fBbeep\fR and \fBflash\fR routines are used to alert the terminal user.
The routine \fBbeep\fR sounds an audible alarm on the terminal, if possible;
otherwise it flashes the screen (visible bell). The routine \fBflash\fR
flashes the screen, and if that is not possible, sounds the alert. If neither
alert is possible, nothing happens. Nearly all terminals have an audible alert
otherwise it flashes the screen (visible bell).
The routine \fBflash\fR
flashes the screen, and if that is not possible, sounds the alert.
If neither
alert is possible, nothing happens.
Nearly all terminals have an audible alert
(bell or beep), but only some can flash the screen.
.SH RETURN VALUE
These routines return \fBOK\fR if they succeed in beeping or flashing,

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2003,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_bkgd.3x,v 1.22 2010/12/04 18:36:44 tom Exp $
.\" $Id: curs_bkgd.3x,v 1.29 2019/07/13 21:01:06 tom Exp $
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.TH curs_bkgd 3X ""
.SH NAME
\fBbkgdset\fR, \fBwbkgdset\fR,
@ -35,57 +39,121 @@
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
\fBvoid bkgdset(chtype ch);\fR
\fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fR
.br
\fBvoid wbkgdset(WINDOW *win, chtype ch);\fR
\fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fR
.br
\fBint bkgd(chtype ch);\fR
\fBint bkgd(chtype \fP\fIch\fP\fB);\fR
.br
\fBint wbkgd(WINDOW *win, chtype ch);\fR
\fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR
.br
\fBchtype getbkgd(WINDOW *win);\fR
\fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fR
.br
.SH DESCRIPTION
.SS bkgdset
The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the
background of the named window.
The window background is a \fBchtype\fR consisting of
any combination of attributes (i.e., rendition) and a character.
The attribute part of the background is combined (OR'ed) with all non-blank
characters that are written into the window with \fBwaddch\fR. Both
the character and attribute parts of the background are combined with
the blank characters. The background becomes a property of the
characters that are written into the window with \fBwaddch\fR.
Both the character and attribute parts of the background are combined with
the blank characters.
The background becomes a property of the
character and moves with the character through any scrolling and
insert/delete line/character operations.
.PP
To the extent possible on a particular terminal,
the attribute part of the background is displayed
as the graphic rendition of the character put on the screen.
.SS bkgd
.PP
The \fBbkgd\fR and \fBwbkgd\fR functions
set the background property of the current or specified window
and then apply this setting to every character position in that window:
and then apply this setting to every character position in that window.
According to X/Open Curses, it should do this:
.PP
.RS
.bP
The rendition of every character on the screen is changed to
the new background rendition.
.PP
.bP
Wherever the former background character
appears, it is changed to the new background character.
.RE
.PP
Neither X/Open Curses nor the SVr4 manual pages give details about
the way the rendition of characters on the screen is updated when
\fBbkgd\fP or \fBwbkgd\fP is used to change the background character.
.PP
This implementation, like SVr4 curses, does not store the background
and window attribute contributions to each cell separately.
It updates the rendition by comparing the character, non-color attributes and
colors contained in the background.
For each cell in the window, whether or not it is blank:
.bP
The library first compares the \fIcharacter\fP,
and if it matches the current character part of the background,
it replaces that with the new background character.
.bP
The library then checks if the cell uses color,
i.e., its color pair value is nonzero.
If not, it simply replaces the attributes and color pair in the
cell with those from the new background character.
.bP
If the cell uses color,
and that matches the color in the current background,
the library removes attributes
which may have come from the current background
and adds attributes from the new background.
It finishes by setting the cell
to use the color from the new background.
.bP
If the cell uses color,
and that does not match the color in the current background,
the library updates only the non-color attributes,
first removing those which may have come from the current background,
and then adding attributes from the new background.
.PP
If the background's character value is zero, a space is assumed.
.PP
If the terminal does not support color,
or if color has not been started with \fBstart_color\fP,
the new background character's color attribute will be ignored.
.SS getbkgd
.PP
The \fBgetbkgd\fR function returns the given window's current background
character/attribute pair.
.SH RETURN VALUE
The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR.
The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set",
but this appears to be an error.
.SH NOTES
Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
.SH PORTABILITY
.PP
These functions are described in the XSI Curses standard, Issue 4.
It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure,
but gives no failure conditions.
.PP
The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR,
unless the library has not been initialized.
.PP
In contrast,
the SVr4.0 manual says \fBbkgd\fR and \fBwbkgd\fR may return \fBOK\fP
"or a non-negative integer if \fBimmedok\fR is set",
which refers to the return value from \fBwrefresh\fP
(used to implement the immediate repainting).
The SVr4 curses \fBwrefresh\fP returns the number of characters
written to the screen during the refresh.
This implementation does not do that.
.SH NOTES
.PP
Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
.PP
X/Open Curses mentions that the character part of the background must
be a single-byte value.
This implementation, like SVr4, checks to ensure that,
and will reuse the old background character if the check fails.
.SH PORTABILITY
.PP
These functions are described in the XSI Curses standard, Issue 4
(X/Open Curses).
.SH SEE ALSO
.na
.PP
\fBcurses\fR(3X),
\fBcurs_addch\fR(3X),
\fBcurs_attr\fR(3X),

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 2002-2017,2018 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_bkgrnd.3x,v 1.5 2012/11/03 23:03:59 tom Exp $
.\" $Id: curs_bkgrnd.3x,v 1.10 2018/12/09 00:50:50 tom Exp $
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.TH curs_bkgrnd 3X ""
.SH NAME
\fBbkgrnd\fR,
@ -52,12 +56,15 @@
\fBint wgetbkgrnd(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwch\fR\fB);\fR
.br
.SH DESCRIPTION
.SS bkgrndset
.PP
The \fBbkgrndset\fR and \fBwbkgrndset\fR routines manipulate the
background of the named window.
The window background is a \fBcchar_t\fR consisting of
any combination of attributes (i.e., rendition) and a complex character.
The attribute part of the background is combined (OR'ed) with all non-blank
characters that are written into the window with \fBwaddch\fR. Both
characters that are written into the window with \fBwaddch\fR.
Both
the character and attribute parts of the background are combined with
the blank characters.
The background becomes a property of the
@ -67,34 +74,47 @@ insert/delete line/character operations.
To the extent possible on a
particular terminal, the attribute part of the background is displayed
as the graphic rendition of the character put on the screen.
.SS bkgrnd
.PP
The \fBbkgrnd\fR and \fBwbkgrnd\fR functions
set the background property of the current or specified window
and then apply this setting to every character position in that window:
.RS
.PP
.bP
The rendition of every character on the screen is changed to
the new background rendition.
.PP
.bP
Wherever the former background character
appears, it is changed to the new background character.
.RE
.SS getbkgrnd
.PP
The \fBgetbkgrnd\fR function returns the given window's current background
character/attribute pair via the \fBwch\fR pointer.
.
If the given window pointer is null,
the character is not updated (but no error returned).
.SH NOTES
Note that
\fBbkgrnd\fR,
\fBbkgrndset\fR, and
\fBgetbkgrnd\fR
may be macros.
.PP
X/Open Curses does not provide details on how the rendition is changed.
This implementation follows the approach used in SVr4 curses,
which is explained in the manual page for \fBwbkgd\fP.
.SH RETURN VALUE
.PP
The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value.
.PP
Upon successful completion, the other functions return \fBOK\fR.
Otherwise, they return \fBERR\fR.
Otherwise, they return \fBERR\fR:
.bP
A null window pointer is treated as an error.
.bP
A null character pointer is treated as an error.
.SH PORTABILITY
.PP
These functions are described in the XSI Curses standard, Issue 4
(X/Open Curses).
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_bkgd\fR(3X)

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,8 +26,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_border.3x,v 1.22 2010/12/04 18:36:44 tom Exp $
.\" $Id: curs_border.3x,v 1.24 2019/11/30 21:06:30 tom Exp $
.TH curs_border 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.na
.hy 0
.SH NAME
@ -121,23 +125,28 @@ for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
\fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
.PP
The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
line using \fIch\fR starting at the current cursor position in the window. The
current cursor position is not changed. The line is at most \fIn\fR characters
line using \fIch\fR starting at the current cursor position in the window.
The
current cursor position is not changed.
The line is at most \fIn\fR characters
long, or as many as fit into the window.
.PP
The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
using \fIch\fR starting at the current cursor position in the window. The
current cursor position is not changed. The line is at most \fIn\fR characters
using \fIch\fR starting at the current cursor position in the window.
The
current cursor position is not changed.
The line is at most \fIn\fR characters
long, or as many as fit into the window.
.SH RETURN VALUE
All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
All routines return the integer \fBOK\fR.
The SVr4.0 manual says "or a
non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
.PP
X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2002-2011,2012 Free Software Foundation, Inc. *
.\" Copyright (c) 2002-2012,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,8 +26,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_border_set.3x,v 1.11 2012/11/03 23:03:59 tom Exp $
.\" $Id: curs_border_set.3x,v 1.12 2019/11/30 21:06:30 tom Exp $
.TH curs_border_set 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.na
.hy 0
.SH NAME
@ -196,7 +200,7 @@ Otherwise, they return
.PP
Functions using a window parameter return an error if it is null.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH SEE ALSO

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2016,2018 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_clear.3x,v 1.14 2010/12/04 18:36:44 tom Exp $
.\" $Id: curs_clear.3x,v 1.16 2018/07/28 21:34:06 tom Exp $
.TH curs_clear 3X ""
.na
.hy 0
@ -70,7 +70,8 @@ cleared completely on the next call to \fBwrefresh\fR for that window
and repainted from scratch.
.PP
The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
end of screen. That is, they erase all lines below the cursor in the window.
end of screen.
That is, they erase all lines below the cursor in the window.
Also, the current line to the right of the cursor, inclusive, is erased.
.PP
The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
@ -90,18 +91,20 @@ functions using a window pointer parameter return an error if it is null.
Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4. The
These functions are described in the XSI Curses standard, Issue 4.
The
standard specifies that they return \fBERR\fR on failure, but specifies no
error conditions.
.PP
Some historic curses implementations had, as an undocumented feature, the
ability to do the equivalent of \fBclearok(..., 1)\fR by saying
\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR.
This will not work under
ncurses.
.PP
This implementation, and others such as Solaris,
sets the current position to 0,0 after erasing
via \fBwerase()\fP and \fBwclear()\fP.
via \fBwerase\fP and \fBwclear\fP.
That fact is not documented in other implementations,
and may not be true of implementations
which were not derived from SVr4 source.

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,136 +26,145 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_color.3x,v 1.35 2010/12/20 00:50:58 tom Exp $
.\" $Id: curs_color.3x,v 1.61 2019/01/20 17:04:08 tom Exp $
.TH curs_color 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.de bP
.IP \(bu 4
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.ds n 5
.na
.hy 0
.SH NAME
\fBstart_color\fR,
\fBinit_pair\fR,
\fBinit_color\fR,
\fBhas_colors\fR,
\fBcan_change_color\fR,
\fBinit_pair\fR,
\fBinit_color\fR,
\fBinit_extended_pair\fR,
\fBinit_extended_color\fR,
\fBcolor_content\fR,
\fBpair_content\fR,
\fBCOLOR_PAIR\fR \- \fBcurses\fR color manipulation routines
\fBextended_color_content\fR,
\fBextended_pair_content\fR,
\fBreset_color_pairs\fR,
\fBCOLOR_PAIR\fR,
\fBPAIR_NUMBER\fR \- \fBcurses\fR color manipulation routines
.ad
.hy
.SH SYNOPSIS
\fB# include <curses.h>\fR
\fB#include <curses.h>\fR
.sp
\fBint start_color(void);\fR
.sp
\fBbool has_colors(void);\fR
.br
\fBbool can_change_color(void);\fR
.sp
\fBint init_pair(short pair, short f, short b);\fR
.br
\fBint init_color(short color, short r, short g, short b);\fR
.br
\fBbool has_colors(void);\fR
/* extensions */
.br
\fBbool can_change_color(void);\fR
\fBint init_extended_pair(int pair, int f, int b);\fR
.br
\fBint init_extended_color(int color, int r, int g, int b);\fR
.sp
\fBint color_content(short color, short *r, short *g, short *b);\fR
.br
\fBint pair_content(short pair, short *f, short *b);\fR
.br
/* extensions */
.br
\fBint extended_color_content(int color, int *r, int *g, int *b);\fR
.br
\fBint extended_pair_content(int pair, int *f, int *b);\fR
.sp
/* extensions */
.br
\fBvoid reset_color_pairs(void);\fR
.sp
\fBint COLOR_PAIR(int n);\fR
.br
\fBPAIR_NUMBER(\fR\fIattrs\fR\fB);\fP
.br
.SH DESCRIPTION
.SS Overview
\fBcurses\fR support color attributes on terminals with that capability. To
use these routines \fBstart_color\fR must be called, usually right after
\fBinitscr\fR. Colors are always used in pairs (referred to as color-pairs).
\fBcurses\fR supports color attributes on terminals with that capability.
To use these routines \fBstart_color\fR must be called, usually right after
\fBinitscr\fR.
Colors are always used in pairs (referred to as color-pairs).
A color-pair consists of a foreground color (for characters) and a background
color (for the blank field on which the characters are displayed). A
programmer initializes a color-pair with the routine \fBinit_pair\fR. After it
has been initialized, \fBCOLOR_PAIR\fR(\fIn\fR), a macro defined in
\fB<curses.h>\fR, can be used as a new video attribute.
color (for the blank field on which the characters are displayed).
A programmer initializes a color-pair with the routine \fBinit_pair\fR.
After it has been initialized, \fBCOLOR_PAIR\fR(\fIn\fR)
can be used to convert the pair to a video attribute.
.PP
If a terminal is capable of redefining colors, the programmer can use the
routine \fBinit_color\fR to change the definition of a color. The routines
\fBhas_colors\fR and \fBcan_change_color\fR return \fBTRUE\fR or \fBFALSE\fR,
routine \fBinit_color\fR to change the definition of a color.
The routines \fBhas_colors\fR and \fBcan_change_color\fR
return \fBTRUE\fR or \fBFALSE\fR,
depending on whether the terminal has color capabilities and whether the
programmer can change the colors. The routine \fBcolor_content\fR allows a
programmer can change the colors.
The routine \fBcolor_content\fR allows a
programmer to extract the amounts of red, green, and blue components in an
initialized color. The routine \fBpair_content\fR allows a programmer to find
initialized color.
The routine \fBpair_content\fR allows a programmer to find
out how a given color-pair is currently defined.
.SS Routine Descriptions
The \fBstart_color\fR routine requires no arguments. It must be
called if the programmer wants to use colors, and before any other
color manipulation routine is called. It is good practice to call
this routine right after \fBinitscr\fR. \fBstart_color\fR initializes
eight basic colors (black, red, green, yellow, blue, magenta, cyan,
and white), and two global variables, \fBCOLORS\fR and
\fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors
and color-pairs the terminal can support). It also restores the
colors on the terminal to the values they had when the terminal was
just turned on.
.PP
The \fBinit_pair\fR routine changes the definition of a color-pair. It takes
three arguments: the number of the color-pair to be changed, the foreground
color number, and the background color number.
For portable applications:
.SS Color Rendering
The \fBcurses\fP library combines these inputs to produce the
actual foreground and background colors shown on the screen:
.bP
The value of the first argument
must be between \fB1\fR and \fBCOLOR_PAIRS\-1\fR,
except that if default colors are used (see \fBuse_default_colors\fP)
the upper limit is adjusted to allow for extra pairs which use
a default color in foreground and/or background.
per-character video attributes (e.g., via \fBwaddch\fP),
.bP
The value of the second and
third arguments must be between 0 and \fBCOLORS\fR.
Color pair 0 is assumed to be white on black,
but is actually whatever the terminal implements before color is initialized.
It cannot be modified by the application.
the window attribute (e.g., by \fBwattrset\fP), and
.bP
the background character (e.g., \fBwbkgdset\fP).
.PP
If the color-pair was previously
initialized, the screen is refreshed and all occurrences of that color-pair
are changed to the new definition.
Per-character and window attributes are usually set by a parameter containing
video attributes including a color pair value.
Some functions such as \fBwattr_set\fP use a separate parameter which
is the color pair number.
.PP
As an extension, ncurses allows you to set color pair 0 via
the \fBassume_default_colors\fR routine, or to specify the use of
default colors (color number \fB\-1\fR) if you first invoke the
\fBuse_default_colors\fR routine.
The background character is a special case: it includes a character value,
just as if it were passed to \fBwaddch\fP.
.PP
The \fBinit_color\fR routine changes the definition of a color. It takes four
arguments: the number of the color to be changed followed by three RGB values
(for the amounts of red, green, and blue components). The value of the first
argument must be between \fB0\fR and \fBCOLORS\fR. (See the section
\fBColors\fR for the default color index.) Each of the last three arguments
must be a value between 0 and 1000. When \fBinit_color\fR is used, all
occurrences of that color on the screen immediately change to the new
definition.
The \fBcurses\fP library does the actual work of combining these color
pairs in an internal function called from \fBwaddch\fP:
.bP
If the parameter passed to \fBwaddch\fP is \fIblank\fP,
and it uses the special color pair 0,
.RS
.bP
\fBcurses\fP next checks the window attribute.
.bP
If the window attribute does not use color pair 0,
\fBcurses\fP uses the color pair from the window attribute.
.bP
Otherwise, \fBcurses\fP uses the background character.
.RE
.bP
If the parameter passed to \fBwaddch\fP is \fInot blank\fP,
or it does not use the special color pair 0,
\fBcurses\fP prefers the color pair from the parameter,
if it is nonzero.
Otherwise, it tries the window attribute next, and finally the
background character.
.PP
The \fBhas_colors\fR routine requires no arguments. It returns \fBTRUE\fR if
the terminal can manipulate colors; otherwise, it returns \fBFALSE\fR. This
routine facilitates writing terminal-independent programs. For example, a
programmer can use it to decide whether to use color or some other video
attribute.
Some \fBcurses\fP functions such as \fBwprintw\fP call \fBwaddch\fP.
Those do not combine its parameter with a color pair.
Consequently those calls use only the window attribute or
the background character.
.SH CONSTANTS
.PP
The \fBcan_change_color\fR routine requires no arguments. It returns
\fBTRUE\fR if the terminal supports colors and can change their definitions;
other, it returns \fBFALSE\fR. This routine facilitates writing
terminal-independent programs.
.PP
The \fBcolor_content\fR routine gives programmers a way to find the intensity
of the red, green, and blue (RGB) components in a color. It requires four
arguments: the color number, and three addresses of \fBshort\fRs for storing
the information about the amounts of red, green, and blue components in the
given color. The value of the first argument must be between 0 and
\fBCOLORS\fR. The values that are stored at the addresses pointed to by the
last three arguments are between 0 (no component) and 1000 (maximum amount of
component).
.PP
The \fBpair_content\fR routine allows programmers to find out what colors a
given color-pair consists of. It requires three arguments: the color-pair
number, and two addresses of \fBshort\fRs for storing the foreground and the
background color numbers. The value of the first argument must be between 1
and \fBCOLOR_PAIRS\-1\fR. The values that are stored at the addresses pointed
to by the second and third arguments are between 0 and \fBCOLORS\fR.
.SS Colors
In \fB<curses.h>\fR the following macros are defined. These are the default
colors. \fBcurses\fR also assumes that \fBCOLOR_BLACK\fR is the default
In \fB<curses.h>\fR the following macros are defined.
These are the standard colors (ISO-6429).
\fBcurses\fR also assumes that \fBCOLOR_BLACK\fR is the default
background color for all terminals.
.PP
.nf
@ -168,55 +177,293 @@ background color for all terminals.
\fBCOLOR_CYAN\fR
\fBCOLOR_WHITE\fR
.fi
.PP
Some terminals support more than the eight (8) \*(``ANSI\*('' colors.
There are no standard names for those additional colors.
.SH VARIABLES
.SS COLORS
is initialized by \fBstart_color\fP to the maximum number of colors
the terminal can support.
.SS COLOR_PAIRS
is initialized by \fBstart_color\fP to the maximum number of color pairs
the terminal can support.
.SH FUNCTIONS
.SS start_color
The \fBstart_color\fR routine requires no arguments.
It must be called if the programmer wants to use colors, and before any other
color manipulation routine is called.
It is good practice to call this routine right after \fBinitscr\fR.
\fBstart_color\fR does this:
.bP
It initializes two global variables, \fBCOLORS\fR and
\fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors
and color-pairs the terminal can support).
.bP
It initializes the special color pair \fB0\fP to the default foreground
and background colors.
No other color pairs are initialized.
.bP
It restores the colors on the terminal to the values
they had when the terminal was just turned on.
.bP
If the terminal supports the \fBinitc\fP (\fBinitialize_color\fP) capability,
\fBstart_color\fP
initializes its internal table representing the
red, green, and blue components of the color palette.
.IP
The components depend on whether the terminal uses
CGA (aka \*(``ANSI\*('') or
HLS (i.e., the \fBhls\fP (\fBhue_lightness_saturation\fP) capability is set).
The table is initialized first for eight basic colors
(black, red, green, yellow, blue, magenta, cyan, and white),
using weights that depend upon the CGA/HLS choice.
For \*(``ANSI\*('' colors the weights are \fB680\fP or \fB0\fP
depending on whether the corresponding
red, green, or blue component is used or not.
That permits using \fB1000\fP to represent bold/bright colors.
After the initial eight colors
(if the terminal supports more than eight colors)
the components are initialized using the same pattern,
but with weights of \fB1000\fP.
SVr4 uses a similar scheme, but uses \fB1000\fP
for the components of the initial eight colors.
.IP
\fBstart_color\fP does not attempt to set the terminal's color palette
to match its built-in table.
An application may use \fBinit_color\fP to alter the internal table
along with the terminal's color.
.PP
These limits apply to color values and color pairs.
Values outside these limits are not legal, and may result in a runtime error:
.bP
\fBCOLORS\fP corresponds to the terminal database's \fBmax_colors\fR capability,
(see \fBterminfo\fR(\*n)).
.bP
color values are expected to be in the range \fB0\fP to \fBCOLORS\-1\fP,
inclusive (including \fB0\fP and \fBCOLORS\-1\fP).
.bP
a special color value \fB\-1\fP is used in certain extended functions
to denote the \fIdefault color\fP (see \fBuse_default_colors\fP(3X)).
.bP
\fBCOLOR_PAIRS\fP corresponds to
the terminal database's \fBmax_pairs\fP capability,
(see \fBterminfo\fR(\*n)).
.bP
legal color pair values are in the range \fB1\fP to \fBCOLOR_PAIRS\-1\fP,
inclusive.
.bP
color pair \fB0\fP is special; it denotes \*(``no color\*(''.
.IP
Color pair \fB0\fP is assumed to be white on black,
but is actually whatever the terminal implements before color is initialized.
It cannot be modified by the application.
.SS has_colors
.PP
The \fBhas_colors\fR routine requires no arguments.
It returns \fBTRUE\fR if
the terminal can manipulate colors; otherwise, it returns \fBFALSE\fR.
This routine facilitates writing terminal-independent programs.
For example, a programmer can use it to decide
whether to use color or some other video attribute.
.SS can_change_color
.PP
The \fBcan_change_color\fR routine requires no arguments.
It returns \fBTRUE\fR if the terminal supports colors
and can change their definitions;
other, it returns \fBFALSE\fR.
This routine facilitates writing terminal-independent programs.
.SS init_pair
.PP
The \fBinit_pair\fR routine changes the definition of a color-pair.
It takes three arguments:
the number of the color-pair to be changed, the foreground
color number, and the background color number.
For portable applications:
.bP
The first argument must be a legal color pair value.
If default colors are used (see \fBuse_default_colors\fP(3X))
the upper limit is adjusted to allow for extra pairs which use
a default color in foreground and/or background.
.bP
The second and third arguments must be legal color values.
.PP
If the color-pair was previously initialized,
the screen is refreshed and all occurrences of that color-pair
are changed to the new definition.
.PP
As an extension, ncurses allows you to set color pair \fB0\fP via
the \fBassume_default_colors\fR(3X) routine, or to specify the use of
default colors (color number \fB\-1\fR) if you first invoke the
\fBuse_default_colors\fR(3X) routine.
.SS init_extended_pair
.PP
Because \fBinit_pair\fP uses signed \fBshort\fPs for its parameters,
that limits color-pairs and color-values
to 32767 on modern hardware.
The extension \fBinit_extended_pair\fP uses \fBint\fPs
for the color-pair and color-value,
allowing a larger number of colors to be supported.
.SS init_color
.PP
The \fBinit_color\fR routine changes the definition of a color.
It takes four arguments:
the number of the color to be changed followed by three RGB values
(for the amounts of red, green, and blue components).
.bP
The first argument must be a legal color value;
default colors are not allowed here.
(See the section \fBColors\fR for the default color index.)
.bP
Each of the last three arguments
must be a value in the range \fB0\fP through \fB1000\fP.
.PP
When \fBinit_color\fR is used, all
occurrences of that color on the screen immediately change to the new
definition.
.SS init_extended_color
.PP
Because \fBinit_color\fP uses signed \fBshort\fPs for its parameters,
that limits color-values and their red, green, and blue components
to 32767 on modern hardware.
The extension \fBinit_extended_color\fP uses \fBint\fPs
for the color value and
for setting the red, green, and blue components,
allowing a larger number of colors to be supported.
.SS color_content
.PP
The \fBcolor_content\fR routine gives programmers a way to find the intensity
of the red, green, and blue (RGB) components in a color.
It requires four arguments: the color number, and three addresses
of \fBshort\fRs for storing
the information about the amounts of red, green, and blue components in the
given color.
.bP
The first argument must be a legal color value, i.e.,
\fB0\fP through \fBCOLORS\-1\fP, inclusive.
.bP
The values that are stored at the addresses pointed to by the
last three arguments are in the range
\fB0\fP (no component) through \fB1000\fP
(maximum amount of component), inclusive.
.SS extended_color_content
.PP
Because \fBcolor_content\fP uses signed \fBshort\fPs for its parameters,
that limits color-values and their red, green, and blue components
to 32767 on modern hardware.
The extension \fBextended_color_content\fP uses \fBint\fPs
for the color value and
for returning the red, green, and blue components,
allowing a larger number of colors to be supported.
.SS pair_content
.PP
The \fBpair_content\fR routine allows programmers to find out what colors a
given color-pair consists of.
It requires three arguments: the color-pair
number, and two addresses of \fBshort\fRs for storing the foreground and the
background color numbers.
.bP
The first argument must be a legal color value,
i.e., in the range \fB1\fP through \fBCOLOR_PAIRS\-1\fR, inclusive.
.bP
The values that are stored at the addresses pointed
to by the second and third arguments are in the
range \fB0\fP through \fBCOLORS\fR, inclusive.
.SS extended_pair_content
.PP
Because \fBpair_content\fP uses signed \fBshort\fPs for its parameters,
that limits color-pair and color-values to 32767 on modern hardware.
The extension \fBextended_pair_content\fP uses \fBint\fPs
for the color pair and
for returning the foreground and background colors,
allowing a larger number of colors to be supported.
.SS reset_color_pairs
.PP
The extension \fBreset_color_pairs\fP tells ncurses to discard all
of the color-pair information which was set with \fBinit_pair\fP.
It also touches the current- and standard-screens, allowing an application to
switch color palettes rapidly.
.SS PAIR_NUMBER
.PP
\fBPAIR_NUMBER(\fR\fIattrs\fR) extracts the color
value from its \fIattrs\fP parameter and returns it as a color pair number.
.SS COLOR_PAIR
Its inverse \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR converts a color pair number
to an attribute.
Attributes can hold color pairs in the range 0 to 255.
If you need a color pair larger than that, you must use functions
such as \fBattr_set\fP (which pass the color pair as a separate parameter)
rather than the legacy functions such as \fBattrset\fP.
.SH RETURN VALUE
The routines \fBcan_change_color()\fR and \fBhas_colors()\fR return \fBTRUE\fR
The routines \fBcan_change_color\fR and \fBhas_colors\fR return \fBTRUE\fR
or \fBFALSE\fR.
.PP
All other routines return the integer \fBERR\fR upon failure and an \fBOK\fR
(SVr4 specifies only "an integer value other than \fBERR\fR") upon successful
completion.
(SVr4 specifies only \*(``an integer value
other than \fBERR\fR\*('') upon successful completion.
.PP
X/Open defines no error conditions.
SVr4 does document some error conditions which apply in general:
.bP
This implementation will return \fBERR\fR on attempts to
use color values outside the range 0 to COLORS\-1
use color values outside the range \fB0\fP to \fBCOLORS\fP\-1
(except for the default colors extension),
or use color pairs outside the range 0 to COLOR_PAIRS\-1.
Color values used in \fBinit_color\fP must be in the range 0 to 1000.
or use color pairs outside the range \fB0\fP to \fBCOLOR_PAIRS\-1\fP.
.IP
Color values used in \fBinit_color\fP must be
in the range \fB0\fP to \fB1000\fP.
.IP
An error is returned from all functions
if the terminal has not been initialized.
.IP
An error is returned from secondary functions such as \fBinit_pair\fP
if \fBstart_color\fP was not called.
.bP
SVr4 does much the same, except that
it returns \fBERR\fP from \fBpair_content\fP if the pair was not initialized
using \fBinit_pairs\fP
and
it returns \fBERR\fP from \fBcolor_content\fP
if the terminal does not support changing colors.
.IP
This implementation does not return \fBERR\fP for either case.
.PP
Specific functions make additional checks:
.RS 3
.TP 5
\fBinit_color\fP
returns an error if the terminal does not support
this feature, e.g., if the \fIinitialize_color\fP capability is absent
this feature, e.g., if the \fBinitialize_color\fP capability is absent
from the terminal description.
.TP 5
\fBstart_color\fP
returns an error if the color table cannot be allocated.
.RE
.SH NOTES
In the \fIncurses\fR implementation, there is a separate color activation flag,
color palette, color pairs table, and associated COLORS and COLOR_PAIRS counts
In the \fBncurses\fR implementation, there is a separate color activation flag,
color palette, color pairs table,
and associated \fBCOLORS\fP and \fBCOLOR_PAIRS\fP counts
for each screen; the \fBstart_color\fR function only affects the current
screen. The SVr4/XSI interface is not really designed with this in mind, and
screen.
The SVr4/XSI interface is not really designed with this in mind, and
historical implementations may use a single shared color palette.
.PP
Note that setting an implicit background color via a color pair affects only
character cells that a character write operation explicitly touches. To change
Setting an implicit background color via a color pair affects only
character cells that a character write operation explicitly touches.
To change
the background color used when parts of a window are blanked by erasing or
scrolling operations, see \fBcurs_bkgd\fR(3X).
.PP
Several caveats apply on 386 and 486 machines with VGA-compatible graphics:
Several caveats apply on older x86 machines
(e.g., i386, i486) with VGA-compatible graphics:
.bP
COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with
the \fBA_BOLD\fR attribute.
COLOR_YELLOW is actually brown.
To get yellow, use COLOR_YELLOW combined with the \fBA_BOLD\fR attribute.
.bP
The A_BLINK attribute should in theory cause the background to go bright. This
often fails to work, and even some cards for which it mostly works (such as the
The A_BLINK attribute should in theory cause the background to go bright.
This often fails to work, and even some cards for which it mostly works
(such as the
Paradise and compatibles) do the wrong thing when you try to set a bright
"yellow" background (you get a blinking yellow foreground instead).
\*(``yellow\*('' background (you get a blinking yellow foreground instead).
.bP
Color RGB values are not settable.
.SH PORTABILITY
@ -224,17 +471,28 @@ This implementation satisfies XSI Curses's minimum maximums
for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR.
.PP
The \fBinit_pair\fP routine accepts negative values of foreground
and background color to support the \fBuse_default_colors\fP extension,
and background color to support the \fBuse_default_colors\fR(3X) extension,
but only if that routine has been first invoked.
.PP
The assumption that \fBCOLOR_BLACK\fR is the default
background color for all terminals can be modified using the
\fBassume_default_colors\fP extension.
\fBassume_default_colors\fR(3X) extension.
.PP
This implementation checks the pointers,
e.g., for the values returned by
\fBcolor_content\fP and \fBpair_content\fP,
and will treat those as optional parameters when null.
.PP
X/Open Curses does not specify a limit for the number of colors and
color pairs which a terminal can support.
However, in its use of \fBshort\fP for the parameters,
it carries over SVr4's implementation detail for the compiled
terminfo database, which uses signed 16-bit numbers.
This implementation provides extended versions of those functions
which use \fBshort\fP parameters,
allowing applications to use larger color- and pair-numbers.
.PP
The \fBreset_color_pairs\fP function is an extension of ncurses.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_initscr\fR(3X),

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,8 +26,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_delch.3x,v 1.11 2010/12/04 18:36:44 tom Exp $
.\" $Id: curs_delch.3x,v 1.13 2019/11/30 21:06:30 tom Exp $
.TH curs_delch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.el .ds '' ''
.SH NAME
\fBdelch\fR,
\fBwdelch\fR,
@ -47,21 +51,24 @@
.SH DESCRIPTION
These routines delete the character under the cursor; all characters to the
right of the cursor on the same line are moved to the left one position and the
last character on the line is filled with a blank. The cursor position does
not change (after moving to \fIy\fR, \fIx\fR, if specified). (This does not
last character on the line is filled with a blank.
The cursor position does
not change (after moving to \fIy\fR, \fIx\fR, if specified).
(This does not
imply use of the hardware delete character feature.)
.SH RETURN VALUE
All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4
specifies only "an integer value other than \fBERR\fR") upon successful
completion.
.PP
Functions with a "mv" prefix first perform a cursor movement using
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
Note that \fBdelch\fR, \fBmvdelch\fR, and \fBmvwdelch\fR may be macros.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4. The
These functions are described in the XSI Curses standard, Issue 4.
The
standard specifies that they return \fBERR\fR on failure, but specifies no
error conditions.
.SH SEE ALSO

Some files were not shown because too many files have changed in this diff Show more