ncurses: vendor import version 6.5

This commit is contained in:
Baptiste Daroussin 2024-06-20 13:15:14 +02:00
commit 21817992b3
451 changed files with 48693 additions and 50338 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 2020,2021 Thomas E. Dickey --
-- Copyright 2006,2017 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
@ -26,13 +26,13 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: AUTHORS,v 1.4 2020/02/02 23:34:34 tom Exp $
-- $Id: AUTHORS,v 1.5 2021/06/17 21:20:30 tom Exp $
-------------------------------------------------------------------------------
These are the principal authors/contributors of ncurses since 1.9.9e,
in decreasing order of their contribution:
TD Thomas E. Dickey
JPF Juergen Pfeifer
JPF Juergen Pfeifer
ESR Eric S Raymond
AVL Alexander V Lukyanov
PB Philippe Blain

View file

@ -1,4 +1,4 @@
Copyright 2018-2020,2021 Thomas E. Dickey
Copyright 2018-2023,2024 Thomas E. Dickey
Copyright 1998-2017,2018 Free Software Foundation, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
@ -26,4 +26,4 @@ sale, use or other dealings in this Software without prior written
authorization.
-- vile:txtmode fc=72
-- $Id: COPYING,v 1.10 2021/01/01 09:54:30 tom Exp $
-- $Id: COPYING,v 1.13 2024/01/05 21:13:17 tom Exp $

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright 2018-2019,2020 Thomas E. Dickey --
-- Copyright 2018-2023,2024 Thomas E. Dickey --
-- Copyright 1998-2017,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
@ -26,7 +26,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: INSTALL,v 1.226 2020/09/06 23:41:16 tom Exp $
-- $Id: INSTALL,v 1.254 2024/04/27 14:21:05 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@ -35,10 +35,10 @@
* READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
************************************************************
You should be reading the file INSTALL in a directory called ncurses-d.d, where
d.d is the current version number. There should be several subdirectories,
including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
and `test'. See the README file for a roadmap to the package.
You should be reading the file INSTALL in a directory called ncurses-d.d,
where d.d is the current version number. There should be several
subdirectories, including 'c++', 'form', 'man', 'menu', 'misc', 'ncurses',
'panel', 'progs', and 'test'. See 'README' for a roadmap to the package.
If you are a distribution integrator or packager, please read and act on the
section titled FOR SYSTEM INTEGRATORS below.
@ -47,9 +47,10 @@ If you are converting from BSD curses and do not have root access, be sure
to read the BSD CONVERSION NOTES section below.
If you are trying to build applications using gpm with ncurses,
read the USING NCURSES WITH GPM section below.
read the USING GPM section below.
If you are cross-compiling, see the note below on BUILDING WITH A CROSS-COMPILER.
If you are cross-compiling, see the note below on
BUILDING WITH A CROSS-COMPILER.
If you want to build the Ada95 binding, go to the Ada95 directory and
follow the instructions there. The Ada95 binding is not covered below.
@ -72,14 +73,14 @@ Ncurses has been also built in the OS/2 EMX environment.
INSTALLATION PROCEDURE:
----------------------
1. First, decide whether you want ncurses to replace your existing library (in
which case you'll need super-user privileges) or be installed in parallel
with it.
1. First, decide whether you want ncurses to replace your existing library
(in which case you'll need super-user privileges) or be installed in
parallel with it.
The --prefix option to configure changes the root directory for installing
ncurses. The default is normally in subdirectories of /usr/local, except
for systems where ncurses is normally installed as a system library (see
"IF YOU ARE A SYSTEM INTEGRATOR"). Use --prefix=/usr to replace your
"FOR SYSTEM INTEGRATORS"). Use --prefix=/usr to replace your
default curses distribution.
The package gets installed beneath the --prefix directory as follows:
@ -106,16 +107,16 @@ INSTALLATION PROCEDURE:
See also the discussion of --with-install-prefix.
2. Type `./configure' in the top-level directory of the distribution to
2. Type './configure' in the top-level directory of the distribution to
configure ncurses for your operating system and create the Makefiles.
Besides --prefix, various configuration options are available to customize
the installation; use `./configure --help' to list the available options.
the installation; use './configure --help' to list the available options.
If your operating system is not supported, read the PORTABILITY section in
the file ncurses/README for information on how to create a configuration
file for your system.
The `configure' script generates makefile rules for one or more object
The 'configure' script generates makefile rules for one or more object
models and their associated libraries:
libncurses.a (normal)
@ -145,7 +146,7 @@ INSTALLATION PROCEDURE:
the library names (e.g., libncursest.a, libncursestw.a).
If you do not specify any models, the normal and debug libraries will be
configured. Typing `configure' with no arguments is equivalent to:
configured. Typing 'configure' with no arguments is equivalent to:
./configure --with-normal --with-debug --enable-overwrite
@ -176,10 +177,10 @@ INSTALLATION PROCEDURE:
You can make curses and terminfo fall back to an existing file of termcap
definitions by configuring with --enable-termcap. If you do this, the
library will search /etc/termcap before the terminfo database, and will
also interpret the contents of the TERM environment variable. See the
also interpret the contents of the $TERM environment variable. See the
section BSD CONVERSION NOTES below.
3. Type `make'. Ignore any warnings, no error messages should be produced.
3. Type 'make'. Ignore any warnings; no error messages should be produced.
This should compile the ncurses library, the terminfo compiler tic(1),
captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
programs (see the manual pages for explanation of what they do), some test
@ -195,8 +196,9 @@ INSTALLATION PROCEDURE:
database before running the test programs. Not all vendors' terminfo
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).
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
@ -207,21 +209,21 @@ INSTALLATION PROCEDURE:
You can use it to verify that the screen highlights work correctly, that
cursor addressing and window scrolling works OK, etc.
5. Once you've tested, you can type `make install' to install libraries,
the programs, the terminfo database and the manual pages. Alternately, you
can type `make install' in each directory you want to install. In the
5. Once you've tested, you can type 'make install' to install libraries,
the programs, the terminfo database and the manual pages. Alternately,
you can type 'make install' in each directory you want to install. In the
top-level directory, you can do a partial install using these commands:
'make install.progs' installs tic, infocmp, etc...
'make install.includes' installs the headers.
'make install.libs' installs the libraries (and the headers).
'make install.data' installs the terminfo data. (Note: `tic' must
'make install.data' installs the terminfo data. (Note: 'tic' must
be installed before the terminfo data can be
compiled).
'make install.man' installs the manual pages.
############################################################################
# CAVEAT EMPTOR: `install.data' run as root will NUKE any existing #
# 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. #
############################################################################
@ -242,8 +244,8 @@ INSTALLATION PROCEDURE:
compile using its curses.h you'll end up with a large number of
undefined symbols at link time.
IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
and run the `capconvert' script. This script will deduce various things
IF YOU DO NOT HAVE ROOT: Change directory to the 'progs' subdirectory
and run the 'capconvert' script. This script will deduce various things
about your environment and use them to build you a private terminfo tree,
so you can use ncurses applications.
@ -273,13 +275,13 @@ CONFIGURE OPTIONS:
./configure --help
The --help and several options are common to all configure scripts that are
generated with autoconf. Those are all listed before the line
The --help and several options are common to all configure scripts that
are generated with autoconf. Those are all listed before the line
--enable and --with options recognized:
The other options are specific to this package. We list them in alphabetic
order.
The other options are specific to this package. We list them in
alphabetic order.
--disable-assumed-color
With ncurses 5.1, we introduced a new function, assume_default_colors()
@ -444,7 +446,7 @@ CONFIGURE OPTIONS:
--with-menu-libname=XXX
--with-panel-libname=XXX
Rather than renaming them abitrarily, a prefix or suffix is
Rather than renaming them arbitrarily, a prefix or suffix is
recommended. An "n" prefix provides consistency with ncurses versus
curses, i.e.,
@ -453,8 +455,8 @@ CONFIGURE OPTIONS:
--with-panel-libname=npanel
--disable-pkg-ldflags
Omit options in $EXTRA_LDFLAGS from the pkg-config ".pc" and
corresponding ncurses*-config script which normally are listed via
Omit options in $LDFLAGS and $EXTRA_LDFLAGS from the pkg-config ".pc"
and corresponding ncurses*-config script which normally are listed via
the "--libs" option. These options are normally used to facilitate
linking to ncurses when it was configured to use the rpath feature.
@ -475,11 +477,19 @@ CONFIGURE OPTIONS:
filesystems. This option adds a 1-second sleep to help those tools
avoid unnecessary relinking during the install process.
--disable-root-access
Compile with environment restriction, so most file-access is limited
when running as root, or via a setuid/setgid application.
--disable-root-environ
Compile with environment restriction, so certain environment variables
are not available when running as root, or via a setuid/setgid
application. These are (for example $TERMINFO) those that allow the
search path for the terminfo or termcap entry to be customized.
are not available when running as root. These are (for example
$TERMINFO) those that allow the search path for the terminfo or termcap
entry to be customized.
Disabling the root environment variables also disables the setuid
environment variables by default. Use the --disable-setuid-environ
option to modify this behavior.
--disable-rpath-hack
Normally the configure script helps link libraries found in unusual
@ -494,6 +504,16 @@ CONFIGURE OPTIONS:
--disable-stripping
Do not strip installed executables.
--disable-setuid-environ
Compile with environment restriction, so certain environment variables
are not available when running via a setuid/setgid application. These
are (for example $TERMINFO) those that allow the search path for the
terminfo or termcap entry to be customized.
A setuid/setgid application inherits its environment variables from
the current user, in contrast to sudo which may limit the environment
variables that ncurses uses.
--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
@ -512,26 +532,6 @@ 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.
@ -553,6 +553,10 @@ CONFIGURE OPTIONS:
Recognize BSD-style prefix padding. Some ancient BSD programs (such as
nethack) call tputs("50") to implement delays.
--enable-check-size
Compile-in feature to detect screensize for terminals which do not
advertise their screensize, e.g., serial terminals.
--enable-colorfgbg
Compile with experimental $COLORFGBG code. That environment variable
is set by some terminal emulators as a hint to applications, by
@ -666,9 +670,17 @@ CONFIGURE OPTIONS:
--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.
Define symbol in curses.h controlling whether some library structures
are opaque, meaning that their members are accessible only via the
documented API. The --enable-opaque-curses option may be overridden
by the --enable-reentrant option.
Enabling opaque-curses enables opaque for the form, menu, and panel
libraries. Use their corresponding options to disable the feature
individually.
NOTE: beginning with ncurses 6.5 this option is enabled by default;
older versions disable it by default.
--enable-pc-files
If pkg-config is found (see --with-pkg-config), generate ".pc" files
@ -728,6 +740,14 @@ CONFIGURE OPTIONS:
reducing the need for juggling the global SP value with set_term() and
delscreen().
--enable-stdnoreturn
When enabled, check if the <stdnoreturn.h> header exists, and if found
define GCC_NORETURN to _Noreturn rather than either the gcc-specific
__attribute__((noreturn)) or an empty token. Doing this may require
calling programs which use GCC_NORETURN in their own function
definitions to be modified, because _Noreturn is only accepted as
the first token in a declaration.
--enable-string-hacks
Controls whether strlcat and strlcpy may be used. The same issue
applies to OpenBSD's warnings about snprintf, noting that this function
@ -766,6 +786,26 @@ CONFIGURE OPTIONS:
--enable-warnings
Turn on GCC compiler warnings. There should be only a few.
--enable-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-weak-symbols
If the --with-pthread option is set, check if the compiler supports
weak-symbols. If it does, then name the thread-capable library without
@ -786,14 +826,22 @@ CONFIGURE OPTIONS:
symbolic link to equate libncurses.so with libncursesw.so
NOTE: the Ada95 binding may be built against either version of the the
ncurses library, but you must decide which: the binding installs the
same set of files for either version. Currently (2002/6/22) it does
ncurses library, but you must decide which: the binding installs the
same set of files for either version. Currently (2023/10/21) it does
not use the extended features from the wide-character code, so it is
probably better to not install the binding for that configuration.
NOTE: beginning with ncurses 6.5 this option is enabled by default;
older versions disable it by default.
--enable-xmc-glitch
Compile-in support experimental xmc (magic cookie) code.
--with-abi-altered=NUM
Override the displayed (rather than compiled-in) ABI. Only packagers
who have created configurations where the ABI differs from ncurses
should be interested in this option.
--with-abi-version=NUM
Override the ABI version, which is used in shared library filenames.
Normally this is the same as the release version; some ports have
@ -891,8 +939,9 @@ CONFIGURE OPTIONS:
script supplies "unsigned").
--with-config-suffix=XXX
Specify a suffix for the ncursesw6-config file, etc., used to work
around conflicts with packages.
Specify an suffix for "ncurses*" in the ncurses*-config filename to
work around conflicts with packages. The suffix is placed before the
dash.
--with-cxx-libname=NAME
Override the basename of the ncurses++ library (default: "ncurses++")
@ -997,7 +1046,7 @@ CONFIGURE OPTIONS:
See also the --enable-getcap option.
--with-infocmp-path[=XXX]
Use this option to override the automatic detection of tic in your
Use this option to override the automatic detection of infocmp in your
$PATH when building fallbacks (see "--with-fallbacks").
--with-install-prefix=XXX
@ -1113,9 +1162,10 @@ CONFIGURE OPTIONS:
Override the basename of the panel library (default: "panel")
--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.
If ".pc" files are installed (see --enable-pc-files), 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
@ -1126,12 +1176,28 @@ CONFIGURE OPTIONS:
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.
--with-pkg-config[=CMD]
Check for pkg-config, optionally specifying its pathname.
--with-pkg-config-libdir=[DIR]
--with-pkg-config-libdir[=DIR]
If pkg-config was found, override the automatic check for its library
path.
path. The optional DIR value can be
"auto", automatically use pkg-config's library directory, or
"libdir", use a ${libdir}/pkgconfig (based on the configuration), or
a directory path, i.e., beginning with "/".
The configure script allows only a single directory, because
that is used as the directory in which to install ".pc" files.
The automatic check for the library path prefers the first directory
which currently exists. If none of the directories listed by
pkg-config exist, the check prefers a pkgconfig directory under the
"libdir" set by the configure script (which may not be the system
default), or if pkg-config lists nothing suitable, the first one which
is listed by pkg-config is used.
--with-profile
Generate profile-libraries These are named by adding "_p" to the root,
@ -1191,6 +1257,10 @@ CONFIGURE OPTIONS:
This is normally chosen automatically based on the type of system
which you are building on. We use it for testing the configure script.
--with-strip-program=XXX
When stripping executables during install, use the specified program
rather than "strip".
--with-sysmouse
use FreeBSD sysmouse interface provide mouse support on the console.
@ -1205,7 +1275,7 @@ 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
This is a colon-separated list, like the $TERMINFO_DIRS environment
variable.
--with-termlib[=XXX]
@ -1311,7 +1381,8 @@ CONFIGURE OPTIONS:
--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).
(or del, 127). If XXX is "auto", the configure script chooses BS or
DEL according to platform defaults.
During installation, the makefile and scripts modifies the "xterm+kbs"
terminfo entry to use this setting.
@ -1355,11 +1426,6 @@ 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.
@ -1385,6 +1451,88 @@ COMPATIBILITY WITH OLDER RELEASES:
you may encounter when building a system with different versions of
ncurses:
6.5 (Apt 27, 2024)
Interface changes:
+ the WINDOW structure and some related internal data types declared
in <curses.h> have been made opaque by default;
+ the FORM, MENU, and PANEL structures and related internal data types
from their corresponding header files have been made opqaue by
default; and
+ support for wide characters is now enabled by default.
Added extensions:
+ is_cbreak, is_echo, is_nl, and is_raw, as well as "_sp" variants
+ tiparm_s and tiscan_s
Added internal functions (other than "_sp" variants):
+ _nc_env_access
Removed internal functions:
+ none
Modified internal functions:
+ These now pass a const parameter: _nc_delink_entry, _nc_str_copy,
and _nc_trans_string
6.4 (Dec 31, 2022)
Interface changes:
+ none
Added extensions:
+ none
Added internal functions (other than "_sp" variants):
+ add _nc_free_termtype1 and _nc_free_tparm, for memory-leaks
Removed internal functions:
+ none
Modified internal functions:
+ none
6.3 (Oct 21, 2021)
Interface changes:
+ the definition of TERMTYPE2 is now internal, not visible in the ABI,
like the enclosing TERMINAL which was previously made opaque. This
was done to provide SCREEN-specific "static" variables in terminfo.
Added extensions:
+ add sp-funcs for erasewchar, killwchar.
Added internal functions (other than "_sp" variants):
+ _nc_safe_fopen and _nc_safe_open3 limit privileges if possible when
opening a file; otherwise disallow access for updating files.
+ _nc_tiparm is a variant of tiparm which is used when all of the
parameters are known to be numbers rather than possibly strings.
+ _nc_reset_tparm improves tic's checks by resetting the terminfo
"static variables" before calling functions which may update them.
Removed internal functions:
+ none
Modified internal functions:
+ _nc_trace_ttymode passes pointer to const data
+ _nc_tparm_analyze passes pointer to int*, not int[]
6.2 (Feb 12, 2020)
Interface changes:
@ -2147,15 +2295,15 @@ FOR SYSTEM INTEGRATORS:
Naming the Console Terminal
In various systems there has been a practice of designating the system
console driver type as `console'. Please do not do this! It
console driver type as 'console'. Please do not do this! It
complicates peoples' lives, because it can mean that several different
terminfo entries from different operating systems all logically want to
be called `console'.
be called 'console'.
Please pick a name unique to your console driver and set that up
in the /etc/inittab table or local equivalent. Send the entry to the
terminfo maintainer (listed in the misc/terminfo file) to be included
in the terminfo file, if it's not already there. See the
in the terminfo file, if it is not already there. See the
term(7) manual page included with this distribution for more on
conventions for choosing type names.
@ -2189,7 +2337,7 @@ CONFIGURING FALLBACK ENTRIES:
tree is accessible (that is, in single-user mode or at OS installation
time) the ncurses library can be compiled to include an array of
pre-fetched fallback entries.
NOTE: This must be done on a machine which has ncurses' infocmp and
terminfo database installed (as well as ncurses' tic and infocmp
programs). That is because the fallback sources are generated and
@ -2388,4 +2536,4 @@ BUG REPORTS:
The Hacker's Guide in the doc directory includes some guidelines
on how to report bugs in ways that will get them fixed most quickly.
-- vile:txtmode
-- vile:txtmode fc=78

View file

@ -33,6 +33,7 @@
./Ada95/include/ncurses_defs
./Ada95/make-tar.sh
./Ada95/mk-1st.awk
./Ada95/mk-pkg.awk
./Ada95/package/AdaCurses-doc.spec
./Ada95/package/AdaCurses.spec
./Ada95/package/debian/compat
@ -342,7 +343,7 @@
./doc/html/announce.html
./doc/html/hackguide.html
./doc/html/index.html
./doc/html/man/adacurses6-config.1.html
./doc/html/man/adacursesw6-config.1.html
./doc/html/man/captoinfo.1m.html
./doc/html/man/clear.1.html
./doc/html/man/curs_add_wch.3x.html
@ -463,7 +464,7 @@
./doc/html/man/mitem_value.3x.html
./doc/html/man/mitem_visible.3x.html
./doc/html/man/ncurses.3x.html
./doc/html/man/ncurses6-config.1.html
./doc/html/man/ncursesw6-config.1.html
./doc/html/man/new_pair.3x.html
./doc/html/man/panel.3x.html
./doc/html/man/resizeterm.3x.html
@ -553,6 +554,7 @@
./include/edit_cfg.sh
./include/hashed_db.h
./include/headers
./include/nc_access.h
./include/nc_alloc.h
./include/nc_mingw.h
./include/nc_panel.h
@ -670,7 +672,7 @@
./man/keyok.3x
./man/legacy_coding.3x
./man/make_sed.sh
./man/man_db.renames
./man/man_db.renames.in
./man/manhtml.aliases
./man/manhtml.externs
./man/manlinks.sed
@ -768,6 +770,7 @@
./misc/makellib
./misc/menu.def
./misc/menu.ref
./misc/ncu2openbsd
./misc/ncurses-config.in
./misc/ncurses.def
./misc/ncurses.ref
@ -899,6 +902,7 @@
./ncurses/new_pair.h
./ncurses/report_hashing.c
./ncurses/report_offsets.c
./ncurses/term.priv.h
./ncurses/tinfo/MKcaptab.awk
./ncurses/tinfo/MKcaptab.sh
./ncurses/tinfo/MKcodes.awk
@ -1108,6 +1112,7 @@
./test/color_content.c
./test/color_name.h
./test/color_set.c
./test/combine.c
./test/configure
./test/configure.in
./test/demo_altkeys.c
@ -1212,15 +1217,19 @@
./test/test_addstr.c
./test/test_addwstr.c
./test/test_arrays.c
./test/test_delwin.c
./test/test_endwin.c
./test/test_get_wstr.c
./test/test_getstr.c
./test/test_instr.c
./test/test_inwstr.c
./test/test_mouse.c
./test/test_opaque.c
./test/test_setupterm.c
./test/test_sgr.c
./test/test_termattrs.c
./test/test_tparm.c
./test/test_unget_wch.c
./test/test_vid_puts.c
./test/test_vidputs.c
./test/testaddch.c

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.43 2020/02/02 23:34:34 tom Exp $
# $Id: Makefile.in,v 1.46 2022/10/01 22:53:36 tom Exp $
##############################################################################
# Copyright 2018-2019,2020 Thomas E. Dickey #
# Copyright 2018-2021,2022 Thomas E. Dickey #
# Copyright 1998-2014,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -62,11 +62,26 @@ pkgdir = @PKG_CONFIG_LIBDIR@
include_dir = ${includedir}${includesubdir}
FGREP = @FGREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
DIRS_TO_MAKE = @DIRS_TO_MAKE@
@MAKE_PHONY@.PHONY : all
@MAKE_PHONY@.PHONY : check
@MAKE_PHONY@.PHONY : clean
@MAKE_PHONY@.PHONY : depend
@MAKE_PHONY@.PHONY : distclean
@MAKE_PHONY@.PHONY : install
@MAKE_PHONY@.PHONY : mostlyclean
@MAKE_PHONY@.PHONY : preinstall
@MAKE_PHONY@.PHONY : realclean
@MAKE_PHONY@.PHONY : sources
@MAKE_PHONY@.PHONY : tags
@MAKE_PHONY@.PHONY : uninstall
all :: $(DIRS_TO_MAKE)
$(DIRS_TO_MAKE) :
@ -90,16 +105,16 @@ preinstall :
@ test "$(include_dir)" = "$(prefix)/include" || \
echo '** Include-directory is not in a standard location'
@ test ! -f $(include_dir)/termcap.h || \
fgrep NCURSES_VERSION $(include_dir)/termcap.h >/dev/null || \
$(FGREP) NCURSES_VERSION $(include_dir)/termcap.h >/dev/null || \
echo '** Will overwrite non-ncurses termcap.h'
@ test ! -f $(include_dir)/curses.h || \
fgrep NCURSES_VERSION $(include_dir)/curses.h >/dev/null || \
$(FGREP) NCURSES_VERSION $(include_dir)/curses.h >/dev/null || \
echo '** Will overwrite non-ncurses curses.h'
distclean \
realclean ::
check:
check :
@ echo The test-programs are interactive

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 2020,2021 Thomas E. Dickey #
# Copyright 1998-2000,2006 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
################################################################################
# $Id: Makefile.os2,v 1.12 2020/02/02 23:34:34 tom Exp $
# $Id: Makefile.os2,v 1.13 2021/06/17 21:20:30 tom Exp $
#
# Wrapper Makefile for ncurses library under OS/2.
# Author: Juan Jose Garcia Ripoll <worm@arrakis.es>.
@ -70,7 +70,7 @@
# disappear are not essential.
#
# I first thought about killing '_nc_*' symbols, but it seems that some of
# them --_nc_panel_hook, _nc_ada*, etc-- are needed outside ncurses.dll.
# them --_nc_panel_hook, _nc_ada*, etc-- are needed outside ncurses.dll.
# However, the whole size of the export table will not be larger than 1k or
# so.
#

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 2020-2021,2023 Thomas E. Dickey --
-- Copyright 1998-2012,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
@ -26,7 +26,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: README,v 1.28 2020/02/02 23:34:34 tom Exp $
-- $Id: README,v 1.31 2023/10/28 14:49:04 tom Exp $
-------------------------------------------------------------------------------
README file for the ncurses package
@ -35,18 +35,19 @@ See the file INSTALL for instructions on how to build and install ncurses.
See the file NEWS for a release history and bug-fix notes.
See the file TO-DO for things that still need doing, including known bugs.
Browse the file misc/ncurses-intro.html for narrative descriptions of how
Browse the file doc/html/ncurses-intro.html for narrative descriptions of how
to use ncurses and the panel, menu, and form libraries.
Browse the file doc/html/hackguide.html for a tour of the package internals.
Find plain text versions of both of these documents in doc/.
ROADMAP AND PACKAGE OVERVIEW:
You should be reading this file in a directory called: ncurses-d.d, where d.d
is the current version number (see the dist.mk file in this directory for
that). There should be a number of subdirectories, including `c++', `form',
`man', `menu', `misc', `ncurses', `panel', `progs', `test', 'tack' and `Ada95'.
(The 'tack' program may be distributed separately).
`man', `menu', `misc', `ncurses', `panel', `progs', `test', and `Ada95'.
A full build/install of this package typically installs several libraries, a
handful of utilities, and a database hierarchy. Here is an inventory of the
@ -81,7 +82,7 @@ version.
If you configure using the --enable-reentrant option, a "t" is appended to the
library names (e.g., libncursest.a) and the resulting libraries have a
different binary interface which makes the ncurses interface more "opaque".
different binary interface, making the ncurses interface more opaque.
The ncurses libraries implement the curses API. The panel, menu and forms
libraries implement clones of the SVr4 panel, menu and forms APIs. The source
@ -89,9 +90,9 @@ code for these lives in the `ncurses', `panel', `menu', and `form' directories
respectively.
In the `c++' directory, you'll find code that defines an interface to the
curses, forms, menus and panels library packaged as C++ classes, and a demo program in C++
to test it. These class definition modules are not installed by the 'make
install.libs' rule as libncurses++.
curses, forms, menus and panels library packaged as C++ classes, and a demo
program in C++ to test it. These class definition modules are not installed
by the 'make install.libs' rule as libncurses++.
In the `Ada95' directory, you'll find code and documentation for an
Ada95 binding of the curses API, to be used with the GNAT compiler.
@ -102,8 +103,8 @@ for documentation of the binding.
To do its job, the ncurses code needs your terminal type to be set in the
environment variable TERM (normally set by your OS; under UNIX, getty(1)
typically does this, but you can override it in your .profile); and, it needs a
database of terminal descriptions in which to look up your terminal type's
typically does this, but you can override it in your .profile); and, it needs
a database of terminal descriptions in which to look up your terminal type's
capabilities.
In older (V7/BSD) versions of curses, the database was a flat text file,
@ -117,10 +118,10 @@ second form.
In the `misc' directory, there is a text file terminfo.src, in editable
terminfo format, which can be used to generate the terminfo binaries (that's
what make install.data does). If the package was built with the
--enable-termcap option enabled, and the ncurses library cannot find a terminfo
description for your terminal, it will fall back to the termcap file supplied
with your system (which the ncurses package installation leaves strictly
alone).
--enable-termcap option enabled, and the ncurses library cannot find a
terminfo description for your terminal, it will fall back to the termcap file
supplied with your system (which the ncurses package installation leaves
strictly alone).
The utilities are as follows:
@ -149,7 +150,7 @@ help you systematically exercise the library functions.
AUTHORS:
Pavel Curtis:
Pavel Curtis:
wrote the original ncurses
Zeyd M. Ben-Halim:
@ -176,8 +177,8 @@ Eric S. Raymond:
xterm mouse support, and the ncurses test program.
Juergen Pfeifer
The menu and form libraries, C++ bindings for ncurses, menus, forms and
panels, as well as the Ada95 binding. Ongoing support for panel.
The menu and form libraries, C++ bindings for ncurses, menus, forms
and panels, as well as the Ada95 binding. Ongoing support for panel.
CONTRIBUTORS:
@ -216,3 +217,5 @@ BUGS:
See the INSTALL file for bug and developer-list addresses.
The Hacker's Guide in the doc directory includes some guidelines
on how to report bugs in ways that will get them fixed most quickly.
-- vile:txtmode fc=78

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 2020,2021 Thomas E. Dickey --
-- Copyright 1998-2006,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
@ -26,7 +26,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: README.emx,v 1.11 2020/02/02 23:34:34 tom Exp $
-- $Id: README.emx,v 1.12 2021/06/17 21:20:30 tom Exp $
-- Author: Thomas Dickey
-------------------------------------------------------------------------------
@ -34,7 +34,7 @@ You can build ncurses on OS/2 in the EMX environment. But you must build and
acquire tools. Not all of the tools distributed with EMX work properly, and
some additional ones are required.
First, the configure script distributed with ncurses will not run as-is in EMX.
First, the configure script distributed with ncurses will not run as-is in EMX.
You can generate a new one if you have autoconf built for EMX. You will need
the EMX development tools, of course. Get these programs to start:
@ -65,7 +65,7 @@ may fix these problems:
+ I also built from sources (because the distributed binaries did not
work) the cmp, diff programs.
Other required utilities such as ar, cat, chmod, cp, gawk, grep, mv,
ls, rm, mkdir, sed, sort and tr worked.

View file

@ -1 +1 @@
5:0:10 6.2 20210220
5:0:10 6.5 20240427

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

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
dnl***************************************************************************
dnl Copyright 2018-2020,2021 Thomas E. Dickey *
dnl Copyright 2018-2023,2024 Thomas E. Dickey *
dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
@ -29,7 +29,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.729 2021/01/09 11:20:52 tom Exp $
dnl $Id: configure.in,v 1.779 2024/04/10 08:04:00 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl For additional information, see
@ -38,7 +38,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.52.20210101)
AC_REVISION($Revision: 1.729 $)
AC_REVISION($Revision: 1.779 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -61,6 +61,9 @@ CF_CFG_DEFAULTS
### Defaults for ncurses ABI
CF_ABI_DEFAULTS
### override ABI version, e.g., packagers
CF_WITH_ABI_ALTERED
### Checks for programs.
AC_ARG_WITH(ada,
[ --without-ada suppress check for Ada compiler, don't build demo],
@ -183,22 +186,6 @@ AC_ARG_WITH(progs,
[cf_with_progs=yes])
AC_MSG_RESULT($cf_with_progs)
if test -f "$srcdir/tack/tack.h" ; then
if test "x$cross_compiling" = xyes ; then
CF_VERBOSE(ignoring tack because we are cross-compiling)
cf_with_tack=no
else
AC_MSG_CHECKING(if you want to build the tack program)
AC_ARG_WITH(tack,
[ --without-tack suppress build/install with tack program],
[cf_with_tack=$withval],
[cf_with_tack=$cf_with_progs])
AC_MSG_RESULT($cf_with_tack)
fi
else
cf_with_tack=no
fi
AC_MSG_CHECKING(if you want to build test-programs)
AC_ARG_WITH(tests,
[ --without-tests suppress build/install with test-programs],
@ -215,7 +202,6 @@ AC_MSG_RESULT($with_curses_h)
modules_to_build="ncurses"
test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
test "X$cf_with_tack" != Xno && modules_to_build="$modules_to_build tack"
modules_to_build="$modules_to_build panel menu form"
AC_ARG_PROGRAM
@ -231,7 +217,7 @@ AC_SYS_LONG_FILE_NAMES
# of package conflict.
cf_config_suffix=
AC_ARG_WITH(config-suffix,
[ --with-config-suffix=X suffixes ncursesXX-config file],
[ --with-config-suffix=X name ncurses*X-config file with X],
[case "x$withval" in
(xyes|xno)
AC_MSG_WARN(expected a value for config-suffix option)
@ -247,9 +233,9 @@ CF_WITH_PKG_CONFIG_LIBDIR
CF_ENABLE_PC_FILES
if test -z "$MAKE_PC_FILES"
then
AC_MSG_CHECKING(for suffix to add to pc-files)
AC_MSG_CHECKING(for suffix to add to pkg-config files)
AC_ARG_WITH(pc-suffix,
[ --with-pc-suffix suffixes pc-files],
[[ --with-pc-suffix[=XXX] suffix pkg-config files with XXX]],
[case "x$withval" in
(xyes|xno)
PC_MODULE_SUFFIX=
@ -280,6 +266,7 @@ fi
# do this after mixed-case option (tags/TAGS is not as important as tic).
AC_PROG_MAKE_SET
CF_MAKE_PHONY
CF_MAKE_TAGS
CF_MAKEFLAGS
@ -293,16 +280,16 @@ CF_AR_FLAGS
dnl Special option for use by system-builders: the install-prefix is used to
dnl adjust the location into which the actual install is done, so that an
dnl archive can be built without modifying the host system's configuration.
AC_MSG_CHECKING(if you have specified an install-prefix)
AC_MSG_CHECKING(for an installation directory prefix)
AC_ARG_WITH(install-prefix,
[ --with-install-prefix prefixes actual install-location ($DESTDIR)],
[ --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix],
[case "x$withval" in
(xyes|xno)
;;
(*) DESTDIR="$withval"
;;
esac])
AC_MSG_RESULT($DESTDIR)
AC_MSG_RESULT([${DESTDIR:-(none)}])
AC_SUBST(DESTDIR)
###############################################################################
@ -419,6 +406,10 @@ LIB_SUFFIX=
AC_SUBST(LIB_SUFFIX)
CF_PATHSEP
# headers needed for checks...
AC_CHECK_DECL(exit)
AC_HEADER_DIRENT
###############################################################################
AC_MSG_CHECKING(if you want to build a separate terminfo library)
@ -458,7 +449,7 @@ case "$DFT_LWR_MODEL" in
(shared) LD_MODEL='' ;;
esac
AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
AC_MSG_RESULT($LD_MODEL)
AC_MSG_RESULT([${LD_MODEL:-(none)}])
case "$DFT_LWR_MODEL" in
(shared)
@ -553,7 +544,7 @@ fi
### Depending on the system, someone may use rpath to build ncurses but not
# want users of the package to rely upon that feature. Give those people an
# option to suppress that detail from EXTRA_LDFLAGS.
EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
if test -n "$EXTRA_PKG_LDFLAGS"
then
AC_MSG_CHECKING(if you want to disable extra LDFLAGS for package-scripts)
@ -571,10 +562,10 @@ AC_SUBST(EXTRA_PKG_LDFLAGS)
CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
### use option --with-extra-suffix to append suffix to headers and libraries
AC_MSG_CHECKING(if you wish to append extra suffix to header/library paths)
AC_MSG_CHECKING(for extra suffix to append to header/library paths)
EXTRA_SUFFIX=
AC_ARG_WITH(extra-suffix,
[ --with-extra-suffix=X append extra suffix to header/library paths],
[[ --with-extra-suffix[=X] append extra suffix X to header/library paths]],
[case x$withval in
(xno)
;;
@ -586,7 +577,7 @@ AC_ARG_WITH(extra-suffix,
;;
esac
])
AC_MSG_RESULT($EXTRA_SUFFIX)
AC_MSG_RESULT([${EXTRA_SUFFIX:-(none)}])
AC_SUBST(EXTRA_SUFFIX)
### use option --disable-overwrite to leave out the link to -lcurses
@ -634,12 +625,12 @@ else
fi
AC_SUBST(NCURSES_USE_DATABASE)
AC_MSG_CHECKING(for list of fallback descriptions)
AC_MSG_CHECKING(for list of fallback terminal descriptions)
AC_ARG_WITH(fallbacks,
[ --with-fallbacks=XXX specify list of fallback terminal descriptions],
[with_fallback=$withval],
[with_fallback=])
AC_MSG_RESULT($with_fallback)
AC_MSG_RESULT([${with_fallback:-(none)}])
case ".$with_fallback" in
(.|.no)
@ -692,11 +683,20 @@ AC_MSG_RESULT($with_xterm_new)
WHICH_XTERM=$with_xterm_new
AC_SUBST(WHICH_XTERM)
case $host_os in
(*linux-gnu|*cygwin|*mingw32|*msys)
want_xterm_kbs=DEL
;;
(*)
want_xterm_kbs=BS
;;
esac
AC_MSG_CHECKING(if xterm backspace sends BS or DEL)
AC_ARG_WITH(xterm-kbs,
[ --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL],
[[ --with-xterm-kbs[=XXX] specify if xterm backspace sends BS or DEL]],
[with_xterm_kbs=$withval],
[with_xterm_kbs=BS])
[with_xterm_kbs=auto])
case x$with_xterm_kbs in
(xyes|xno|xBS|xbs|x8)
with_xterm_kbs=BS
@ -704,6 +704,9 @@ case x$with_xterm_kbs in
(xDEL|xdel|x127)
with_xterm_kbs=DEL
;;
(xauto)
with_xterm_kbs=$want_xterm_kbs
;;
(*)
with_xterm_kbs=$withval
;;
@ -712,6 +715,11 @@ AC_MSG_RESULT($with_xterm_kbs)
XTERM_KBS=$with_xterm_kbs
AC_SUBST(XTERM_KBS)
if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
then
AC_MSG_WARN([expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs])
fi
MAKE_TERMINFO=
if test "$use_database" = no ; then
TERMINFO="${datadir}/terminfo"
@ -757,7 +765,7 @@ AC_ARG_ENABLE(big-core,
[AC_TRY_RUN([
#include <stdlib.h>
#include <string.h>
int main() {
int main(void) {
unsigned long n = 6000000L;
char *s = malloc(n);
if (s != 0)
@ -844,13 +852,29 @@ AC_ARG_ENABLE(home-terminfo,
AC_MSG_RESULT($with_home_terminfo)
test "x$with_home_terminfo" = "xyes" && AC_DEFINE(USE_HOME_TERMINFO,1,[Define to 1 if $HOME/.terminfo feature is wanted])
AC_MSG_CHECKING(if you want to use restricted environment when running as root)
AC_MSG_CHECKING(if you want to permit root to use ncurses environment variables)
AC_ARG_ENABLE(root-environ,
[ --disable-root-environ restrict environment when running as root],
[ --disable-root-environ restrict root use of ncurses environment variables],
[with_root_environ=$enableval],
[with_root_environ=yes])
AC_MSG_RESULT($with_root_environ)
test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if environment should be restricted for root user])
test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if root/setuid application is allowed to use ncurses environment])
AC_MSG_CHECKING(if you want to permit setuid programs to access all files)
AC_ARG_ENABLE(root-access,
[ --disable-root-access restrict file-access when running setuid],
[with_root_access=$enableval],
[with_root_access=yes])
AC_MSG_RESULT($with_root_access)
test "x$with_root_access" = xyes && AC_DEFINE(USE_ROOT_ACCESS,1,[Define to 1 if setuid is allowed all file-access])
AC_MSG_CHECKING(if you want to permit setuid use of ncurses environment variables)
AC_ARG_ENABLE(setuid-environ,
[ --disable-setuid-environ restrict setuid use of ncurses environment variables],
[with_setuid_environ=$enableval],
[with_setuid_environ=$with_root_environ])
AC_MSG_RESULT($with_setuid_environ)
test "x$with_setuid_environ" = xyes && AC_DEFINE(USE_SETUID_ENVIRON,1,[Define to 1 if setuid/setgid application is allowed to use ncurses environment])
### Use option --enable-symlinks to make tic use symlinks, not hard links
### to reduce storage requirements for the terminfo database.
@ -923,9 +947,9 @@ NCURSES_OK_WINT_T=
AC_MSG_CHECKING(if you want wide-character code)
AC_ARG_ENABLE(widec,
[ --enable-widec compile with wide-char/UTF-8 code],
[ --disable-widec compile without wide character and UTF-8 support],
[with_widec=$enableval],
[with_widec=no])
[with_widec=$cf_dft_widec])
AC_MSG_RESULT($with_widec)
NCURSES_WCWIDTH_GRAPHICS=1
@ -935,8 +959,17 @@ if test "x$with_widec" = xyes ; then
if test "x$disable_lib_suffixes" = xno ; then
LIB_SUFFIX="w${LIB_SUFFIX}"
fi
AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code])
AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code])
AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide character and UTF-8 support])
AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide character and UTF-8 support])
case "$CPPFLAGS" in
(*_XOPEN_SOURCE=*)
;;
(*)
AC_MSG_WARN(_XOPEN_SOURCE feature test macro appears to be predefined)
# CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
;;
esac
CF_CHECK_WCHAR_H
CF_CHECK_WCWIDTH_GRAPHICS
@ -944,7 +977,7 @@ if test "x$with_widec" = xyes ; then
# with_overwrite=no
NCURSES_CH_T=cchar_t
AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs)
AC_CHECK_FUNCS(putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs)
if test "x$ac_cv_func_putwc" != xyes ; then
CF_UTF8_LIB
if test "$cf_cv_utf8_lib" != no ; then
@ -1010,72 +1043,66 @@ else
with_tic_depends=no
fi
### use option --disable-wattr-macros to suppress wattr* macros from curses.h
AC_MSG_CHECKING(if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition)
### use option --enable-wattr-macros to enable wattr* macros in curses.h
AC_MSG_CHECKING(if you want to enable wattr* macros)
AC_ARG_ENABLE(wattr-macros,
[ --disable-wattr-macros suppress wattr* macros to help with ncurses5/ncurses6 transition],
[ --enable-wattr-macros enable wattr* macros],
[with_wattr_macros=$enableval],
[with_wattr_macros=yes])
[with_wattr_macros=no])
if [[ "x$with_wattr_macros" != xyes ]]; then
NCURSES_WATTR_MACROS=0
AC_MSG_RESULT(yes)
AC_MSG_RESULT(no)
else
NCURSES_WATTR_MACROS=1
AC_MSG_RESULT(no)
AC_MSG_RESULT(yes)
fi
AC_SUBST(NCURSES_WATTR_MACROS)
CF_WITH_X11_RGB
### use option --with-bool to override bool's type
AC_MSG_CHECKING(for type of bool)
AC_ARG_WITH(bool,
[ --with-bool=TYPE override fallback type of bool variable],
[NCURSES_BOOL="$withval"],
[NCURSES_BOOL=auto])
AC_MSG_RESULT($NCURSES_BOOL)
AC_SUBST(NCURSES_BOOL)
CF_WITH_TYPE(bool,
[ --with-bool=TYPE fall back to TYPE for curses 'bool' typedef],
NCURSES_BOOL,
auto)
AC_MSG_CHECKING(for alternate terminal capabilities file)
AC_ARG_WITH(caps,
[ --with-caps=alt compile with alternate Caps file],
[TERMINFO_CAPS=Caps.$withval],
[TERMINFO_CAPS=Caps])
test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
then
AC_MSG_WARN(file not found: "${srcdir}/include/${TERMINFO_CAPS}")
TERMINFO_CAPS=Caps
fi
AC_MSG_RESULT($TERMINFO_CAPS)
AC_SUBST(TERMINFO_CAPS)
### use option --with-chtype to override chtype's type
AC_MSG_CHECKING(for type of chtype)
AC_ARG_WITH(chtype,
CF_WITH_TYPE(chtype,
[ --with-chtype=TYPE override type of chtype],
[NCURSES_CHTYPE="$withval"],
[NCURSES_CHTYPE=$cf_dft_chtype])
AC_MSG_RESULT($NCURSES_CHTYPE)
NCURSES_CHTYPE,
$cf_dft_chtype)
### use option --with-ospeed to override ospeed's type
AC_MSG_CHECKING(for type of ospeed)
AC_ARG_WITH(ospeed,
CF_WITH_TYPE(ospeed,
[ --with-ospeed=TYPE override type of ospeed variable],
[NCURSES_OSPEED="$withval"],
[NCURSES_OSPEED=short])
AC_MSG_RESULT($NCURSES_OSPEED)
AC_SUBST(NCURSES_OSPEED)
NCURSES_OSPEED,
short)
### use option --with-mmask-t to override mmask_t's type
AC_MSG_CHECKING(for type of mmask_t)
AC_ARG_WITH(mmask-t,
CF_WITH_TYPE(mmask-t,
[ --with-mmask-t=TYPE override type of mmask_t],
[NCURSES_MMASK_T="$withval"],
[NCURSES_MMASK_T=$cf_dft_mmask_t])
AC_MSG_RESULT($NCURSES_MMASK_T)
NCURSES_MMASK_T,
$cf_dft_mmask_t)
### use option --with-ccharw-max to override CCHARW_MAX size
AC_MSG_CHECKING(for size CCHARW_MAX)
AC_ARG_WITH(ccharw-max,
[ --with-ccharw-max=XXX override size CCHARW_MAX],
[NCURSES_CCHARW_MAX="$withval"],
[NCURSES_CCHARW_MAX=5])
[NCURSES_CCHARW_MAX=$cf_dft_ccharw_max])
AC_MSG_RESULT($NCURSES_CCHARW_MAX)
AC_SUBST(NCURSES_CCHARW_MAX)
@ -1085,23 +1112,20 @@ if test "$ac_cv_sizeof_signed_char" = 1 ; then
else
NCURSES_SBOOL="char"
fi
AC_MSG_CHECKING(if you want to use signed Boolean array in term.h)
AC_MSG_CHECKING(whether to use signed chars for Boolean array in term.h)
AC_ARG_ENABLE(signed-char,
[ --enable-signed-char compile using signed Boolean's in term.h],
[ --enable-signed-char use signed chars for Boolean array in term.h],
[with_signed_char=$enableval],
[with_signed_char=no])
[with_signed_char=$cf_dft_signed_char])
AC_MSG_RESULT($with_signed_char)
test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
AC_SUBST(NCURSES_SBOOL)
### use option --with-tparm-arg to override tparm's argument type
AC_MSG_CHECKING(for type of tparm args)
AC_ARG_WITH(tparm-arg,
CF_WITH_TYPE(tparm-arg,
[ --with-tparm-arg=TYPE override parameter type of tparm],
[NCURSES_TPARM_ARG="$withval"],
[NCURSES_TPARM_ARG=$cf_dft_tparm_arg])
AC_MSG_RESULT($NCURSES_TPARM_ARG)
AC_SUBST(NCURSES_TPARM_ARG)
NCURSES_TPARM_ARG,
$cf_dft_tparm_arg)
### Enable compiling-in rcs id's
AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
@ -1135,7 +1159,6 @@ if test "x$with_ext_funcs" = xyes ; then
AC_DEFINE(HAVE_RESIZE_TERM,1,[Define to 1 to enable resize_term() function in test-programs])
AC_DEFINE(HAVE_TERM_ENTRY_H,1,[Define to 1 to enable term_entry() function in test-programs])
AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 to enable use_default_colors() function in test-programs])
AC_DEFINE(HAVE_USE_EXTENDED_NAMES,1,[Define to 1 to enable use_extended_names() function in test-programs])
AC_DEFINE(HAVE_USE_SCREEN,1,[Define to 1 to enable use_screen() function in test-programs])
AC_DEFINE(HAVE_USE_WINDOW,1,[Define to 1 to enable use_window() function in test-programs])
AC_DEFINE(HAVE_WRESIZE,1,[Define to 1 to enable wresize() function in test-programs])
@ -1225,11 +1248,18 @@ AC_ARG_ENABLE(ext-mouse,
[with_ext_mouse=$enableval],
[with_ext_mouse=$cf_dft_ext_mouse])
AC_MSG_RESULT($with_ext_mouse)
NCURSES_MOUSE_VERSION=1
if test "x$with_ext_mouse" = xyes ; then
NCURSES_MOUSE_VERSION=2
CF_NCURSES_ABI_6
fi
if test $cf_cv_abi_default -le 5 ; then
NCURSES_MOUSE_VERSION=1
elif test $cf_cv_abi_default -le 6 ; then
NCURSES_MOUSE_VERSION=2
else
NCURSES_MOUSE_VERSION=3
fi
AC_SUBST(NCURSES_MOUSE_VERSION)
### use option --enable-ext-putwin to turn on extended screendumps
@ -1258,7 +1288,14 @@ AC_ARG_ENABLE(sigwinch,
[with_sigwinch=$enableval],
[with_sigwinch=$with_ext_funcs])
AC_MSG_RESULT($with_sigwinch)
test "x$with_sigwinch" = xyes && AC_DEFINE(USE_SIGWINCH,1,[Define to 1 to compile with SIGWINCH handler])
if test "x$with_sigwinch" = xyes
then
AC_DEFINE(USE_SIGWINCH,1,[Define to 1 to compile with SIGWINCH handler])
cf_cv_enable_sigwinch=1
else
cf_cv_enable_sigwinch=0
fi
AC_SUBST(cf_cv_enable_sigwinch)
### use option --enable-tcap-names to allow user to define new capabilities
AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap)
@ -1268,7 +1305,10 @@ AC_ARG_ENABLE(tcap-names,
[with_tcap_names=$with_ext_funcs])
AC_MSG_RESULT($with_tcap_names)
NCURSES_XNAMES=0
test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
if test "x$with_tcap_names" = xyes; then
NCURSES_XNAMES=1
AC_DEFINE(NCURSES_XNAMES,1,[Define to 1 to compile with user-definable terminal capabilities])
fi
AC_SUBST(NCURSES_XNAMES)
##############################################################################
@ -1358,19 +1398,19 @@ if test "x$with_reentrant" = xyes ; then
else
cf_cv_enable_reentrant=0
cf_cv_enable_opaque="NCURSES_OPAQUE"
NCURSES_SIZE_T=short
NCURSES_SIZE_T=$cf_dft_ordinate_type
fi
AC_SUBST(cf_cv_enable_reentrant)
AC_SUBST(cf_cv_enable_opaque)
AC_SUBST(NCURSES_SIZE_T)
AC_MSG_CHECKING(if you want opaque curses-library structures)
CF_ARG_ENABLE(opaque-curses,
[ --enable-opaque-curses make curses WINDOW, etc., "opaque"],
[enable_opaque_curses=yes],[
AC_MSG_CHECKING(whether curses library structures should be opaque)
CF_ARG_DISABLE(opaque-curses,
[ --disable-opaque-curses do not make WINDOW, etc., structures opaque],
[enable_opaque_curses=no],[
test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
])
AC_MSG_RESULT($enable_opaque_curses)
@ -1378,22 +1418,22 @@ test "$cf_cv_enable_reentrant" = 1 && \
test "$enable_opaque_curses" = no && \
AC_MSG_ERROR(reentrant configuration requires opaque library)
AC_MSG_CHECKING(if you want opaque form-library structures)
AC_ARG_ENABLE(opaque-form,
[ --enable-opaque-form make form-library structures "opaque"],
[enable_opaque_form=yes],[enable_opaque_form=no])
AC_MSG_CHECKING(whether form library structures should be opaque)
CF_ARG_DISABLE(opaque-form,
[ --disable-opaque-form do not make form library structures opaque],
[enable_opaque_form=no],[enable_opaque_form=$cf_dft_opaque_curses])
AC_MSG_RESULT($enable_opaque_form)
AC_MSG_CHECKING(if you want opaque menu-library structures)
AC_ARG_ENABLE(opaque-menu,
[ --enable-opaque-menu make menu-library structures "opaque"],
[enable_opaque_menu=yes],[enable_opaque_menu=no])
AC_MSG_CHECKING(whether menu library structures should be opaque)
CF_ARG_DISABLE(opaque-menu,
[ --disable-opaque-menu do not make menu library structures opaque],
[enable_opaque_menu=no],[enable_opaque_menu=$cf_dft_opaque_curses])
AC_MSG_RESULT($enable_opaque_menu)
AC_MSG_CHECKING(if you want opaque panel-library structures)
AC_ARG_ENABLE(opaque-panel,
[ --enable-opaque-panel make panel-library structures "opaque"],
[enable_opaque_panel=yes],[enable_opaque_panel=no])
AC_MSG_CHECKING(whether panel library structures should be opaque)
CF_ARG_DISABLE(opaque-panel,
[ --disable-opaque-panel do not make panel library structures opaque],
[enable_opaque_panel=no],[enable_opaque_panel=$cf_dft_opaque_curses])
AC_MSG_RESULT($enable_opaque_panel)
NCURSES_OPAQUE=0; test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
@ -1430,6 +1470,14 @@ AC_ARG_WITH(develop,
[with_develop=no])
AC_MSG_RESULT($with_develop)
### use option --enable-check-size to detect screensize with CPR
AC_MSG_CHECKING(if you want to check screensize of serial terminals)
AC_ARG_ENABLE(check-size,
[ --enable-check-size compile-in code to detect screensize of serial terminals],,
[enable_check_size=$with_develop])
AC_MSG_RESULT($enable_check_size)
test "x$enable_check_size" = xyes && AC_DEFINE(USE_CHECK_SIZE,1,[Define to 1 to compile-in code to detect screensize])
### use option --enable-hard-tabs to turn on use of hard-tabs optimize
AC_MSG_CHECKING(if you want hard-tabs code)
AC_ARG_ENABLE(hard-tabs,
@ -1616,7 +1664,7 @@ AC_SUBST(INSTALL_OPT_P)
CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes)
if test "x$enable_warnings" = "xyes"; then
CF_ADD_ADAFLAGS(-gnatg)
CF_ADD_ADAFLAGS(-gnatwa -gnatyg)
if test "x$cf_with_cxx" = xyes ; then
CF_GXX_WARNINGS(Wno-unused)
fi
@ -1687,20 +1735,15 @@ CF_DISABLE_GNAT_PROJECTS
### Checks for libraries.
case "$cf_cv_system_name" in
(*mingw32*|*mingw64*)
if test "x$with_exp_win32" = xyes ; then
CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
else
CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
fi
# Note: WINVER may be a problem with Windows 10
if test "x$with_exp_win32" = xyes ; then
CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
else
CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
fi
CF_CHECK_LIBSSP
;;
(*)
AC_CHECK_FUNC(gettimeofday,
AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[
AC_CHECK_LIB(bsd, gettimeofday,
AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function])
CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday
;;
esac
@ -1708,8 +1751,6 @@ CF_MATH_LIB(MATH_LIB,pow(sin(x),x))
AC_SUBST(MATH_LIB)
### Checks for header files.
AC_STDC_HEADERS
AC_HEADER_DIRENT
AC_HEADER_TIME
CF_REGEX
@ -1721,13 +1762,13 @@ limits.h \
locale.h \
math.h \
poll.h \
sys/auxv.h \
sys/ioctl.h \
sys/param.h \
sys/poll.h \
sys/select.h \
sys/time.h \
sys/times.h \
ttyent.h \
unistd.h \
wctype.h \
)
@ -1777,21 +1818,23 @@ CF_ERRNO
CF_LINK_DATAONLY
### Checks for library functions.
CF_FUNC_GETTIME
AC_CHECK_FUNCS( \
fpathconf \
getcwd \
getauxval \
getegid \
geteuid \
getopt \
getttynam \
getuid \
issetugid \
localeconv \
poll \
putenv \
remove \
select \
setbuf \
setbuffer \
setenv \
setfsuid \
setvbuf \
sigaction \
sigvec \
@ -1805,6 +1848,8 @@ tsearch \
vsnprintf \
)
CF_FUNC_GETTTYNAM
if test "x$ac_cv_func_getopt" = xno && \
test "x$cf_with_progs$cf_with_tests" != xnono; then
AC_MSG_ERROR(getopt is required for building programs)
@ -1846,6 +1891,7 @@ CF_TYPE_SIGACTION
CF_SIZECHANGE
CF_FUNC_MEMMOVE
CF_FUNC_POLL
CF_MB_LEN_MAX
CF_VA_COPY
AC_FUNC_VFORK
CF_FOPEN_BIN_R
@ -1899,6 +1945,7 @@ if test -n "$CXX" ; then
CF_BOOL_DECL
CF_BOOL_SIZE
CF_ETIP_DEFINES
CF_CPP_OVERRIDE
CF_CPP_PARAM_INIT
CF_CPP_STATIC_CAST
CF_CXX_AR_FLAGS
@ -2293,14 +2340,11 @@ AC_SUBST(TICS_LIST)
AC_SUBST(TINFO_LIST)
AC_SUBST(SHLIB_LIST)
# used to separate tack out of the tree
NCURSES_TREE=
AC_SUBST(NCURSES_TREE)
### predefined stuff for the test programs
AC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs])
# pkgsrc uses these
CF_HELP_MESSAGE(Library basenames for pkgsrc:)
CF_WITH_LIB_BASENAME(FORM_NAME,form)
CF_WITH_LIB_BASENAME(MENU_NAME,menu)
CF_WITH_LIB_BASENAME(PANEL_NAME,panel)
@ -2382,7 +2426,7 @@ esac
# Help to automatically enable the extended curses features when using either
# the *-config or the ".pc" files by adding defines.
AC_MSG_CHECKING(for defines to add to ncurses${USE_CFG_SUFFIX}-config script)
AC_MSG_CHECKING(for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script)
PKG_CFLAGS=
for cf_loop1 in $CPPFLAGS_after_XOPEN
do
@ -2457,7 +2501,7 @@ cf_filter_syms=no
if test -n "$RESULTING_SYMS"
then
cf_filter_syms=$cf_dft_filter_syms
CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_default)
fi
if test "x$WILDCARD_SYMS" = xno
@ -2488,20 +2532,20 @@ AC_SUBST(PRIVATE_LIBS)
# This is used for the *-config script and *.pc data files.
CF_LD_SEARCHPATH
AC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack])
AC_OUTPUT( \
include/MKterm.h.awk \
include/curses.head:include/curses.h.in \
include/ncurses_dll.h \
include/termcap.h \
include/unctrl.h \
man/man_db.renames \
$SUB_MAKEFILES \
Makefile,[
if test "x$cf_with_tests" != xno ; then
CF_PRG_RULES(["$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD"], test)
fi
CF_LIB_RULES($SRC_SUBDIRS)
CF_OUTPUT_MANPAGE_RENAMES
if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
if test -z "$USE_OLD_MAKERULES" ; then
@ -2529,6 +2573,7 @@ LIB_SUFFIX="$LIB_SUFFIX"
LIB_TRACING="$LIB_TRACING"
LN_S="$LN_S"
MAKE_TERMINFO="$MAKE_TERMINFO"
MANPAGE_RENAMES="$MANPAGE_RENAMES"
MENU_NAME="$MENU_NAME"
NCURSES_MAJOR="$NCURSES_MAJOR"
NCURSES_MINOR="$NCURSES_MINOR"
@ -2558,12 +2603,14 @@ WITH_OVERWRITE="$with_overwrite"
cf_LIST_MODELS="$cf_list_models"
cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
cf_cv_abi_default="$cf_cv_abi_default"
cf_cv_abi_version="$cf_cv_abi_version"
cf_cv_do_relink="$cf_cv_do_relink"
cf_cv_do_reranlib="$cf_cv_do_reranlib"
cf_cv_do_symlinks="$cf_cv_do_symlinks"
cf_cv_enable_lp64="$cf_cv_enable_lp64"
cf_cv_enable_opaque="$cf_cv_enable_opaque"
cf_cv_make_PHONY="$cf_cv_make_PHONY"
cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
@ -2581,6 +2628,7 @@ cf_with_manpages="$cf_with_manpages"
cf_with_tests="$cf_with_tests"
host="$host"
target="$target"
verbose="$verbose"
with_shared_cxx="$with_shared_cxx"
],cat)dnl

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2018-2020,2021 Thomas E. Dickey #
# Copyright 2018-2023,2024 Thomas E. Dickey #
# Copyright 1998-2017,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.1401 2021/02/20 12:06:34 tom Exp $
# $Id: dist.mk,v 1.1610 2024/04/27 13:55:54 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -37,8 +37,8 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 2
NCURSES_PATCH = 20210220
NCURSES_MINOR = 5
NCURSES_PATCH = 20240427
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@ -63,7 +63,7 @@ GNATHTML= gnathtml
# 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' -index
MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html' -index -mixsecs
ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml
@ -124,19 +124,20 @@ manhtml:
@echo 's/<I>/<EM>/g' >> subst.tmp
@echo 's/<\/I>/<\/EM>/g' >> subst.tmp
@misc/csort < subst.tmp | uniq > subst.sed
@echo '/<\/TITLE>/a\' >> 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
@echo 's%[_-]*_-[_-]*%_%g' >> subst.sed
@echo '/<\/TITLE>/a\\' >> subst.sed
@echo '<link rel="author" href="mailto:bug-ncurses@gnu.org">\\' >> subst.sed
@rm -f subst.tmp
@for f in man/*.[0-9]* ; do \
m=`basename $$f` ;\
T=`egrep '^.TH' $$f|sed -e 's/^.TH //' -e s'/"//g' -e 's/[ ]\+$$//'` ; \
T=`$${EGREP-grep -E} '^.TH' $$f|sed -e 's/^.TH //' -e s'/"//g' -e 's/[ ]\+$$//'` ; \
g=$${m}.html ;\
if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\
echo "Converting $$m to HTML" ;\
echo '<!-- ' > doc/html/man/$$g ;\
egrep '^.\\"[^#]' $$f | \
sed -e 's/\$$/@/g' \
echo '<!--' > doc/html/man/$$g ;\
sed -e '/^\.[a-zA-Z]/,99999d' $$f | \
$${EGREP-grep -E} '^.\\"[^#]' | \
sed -e 's/\$$/@/g' \
-e 's/^.../ */' \
-e 's/</\&lt;/g' \
-e 's/>/\&gt;/g' \

View file

@ -1,6 +1,8 @@
A Hacker's Guide to NCURSES
Contents
A Hacker's Guide to NCURSES
Contents
* Abstract
* Objective of the Package
@ -24,7 +26,7 @@
* Style Tips for Developers
* Porting Hints
Abstract
Abstract
This document is a hacker's tour of the ncurses library and utilities.
It discusses design philosophy, implementation methods, and the
@ -32,7 +34,7 @@
reading for anyone who is interested in porting, extending or
improving the package.
Objective of the Package
Objective of the Package
The objective of the ncurses package is to provide a free software API
for character-cell terminals and terminal emulators with the following
@ -52,7 +54,7 @@
cannot add features if it means breaking the portion of the API
corresponding to historical curses versions.
Why System V Curses?
Why System V Curses?
We used System V curses as a model, reverse-engineering their API, in
order to fulfill the first two objectives.
@ -65,7 +67,7 @@ Why System V Curses?
X/Open is explicitly and closely modeled on System V. So conformance
with System V took us most of the way to base-level XSI conformance.
How to Design Extensions
How to Design Extensions
The third objective (standards conformance) requires that it be easy
to condition source code using ncurses so that the absence of
@ -80,7 +82,7 @@ How to Design Extensions
does not define, but which is defined in the ncurses library header.
You can use this to condition the calls to the mouse API calls.
Portability and Configuration
Portability and Configuration
Code written for ncurses may assume an ANSI-standard C compiler and
POSIX-compatible OS interface. It may also assume the presence of a
@ -101,7 +103,7 @@ How to Design Extensions
specification files (configure.in and aclocal.m4) to set up a new
feature macro, which you then use to condition your code.
Documentation Conventions
Documentation Conventions
There are three kinds of documentation associated with this package.
Each has a different preferred format:
@ -111,7 +113,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 is no point in
for them is 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.
@ -127,7 +129,7 @@ How to Design Extensions
nice-looking printed version from it. Also, of course, it make
exporting things like the announcement document to WWW pretty trivial.
How to Report Bugs
How to Report Bugs
The reporting address for bugs is bug-ncurses@gnu.org. This is a
majordomo list; to join, write to bug-ncurses-request@gnu.org with a
@ -228,9 +230,9 @@ How to Design Extensions
comments of hardscroll.c and hashmap.c; then try it out. You can also
test the hardware-scrolling optimization separately with hardscroll.
A Tour of the Ncurses Library
A Tour of the Ncurses Library
Library Overview
Library Overview
Most of the library is superstructure -- fairly trivial convenience
interfaces to a small set of basic functions and data structures used
@ -303,9 +305,9 @@ Library Overview
We will discuss these in the compiler tour.
The Engine Room
The Engine Room
Keyboard Input
Keyboard Input
All ncurses input funnels through the function wgetch(), defined in
lib_getch.c. This function is tricky; it has to poll for keyboard and
@ -328,7 +330,7 @@ The Engine Room
value. The function timed_wait() effectively simulates a System V
select.
Mouse Events
Mouse Events
If the mouse interface is active, wgetch() polls for mouse events each
call, before it goes to the keyboard for input. It is up to
@ -368,7 +370,7 @@ The Engine Room
accepted to parse the digested mouse reports (low-level events) into a
gesture (a high-level or composite event).
Output and Screen Updating
Output and Screen Updating
With the single exception of character echoes during a wgetnstr() call
(which simulates cooked-mode line editing in an ncurses window), the
@ -412,7 +414,7 @@ The Engine Room
variable _nc_optimize_enable. See the file include/curses.h.in for
mask values, near the end.
The Forms and Menu Libraries
The Forms and Menu Libraries
The forms and menu libraries should work reliably in any environment
you can port ncurses to. The only portability issue anywhere in them
@ -428,7 +430,7 @@ The Engine Room
panels support; u386mon 2.10 and beyond use it. This version has been
slightly cleaned up for ncurses.
A Tour of the Terminfo Compiler
A Tour of the Terminfo Compiler
The ncurses implementation of tic is rather complex internally; it has
to do a trying combination of missions. This starts with the fact
@ -443,7 +445,7 @@ The Engine Room
the grammar above it is trivial, just "parse entries till you run out
of file".
Translation of Non-use Capabilities
Translation of Non-use Capabilities
Translation of most things besides use capabilities is pretty
straightforward. The lexical analyzer's tokenizer hands each
@ -464,7 +466,7 @@ Translation of Non-use Capabilities
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
Use Capability Resolution
The background problem that makes tic tricky is not the capability
translation itself, it is the resolution of use capabilities. Older
@ -512,7 +514,7 @@ Use Capability Resolution
complain about overwriting entries newly made during the tic run, but
not about overwriting ones that predate it.
Source-Form Translation
Source-Form Translation
Another use of tic is to do source translation between various termcap
and terminfo formats. There are more variants out there than you might
@ -536,7 +538,7 @@ Source-Form Translation
for example, is where the AIX box1 capability get translated to an
acsc string.
Other Utilities
Other Utilities
The infocmp utility is just a wrapper around the same entry-dumping
code used by tic for source translation. Perhaps the one interesting
@ -548,7 +550,7 @@ Source-Form Translation
The tput and clear utilities just do an entry load followed by a
tputs() of a selected capability.
Style Tips for Developers
Style Tips for Developers
See the TO-DO file in the top-level directory of the source
distribution for additions that would be particularly useful.
@ -575,7 +577,7 @@ Source-Form Translation
Have fun!
Porting Hints
Porting Hints
The following notes are intended to be a first step towards DOS and
Macintosh ports of the ncurses libraries.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,969 +0,0 @@
<!--
$Id: hackguide.html,v 1.33 2020/02/02 23:34:34 tom Exp $
****************************************************************************
* Copyright 2019,2020 Thomas E. Dickey *
* Copyright 2000-2013,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"), 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. *
****************************************************************************
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.2.0">
<title>A Hacker's Guide to Ncurses Internals</title>
<link rel="author" href="mailto:bugs-ncurses@gnu.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii"><!--
This document is self-contained, *except* that there is one relative link to
the ncurses-intro.html document, expected to be in the same directory with
this one.
-->
</head>
<body>
<h1>A Hacker's Guide to NCURSES</h1>
<h1>Contents</h1>
<ul>
<li><a href="#abstract">Abstract</a></li>
<li>
<a href="#objective">Objective of the Package</a>
<ul>
<li><a href="#whysvr4">Why System V Curses?</a></li>
<li><a href="#extensions">How to Design Extensions</a></li>
</ul>
</li>
<li><a href="#portability">Portability and Configuration</a></li>
<li><a href="#documentation">Documentation Conventions</a></li>
<li><a href="#bugtrack">How to Report Bugs</a></li>
<li>
<a href="#ncurslib">A Tour of the Ncurses Library</a>
<ul>
<li><a href="#loverview">Library Overview</a></li>
<li><a href="#engine">The Engine Room</a></li>
<li><a href="#input">Keyboard Input</a></li>
<li><a href="#mouse">Mouse Events</a></li>
<li><a href="#output">Output and Screen Updating</a></li>
</ul>
</li>
<li><a href="#fmnote">The Forms and Menu Libraries</a></li>
<li>
<a href="#tic">A Tour of the Terminfo Compiler</a>
<ul>
<li><a href="#nonuse">Translation of
Non-<strong>use</strong> Capabilities</a></li>
<li><a href="#uses">Use Capability Resolution</a></li>
<li><a href="#translation">Source-Form Translation</a></li>
</ul>
</li>
<li><a href="#utils">Other Utilities</a></li>
<li><a href="#style">Style Tips for Developers</a></li>
<li><a href="#port">Porting Hints</a></li>
</ul>
<h1><a name="abstract" id="abstract">Abstract</a></h1>
<p>This document is a hacker's tour of the
<strong>ncurses</strong> library and utilities. It discusses
design philosophy, implementation methods, and the conventions
used for coding and documentation. It is recommended reading for
anyone who is interested in porting, extending or improving the
package.</p>
<h1><a name="objective" id="objective">Objective of the
Package</a></h1>
<p>The objective of the <strong>ncurses</strong> package is to
provide a free software API for character-cell terminals and
terminal emulators with the following characteristics:</p>
<ul>
<li>Source-compatible with historical curses implementations
(including the original BSD curses and System V curses.</li>
<li>Conformant with the XSI Curses standard issued as part of
XPG4 by X/Open.</li>
<li>High-quality &mdash; stable and reliable code, wide
portability, good packaging, superior documentation.</li>
<li>Featureful &mdash; should eliminate as much of the drudgery
of C interface programming as possible, freeing programmers to
think at a higher level of design.</li>
</ul>
<p>These objectives are in priority order. So, for example,
source compatibility with older version must trump featurefulness
&mdash; we cannot add features if it means breaking the portion
of the API corresponding to historical curses versions.</p>
<h2><a name="whysvr4" id="whysvr4">Why System V Curses?</a></h2>
<p>We used System V curses as a model, reverse-engineering their
API, in order to fulfill the first two objectives.</p>
<p>System V curses implementations can support BSD curses
programs with just a recompilation, so by capturing the System V
API we also capture BSD's.</p>
<p>More importantly for the future, the XSI Curses standard
issued by X/Open is explicitly and closely modeled on System V.
So conformance with System V took us most of the way to
base-level XSI conformance.</p>
<h2><a name="extensions" id="extensions">How to Design
Extensions</a></h2>
<p>The third objective (standards conformance) requires that it
be easy to condition source code using <strong>ncurses</strong>
so that the absence of nonstandard extensions does not break the
code.</p>
<p>Accordingly, we have a policy of associating with each
nonstandard extension a feature macro, so that ncurses client
code can use this macro to condition in or out the code that
requires the <strong>ncurses</strong> extension.</p>
<p>For example, there is a macro
<code>NCURSES_MOUSE_VERSION</code> which XSI Curses does not
define, but which is defined in the <strong>ncurses</strong>
library header. You can use this to condition the calls to the
mouse API calls.</p>
<h1><a name="portability" id="portability">Portability and
Configuration</a></h1>
<p>Code written for <strong>ncurses</strong> may assume an
ANSI-standard C compiler and POSIX-compatible OS interface. It
may also assume the presence of a System-V-compatible
<em>select(2)</em> call.</p>
<p>We encourage (but do not require) developers to make the code
friendly to less-capable UNIX environments wherever possible.</p>
<p>We encourage developers to support OS-specific optimizations
and methods not available under POSIX/ANSI, provided only
that:</p>
<ul>
<li>All such code is properly conditioned so the build process
does not attempt to compile it under a plain ANSI/POSIX
environment.</li>
<li>Adding such implementation methods does not introduce
incompatibilities in the <strong>ncurses</strong> API between
platforms.</li>
</ul>
<p>We use GNU <code>autoconf(1)</code> as a tool to deal with
portability issues. The right way to leverage an OS-specific
feature is to modify the autoconf specification files
(configure.in and aclocal.m4) to set up a new feature macro,
which you then use to condition your code.</p>
<h1><a name="documentation" id="documentation">Documentation
Conventions</a></h1>
<p>There are three kinds of documentation associated with this
package. Each has a different preferred format:</p>
<ul>
<li>Package-internal files (README, INSTALL, TO-DO etc.)</li>
<li>Manual pages.</li>
<li>Everything else (i.e., narrative documentation).</li>
</ul>
<p>Our conventions are simple:</p>
<ol>
<li><strong>Maintain package-internal files in plain
text.</strong> The expected viewer for them <em>more(1)</em> or
an editor window; there is no point in elaborate mark-up.</li>
<li><strong>Mark up manual pages in the man macros.</strong>
These have to be viewable through traditional <em>man(1)</em>
programs.</li>
<li><strong>Write everything else in HTML.</strong>
</li>
</ol>
<p>When in doubt, HTMLize a master and use <em>lynx(1)</em> to
generate plain ASCII (as we do for the announcement
document).</p>
<p>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.</p>
<h1><a name="bugtrack" id="bugtrack">How to Report Bugs</a></h1>
<p>The <a name="bugreport" id="bugreport">reporting address for
bugs</a> is <a href=
"mailto:bug-ncurses@gnu.org">bug-ncurses@gnu.org</a>. This is a
majordomo list; to join, write to
<code>bug-ncurses-request@gnu.org</code> with a message
containing the line:</p>
<pre>
subscribe &lt;name&gt;@&lt;host.domain&gt;
</pre>
<p>The <code>ncurses</code> code is maintained by a small group
of volunteers. While 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 <code>ncurses</code>, there
are some steps you can take before contacting us that will help
get the bug fixed quickly.</p>
<p>In order to use our bug-fixing time efficiently, we put people
who 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.</p>
<ol>
<li>Develop a recipe to reproduce the bug.
<p>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 quick fix is develop a way we can duplicate the bad
behavior &mdash; ideally, by giving us source for a small,
portable test program that breaks the library. (Even better
is a keystroke recipe using one of the test programs provided
with the distribution.)</p>
</li>
<li>Try to reproduce the bug on a different terminal type.
<p>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 are
using a traditional asynchronous terminal or PC-based
terminal emulator, rather than xterm or a UNIX console
entry.</p>
<p>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.</p>
<p>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 &mdash;
a surprising number of the bugs we have seen are either
triggered or masked by these.</p>
</li>
<li>Generate and examine a trace file for the broken behavior.
<p>Recompile your program with the debugging versions of the
libraries. Insert a <code>trace()</code> call with the
argument set to <code>TRACE_UPDATE</code>. (See <a href=
"ncurses-intro.html#debugging">"Writing Programs with
NCURSES"</a> for details on trace levels.) Reproduce your
bug, then look at the trace file to see what the library was
actually doing.</p>
<p>Another frequent cause of apparent bugs is application
coding errors that cause the wrong things to be put on the
virtual screen. Looking at the virtual-screen dumps in the
trace file will 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.</p>
<p>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.</p>
<p>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.</p>
</li>
<li>Report details and symptoms, not just interpretations.
<p>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 cannot characterize and fix
yourself.</p>
<p>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.</p>
<p>If your bug produces a bad update, include a trace file.
Try to make the trace at the <em>least</em> voluminous level
that pins down the 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).</p>
<p>If your bug produces a core-dump, please include a
symbolic stack trace generated by gdb(1) or your local
equivalent.</p>
<p>Tell us about every terminal on which you have reproduced
the bug &mdash; and every terminal on which you cannot.
Ideally, send us terminfo sources for all of these (yours
might differ from ours).</p>
<p>Include your ncurses version and your OS/machine type, of
course! You can find your ncurses version in the
<code>curses.h</code> file.</p>
</li>
</ol>
<p>If your problem smells like a logic error or in cursor
movement or scrolling or a bad capability, there are a couple of
tiny test frames for the library algorithms in the progs
directory that may help you isolate it. These are not part of the
normal build, but do have their own make productions.</p>
<p>The most important of these is <code>mvcur</code>, 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 have got a bad capability
identified, you can disable it and test again. The program is
command-driven and has on-line help.</p>
<p>If you think the vertical-scroll optimization is broken, or
just want to understand how it works better, build
<code>hashmap</code> and read the header comments of
<code>hardscroll.c</code> and <code>hashmap.c</code>; then try it
out. You can also test the hardware-scrolling optimization
separately with <code>hardscroll</code>.</p>
<h1><a name="ncurslib" id="ncurslib">A Tour of the Ncurses
Library</a></h1>
<h2><a name="loverview" id="loverview">Library Overview</a></h2>
<p>Most of the library is superstructure &mdash; fairly trivial
convenience interfaces to a small set of basic functions and data
structures used to manipulate the virtual screen (in particular,
none of this code does any I/O except through calls to more
fundamental modules described below). The files</p>
<blockquote>
<code>lib_addch.c lib_bkgd.c lib_box.c lib_chgat.c lib_clear.c
lib_clearok.c lib_clrbot.c lib_clreol.c lib_colorset.c
lib_data.c lib_delch.c lib_delwin.c lib_echo.c lib_erase.c
lib_gen.c lib_getstr.c lib_hline.c lib_immedok.c lib_inchstr.c
lib_insch.c lib_insdel.c lib_insstr.c lib_instr.c
lib_isendwin.c lib_keyname.c lib_leaveok.c lib_move.c
lib_mvwin.c lib_overlay.c lib_pad.c lib_printw.c lib_redrawln.c
lib_scanw.c lib_screen.c lib_scroll.c lib_scrollok.c
lib_scrreg.c lib_set_term.c lib_slk.c lib_slkatr_set.c
lib_slkatrof.c lib_slkatron.c lib_slkatrset.c lib_slkattr.c
lib_slkclear.c lib_slkcolor.c lib_slkinit.c lib_slklab.c
lib_slkrefr.c lib_slkset.c lib_slktouch.c lib_touch.c
lib_unctrl.c lib_vline.c lib_wattroff.c lib_wattron.c
lib_window.c</code>
</blockquote>
<p>are all in this category. They are very unlikely to need
change, barring bugs or some fundamental reorganization in the
underlying data structures.</p>
<p>These files are used only for debugging support:</p>
<blockquote>
<code>lib_trace.c lib_traceatr.c lib_tracebits.c lib_tracechr.c
lib_tracedmp.c lib_tracemse.c trace_buf.c</code>
</blockquote>
<p>It is rather unlikely you will ever need to change these,
unless you want to introduce a new debug trace level for some
reason.</p>
<p>There is another group of files that do direct I/O via
<em>tputs()</em>, computations on the terminal capabilities, or
queries to the OS environment, but nevertheless have only fairly
low complexity. These include:</p>
<blockquote>
<code>lib_acs.c lib_beep.c lib_color.c lib_endwin.c
lib_initscr.c lib_longname.c lib_newterm.c lib_options.c
lib_termcap.c lib_ti.c lib_tparm.c lib_tputs.c lib_vidattr.c
read_entry.c.</code>
</blockquote>
<p>They are likely to need revision only if ncurses is being
ported to an environment without an underlying terminfo
capability representation.</p>
<p>These files have serious hooks into the tty driver and signal
facilities:</p>
<blockquote>
<code>lib_kernel.c lib_baudrate.c lib_raw.c lib_tstp.c
lib_twait.c</code>
</blockquote>
<p>If you run into porting snafus moving the package to another
UNIX, the problem is likely to be in one of these files. The file
<code>lib_print.c</code> uses sleep(2) and also falls in this
category.</p>
<p>Almost all of the real work is done in the files</p>
<blockquote>
<code>hardscroll.c hashmap.c lib_addch.c lib_doupdate.c
lib_getch.c lib_mouse.c lib_mvcur.c lib_refresh.c lib_setup.c
lib_vidattr.c</code>
</blockquote>
<p>Most of the algorithmic complexity in the library lives in
these files. If there is a real bug in <strong>ncurses</strong>
itself, it is probably here. We will tour some of these files in
detail below (see <a href="#engine">The Engine Room</a>).</p>
<p>Finally, there is a group of files that is actually most of
the terminfo compiler. The reason this code lives in the
<strong>ncurses</strong> library is to support fallback to
/etc/termcap. These files include</p>
<blockquote>
<code>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</code>
</blockquote>
<p>We will discuss these in the compiler tour.</p>
<h2><a name="engine" id="engine">The Engine Room</a></h2>
<h3><a name="input" id="input">Keyboard Input</a></h3>
<p>All <code>ncurses</code> input funnels through the function
<code>wgetch()</code>, defined in <code>lib_getch.c</code>. This
function is tricky; it has to poll for keyboard and mouse events
and do a running match of incoming input against the set of
defined special keys.</p>
<p>The central data structure in this module is a FIFO queue,
used to match multiple-character input sequences against
special-key capabilities; also to implement pushback via
<code>ungetch()</code>.</p>
<p>The <code>wgetch()</code> code distinguishes between function
key sequences and the same sequences typed manually by doing a
timed wait after each input character that could lead a function
key sequence. If the entire sequence takes less than 1 second, it
is assumed to have been generated by a function key press.</p>
<p>Hackers bruised by previous encounters with variant
<code>select(2)</code> calls may find the code in
<code>lib_twait.c</code> interesting. It deals with the problem
that some BSD selects do not return a reliable time-left value.
The function <code>timed_wait()</code> effectively simulates a
System V select.</p>
<h3><a name="mouse" id="mouse">Mouse Events</a></h3>
<p>If the mouse interface is active, <code>wgetch()</code> polls
for mouse events each call, before it goes to the keyboard for
input. It is up to <code>lib_mouse.c</code> how the polling is
accomplished; it may vary for different devices.</p>
<p>Under xterm, however, mouse event notifications come in via
the keyboard input stream. They are recognized by having the
<strong>kmous</strong> capability as a prefix. This is kind of
klugey, but trying to wire in recognition of a mouse key prefix
without going through the function-key machinery would be just
too painful, and this turns out to imply having the prefix
somewhere in the function-key capabilities at terminal-type
initialization.</p>
<p>This kluge only works because <strong>kmous</strong> is not
actually used by any historic terminal type or curses
implementation we know of. Best guess 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.</p>
<p>Here are some more details about mouse event handling:</p>
<p>The <code>lib_mouse()</code> 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.</p>
<p>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: either (a) <code>_nc_mouse_event()</code> detects a
series of incoming mouse reports and queues them, or (b) code in
<code>lib_getch.c</code> detects the <strong>kmous</strong>
prefix in the keyboard input stream and calls _nc_mouse_inline to
queue up a series of adjacent mouse reports.</p>
<p>In either case, <code>_nc_mouse_parse()</code> should be
called after the series is accepted to parse the digested mouse
reports (low-level events) into a gesture (a high-level or
composite event).</p>
<h3><a name="output" id="output">Output and Screen Updating</a></h3>
<p>With the single exception of character echoes during a
<code>wgetnstr()</code> call (which simulates cooked-mode line
editing in an ncurses window), the library normally does all its
output at refresh time.</p>
<p>The main job is to go from the current state of the screen (as
represented in the <code>curscr</code> window structure) to the
desired new state (as represented in the <code>newscr</code>
window structure), while doing as little I/O as possible.</p>
<p>The brains of this operation are the modules
<code>hashmap.c</code>, <code>hardscroll.c</code> and
<code>lib_doupdate.c</code>; the latter two use
<code>lib_mvcur.c</code>. Essentially, what happens looks like
this:</p>
<ul>
<li>
<p>The <code>hashmap.c</code> 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.</p>
</li>
<li>
<p>The <code>hardscroll.c</code> module computes an optimum
set of scroll, insertion, and deletion operations to make the
indices match. It calls <code>_nc_mvcur_scrolln()</code> in
<code>lib_mvcur.c</code> to do those motions.</p>
</li>
<li>
<p>Then <code>lib_doupdate.c</code> goes to work. Its job is
to do line-by-line transformations of <code>curscr</code>
lines to <code>newscr</code> lines. Its main tool is the
routine <code>mvcur()</code> in <code>lib_mvcur.c</code>.
This routine does cursor-movement optimization, attempting to
get from given screen location A to given location B in the
fewest output characters possible.</p>
</li>
</ul>
<p>If you want to work on screen optimizations, you should use
the fact that (in the trace-enabled version of the library)
enabling the <code>TRACE_TIMES</code> trace level causes a report
to be emitted after each screen update giving the elapsed time
and a count of characters emitted during the update. You can use
this to tell when an update optimization improves efficiency.</p>
<p>In the trace-enabled version of the library, it is also
possible to disable and re-enable various optimizations at
runtime by tweaking the variable
<code>_nc_optimize_enable</code>. See the file
<code>include/curses.h.in</code> for mask values, near the
end.</p>
<h1><a name="fmnote" id="fmnote">The Forms and Menu Libraries</a></h1>
<p>The forms and menu libraries should work reliably in any
environment you can port ncurses to. The only portability issue
anywhere in them is what flavor of regular expressions the
built-in form field type TYPE_REGEXP will recognize.</p>
<p>The configuration code prefers the POSIX regex facility,
modeled on System V's, but will settle for BSD regexps if the
former is not available.</p>
<p>Historical note: the panels code was written primarily to
assist in porting u386mon 2.0 (comp.sources.misc v14i001-4) to
systems lacking panels support; u386mon 2.10 and beyond use it.
This version has been slightly cleaned up for
<code>ncurses</code>.</p>
<h1><a name="tic" id="tic">A Tour of the Terminfo Compiler</a></h1>
<p>The <strong>ncurses</strong> implementation of
<strong>tic</strong> is rather complex internally; it has to do a
trying combination of missions. This starts with the fact that,
in addition to its normal duty of compiling terminfo sources into
loadable terminfo binaries, it has to be able to handle termcap
syntax and compile that too into terminfo entries.</p>
<p>The implementation therefore starts with a table-driven,
dual-mode lexical analyzer (in <code>comp_scan.c</code>). The
lexer chooses its mode (termcap or terminfo) based on the first
&ldquo;,&rdquo; or &ldquo;:&rdquo; 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".</p>
<h2><a name="nonuse" id="nonuse">Translation of
Non-<strong>use</strong> Capabilities</a></h2>
<p>Translation of most things besides <strong>use</strong>
capabilities is pretty straightforward. The lexical analyzer's
tokenizer hands each capability name to a hash function, which
drives a table lookup. The table entry yields an index which is
used to look up the token type in another table, and controls
interpretation of the value.</p>
<p>One possibly interesting aspect of the implementation is the
way the compiler tables are initialized. All the tables are
generated by various awk/sed/sh scripts from a master table
<code>include/Caps</code>; these scripts actually write C
initializers which are linked to the compiler. Furthermore, the
hash table is generated in the same way, so it doesn't have to be
generated at compiler startup time (another benefit of this
organization is that the hash table can be in shareable text
space).</p>
<p>Thus, adding a new capability is usually pretty trivial, just
a matter of adding one line to the <code>include/Caps</code>
file. We will have more to say about this in the section on
<a href="#translation">Source-Form Translation</a>.</p>
<h2><a name="uses" id="uses">Use Capability Resolution</a></h2>
<p>The background problem that makes <strong>tic</strong> tricky
is not the capability translation itself, it is the resolution of
<strong>use</strong> capabilities. Older versions would not
handle forward <strong>use</strong> 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.</p>
<p>This will not do for <strong>ncurses</strong>. The problem is
that that the whole compilation process has to be embeddable in
the <strong>ncurses</strong> library so that it can be called by
the startup code to translate termcap entries on the fly. The
embedded version cannot go promiscuously writing everything it
translates out to disk &mdash; for one thing, it will typically
be running with non-root permissions.</p>
<p>So our <strong>tic</strong> is designed to parse an entire
terminfo file into a doubly-linked circular list of entry
structures in-core, and then do <strong>use</strong> 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 are written out easy to do.</p>
<p>And this is exactly how the embedded version works. But the
stand-alone user-accessible version of <strong>tic</strong>
partly reverts to the historical strategy; it writes to disk (not
keeping in core) any entry with no <strong>use</strong>
references.</p>
<p>This is strictly a core-economy kluge, implemented because the
terminfo master file is large enough that some core-poor systems
swap like crazy when you compile it all in memory...there have
been reports of this process taking <strong>three hours</strong>,
rather than the twenty seconds or less typical on the author's
development box.</p>
<p>So. The executable <strong>tic</strong> passes the
entry-parser a hook that <em>immediately</em> 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 is OK; the resolution code
will fetch it off disk when it cannot find it in core.</p>
<p>Name collisions will still be detected, just not as cleanly.
The <code>write_entry()</code> code complains before overwriting
an entry that postdates the time of <strong>tic</strong>'s first
call to <code>write_entry()</code>, Thus it will complain about
overwriting entries newly made during the <strong>tic</strong>
run, but not about overwriting ones that predate it.</p>
<h2><a name="translation" id="translation">Source-Form
Translation</a></h2>
<p>Another use of <strong>tic</strong> is to do source
translation between various termcap and terminfo formats. There
are more variants out there than you might think; the ones we
know about are described in the <strong>captoinfo(1)</strong>
manual page.</p>
<p>The translation output code (<code>dump_entry()</code> in
<code>ncurses/dump_entry.c</code>) is shared with the
<strong>infocmp(1)</strong> utility. It takes the same internal
representation used to generate the binary form and dumps it to
standard output in a specified format.</p>
<p>The <code>include/Caps</code> file has a header comment
describing ways you can specify source translations for
nonstandard capabilities just by 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.</p>
<p>For circumstances where you need to do algorithmic
translation, there are functions in <code>parse_entry.c</code>
called after the parse of each entry that are specifically
intended to encapsulate such translations. This, for example, is
where the AIX <strong>box1</strong> capability get translated to
an <strong>acsc</strong> string.</p>
<h1><a name="utils" id="utils">Other Utilities</a></h1>
<p>The <strong>infocmp</strong> utility is just a wrapper around
the same entry-dumping code used by <strong>tic</strong> for
source translation. Perhaps the one interesting aspect of the
code is the use of a predicate function passed in to
<code>dump_entry()</code> to control which capabilities are
dumped. This is necessary in order to handle both the ordinary
De-compilation case and entry difference reporting.</p>
<p>The <strong>tput</strong> and <strong>clear</strong> utilities
just do an entry load followed by a <code>tputs()</code> of a
selected capability.</p>
<h1><a name="style" id="style">Style Tips for Developers</a></h1>
<p>See the TO-DO file in the top-level directory of the source
distribution for additions that would be particularly useful.</p>
<p>The prefix <code>_nc_</code> should be used on library public
functions that are not part of the curses API in order to prevent
pollution of the application namespace. If you have to add to or
modify the function prototypes in curses.h.in, read
ncurses/MKlib_gen.sh first so you can avoid breaking XSI
conformance. Please join the ncurses mailing list. See the
INSTALL file in the top level of the distribution for details on
the list.</p>
<p>Look for the string <code>FIXME</code> in source files to tag
minor bugs and potential problems that could use fixing.</p>
<p>Do not try to auto-detect OS features in the main body of the
C code. That is the job of the configuration system.</p>
<p>To hold down complexity, do make your code data-driven.
Especially, if you can drive logic from a table filtered out of
<code>include/Caps</code>, do it. If you find you need to augment
the data in that file in order to generate the proper table, that
is still preferable to ad-hoc code &mdash; that is why the fifth
field (flags) is there.</p>
<p>Have fun!</p>
<h1><a name="port" id="port">Porting Hints</a></h1>
<p>The following notes are intended to be a first step towards
DOS and Macintosh ports of the ncurses libraries.</p>
<p>The following library modules are &ldquo;pure curses&rdquo;;
they operate only on the curses internal structures, do all
output through other curses calls (not including
<code>tputs()</code> and <code>putp()</code>) and do not call any
other UNIX routines such as signal(2) or the stdio library. Thus,
they should not need to be modified for single-terminal
ports.</p>
<blockquote>
<code>lib_addch.c lib_addstr.c lib_bkgd.c lib_box.c lib_clear.c
lib_clrbot.c lib_clreol.c lib_delch.c lib_delwin.c lib_erase.c
lib_inchstr.c lib_insch.c lib_insdel.c lib_insstr.c
lib_keyname.c lib_move.c lib_mvwin.c lib_newwin.c lib_overlay.c
lib_pad.c lib_printw.c lib_refresh.c lib_scanw.c lib_scroll.c
lib_scrreg.c lib_set_term.c lib_touch.c lib_tparm.c lib_tputs.c
lib_unctrl.c lib_window.c panel.c</code>
</blockquote>
<p>This module is pure curses, but calls outstr():</p>
<blockquote>
<code>lib_getstr.c</code>
</blockquote>
<p>These modules are pure curses, except that they use
<code>tputs()</code> and <code>putp()</code>:</p>
<blockquote>
<code>lib_beep.c lib_color.c lib_endwin.c lib_options.c
lib_slk.c lib_vidattr.c</code>
</blockquote>
<p>This modules assist in POSIX emulation on non-POSIX
systems:</p>
<dl>
<dt>sigaction.c</dt>
<dd>signal calls</dd>
</dl>
<p>The following source files will not be needed for a
single-terminal-type port.</p>
<blockquote>
<code>alloc_entry.c captoinfo.c clear.c comp_captab.c
comp_error.c comp_hash.c comp_main.c comp_parse.c comp_scan.c
dump_entry.c infocmp.c parse_entry.c read_entry.c tput.c
write_entry.c</code>
</blockquote>
<p>The following modules will use
open()/read()/write()/close()/lseek() on files, but no other OS
calls.</p>
<dl>
<dt>lib_screen.c</dt>
<dd>used to read/write screen dumps</dd>
<dt>lib_trace.c</dt>
<dd>used to write trace data to the logfile</dd>
</dl>
<p>Modules that would have to be modified for a port start
here:</p>
<p>The following modules are &ldquo;pure curses&rdquo; but
contain assumptions inappropriate for a memory-mapped port.</p>
<dl>
<dt>lib_longname.c</dt>
<dd>assumes there may be multiple terminals</dd>
<dt>lib_acs.c</dt>
<dd>assumes acs_map as a double indirection</dd>
<dt>lib_mvcur.c</dt>
<dd>assumes cursor moves have variable cost</dd>
<dt>lib_termcap.c</dt>
<dd>assumes there may be multiple terminals</dd>
<dt>lib_ti.c</dt>
<dd>assumes there may be multiple terminals</dd>
</dl>
<p>The following modules use UNIX-specific calls:</p>
<dl>
<dt>lib_doupdate.c</dt>
<dd>input checking</dd>
<dt>lib_getch.c</dt>
<dd>read()</dd>
<dt>lib_initscr.c</dt>
<dd>getenv()</dd>
<dt>lib_newterm.c</dt>
<dt>lib_baudrate.c</dt>
<dt>lib_kernel.c</dt>
<dd>various tty-manipulation and system calls</dd>
<dt>lib_raw.c</dt>
<dd>various tty-manipulation calls</dd>
<dt>lib_setup.c</dt>
<dd>various tty-manipulation calls</dd>
<dt>lib_restart.c</dt>
<dd>various tty-manipulation calls</dd>
<dt>lib_tstp.c</dt>
<dd>signal-manipulation calls</dd>
<dt>lib_twait.c</dt>
<dd>gettimeofday(), select().</dd>
</dl>
<hr>
<address>
Eric S. Raymond &lt;esr@snark.thyrsus.com&gt;
</address>
(Note: This is <em>not</em> the <a href="#bugtrack">bug
address</a>!)
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,11 @@
Writing Programs with NCURSES
Writing Programs with NCURSES
by Eric S. Raymond and Zeyd M. Ben-Halim
updates since release 1.9.9e by Thomas Dickey
Contents
Contents
* Introduction
+ A Brief History of Curses
@ -96,7 +98,7 @@
o Avoiding Problems
_________________________________________________________________
Introduction
Introduction
This document is an introduction to programming with curses. It is not
an exhaustive reference for the curses Application Programming
@ -129,7 +131,7 @@
will typically be a great deal simpler and less expensive than one
using an X toolkit.
A Brief History of Curses
A Brief History of Curses
Historically, the first ancestor of curses was the routines written to
provide screen-handling for the vi editor; these used the termcap
@ -163,7 +165,7 @@ A Brief History of Curses
releases, curses evolved to use more facilities and offer more
capabilities, going far beyond BSD curses in power and flexibility.
Scope of This Document
Scope of This Document
This document describes ncurses, a free implementation of the System V
curses API with some clearly marked extensions. It includes the
@ -206,7 +208,7 @@ Scope of This Document
extension libraries, also cloned from System V, which support easy
construction and sequences of menus and fill-in forms.
Terminology
Terminology
In this document, the following terminology is used with reasonable
consistency:
@ -227,11 +229,11 @@ Terminology
The package's idea of what the terminal display currently looks
like, i.e., what the user sees now. This is a special screen.
The Curses Library
The Curses Library
An Overview of Curses
An Overview of Curses
Compiling Programs using Curses
Compiling Programs using Curses
In order to use the library, it is necessary to have certain types and
variables defined. Therefore, the programmer must have a line:
@ -245,7 +247,7 @@ An Overview of Curses
your LDFLAGS or on the command line. There is no need for any other
libraries.
Updating the Screen
Updating the Screen
In order to update the screen optimally, it is necessary for the
routines to know what the screen currently looks like and what the
@ -273,7 +275,7 @@ An Overview of Curses
package implementation determine the most efficient way to repaint the
screen.
Standard Windows and Function Naming Conventions
Standard Windows and Function Naming Conventions
As hinted above, the routines can use several windows, but two are
automatically given: curscr, which knows what the terminal looks like,
@ -313,7 +315,7 @@ An Overview of Curses
(y, x) coordinates. If a function requires a window pointer, it is
always the first parameter passed.
Variables
Variables
The curses library sets some variables describing the terminal
capabilities.
@ -340,7 +342,7 @@ An Overview of Curses
OK
error flag returned by routines when things go right.
Using the Library
Using the Library
Now we describe how to actually use the screen package. In it, we
assume all updating, reading, etc. is applied to stdscr. These
@ -409,7 +411,7 @@ static void finish(int sig)
exit(0);
}
Starting up
Starting up
In order to use the screen package, the routines must know about
terminal characteristics, and the space for curscr and stdscr must be
@ -435,7 +437,7 @@ static void finish(int sig)
of old windows. All the options described above can be applied to any
window.
Output
Output
Now that we have set things up, we will want to actually update the
terminal. The basic functions used to change what will go on a window
@ -464,7 +466,7 @@ static void finish(int sig)
implementing a command which would redraw the screen in case it get
messed up.
Input
Input
The complementary function to addch() is getch() which, if echo is
set, will call addch() to echo the character. Since the screen package
@ -488,7 +490,7 @@ static void finish(int sig)
curses.h The mapping from sequences to #define values is determined by
key_ capabilities in the terminal's terminfo entry.
Using Forms Characters
Using Forms Characters
The addch() function (and some others, including box() and border())
can accept some pseudo-character arguments which are specially defined
@ -500,7 +502,7 @@ static void finish(int sig)
the terminal does not have such characters, curses.h will map them to
a recognizable (though ugly) set of ASCII defaults.
Character Attributes and Color
Character Attributes and Color
The ncurses package supports screen highlights including standout,
reverse-video, underline, and blink. It also supports color, which is
@ -531,7 +533,7 @@ static void finish(int sig)
combination. Note that COLOR_PAIR(N), for constant N, is itself a
compile-time constant and can be used in initializers.
Mouse Interfacing
Mouse Interfacing
The ncurses library also provides a mouse interface.
@ -603,7 +605,7 @@ static void finish(int sig)
See the manual page curs_mouse(3X) for full details of the
mouse-interface functions.
Finishing Up
Finishing Up
In order to clean up after the ncurses routines, the routine endwin()
is provided. It restores tty modes to what they were when initscr()
@ -611,12 +613,12 @@ static void finish(int sig)
Thus, anytime after the call to initscr, endwin() should be called
before exiting.
Function Descriptions
Function Descriptions
We describe the detailed behavior of some important curses functions
here, as a supplement to the manual page descriptions.
Initialization and Wrapup
Initialization and Wrapup
initscr()
The first function called should almost always be initscr().
@ -660,7 +662,7 @@ Function Descriptions
The inverse of newterm(); deallocates the data structures
associated with a given SCREEN reference.
Causing Output to the Terminal
Causing Output to the Terminal
refresh() and wrefresh(win)
These functions must be called to actually get any output on
@ -689,7 +691,7 @@ Function Descriptions
with fewer total characters transmitted (this also avoids a
visually annoying flicker at each update).
Low-Level Capability Access
Low-Level Capability Access
setupterm(term, filenum, errret)
This routine is called to initialize a terminal's description,
@ -719,7 +721,7 @@ Function Descriptions
array ttytype[]. Subsequent calls to setupterm() will overwrite
this array, so you will have to save it yourself if need be.
Debugging
Debugging
NOTE: These functions are not part of the standard curses API!
@ -747,13 +749,13 @@ Function Descriptions
single-line pseudo-operations. These pseudo-ops can be distinguished
by the fact that they are named in capital letters.
Hints, Tips, and Tricks
Hints, Tips, and Tricks
The ncurses manual pages are a complete reference for this library. In
the remainder of this document, we discuss various useful methods that
may not be obvious from the manual page descriptions.
Some Notes of Caution
Some Notes of Caution
If you find yourself thinking you need to use noraw() or nocbreak(),
think again and move carefully. It is probably better design to use
@ -787,7 +789,7 @@ Hints, Tips, and Tricks
in an environment with window resizes, in which case several screens
could be open with different sizes.
Temporarily Leaving NCURSES Mode
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"
@ -812,7 +814,7 @@ Hints, Tips, and Tricks
addstr("returned.\n"); /* prepare return message */
refresh(); /* restore save modes, repaint screen */
Using NCURSES under XTERM
Using NCURSES under XTERM
A resize operation in X sends SIGWINCH to the application running
under xterm. The easiest way to handle SIGWINCH is to do an endwin,
@ -835,7 +837,7 @@ Hints, Tips, and Tricks
it cannot know how you want the screen re-painted. You will usually
have to write special-purpose code to handle KEY_RESIZE yourself.
Handling Multiple Terminal Screens
Handling Multiple Terminal Screens
The initscr() function actually calls a function named newterm() to do
most of its work. If you are writing a program that opens multiple
@ -847,7 +849,7 @@ Hints, Tips, and Tricks
with the set_term call. Note that you will also have to call
def_shell_mode and def_prog_mode on each tty yourself.
Testing for Terminal Capabilities
Testing for Terminal Capabilities
Sometimes you may want to write programs that test for the presence of
various capabilities before deciding whether to go into ncurses mode.
@ -861,14 +863,14 @@ Hints, Tips, and Tricks
can include the term.h file and test the value of the macro
cursor_address.
Tuning for Speed
Tuning for Speed
Use the addchstr() family of functions for fast screen-painting of
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
Special Features of NCURSES
The wresize() function allows you to resize a window in place. The
associated resizeterm() function simplifies the construction of
@ -888,14 +890,14 @@ Hints, Tips, and Tricks
8. While most terminals which provide color allow only 8 colors, about
a quarter (including XFree86 xterm) support 16 colors.
Compatibility with Older Versions
Compatibility with Older Versions
Despite our best efforts, there are some differences between ncurses
and the (undocumented!) behavior of older curses implementations.
These arise from ambiguities or omissions in the documentation of the
API.
Refresh of Overlapping Windows
Refresh of Overlapping Windows
If you define two windows A and B that overlap, and then alternately
scribble on and refresh them, the changes made to the overlapping
@ -947,7 +949,7 @@ Compatibility with Older Versions
you have defined. Then you can do one doupdate() and there will be a
single burst of physical I/O that will do all your updates.
Background Erase
Background Erase
If you have been using a very old versions of ncurses (1.8.7 or older)
you may be surprised by the behavior of the erase functions. In older
@ -962,7 +964,7 @@ Compatibility with Older Versions
This change in behavior conforms ncurses to System V Release 4 and the
XSI Curses standard.
XSI Curses Conformance
XSI Curses Conformance
The ncurses library is intended to be base-level conformant with the
XSI Curses standard from X/Open. Many extended-level features (in
@ -976,7 +978,7 @@ XSI Curses Conformance
have a corresponding function which may be linked (and will be
prototype-checked) if the macro definition is disabled with #undef.
The Panels Library
The Panels Library
The ncurses library by itself provides good support for screen
displays in which the windows are tiled (non-overlapping). In the more
@ -993,7 +995,7 @@ XSI Curses Conformance
The panel library first appeared in AT&T System V. The version
documented here is the panel code distributed with ncurses.
Compiling With the Panels Library
Compiling With the Panels Library
Your panels-using modules must import the panels library declarations
with
@ -1004,7 +1006,7 @@ Compiling With the Panels Library
-lncurses. Many linkers are two-pass and will accept either order, but
it is still good practice to put -lpanel first and -lncurses second.
Overview of Panels
Overview of Panels
A panel object is a window that is implicitly treated as part of a
deck including all other panel objects. The deck has an implicit
@ -1047,7 +1049,7 @@ Overview of Panels
write, you will generate a lot of unnecessary refresh activity and
screen flicker.
Panels, Input, and the Standard Screen
Panels, Input, and the Standard Screen
You should not mix wnoutrefresh() or wrefresh() operations with panels
code; this will work only if the argument window is either in the top
@ -1065,7 +1067,7 @@ Panels, Input, and the Standard Screen
There is presently no way to display changes to one obscured panel
without repainting all panels.
Hiding Panels
Hiding Panels
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
@ -1076,7 +1078,7 @@ Hiding Panels
or bottom_panel on a hidden panel(). Other panels operations are
applicable.
Miscellaneous Other Facilities
Miscellaneous Other Facilities
It is possible to navigate the deck using the functions panel_above()
and panel_below. Handed a panel pointer, they return the panel above
@ -1087,7 +1089,7 @@ Miscellaneous Other Facilities
code, to which you can attach application data. See the man page
documentation of set_panel_userptr() and panel_userptr for details.
The Menu Library
The Menu Library
A menu is a screen display that assists the user to choose some subset
of a given set of items. The menu library is a curses extension that
@ -1097,7 +1099,7 @@ Miscellaneous Other Facilities
The menu library first appeared in AT&T System V. The version
documented here is the menu code distributed with ncurses.
Compiling With the menu Library
Compiling With the menu Library
Your menu-using modules must import the menu library declarations with
#include <menu.h>
@ -1107,7 +1109,7 @@ Compiling With the menu Library
-lncurses. Many linkers are two-pass and will accept either order, but
it is still good practice to put -lmenu first and -lncurses second.
Overview of Menus
Overview of Menus
The menus created by this library consist of collections of items
including a name string part and a description string part. To make
@ -1137,7 +1139,7 @@ Overview of Menus
9. Free the items using free_item().
10. Terminate curses.
Selecting items
Selecting items
Menus may be multi-valued or (the default) single-valued (see the
manual page menu_opts(3x) to see how to change the default). Both
@ -1154,7 +1156,7 @@ Selecting items
option so far defined for menus, but it is good practice to code as
though other option bits might be on.
Menu Display
Menu Display
The menu library calculates a minimum display size for your window,
based on the following variables:
@ -1197,7 +1199,7 @@ Menu Display
have reasonable defaults which the library allows you to change (see
the menu_attribs(3x) manual page.
Menu Windows
Menu Windows
Each menu has, as mentioned previously, a pair of associated windows.
Both these windows are painted when the menu is posted and erased when
@ -1217,7 +1219,7 @@ Menu Windows
these actually modifies the screen. To do that, call wrefresh() or
some equivalent.
Processing Menu Input
Processing Menu Input
The main loop of your menu-processing code should call menu_driver()
repeatedly. The first argument of this routine is a menu pointer; the
@ -1261,7 +1263,7 @@ Processing Menu Input
considered application-specific commands. The menu_driver() code
ignores them and returns E_UNKNOWN_COMMAND.
Miscellaneous Other Features
Miscellaneous Other Features
Various menu options can affect the processing and visual appearance
and input processing of menus. See menu_opts(3x) for details.
@ -1280,7 +1282,7 @@ Miscellaneous Other Features
Each item, and each menu, has an associated user pointer on which you
can hang application data. See mitem_userptr(3x) and menu_userptr(3x).
The Forms Library
The Forms Library
The form library is a curses extension that supports easy programming
of on-screen forms for data entry and program control.
@ -1288,7 +1290,7 @@ Miscellaneous Other Features
The form library first appeared in AT&T System V. The version
documented here is the form code distributed with ncurses.
Compiling With the form Library
Compiling With the form Library
Your form-using modules must import the form library declarations with
#include <form.h>
@ -1298,7 +1300,7 @@ Compiling With the form Library
-lncurses. Many linkers are two-pass and will accept either order, but
it is still good practice to put -lform first and -lncurses second.
Overview of Forms
Overview of Forms
A form is a collection of fields; each field may be either a label
(explanatory text) or a data-entry location. Long forms may be
@ -1347,7 +1349,7 @@ Overview of Forms
operations, the menu driver loop has to support field editing and data
validation.
Creating and Freeing Fields and Forms
Creating and Freeing Fields and Forms
The basic function for creating fields is new_field():
FIELD *new_field(int height, int width, /* new field size */
@ -1423,7 +1425,7 @@ FORM *new_form(FIELD **fields);
to a form, but not vice-versa; thus, you will generally free your form
objects first.
Fetching and Changing Field Attributes
Fetching and Changing Field Attributes
Each form field has a number of location and size attributes
associated with it. There are other field attributes used to control
@ -1438,7 +1440,7 @@ Fetching and Changing Field Attributes
to mean this field. Changes to it persist as defaults until your forms
application terminates.
Fetching Size and Location Data
Fetching Size and Location Data
You can retrieve field sizes and locations through:
int field_info(FIELD *field, /* field from which to fetch */
@ -1451,7 +1453,7 @@ int field_info(FIELD *field, /* field from which to fetch */
size and location attributes of a new field, it fetches them from an
existing one.
Changing the Field Location
Changing the Field Location
It is possible to move a field's location on the screen:
int move_field(FIELD *field, /* field to alter */
@ -1459,7 +1461,7 @@ int move_field(FIELD *field, /* field to alter */
You can, of course. query the current location through field_info().
The Justification Attribute
The Justification Attribute
One-line fields may be unjustified, justified right, justified left,
or centered. Here is how you manipulate this attribute:
@ -1472,7 +1474,7 @@ int field_just(FIELD *field); /* fetch mode of field */
preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or
JUSTIFY_CENTER.
Field Display Attributes
Field Display Attributes
For each field, you can set a foreground attribute for entered
characters, a background attribute for the entire field, and a pad
@ -1507,7 +1509,7 @@ chtype new_page(FIELD *field); /* field to query */
etc). The page bit of a field controls whether it is displayed at the
start of a new form screen.
Field Option Bits
Field Option Bits
There is also a large collection of field option bits you can set to
control various aspects of forms processing. You can manipulate them
@ -1593,7 +1595,7 @@ int field_opts(FIELD *field); /* field to query */
The option values are bit-masks and can be composed with logical-or in
the obvious way.
Field Status
Field Status
Every field has a status flag, which is set to FALSE when the field is
created and TRUE when the value in field buffer 0 changes. This flag
@ -1616,7 +1618,7 @@ int field_status(FIELD *field); /* fetch mode of field */
initialization or termination hooks, or (3) just after a
REQ_VALIDATION request has been processed by the forms driver.
Field User Pointer
Field User Pointer
Each field structure contains one character pointer slot that is not
used by the forms library. It is intended to be used by applications
@ -1634,7 +1636,7 @@ char *field_userptr(FIELD *field); /* fetch mode of field */
field is created, the default-field user pointer is copied to
initialize the new field's user pointer.
Variable-Sized Fields
Variable-Sized Fields
Normally, a field is fixed at the size specified for it at creation
time. If, however, you turn off its O_STATIC bit, it becomes dynamic
@ -1673,7 +1675,7 @@ int set_max_field(FIELD *field, /* field to alter (may not be NULL) */
the field; use dynamic_field_info() to get the actual dynamic
size.
Field Validation
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
@ -1703,7 +1705,7 @@ FIELDTYPE *field_type(FIELD *field); /* field to query */
Here are the pre-defined validation types:
TYPE_ALPHA
TYPE_ALPHA
This field type accepts alphabetic data; no blanks, no digits, no
special characters (this is checked at character-entry time). It is
@ -1717,7 +1719,7 @@ int set_field_type(FIELD *field, /* field to alter */
width, the validation check will always fail. A minimum width of zero
makes field completion optional.
TYPE_ALNUM
TYPE_ALNUM
This field type accepts alphabetic data and digits; no blanks, no
special characters (this is checked at character-entry time). It is
@ -1731,7 +1733,7 @@ int set_field_type(FIELD *field, /* field to alter */
greater than the field width, the validation check will always fail. A
minimum width of zero makes field completion optional.
TYPE_ENUM
TYPE_ENUM
This type allows you to restrict a field's values to be among a
specified set of string values (for example, the two-letter postal
@ -1760,7 +1762,7 @@ int set_field_type(FIELD *field, /* field to alter */
The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests can be
particularly useful with these fields.
TYPE_INTEGER
TYPE_INTEGER
This field type accepts an integer. It is set up as follows:
int set_field_type(FIELD *field, /* field to alter */
@ -1778,7 +1780,7 @@ int set_field_type(FIELD *field, /* field to alter */
A TYPE_INTEGER value buffer can conveniently be interpreted with the C
library function atoi(3).
TYPE_NUMERIC
TYPE_NUMERIC
This field type accepts a decimal number. It is set up as follows:
int set_field_type(FIELD *field, /* field to alter */
@ -1798,7 +1800,7 @@ int set_field_type(FIELD *field, /* field to alter */
A TYPE_NUMERIC value buffer can conveniently be interpreted with the C
library function atof(3).
TYPE_REGEXP
TYPE_REGEXP
This field type accepts data matching a regular expression. It is set
up as follows:
@ -1809,7 +1811,7 @@ int set_field_type(FIELD *field, /* field to alter */
The syntax for regular expressions is that of regcomp(3). The check
for regular-expression match is performed on exit.
Direct Field Buffer Manipulation
Direct Field Buffer Manipulation
The chief attribute of a field is its buffer contents. When a form has
been completed, your application usually needs to know the state of
@ -1840,7 +1842,7 @@ int set_field_buffer(FIELD *field, /* field to alter */
or form's initialization or termination hooks, or (3) just after a
REQ_VALIDATION request has been processed by the forms driver.
Attributes of Forms
Attributes of Forms
As with field attributes, form attributes inherit a default from a
system default form structure. These defaults can be queried or set by
@ -1868,7 +1870,7 @@ int field_count(FORM *form); /* count connect fields */
connected to a given from. It returns -1 if the form-pointer argument
is NULL.
Control of Form Display
Control of Form Display
In the overview section, you saw that to display a form you normally
start by defining its size (and fields), posting it, and refreshing
@ -1938,7 +1940,7 @@ int pos_form_cursor(FORM *) /* form to be queried */
before handing control back to the forms driver in order to
re-synchronize it.
Input Processing in the Forms Driver
Input Processing in the Forms Driver
The function form_driver() handles virtualized input requests for form
navigation, editing, and validation requests, just as menu_driver does
@ -1955,7 +1957,7 @@ int form_driver(FORM *form, /* form to pass input to */
field-termination functions) with which your application code can
check that the input taken by the driver matched what was expected.
Page Navigation Requests
Page Navigation Requests
These requests cause page-level moves through the form, triggering
display of a new form screen.
@ -1976,7 +1978,7 @@ int form_driver(FORM *form, /* form to pass input to */
the last page goes to the first, and REQ_PREV_PAGE from the first page
goes to the last.
Inter-Field Navigation Requests
Inter-Field Navigation Requests
These requests handle navigation between fields on the same page.
@ -2039,7 +2041,7 @@ int form_driver(FORM *form, /* form to pass input to */
only if A, B, and C all share the same first line; otherwise it will
skip over B to C.
Intra-Field Navigation Requests
Intra-Field Navigation Requests
These requests drive movement of the edit cursor within the currently
selected field.
@ -2090,7 +2092,7 @@ int form_driver(FORM *form, /* form to pass input to */
whitespace. The commands to move to beginning and end of line or field
look for the first or last non-pad character in their ranges.
Scrolling Requests
Scrolling Requests
Fields that are dynamic and have grown and fields explicitly created
with offscreen rows are scrollable. One-line fields scroll
@ -2138,7 +2140,7 @@ int form_driver(FORM *form, /* form to pass input to */
For scrolling purposes, a page of a field is the height of its visible
part.
Editing Requests
Editing Requests
When you pass the forms driver an ASCII character, it is treated as a
request to add the character to the field's data buffer. Whether this
@ -2223,7 +2225,7 @@ int form_driver(FORM *form, /* form to pass input to */
See Form Options for discussion of how to set and clear the overload
options.
Order Requests
Order Requests
If the type of your field is ordered, and has associated functions for
getting the next and previous values of the type from a given value,
@ -2240,14 +2242,14 @@ int form_driver(FORM *form, /* form to pass input to */
Custom Validation Types), you can associate our own ordering
functions.
Application Commands
Application Commands
Form requests are represented as integers above the curses value
greater than KEY_MAX and less than or equal to the constant
MAX_COMMAND. If your input-virtualization routine returns a value
above MAX_COMMAND, the forms driver will ignore it.
Field Change Hooks
Field Change Hooks
It is possible to set function hooks to be executed whenever the
current field or form changes. Here are the functions that support
@ -2309,7 +2311,7 @@ HOOK field_term(FORM *form); /* form to query */
You can disable any of these hooks by (re)setting them to NULL, the
default value.
Field Change Commands
Field Change Commands
Normally, navigation through the form will be driven by the user's
input requests. But sometimes it is useful to be able to move the
@ -2340,7 +2342,7 @@ int form_page(FORM *form); /* return form's current page */
The initial page of a newly-created form is 0. The function
set_form_fields() resets this.
Form Options
Form Options
Like fields, forms may have control option bits. They can be changed
or queried with these functions:
@ -2371,7 +2373,7 @@ int form_opts(FORM *form); /* form to query */
The option values are bit-masks and can be composed with logical-or in
the obvious way.
Custom Validation Types
Custom Validation Types
The form library gives you the capability to define custom validation
types of your own. Further, the optional additional arguments of
@ -2380,7 +2382,7 @@ Custom Validation Types
with the handling of the additional arguments within custom validation
functions.
Union Types
Union Types
The simplest way to create a custom data type is to compose it from
two preexisting ones:
@ -2397,7 +2399,7 @@ FIELD *link_fieldtype(FIELDTYPE *type1,
first type, then for the second, to figure what type the buffer
contents should be treated as.
New Field Types
New Field Types
To create a field type from scratch, you need to specify one or both
of the following things:
@ -2430,7 +2432,7 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */
argument. It too should return TRUE if the character is valid, FALSE
otherwise.
Validation Function Arguments
Validation Function Arguments
Your field- and character- validation functions will be passed a
second argument as well. This second argument is the address of a
@ -2479,7 +2481,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */
functions should never see a NULL file pointer and need not check
specially for it.
Order Functions For Custom Types
Order Functions For Custom Types
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
@ -2499,7 +2501,7 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */
success (a legal next or previous value was set) or FALSE to indicate
failure.
Avoiding Problems
Avoiding Problems
The interface for defining custom types is complicated and tricky.
Rather than attempting to create a custom type entirely from scratch,

View file

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.71 2021/01/23 20:42:08 tom Exp $
# $Id: Makefile.in,v 1.72 2021/07/03 15:45:33 tom Exp $
##############################################################################
# Copyright 2020,2021 Thomas E. Dickey #
# Copyright 1998-2015,2018 Free Software Foundation, Inc. #
@ -134,6 +134,19 @@ AUTO_SRC = \
../include/form.h
################################################################################
@MAKE_PHONY@.PHONY : all
@MAKE_PHONY@.PHONY : clean
@MAKE_PHONY@.PHONY : distclean
@MAKE_PHONY@.PHONY : install
@MAKE_PHONY@.PHONY : install.libs
@MAKE_PHONY@.PHONY : libs
@MAKE_PHONY@.PHONY : mostlyclean
@MAKE_PHONY@.PHONY : realclean
@MAKE_PHONY@.PHONY : sources
@MAKE_PHONY@.PHONY : uninstall
@MAKE_PHONY@.PHONY : uninstall.libs
all \
libs \
install :: $(AUTO_SRC) $(LIBRARIES)

View file

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 2020,2021 Thomas E. Dickey --
-- Copyright 1998-2003,2006 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
@ -26,18 +26,18 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: READ.ME,v 0.8 2020/02/02 23:34:34 tom Exp $
-- $Id: READ.ME,v 0.9 2021/06/17 21:20:30 tom Exp $
-------------------------------------------------------------------------------
This is a clone of the form library that is available with typical
System V curses implementations (ETI).
It is modelled after the documentation that comes for this library with
a 386 based SVR4 implementation (ESIX).
a 386 based SVR4 implementation (ESIX).
The development environment was and is an ELF based Linux system.
For things that still need doing, see the TO-DO file in the top-level
For things that still need doing, see the TO-DO file in the top-level
directory.
Juergen Pfeifer

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_def.c,v 1.43 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: fld_def.c,v 1.44 2021/03/27 23:49:53 tom Exp $")
/* this can't be readonly */
static FIELD default_field =
@ -86,14 +86,13 @@ FORM_EXPORT(TypeArgument *)
_nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
{
TypeArgument *res = (TypeArgument *)0;
TypeArgument *p;
if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
{
assert(err != 0 && ap != (va_list *)0);
if ((typ->status & _LINKED_TYPE) != 0)
{
p = typeMalloc(TypeArgument, 1);
TypeArgument *p = typeMalloc(TypeArgument, 1);
if (p != 0)
{
@ -134,14 +133,13 @@ FORM_EXPORT(TypeArgument *)
_nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
{
TypeArgument *res = (TypeArgument *)0;
TypeArgument *p;
if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
{
assert(err != 0 && argp != 0);
if ((typ->status & _LINKED_TYPE) != 0)
{
p = typeMalloc(TypeArgument, 1);
TypeArgument *p = typeMalloc(TypeArgument, 1);
if (p != 0)
{

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2012,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,10 +33,10 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftchoice.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: fld_ftchoice.c,v 1.18 2021/06/17 21:26:02 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_fieldtype_choice(
| FIELDTYPE *typ,
| bool (* const next_choice)(FIELD *,const void *),

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,17 +33,17 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftlink.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: fld_ftlink.c,v 1.18 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : FIELDTYPE *link_fieldtype(
| FIELDTYPE *type1,
| FIELDTYPE *type2)
|
|
| Description : Create a new fieldtype built from the two given types.
| They are connected by an logical 'OR'.
| If an error occurs, errno is set to
| If an error occurs, errno is set to
| E_BAD_ARGUMENT - invalid arguments
| E_SYSTEM_ERROR - system error (no memory)
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,15 +33,15 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_info.c,v 1.15 2020/12/12 01:05:42 tom Exp $")
MODULE_ID("$Id: fld_info.c,v 1.16 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int field_info(const FIELD *field,
| int *rows, int *cols,
| int *frow, int *fcol,
| int *nrow, int *nbuf)
|
|
| Description : Retrieve information about the field's creation parameters.
|
| Return Values : E_OK - success
@ -78,11 +78,11 @@ field_info(const FIELD *field,
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int dynamic_field_info(const FIELD *field,
| int *drows, int *dcols,
| int *maxgrow)
|
|
| Description : Retrieve information about a dynamic field's current
| dynamic parameters.
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_just.c,v 1.16 2020/12/11 23:16:37 tom Exp $")
MODULE_ID("$Id: fld_just.c,v 1.17 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_field_just(FIELD *field, int just)
|
|
| Description : Set the field's type of justification.
|
| Return Values : E_OK - success
@ -70,9 +70,9 @@ set_field_just(FIELD *field, int just)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int field_just( const FIELD *field )
|
|
| Description : Retrieve the field's type of justification
|
| Return Values : The justification type.

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,17 +33,17 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_link.c,v 1.16 2020/12/11 23:20:32 tom Exp $")
MODULE_ID("$Id: fld_link.c,v 1.17 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : FIELD *link_field(FIELD *field, int frow, int fcol)
|
| Facility : libnform
| Function : FIELD *link_field(FIELD *field, int frow, int fcol)
|
| Description : Duplicates the field at the specified position. The
| new field shares its buffers with the original one,
| the attributes are independent.
| If an error occurs, errno is set to
|
|
| E_BAD_ARGUMENT - invalid argument
| E_SYSTEM_ERROR - system error
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2019,2020 Thomas E. Dickey *
* Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_max.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: fld_max.c,v 1.18 2021/06/17 21:26:02 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_max_field(FIELD *field, int maxgrow)
|
|
| Description : Set the maximum growth for a dynamic field. If maxgrow=0
| the field may grow to any possible size.
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_move.c,v 1.15 2020/12/11 23:48:05 tom Exp $")
MODULE_ID("$Id: fld_move.c,v 1.16 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int move_field(FIELD *field,int frow, int fcol)
|
|
| Description : Moves the disconnected field to the new location in
| the form's subwindow.
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,16 +33,16 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_opts.c,v 1.15 2020/12/11 22:05:24 tom Exp $")
MODULE_ID("$Id: fld_opts.c,v 1.16 2021/06/17 21:20:30 tom Exp $")
/*----------------------------------------------------------------------------
Field-Options manipulation routines
--------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_field_opts(FIELD *field, Field_Options opts)
|
|
| Description : Turns on the named options for this field and turns
| off all the remaining options.
|
@ -65,9 +65,9 @@ set_field_opts(FIELD *field, Field_Options opts)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : Field_Options field_opts(const FIELD *field)
|
|
| Description : Retrieve the field's options.
|
| Return Values : The options.
@ -81,10 +81,10 @@ field_opts(const FIELD *field)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int field_opts_on(FIELD *field, Field_Options opts)
|
| Description : Turns on the named options for this field and all the
|
| Description : Turns on the named options for this field and all the
| remaining options are unchanged.
|
| Return Values : E_OK - success
@ -109,10 +109,10 @@ field_opts_on(FIELD *field, Field_Options opts)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int field_opts_off(FIELD *field, Field_Options opts)
|
| Description : Turns off the named options for this field and all the
|
| Description : Turns off the named options for this field and all the
| remaining options are unchanged.
|
| Return Values : E_OK - success

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_pad.c,v 1.13 2020/12/11 22:05:24 tom Exp $")
MODULE_ID("$Id: fld_pad.c,v 1.14 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_field_pad(FIELD *field, int ch)
|
|
| Description : Set the pad character used to fill the field. This must
| be a printable character.
|
@ -68,9 +68,9 @@ set_field_pad(FIELD *field, int ch)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int field_pad(const FIELD *field)
|
|
| Description : Retrieve the field's pad character.
|
| Return Values : The pad character.

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,13 +33,13 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_page.c,v 1.15 2020/12/11 23:15:26 tom Exp $")
MODULE_ID("$Id: fld_page.c,v 1.16 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_new_page(FIELD *field, bool new_page_flag)
|
| Description : Marks the field as the beginning of a new page of
|
| Description : Marks the field as the beginning of a new page of
| the form.
|
| Return Values : E_OK - success
@ -63,9 +63,9 @@ set_new_page(FIELD *field, bool new_page_flag)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : bool new_page(const FIELD *field)
|
|
| Description : Retrieve the information whether or not the field starts
| a new page on the form.
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_stat.c,v 1.17 2020/12/11 22:05:24 tom Exp $")
MODULE_ID("$Id: fld_stat.c,v 1.18 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_field_status(FIELD *field, bool status)
|
|
| Description : Set or clear the 'changed' indication flag for that
| field's primary buffer.
|
@ -60,11 +60,11 @@ set_field_status(FIELD *field, bool status)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : bool field_status(const FIELD *field)
|
|
| Description : Retrieve the value of the 'changed' indication flag
| for that field's primary buffer.
| for that field's primary buffer.
|
| Return Values : TRUE - buffer has been changed
| FALSE - buffer has not been changed

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_type.c,v 1.19 2020/12/11 23:20:37 tom Exp $")
MODULE_ID("$Id: fld_type.c,v 1.20 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_field_type(FIELD *field, FIELDTYPE *type,...)
|
|
| Description : Associate the specified fieldtype with the field.
| Certain field types take additional arguments. Look
| at the spec of the field types !
@ -81,9 +81,9 @@ set_field_type(FIELD *field, FIELDTYPE *type, ...)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : FIELDTYPE *field_type(const FIELD *field)
|
|
| Description : Retrieve the associated fieldtype for this field.
|
| Return Values : Pointer to fieldtype of NULL if none is defined.

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_user.c,v 1.19 2020/12/12 01:05:34 tom Exp $")
MODULE_ID("$Id: fld_user.c,v 1.20 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_field_userptr(FIELD *field, void *usrptr)
|
|
| Description : Set the pointer that is reserved in any field to store
| application relevant information.
|
@ -54,9 +54,9 @@ set_field_userptr(FIELD *field, void *usrptr)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : void *field_userptr(const FIELD *field)
|
|
| Description : Return the pointer that is reserved in any field to
| store application relevant information.
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -31,7 +31,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.h,v 0.31 2020/07/04 20:38:43 tom Exp $ */
/* $Id: form.h,v 0.32 2021/06/17 21:26:02 tom Exp $ */
#ifndef FORM_H
#define FORM_H
@ -116,7 +116,7 @@ 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, except by changing the ABI.
* 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.

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2021,2024 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -31,7 +31,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.priv.h,v 0.47 2020/12/11 23:20:11 tom Exp $ */
/* $Id: form.priv.h,v 0.49 2024/02/24 12:17:31 tom Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
@ -47,10 +47,6 @@
#include <wctype.h>
#endif
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */
#endif
#define FIELD_CELL NCURSES_CH_T
#define NCURSES_FIELD_INTERNALS char** expanded; WINDOW *working;
@ -202,12 +198,12 @@ extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
extern FORM_EXPORT(FIELDTYPE *)
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
FIELD *,
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
FIELD *,
const void *),
bool (*const char_check) (int,
FORM*,
FIELD*,
bool (*const char_check) (int,
FORM*,
FIELD*,
const void *),
bool (*const next)(FORM*,FIELD*,const void*),
bool (*const prev)(FORM*,FIELD*,const void*),

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_cursor.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: frm_cursor.c,v 1.13 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int pos_form_cursor(FORM * form)
|
|
| Description : Moves the form window cursor to the location required
| by the form driver to resume form processing. This may
| be needed after the application calls a curses library

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_data.c,v 1.19 2020/12/11 23:20:37 tom Exp $")
MODULE_ID("$Id: frm_data.c,v 1.21 2021/06/17 21:11:08 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : bool data_behind(const FORM *form)
|
|
| Description : Check for off-screen data behind. This is nearly trivial
| because the beginning of a field is fixed.
|
@ -70,12 +70,12 @@ data_behind(const FORM *form)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static char * Only_Padding(
| WINDOW *w,
| int len,
| int pad)
|
|
| Description : Test if 'length' cells starting at the current position
| contain a padding character.
|
@ -123,11 +123,11 @@ Only_Padding(WINDOW *w, int len, int pad)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : bool data_ahead(const FORM *form)
|
|
| Description : Check for off-screen data ahead. This is more difficult
| because a dynamic field has a variable end.
| because a dynamic field has a variable end.
|
| Return Values : TRUE - there are off-screen data ahead
| FALSE - there are no off-screen data ahead
@ -150,12 +150,11 @@ data_ahead(const FORM *form)
if (Single_Line_Field(field))
{
int check_len;
pos = form->begincol + field->cols;
while (pos < field->dcols)
{
check_len = field->dcols - pos;
int check_len = field->dcols - pos;
if (check_len >= field->cols)
check_len = field->cols;
cursor_moved = TRUE;

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_def.c,v 1.29 2020/12/11 23:47:16 tom Exp $")
MODULE_ID("$Id: frm_def.c,v 1.30 2021/03/27 23:49:58 tom Exp $")
/* this can't be readonly */
static FORM default_form =
@ -158,7 +158,6 @@ Connect_Fields(FORM *form, FIELD **fields)
{
int field_cnt, j;
int page_nr;
int maximum_row_in_field, maximum_col_in_field;
_PAGE *pg;
T((T_CALLED("Connect_Fields(%p,%p)"), (void *)form, (void *)fields));
@ -199,6 +198,9 @@ Connect_Fields(FORM *form, FIELD **fields)
size of the form */
for (j = 0; j < field_cnt; j++)
{
int maximum_row_in_field;
int maximum_col_in_field;
if (j == 0)
pg->pmin = (short)j;
else

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_driver.c,v 1.133 2020/12/12 00:36:42 tom Exp $")
MODULE_ID("$Id: frm_driver.c,v 1.135 2021/09/01 23:34:01 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@ -217,10 +217,10 @@ static FIELD_CELL myZEROS;
static void
check_pos(FORM *form, int lineno)
{
int y, x;
if (form && form->w)
{
int y, x;
getyx(form->w, y, x);
if (y != form->currow || x != form->curcol)
{
@ -265,10 +265,11 @@ static int
wide_winsnstr(WINDOW *w, const cchar_t *s, int n)
{
int code = ERR;
int y, x;
while (n-- > 0)
{
int y, x;
getyx(w, y, x);
if ((code = wins_wch(w, s++)) != OK)
break;
@ -511,7 +512,6 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
{
int width, height;
int y, x;
int len;
int row;
FIELD_CELL *pBuffer;
@ -525,6 +525,8 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
row < height;
row++, pBuffer += width)
{
int len;
if ((len = (int)(After_End_Of_Data(pBuffer, width) - pBuffer)) > 0)
{
wmove(win, row, 0);
@ -706,8 +708,6 @@ Field_Grown(FIELD *field, int amount)
* realloc().
*/
int i, j;
FIELD_CELL *old_bp;
FIELD_CELL *new_bp;
result = TRUE; /* allow sharing of recovery on failure */
@ -715,8 +715,9 @@ Field_Grown(FIELD *field, int amount)
field->buf = newbuf;
for (i = 0; i <= field->nbuf; i++)
{
new_bp = Address_Of_Nth_Buffer(field, i);
old_bp = oldbuf + i * (1 + old_buflen);
FIELD_CELL *new_bp = Address_Of_Nth_Buffer(field, i);
FIELD_CELL *old_bp = oldbuf + i * (1 + old_buflen);
for (j = 0; j < old_buflen; ++j)
new_bp[j] = old_bp[j];
while (j < new_buflen)
@ -917,11 +918,12 @@ _nc_Refresh_Current_Field(FORM *form)
else
{
/* A multi-line, i.e. vertical scrolling field */
int row_after_bottom, first_modified_row, first_unmodified_row;
int first_modified_row, first_unmodified_row;
if (field->drows > field->rows)
{
row_after_bottom = form->toprow + field->rows;
int row_after_bottom = form->toprow + field->rows;
if (form->currow < form->toprow)
{
form->toprow = form->currow;
@ -1005,7 +1007,6 @@ Perform_Justification(FIELD *field, WINDOW *win)
{
FIELD_CELL *bp;
int len;
int col = 0;
bp = (Field_Has_Option(field, O_NO_LEFT_STRIP)
? field->buf
@ -1014,6 +1015,8 @@ Perform_Justification(FIELD *field, WINDOW *win)
if (len > 0)
{
int col = 0;
assert(win && (field->drows == 1));
if (field->cols - len >= 0)
@ -1240,7 +1243,6 @@ Synchronize_Linked_Fields(FIELD *field)
{
FIELD *linked_field;
int res = E_OK;
int syncres;
if (!field)
return (E_BAD_ARGUMENT);
@ -1252,6 +1254,8 @@ Synchronize_Linked_Fields(FIELD *field)
(linked_field != field) && (linked_field != 0);
linked_field = linked_field->link)
{
int syncres;
if (((syncres = Synchronize_Field(linked_field)) != E_OK) &&
(res == E_OK))
res = syncres;
@ -1276,7 +1280,6 @@ _nc_Synchronize_Attributes(FIELD *field)
{
FORM *form;
int res = E_OK;
WINDOW *formwin;
T((T_CALLED("_nc_Synchronize_Attributes(%p)"), (void *)field));
@ -1303,7 +1306,8 @@ _nc_Synchronize_Attributes(FIELD *field)
}
else
{
formwin = Get_Form_Window(form);
WINDOW *formwin = Get_Form_Window(form);
copywin(form->w, formwin,
0, 0,
field->frow, field->fcol,
@ -2422,7 +2426,6 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len)
int datalen = (int)(After_End_Of_Data(bp, field->dcols) - bp);
int freelen = field->dcols - datalen;
int requiredlen = len + 1;
FIELD_CELL *split;
int result = E_REQUEST_DENIED;
if (freelen >= requiredlen)
@ -2431,7 +2434,7 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len)
myINSNSTR(form->w, txt, len);
wmove(form->w, row, len);
myINSNSTR(form->w, &myBLANK, 1);
return E_OK;
result = E_OK;
}
else
{
@ -2447,6 +2450,8 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len)
if (row < (field->drows - 1))
{
FIELD_CELL *split;
split =
After_Last_Whitespace_Character(bp,
(int)(Get_Start_Of_Data(bp
@ -2470,8 +2475,8 @@ Insert_String(FORM *form, int row, FIELD_CELL *txt, int len)
return E_OK;
}
}
return (result);
}
return (result);
}
/*---------------------------------------------------------------------------
@ -3551,7 +3556,7 @@ Upper_Neighbor_Field(FIELD *field)
| Function : static FIELD *Down_Neighbor_Field(FIELD * field)
|
| Description : Because of the row-major nature of sorting the fields,
| it's more difficult to define what the down neighbor
| it is more difficult to define what the down neighbor
| field really means. We define that it must be on a
| 'next' line (cyclic order!) and is the leftmost
| field laying on the right side of the given field. If
@ -4474,14 +4479,13 @@ form_driver(FORM *form, int c)
}
else if (wenclose(sub, event.y, event.x))
{ /* Inside the area we try to find the hit item */
int i;
ry = event.y;
rx = event.x;
if (wmouse_trafo(sub, &ry, &rx, FALSE))
{
int min_field = form->page[form->curpage].pmin;
int max_field = form->page[form->curpage].pmax;
int i;
for (i = min_field; i <= max_field; ++i)
{
@ -4676,14 +4680,13 @@ form_driver_w(FORM *form, int type, wchar_t c)
}
else if (wenclose(sub, event.y, event.x))
{ /* Inside the area we try to find the hit item */
int i;
ry = event.y;
rx = event.x;
if (wmouse_trafo(sub, &ry, &rx, FALSE))
{
int min_field = form->page[form->curpage].pmin;
int max_field = form->page[form->curpage].pmax;
int i;
for (i = min_field; i <= max_field; ++i)
{

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_opts.c,v 1.20 2020/12/12 00:37:00 tom Exp $")
MODULE_ID("$Id: frm_opts.c,v 1.21 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_form_opts(FORM *form, Form_Options opts)
|
|
| Description : Turns on the named options and turns off all the
| remaining options for that form.
|
@ -61,9 +61,9 @@ set_form_opts(FORM *form, Form_Options opts)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : Form_Options form_opts(const FORM *)
|
|
| Description : Retrieves the current form options.
|
| Return Values : The option flags.
@ -76,13 +76,13 @@ form_opts(const FORM *form)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int form_opts_on(FORM *form, Form_Options opts)
|
| Description : Turns on the named options; no other options are
|
| Description : Turns on the named options; no other options are
| changed.
|
| Return Values : E_OK - success
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
FORM_EXPORT(int)
@ -101,13 +101,13 @@ form_opts_on(FORM *form, Form_Options opts)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int form_opts_off(FORM *form, Form_Options opts)
|
| Description : Turns off the named options; no other options are
|
| Description : Turns off the named options; no other options are
| changed.
|
| Return Values : E_OK - success
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
FORM_EXPORT(int)

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_page.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: frm_page.c,v 1.15 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_form_page(FORM * form,int page)
|
|
| Description : Set the page number of the form.
|
| Return Values : E_OK - success
@ -88,9 +88,9 @@ set_form_page(FORM *form, int page)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int form_page(const FORM * form)
|
|
| Description : Return the current page of the form.
|
| Return Values : >= 0 : current page number

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2012,2015 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -38,7 +38,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_req_name.c,v 1.21 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: frm_req_name.c,v 1.23 2021/06/17 21:11:08 tom Exp $")
#define DATA(s) { s }
@ -112,9 +112,9 @@ static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] =
#define A_SIZE (sizeof(request_names)/sizeof(request_names[0]))
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : const char * form_request_name (int request);
|
|
| Description : Get the external name of a form request.
|
| Return Values : Pointer to name - on success
@ -135,9 +135,9 @@ form_request_name(int request)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int form_request_by_name (const char *str);
|
|
| Description : Search for a request with this name.
|
| Return Values : Request Id - on success
@ -150,12 +150,13 @@ form_request_by_name(const char *str)
to run sequentially through it.
*/
size_t i = 0;
char buf[16]; /* longest name is 10 chars */
T((T_CALLED("form_request_by_name(%s)"), _nc_visbuf(str)));
if (str != 0 && (i = strlen(str)) != 0)
{
char buf[16]; /* longest name is 10 chars */
if (i > sizeof(buf) - 2)
i = sizeof(buf) - 2;
memcpy(buf, str, i);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_scale.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: frm_scale.c,v 1.13 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int scale_form( const FORM *form, int *rows, int *cols )
|
|
| Description : Retrieve size of form
|
| Return Values : E_OK - no error

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,13 +33,13 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_sub.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: frm_sub.c,v 1.15 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_form_sub(FORM *form, WINDOW *win)
|
| Description : Set the subwindow of the form to win.
|
| Description : Set the subwindow of the form to win.
|
| Return Values : E_OK - success
| E_POSTED - form is posted
@ -66,9 +66,9 @@ set_form_sub(FORM *form, WINDOW *win)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : WINDOW *form_sub(const FORM *)
|
|
| Description : Retrieve the window of the form.
|
| Return Values : The pointer to the Subwindow.

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,12 +33,12 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_user.c,v 1.18 2020/12/12 01:05:20 tom Exp $")
MODULE_ID("$Id: frm_user.c,v 1.19 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_form_userptr(FORM *form, void *usrptr)
|
|
| Description : Set the pointer that is reserved in any form to store
| application relevant information.
|
@ -54,9 +54,9 @@ set_form_userptr(FORM *form, void *usrptr)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : void *form_userptr(const FORM *form)
|
|
| Description : Return the pointer that is reserved in any form to
| store application relevant information.
|

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,13 +33,13 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_win.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
MODULE_ID("$Id: frm_win.c,v 1.19 2021/06/17 21:20:30 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_form_win(FORM *form,WINDOW *win)
|
| Description : Set the window of the form to win.
|
| Description : Set the window of the form to win.
|
| Return Values : E_OK - success
| E_POSTED - form is posted
@ -66,9 +66,9 @@ set_form_win(FORM *form, WINDOW *win)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : WINDOW *form_win(const FORM *)
|
|
| Description : Retrieve the window of the form.
|
| Return Values : The pointer to the Window or stdscr if there is none.

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_enum.c,v 1.31 2020/12/12 01:15:37 tom Exp $")
MODULE_ID("$Id: fty_enum.c,v 1.33 2021/06/17 21:11:08 tom Exp $")
typedef struct
{
@ -55,9 +55,9 @@ typedef struct
enumParams;
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Generic_Enum_Type(void * arg)
|
|
| Description : Allocate structure for enumeration type argument.
|
| Return Values : Pointer to argument structure or NULL on error
@ -77,7 +77,6 @@ Generic_Enum_Type(void *arg)
int cnt = 0;
char **kp = (char **)0;
char **kwds = (char **)0;
char **kptarget;
int ccase, cunique;
T((T_CREATE("enumARG %p"), (void *)argp));
@ -96,6 +95,8 @@ Generic_Enum_Type(void *arg)
if (cnt > 0)
{
char **kptarget;
/* We copy the keywords, because we can't rely on the fact
that the caller doesn't relocate or free the memory used
for the keywords (maybe he has GC)
@ -118,9 +119,9 @@ Generic_Enum_Type(void *arg)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Make_Enum_Type( va_list * ap )
|
|
| Description : Allocate structure for enumeration type argument.
|
| Return Values : Pointer to argument structure or NULL on error
@ -138,10 +139,10 @@ Make_Enum_Type(va_list *ap)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Copy_Enum_Type( const void * argp )
|
| Description : Copy structure for enumeration type argument.
|
| Description : Copy structure for enumeration type argument.
|
| Return Values : Pointer to argument structure or NULL on error.
+--------------------------------------------------------------------------*/
@ -182,9 +183,9 @@ Copy_Enum_Type(const void *argp)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void Free_Enum_Type( void * argp )
|
|
| Description : Free structure for enumeration type argument.
|
| Return Values : -
@ -219,11 +220,11 @@ Free_Enum_Type(void *argp)
#define EXACT 2
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static int Compare(const unsigned char * s,
| Facility : libnform
| Function : static int Compare(const unsigned char * s,
| const unsigned char * buf,
| bool ccase )
|
|
| Description : Check whether or not the text in 'buf' matches the
| text in 's', at least partial.
|
@ -274,11 +275,11 @@ Compare(const unsigned char *s, const unsigned char *buf,
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Check_Enum_Field(
| FIELD * field,
| const void * argp)
|
|
| Description : Validate buffer content to be a valid enumeration value
|
| Return Values : TRUE - field is valid
@ -292,10 +293,11 @@ Check_Enum_Field(FIELD *field, const void *argp)
bool unique = ((const enumARG *)argp)->checkunique;
unsigned char *bp = (unsigned char *)field_buffer(field, 0);
char *s, *t, *p;
int res;
while (kwds && (s = (*kwds++)))
{
int res;
if ((res = Compare((unsigned char *)s, bp, ccase)) != NOMATCH)
{
p = t = s; /* t is at least a partial match */
@ -331,10 +333,10 @@ static const char *dummy[] =
{(char *)0};
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Next_Enum(FIELD * field,
| const void * argp)
|
|
| Description : Check for the next enumeration value
|
| Return Values : TRUE - next value found and loaded
@ -368,11 +370,11 @@ Next_Enum(FIELD *field, const void *argp)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Previous_Enum(
| FIELD * field,
| const void * argp)
|
|
| Description : Check for the previous enumeration value
|
| Return Values : TRUE - previous value found and loaded

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2012,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_generic.c,v 1.14 2020/12/12 17:27:44 tom Exp $")
MODULE_ID("$Id: fty_generic.c,v 1.15 2021/03/27 23:49:53 tom Exp $")
/*
* This is not a full implementation of a field type, but adds some
@ -282,7 +282,7 @@ _nc_form_cursor(const FORM *form, int *pRow, int *pCol)
int code = E_SYSTEM_ERROR;
WINDOW *res = (WINDOW *)0;
if (!(form == 0 || pRow == 0 || pCol == 0))
if (form != 0 && pRow != 0 && pCol != 0)
{
*pRow = form->currow;
*pCol = form->curcol;

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_int.c,v 1.31 2020/12/12 01:15:37 tom Exp $")
MODULE_ID("$Id: fty_int.c,v 1.33 2021/06/17 21:11:08 tom Exp $")
#if USE_WIDEC_SUPPORT
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
@ -62,9 +62,9 @@ typedef struct
integerPARM;
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Generic_This_Type( void * arg )
|
|
| Description : Allocate structure for integer type argument.
|
| Return Values : Pointer to argument structure or NULL on error
@ -89,9 +89,9 @@ Generic_This_Type(void *arg)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Make_This_Type( va_list * ap )
|
|
| Description : Allocate structure for integer type argument.
|
| Return Values : Pointer to argument structure or NULL on error
@ -109,10 +109,10 @@ Make_This_Type(va_list *ap)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void *Copy_This_Type(const void * argp)
|
| Description : Copy structure for integer type argument.
|
| Description : Copy structure for integer type argument.
|
| Return Values : Pointer to argument structure or NULL on error.
+--------------------------------------------------------------------------*/
@ -136,9 +136,9 @@ Copy_This_Type(const void *argp)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void Free_This_Type(void * argp)
|
|
| Description : Free structure for integer type argument.
|
| Return Values : -
@ -151,11 +151,11 @@ Free_This_Type(void *argp)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Check_This_Field(
| FIELD * field,
| const void * argp)
|
|
| Description : Validate buffer content to be a valid integer value
|
| Return Values : TRUE - field is valid
@ -170,11 +170,9 @@ Check_This_Field(FIELD *field, const void *argp)
int prec = argi->precision;
unsigned char *bp = (unsigned char *)field_buffer(field, 0);
char *s = (char *)bp;
long val;
char buf[100];
bool result = FALSE;
while (*bp && *bp == ' ')
while (*bp == ' ')
bp++;
if (*bp)
{
@ -183,13 +181,14 @@ Check_This_Field(FIELD *field, const void *argp)
#if USE_WIDEC_SUPPORT
if (*bp)
{
bool blank = FALSE;
int len;
int n;
wchar_t *list = _nc_Widen_String((char *)bp, &len);
if (list != 0)
{
bool blank = FALSE;
int n;
result = TRUE;
for (n = 0; n < len; ++n)
{
@ -227,7 +226,8 @@ Check_This_Field(FIELD *field, const void *argp)
#endif
if (result)
{
val = atol(s);
long val = atol(s);
if (low < high)
{
if (val < low || val > high)
@ -235,6 +235,8 @@ Check_This_Field(FIELD *field, const void *argp)
}
if (result)
{
char buf[100];
_nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf))
"%.*ld", (prec > 0 ? prec : 0), val);
set_field_buffer(field, 0, buf);
@ -245,11 +247,11 @@ Check_This_Field(FIELD *field, const void *argp)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Check_This_Character(
| int c,
| const void * argp)
|
|
| Description : Check a character for the integer type.
|
| Return Values : TRUE - character is valid

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -35,14 +35,14 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_ipv4.c,v 1.14 2020/12/12 01:15:37 tom Exp $")
MODULE_ID("$Id: fty_ipv4.c,v 1.16 2021/06/17 21:11:08 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Check_IPV4_Field(
| FIELD * field,
| const void * argp)
|
|
| Description : Validate buffer content to be a valid IP number (Ver. 4)
|
| Return Values : TRUE - field is valid
@ -53,7 +53,7 @@ Check_IPV4_Field(FIELD *field, const void *argp GCC_UNUSED)
{
char *bp = field_buffer(field, 0);
int num = 0, len;
unsigned int d1, d2, d3, d4;
unsigned int d1 = 0, d2 = 0, d3 = 0, d4 = 0;
if (isdigit(UChar(*bp))) /* Must start with digit */
{
@ -70,11 +70,11 @@ Check_IPV4_Field(FIELD *field, const void *argp GCC_UNUSED)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static bool Check_IPV4_Character(
| int c,
| int c,
| const void *argp )
|
|
| Description : Check a character for unsigned type or period.
|
| Return Values : TRUE - character is valid

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2019,2020 Thomas E. Dickey *
* Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_num.c,v 1.36 2020/12/12 01:15:37 tom Exp $")
MODULE_ID("$Id: fty_num.c,v 1.37 2021/03/27 23:49:58 tom Exp $")
#if HAVE_LOCALE_H
#include <locale.h>
@ -188,12 +188,10 @@ Check_This_Field(FIELD *field, const void *argp)
int prec = argn->precision;
unsigned char *bp = (unsigned char *)field_buffer(field, 0);
char *s = (char *)bp;
double val = 0.0;
struct lconv *L = argn->L;
char buf[64];
bool result = FALSE;
while (*bp && *bp == ' ')
while (*bp == ' ')
bp++;
if (*bp)
{
@ -202,14 +200,15 @@ Check_This_Field(FIELD *field, const void *argp)
#if USE_WIDEC_SUPPORT
if (*bp)
{
bool blank = FALSE;
int state = 0;
int len;
int n;
wchar_t *list = _nc_Widen_String((char *)bp, &len);
if (list != 0)
{
bool blank = FALSE;
int state = 0;
int n;
result = TRUE;
for (n = 0; n < len; ++n)
{
@ -265,7 +264,8 @@ Check_This_Field(FIELD *field, const void *argp)
#endif
if (result)
{
val = atof(s);
double val = atof(s);
if (low < high)
{
if (val < low || val > high)
@ -273,6 +273,8 @@ Check_This_Field(FIELD *field, const void *argp)
}
if (result)
{
char buf[64];
_nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf))
"%.*f", (prec > 0 ? prec : 0), val);
set_field_buffer(field, 0, buf);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2012,2015 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -35,12 +35,43 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_regex.c,v 1.32 2020/12/12 01:15:37 tom Exp $")
MODULE_ID("$Id: fty_regex.c,v 1.33 2021/08/14 15:01:52 tom Exp $")
#if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */
#if HAVE_PCRE2POSIX_H
#include <pcre2posix.h>
/* pcre2 used to provide its "POSIX" entrypoints using the same names as the
* standard ones in the C runtime, but that never worked because the linker
* would use the C runtime. Debian patched the library to fix this symbol
* conflict, but overlooked the header file, and Debian's patch was made
* obsolete when pcre2 was changed early in 2019 to provide different names.
*
* Here is a workaround to make the older version of Debian's package work.
*/
#if !defined(PCRE2regcomp) && defined(HAVE_PCRE2REGCOMP)
#undef regcomp
#undef regexec
#undef regfree
#ifdef __cplusplus
extern "C"
{
#endif
PCRE2POSIX_EXP_DECL int PCRE2regcomp(regex_t *, const char *, int);
PCRE2POSIX_EXP_DECL int PCRE2regexec(const regex_t *, const char *, size_t,
regmatch_t *, int);
PCRE2POSIX_EXP_DECL void PCRE2regfree(regex_t *);
#ifdef __cplusplus
} /* extern "C" */
#endif
#define regcomp(r,s,n) PCRE2regcomp(r,s,n)
#define regexec(r,s,n,m,x) PCRE2regexec(r,s,n,m,x)
#define regfree(r) PCRE2regfree(r)
#endif
/* end workaround... */
#elif HAVE_PCREPOSIX_H
#include <pcreposix.h>
#else

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -65,11 +65,11 @@ Form_Hook _nc_retrace_form_hook(
#undef set_fieldtype_arg
int set_fieldtype_arg(
FIELDTYPE *typ,
FIELDTYPE *typ,
void *(*const make_arg)(
va_list *p1),
va_list *p1),
void *(*const copy_arg)(
const void *p1),
const void *p1),
void (*const free_arg)(
void *p1))
{ return(*(int *)0); }
@ -83,7 +83,7 @@ void *field_arg(
#undef set_field_fore
int set_field_fore(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -94,7 +94,7 @@ chtype field_fore(
#undef set_field_back
int set_field_back(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -107,7 +107,7 @@ chtype field_back(
#undef set_current_field
int set_current_field(
FORM *form,
FORM *form,
FIELD *field)
{ return(*(int *)0); }
@ -133,27 +133,27 @@ FIELD *_nc_Default_Field;
#undef _nc_Make_Argument
TypeArgument *_nc_Make_Argument(
const FIELDTYPE *typ,
va_list *ap,
const FIELDTYPE *typ,
va_list *ap,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Copy_Argument
TypeArgument *_nc_Copy_Argument(
const FIELDTYPE *typ,
const TypeArgument *argp,
const FIELDTYPE *typ,
const TypeArgument *argp,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Free_Argument
void _nc_Free_Argument(
const FIELDTYPE *typ,
const FIELDTYPE *typ,
TypeArgument *argp)
{ /* void */ }
#undef _nc_Copy_Type
NCURSES_BOOL _nc_Copy_Type(
FIELD *dst,
FIELD *dst,
FIELD const *src)
{ return(*(NCURSES_BOOL *)0); }
@ -164,11 +164,11 @@ void _nc_Free_Type(
#undef new_field
FIELD *new_field(
int rows,
int cols,
int frow,
int fcol,
int nrow,
int rows,
int cols,
int frow,
int fcol,
int nrow,
int nbuf)
{ return(*(FIELD **)0); }
@ -181,8 +181,8 @@ int free_field(
#undef dup_field
FIELD *dup_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -190,12 +190,12 @@ FIELD *dup_field(
#undef set_fieldtype_choice
int set_fieldtype_choice(
FIELDTYPE *typ,
FIELDTYPE *typ,
NCURSES_BOOL (*const next_choice)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const prev_choice)(
FIELD *p1,
FIELD *p1,
const void *p2))
{ return(*(int *)0); }
@ -203,7 +203,7 @@ int set_fieldtype_choice(
#undef link_fieldtype
FIELDTYPE *link_fieldtype(
FIELDTYPE *type1,
FIELDTYPE *type1,
FIELDTYPE *type2)
{ return(*(FIELDTYPE **)0); }
@ -211,20 +211,20 @@ FIELDTYPE *link_fieldtype(
#undef field_info
int field_info(
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
int *nbuf)
{ return(*(int *)0); }
#undef dynamic_field_info
int dynamic_field_info(
const FIELD *field,
int *drows,
int *dcols,
const FIELD *field,
int *drows,
int *dcols,
int *maxgrow)
{ return(*(int *)0); }
@ -232,7 +232,7 @@ int dynamic_field_info(
#undef set_field_just
int set_field_just(
FIELD *field,
FIELD *field,
int just)
{ return(*(int *)0); }
@ -245,8 +245,8 @@ int field_just(
#undef link_field
FIELD *link_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -254,7 +254,7 @@ FIELD *link_field(
#undef set_max_field
int set_max_field(
FIELD *field,
FIELD *field,
int maxgrow)
{ return(*(int *)0); }
@ -262,8 +262,8 @@ int set_max_field(
#undef move_field
int move_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(int *)0); }
@ -275,10 +275,10 @@ FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
NCURSES_BOOL (*const field_check)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const char_check)(
int p1,
int p1,
const void *p2))
{ return(*(FIELDTYPE **)0); }
@ -291,7 +291,7 @@ int free_fieldtype(
#undef set_field_opts
int set_field_opts(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -302,13 +302,13 @@ Field_Options field_opts(
#undef field_opts_on
int field_opts_on(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts_off
int field_opts_off(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -316,7 +316,7 @@ int field_opts_off(
#undef set_field_pad
int set_field_pad(
FIELD *field,
FIELD *field,
int ch)
{ return(*(int *)0); }
@ -329,7 +329,7 @@ int field_pad(
#undef set_new_page
int set_new_page(
FIELD *field,
FIELD *field,
NCURSES_BOOL new_page_flag)
{ return(*(int *)0); }
@ -342,7 +342,7 @@ NCURSES_BOOL new_page(
#undef set_field_status
int set_field_status(
FIELD *field,
FIELD *field,
NCURSES_BOOL status)
{ return(*(int *)0); }
@ -355,8 +355,8 @@ NCURSES_BOOL field_status(
#undef set_field_type
int set_field_type(
FIELD *field,
FIELDTYPE *type,
FIELD *field,
FIELDTYPE *type,
...)
{ return(*(int *)0); }
@ -369,7 +369,7 @@ FIELDTYPE *field_type(
#undef set_field_userptr
int set_field_userptr(
FIELD *field,
FIELD *field,
void *usrptr)
{ return(*(int *)0); }
@ -404,7 +404,7 @@ FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
@ -420,7 +420,7 @@ int free_form(
#undef set_form_fields
int set_form_fields(
FORM *form,
FORM *form,
FIELD **fields)
{ return(*(int *)0); }
@ -438,8 +438,8 @@ int field_count(
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
FORM *form,
FIELD *field,
char *buf)
{ /* void */ }
@ -460,7 +460,7 @@ int _nc_Synchronize_Attributes(
#undef _nc_Synchronize_Options
int _nc_Synchronize_Options(
FIELD *field,
FIELD *field,
Field_Options newopts)
{ return(*(int *)0); }
@ -471,7 +471,7 @@ void _nc_Unset_Current_Field(
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
FORM *form,
FIELD *newfield)
{ return(*(int *)0); }
@ -487,34 +487,34 @@ FIELD *_nc_First_Active_Field(
#undef _nc_Set_Form_Page
int _nc_Set_Form_Page(
FORM *form,
int page,
FORM *form,
int page,
FIELD *field)
{ return(*(int *)0); }
typedef struct
{
int keycode;
int (*cmd) (FORM *);
int keycode;
int (*cmd) (FORM *);
}
Binding_Info;
#undef form_driver
int form_driver(
FORM *form,
FORM *form,
int c)
{ return(*(int *)0); }
#undef set_field_buffer
int set_field_buffer(
FIELD *field,
int buffer,
FIELD *field,
int buffer,
const char *value)
{ return(*(int *)0); }
#undef field_buffer
char *field_buffer(
const FIELD *field,
const FIELD *field,
int buffer)
{ return(*(char **)0); }
@ -522,7 +522,7 @@ char *field_buffer(
#undef set_field_init
int set_field_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -533,7 +533,7 @@ Form_Hook field_init(
#undef set_field_term
int set_field_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -544,7 +544,7 @@ Form_Hook field_term(
#undef set_form_init
int set_form_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -555,7 +555,7 @@ Form_Hook form_init(
#undef set_form_term
int set_form_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -568,7 +568,7 @@ Form_Hook form_term(
#undef set_form_opts
int set_form_opts(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -579,13 +579,13 @@ Form_Options form_opts(
#undef form_opts_on
int form_opts_on(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts_off
int form_opts_off(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -593,7 +593,7 @@ int form_opts_off(
#undef set_form_page
int set_form_page(
FORM *form,
FORM *form,
int page)
{ return(*(int *)0); }
@ -630,8 +630,8 @@ int form_request_by_name(
#undef scale_form
int scale_form(
const FORM *form,
int *rows,
const FORM *form,
int *rows,
int *cols)
{ return(*(int *)0); }
@ -639,7 +639,7 @@ int scale_form(
#undef set_form_sub
int set_form_sub(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -652,7 +652,7 @@ WINDOW *form_sub(
#undef set_form_userptr
int set_form_userptr(
FORM *form,
FORM *form,
void *usrptr)
{ return(*(int *)0); }
@ -665,7 +665,7 @@ void *form_userptr(
#undef set_form_win
int set_form_win(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -735,38 +735,38 @@ FIELDTYPE *_nc_TYPE_ENUM(void)
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
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,
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2010-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -65,11 +65,11 @@ Form_Hook _nc_retrace_form_hook(
#undef set_fieldtype_arg
int set_fieldtype_arg(
FIELDTYPE *typ,
FIELDTYPE *typ,
void *(*const make_arg)(
va_list *p1),
va_list *p1),
void *(*const copy_arg)(
const void *p1),
const void *p1),
void (*const free_arg)(
void *p1))
{ return(*(int *)0); }
@ -83,7 +83,7 @@ void *field_arg(
#undef set_field_fore
int set_field_fore(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -94,7 +94,7 @@ chtype field_fore(
#undef set_field_back
int set_field_back(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -107,7 +107,7 @@ chtype field_back(
#undef set_current_field
int set_current_field(
FORM *form,
FORM *form,
FIELD *field)
{ return(*(int *)0); }
@ -133,27 +133,27 @@ FIELD *_nc_Default_Field;
#undef _nc_Make_Argument
TypeArgument *_nc_Make_Argument(
const FIELDTYPE *typ,
va_list *ap,
const FIELDTYPE *typ,
va_list *ap,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Copy_Argument
TypeArgument *_nc_Copy_Argument(
const FIELDTYPE *typ,
const TypeArgument *argp,
const FIELDTYPE *typ,
const TypeArgument *argp,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Free_Argument
void _nc_Free_Argument(
const FIELDTYPE *typ,
const FIELDTYPE *typ,
TypeArgument *argp)
{ /* void */ }
#undef _nc_Copy_Type
NCURSES_BOOL _nc_Copy_Type(
FIELD *dst,
FIELD *dst,
FIELD const *src)
{ return(*(NCURSES_BOOL *)0); }
@ -164,11 +164,11 @@ void _nc_Free_Type(
#undef new_field
FIELD *new_field(
int rows,
int cols,
int frow,
int fcol,
int nrow,
int rows,
int cols,
int frow,
int fcol,
int nrow,
int nbuf)
{ return(*(FIELD **)0); }
@ -181,8 +181,8 @@ int free_field(
#undef dup_field
FIELD *dup_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -190,12 +190,12 @@ FIELD *dup_field(
#undef set_fieldtype_choice
int set_fieldtype_choice(
FIELDTYPE *typ,
FIELDTYPE *typ,
NCURSES_BOOL (*const next_choice)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const prev_choice)(
FIELD *p1,
FIELD *p1,
const void *p2))
{ return(*(int *)0); }
@ -203,7 +203,7 @@ int set_fieldtype_choice(
#undef link_fieldtype
FIELDTYPE *link_fieldtype(
FIELDTYPE *type1,
FIELDTYPE *type1,
FIELDTYPE *type2)
{ return(*(FIELDTYPE **)0); }
@ -211,20 +211,20 @@ FIELDTYPE *link_fieldtype(
#undef field_info
int field_info(
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
int *nbuf)
{ return(*(int *)0); }
#undef dynamic_field_info
int dynamic_field_info(
const FIELD *field,
int *drows,
int *dcols,
const FIELD *field,
int *drows,
int *dcols,
int *maxgrow)
{ return(*(int *)0); }
@ -232,7 +232,7 @@ int dynamic_field_info(
#undef set_field_just
int set_field_just(
FIELD *field,
FIELD *field,
int just)
{ return(*(int *)0); }
@ -245,8 +245,8 @@ int field_just(
#undef link_field
FIELD *link_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -254,7 +254,7 @@ FIELD *link_field(
#undef set_max_field
int set_max_field(
FIELD *field,
FIELD *field,
int maxgrow)
{ return(*(int *)0); }
@ -262,8 +262,8 @@ int set_max_field(
#undef move_field
int move_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(int *)0); }
@ -275,10 +275,10 @@ FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
NCURSES_BOOL (*const field_check)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const char_check)(
int p1,
int p1,
const void *p2))
{ return(*(FIELDTYPE **)0); }
@ -291,7 +291,7 @@ int free_fieldtype(
#undef set_field_opts
int set_field_opts(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -302,13 +302,13 @@ Field_Options field_opts(
#undef field_opts_on
int field_opts_on(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts_off
int field_opts_off(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -316,7 +316,7 @@ int field_opts_off(
#undef set_field_pad
int set_field_pad(
FIELD *field,
FIELD *field,
int ch)
{ return(*(int *)0); }
@ -329,7 +329,7 @@ int field_pad(
#undef set_new_page
int set_new_page(
FIELD *field,
FIELD *field,
NCURSES_BOOL new_page_flag)
{ return(*(int *)0); }
@ -342,7 +342,7 @@ NCURSES_BOOL new_page(
#undef set_field_status
int set_field_status(
FIELD *field,
FIELD *field,
NCURSES_BOOL status)
{ return(*(int *)0); }
@ -355,8 +355,8 @@ NCURSES_BOOL field_status(
#undef set_field_type
int set_field_type(
FIELD *field,
FIELDTYPE *type,
FIELD *field,
FIELDTYPE *type,
...)
{ return(*(int *)0); }
@ -369,7 +369,7 @@ FIELDTYPE *field_type(
#undef set_field_userptr
int set_field_userptr(
FIELD *field,
FIELD *field,
void *usrptr)
{ return(*(int *)0); }
@ -404,7 +404,7 @@ FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
@ -420,7 +420,7 @@ int free_form(
#undef set_form_fields
int set_form_fields(
FORM *form,
FORM *form,
FIELD **fields)
{ return(*(int *)0); }
@ -438,8 +438,8 @@ int field_count(
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
FORM *form,
FIELD *field,
char *buf)
{ /* void */ }
@ -460,7 +460,7 @@ int _nc_Synchronize_Attributes(
#undef _nc_Synchronize_Options
int _nc_Synchronize_Options(
FIELD *field,
FIELD *field,
Field_Options newopts)
{ return(*(int *)0); }
@ -471,7 +471,7 @@ void _nc_Unset_Current_Field(
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
FORM *form,
FIELD *newfield)
{ return(*(int *)0); }
@ -487,34 +487,34 @@ FIELD *_nc_First_Active_Field(
#undef _nc_Set_Form_Page
int _nc_Set_Form_Page(
FORM *form,
int page,
FORM *form,
int page,
FIELD *field)
{ return(*(int *)0); }
typedef struct
{
int keycode;
int (*cmd) (FORM *);
int keycode;
int (*cmd) (FORM *);
}
Binding_Info;
#undef form_driver
int form_driver(
FORM *form,
FORM *form,
int c)
{ return(*(int *)0); }
#undef set_field_buffer
int set_field_buffer(
FIELD *field,
int buffer,
FIELD *field,
int buffer,
const char *value)
{ return(*(int *)0); }
#undef field_buffer
char *field_buffer(
const FIELD *field,
const FIELD *field,
int buffer)
{ return(*(char **)0); }
@ -522,7 +522,7 @@ char *field_buffer(
#undef set_field_init
int set_field_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -533,7 +533,7 @@ Form_Hook field_init(
#undef set_field_term
int set_field_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -544,7 +544,7 @@ Form_Hook field_term(
#undef set_form_init
int set_form_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -555,7 +555,7 @@ Form_Hook form_init(
#undef set_form_term
int set_form_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -568,7 +568,7 @@ Form_Hook form_term(
#undef set_form_opts
int set_form_opts(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -579,13 +579,13 @@ Form_Options form_opts(
#undef form_opts_on
int form_opts_on(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts_off
int form_opts_off(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -593,7 +593,7 @@ int form_opts_off(
#undef set_form_page
int set_form_page(
FORM *form,
FORM *form,
int page)
{ return(*(int *)0); }
@ -630,8 +630,8 @@ int form_request_by_name(
#undef scale_form
int scale_form(
const FORM *form,
int *rows,
const FORM *form,
int *rows,
int *cols)
{ return(*(int *)0); }
@ -639,7 +639,7 @@ int scale_form(
#undef set_form_sub
int set_form_sub(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -652,7 +652,7 @@ WINDOW *form_sub(
#undef set_form_userptr
int set_form_userptr(
FORM *form,
FORM *form,
void *usrptr)
{ return(*(int *)0); }
@ -665,7 +665,7 @@ void *form_userptr(
#undef set_form_win
int set_form_win(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -735,38 +735,38 @@ FIELDTYPE *_nc_TYPE_ENUM(void)
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
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,
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2010-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -65,11 +65,11 @@ Form_Hook _nc_retrace_form_hook(
#undef set_fieldtype_arg
int set_fieldtype_arg(
FIELDTYPE *typ,
FIELDTYPE *typ,
void *(*const make_arg)(
va_list *p1),
va_list *p1),
void *(*const copy_arg)(
const void *p1),
const void *p1),
void (*const free_arg)(
void *p1))
{ return(*(int *)0); }
@ -83,7 +83,7 @@ void *field_arg(
#undef set_field_fore
int set_field_fore(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -94,7 +94,7 @@ chtype field_fore(
#undef set_field_back
int set_field_back(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -107,7 +107,7 @@ chtype field_back(
#undef set_current_field
int set_current_field(
FORM *form,
FORM *form,
FIELD *field)
{ return(*(int *)0); }
@ -133,27 +133,27 @@ FIELD *_nc_Default_Field;
#undef _nc_Make_Argument
TypeArgument *_nc_Make_Argument(
const FIELDTYPE *typ,
va_list *ap,
const FIELDTYPE *typ,
va_list *ap,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Copy_Argument
TypeArgument *_nc_Copy_Argument(
const FIELDTYPE *typ,
const TypeArgument *argp,
const FIELDTYPE *typ,
const TypeArgument *argp,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Free_Argument
void _nc_Free_Argument(
const FIELDTYPE *typ,
const FIELDTYPE *typ,
TypeArgument *argp)
{ /* void */ }
#undef _nc_Copy_Type
NCURSES_BOOL _nc_Copy_Type(
FIELD *dst,
FIELD *dst,
FIELD const *src)
{ return(*(NCURSES_BOOL *)0); }
@ -164,11 +164,11 @@ void _nc_Free_Type(
#undef new_field
FIELD *new_field(
int rows,
int cols,
int frow,
int fcol,
int nrow,
int rows,
int cols,
int frow,
int fcol,
int nrow,
int nbuf)
{ return(*(FIELD **)0); }
@ -181,8 +181,8 @@ int free_field(
#undef dup_field
FIELD *dup_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -190,12 +190,12 @@ FIELD *dup_field(
#undef set_fieldtype_choice
int set_fieldtype_choice(
FIELDTYPE *typ,
FIELDTYPE *typ,
NCURSES_BOOL (*const next_choice)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const prev_choice)(
FIELD *p1,
FIELD *p1,
const void *p2))
{ return(*(int *)0); }
@ -203,7 +203,7 @@ int set_fieldtype_choice(
#undef link_fieldtype
FIELDTYPE *link_fieldtype(
FIELDTYPE *type1,
FIELDTYPE *type1,
FIELDTYPE *type2)
{ return(*(FIELDTYPE **)0); }
@ -211,20 +211,20 @@ FIELDTYPE *link_fieldtype(
#undef field_info
int field_info(
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
int *nbuf)
{ return(*(int *)0); }
#undef dynamic_field_info
int dynamic_field_info(
const FIELD *field,
int *drows,
int *dcols,
const FIELD *field,
int *drows,
int *dcols,
int *maxgrow)
{ return(*(int *)0); }
@ -232,7 +232,7 @@ int dynamic_field_info(
#undef set_field_just
int set_field_just(
FIELD *field,
FIELD *field,
int just)
{ return(*(int *)0); }
@ -245,8 +245,8 @@ int field_just(
#undef link_field
FIELD *link_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -254,7 +254,7 @@ FIELD *link_field(
#undef set_max_field
int set_max_field(
FIELD *field,
FIELD *field,
int maxgrow)
{ return(*(int *)0); }
@ -262,8 +262,8 @@ int set_max_field(
#undef move_field
int move_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(int *)0); }
@ -275,10 +275,10 @@ FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
NCURSES_BOOL (*const field_check)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const char_check)(
int p1,
int p1,
const void *p2))
{ return(*(FIELDTYPE **)0); }
@ -291,7 +291,7 @@ int free_fieldtype(
#undef set_field_opts
int set_field_opts(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -302,13 +302,13 @@ Field_Options field_opts(
#undef field_opts_on
int field_opts_on(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts_off
int field_opts_off(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -316,7 +316,7 @@ int field_opts_off(
#undef set_field_pad
int set_field_pad(
FIELD *field,
FIELD *field,
int ch)
{ return(*(int *)0); }
@ -329,7 +329,7 @@ int field_pad(
#undef set_new_page
int set_new_page(
FIELD *field,
FIELD *field,
NCURSES_BOOL new_page_flag)
{ return(*(int *)0); }
@ -342,7 +342,7 @@ NCURSES_BOOL new_page(
#undef set_field_status
int set_field_status(
FIELD *field,
FIELD *field,
NCURSES_BOOL status)
{ return(*(int *)0); }
@ -355,8 +355,8 @@ NCURSES_BOOL field_status(
#undef set_field_type
int set_field_type(
FIELD *field,
FIELDTYPE *type,
FIELD *field,
FIELDTYPE *type,
...)
{ return(*(int *)0); }
@ -369,7 +369,7 @@ FIELDTYPE *field_type(
#undef set_field_userptr
int set_field_userptr(
FIELD *field,
FIELD *field,
void *usrptr)
{ return(*(int *)0); }
@ -404,7 +404,7 @@ FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
@ -420,7 +420,7 @@ int free_form(
#undef set_form_fields
int set_form_fields(
FORM *form,
FORM *form,
FIELD **fields)
{ return(*(int *)0); }
@ -438,8 +438,8 @@ int field_count(
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
FORM *form,
FIELD *field,
cchar_t *buf)
{ /* void */ }
@ -460,7 +460,7 @@ int _nc_Synchronize_Attributes(
#undef _nc_Synchronize_Options
int _nc_Synchronize_Options(
FIELD *field,
FIELD *field,
Field_Options newopts)
{ return(*(int *)0); }
@ -471,7 +471,7 @@ void _nc_Unset_Current_Field(
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
FORM *form,
FIELD *newfield)
{ return(*(int *)0); }
@ -487,47 +487,47 @@ FIELD *_nc_First_Active_Field(
#undef _nc_Set_Form_Page
int _nc_Set_Form_Page(
FORM *form,
int page,
FORM *form,
int page,
FIELD *field)
{ return(*(int *)0); }
typedef struct
{
int keycode;
int (*cmd) (FORM *);
int keycode;
int (*cmd) (FORM *);
}
Binding_Info;
#undef form_driver
int form_driver(
FORM *form,
FORM *form,
int c)
{ return(*(int *)0); }
#undef form_driver_w
int form_driver_w(
FORM *form,
int type,
FORM *form,
int type,
wchar_t c)
{ return(*(int *)0); }
#undef set_field_buffer
int set_field_buffer(
FIELD *field,
int buffer,
FIELD *field,
int buffer,
const char *value)
{ return(*(int *)0); }
#undef field_buffer
char *field_buffer(
const FIELD *field,
const FIELD *field,
int buffer)
{ return(*(char **)0); }
#undef _nc_Widen_String
wchar_t *_nc_Widen_String(
char *source,
char *source,
int *lengthp)
{ return(*(wchar_t **)0); }
@ -535,7 +535,7 @@ wchar_t *_nc_Widen_String(
#undef set_field_init
int set_field_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -546,7 +546,7 @@ Form_Hook field_init(
#undef set_field_term
int set_field_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -557,7 +557,7 @@ Form_Hook field_term(
#undef set_form_init
int set_form_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -568,7 +568,7 @@ Form_Hook form_init(
#undef set_form_term
int set_form_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -581,7 +581,7 @@ Form_Hook form_term(
#undef set_form_opts
int set_form_opts(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -592,13 +592,13 @@ Form_Options form_opts(
#undef form_opts_on
int form_opts_on(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts_off
int form_opts_off(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -606,7 +606,7 @@ int form_opts_off(
#undef set_form_page
int set_form_page(
FORM *form,
FORM *form,
int page)
{ return(*(int *)0); }
@ -643,8 +643,8 @@ int form_request_by_name(
#undef scale_form
int scale_form(
const FORM *form,
int *rows,
const FORM *form,
int *rows,
int *cols)
{ return(*(int *)0); }
@ -652,7 +652,7 @@ int scale_form(
#undef set_form_sub
int set_form_sub(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -665,7 +665,7 @@ WINDOW *form_sub(
#undef set_form_userptr
int set_form_userptr(
FORM *form,
FORM *form,
void *usrptr)
{ return(*(int *)0); }
@ -678,7 +678,7 @@ void *form_userptr(
#undef set_form_win
int set_form_win(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -748,38 +748,38 @@ FIELDTYPE *_nc_TYPE_ENUM(void)
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
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,
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2002-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -65,11 +65,11 @@ Form_Hook _nc_retrace_form_hook(
#undef set_fieldtype_arg
int set_fieldtype_arg(
FIELDTYPE *typ,
FIELDTYPE *typ,
void *(*const make_arg)(
va_list *p1),
va_list *p1),
void *(*const copy_arg)(
const void *p1),
const void *p1),
void (*const free_arg)(
void *p1))
{ return(*(int *)0); }
@ -83,7 +83,7 @@ void *field_arg(
#undef set_field_fore
int set_field_fore(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -94,7 +94,7 @@ chtype field_fore(
#undef set_field_back
int set_field_back(
FIELD *field,
FIELD *field,
chtype attr)
{ return(*(int *)0); }
@ -107,7 +107,7 @@ chtype field_back(
#undef set_current_field
int set_current_field(
FORM *form,
FORM *form,
FIELD *field)
{ return(*(int *)0); }
@ -133,27 +133,27 @@ FIELD *_nc_Default_Field;
#undef _nc_Make_Argument
TypeArgument *_nc_Make_Argument(
const FIELDTYPE *typ,
va_list *ap,
const FIELDTYPE *typ,
va_list *ap,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Copy_Argument
TypeArgument *_nc_Copy_Argument(
const FIELDTYPE *typ,
const TypeArgument *argp,
const FIELDTYPE *typ,
const TypeArgument *argp,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Free_Argument
void _nc_Free_Argument(
const FIELDTYPE *typ,
const FIELDTYPE *typ,
TypeArgument *argp)
{ /* void */ }
#undef _nc_Copy_Type
NCURSES_BOOL _nc_Copy_Type(
FIELD *dst,
FIELD *dst,
FIELD const *src)
{ return(*(NCURSES_BOOL *)0); }
@ -164,11 +164,11 @@ void _nc_Free_Type(
#undef new_field
FIELD *new_field(
int rows,
int cols,
int frow,
int fcol,
int nrow,
int rows,
int cols,
int frow,
int fcol,
int nrow,
int nbuf)
{ return(*(FIELD **)0); }
@ -181,8 +181,8 @@ int free_field(
#undef dup_field
FIELD *dup_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -190,12 +190,12 @@ FIELD *dup_field(
#undef set_fieldtype_choice
int set_fieldtype_choice(
FIELDTYPE *typ,
FIELDTYPE *typ,
NCURSES_BOOL (*const next_choice)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const prev_choice)(
FIELD *p1,
FIELD *p1,
const void *p2))
{ return(*(int *)0); }
@ -203,7 +203,7 @@ int set_fieldtype_choice(
#undef link_fieldtype
FIELDTYPE *link_fieldtype(
FIELDTYPE *type1,
FIELDTYPE *type1,
FIELDTYPE *type2)
{ return(*(FIELDTYPE **)0); }
@ -211,20 +211,20 @@ FIELDTYPE *link_fieldtype(
#undef field_info
int field_info(
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
int *nbuf)
{ return(*(int *)0); }
#undef dynamic_field_info
int dynamic_field_info(
const FIELD *field,
int *drows,
int *dcols,
const FIELD *field,
int *drows,
int *dcols,
int *maxgrow)
{ return(*(int *)0); }
@ -232,7 +232,7 @@ int dynamic_field_info(
#undef set_field_just
int set_field_just(
FIELD *field,
FIELD *field,
int just)
{ return(*(int *)0); }
@ -245,8 +245,8 @@ int field_just(
#undef link_field
FIELD *link_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
@ -254,7 +254,7 @@ FIELD *link_field(
#undef set_max_field
int set_max_field(
FIELD *field,
FIELD *field,
int maxgrow)
{ return(*(int *)0); }
@ -262,8 +262,8 @@ int set_max_field(
#undef move_field
int move_field(
FIELD *field,
int frow,
FIELD *field,
int frow,
int fcol)
{ return(*(int *)0); }
@ -275,10 +275,10 @@ FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
NCURSES_BOOL (*const field_check)(
FIELD *p1,
const void *p2),
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const char_check)(
int p1,
int p1,
const void *p2))
{ return(*(FIELDTYPE **)0); }
@ -291,7 +291,7 @@ int free_fieldtype(
#undef set_field_opts
int set_field_opts(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -302,13 +302,13 @@ Field_Options field_opts(
#undef field_opts_on
int field_opts_on(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts_off
int field_opts_off(
FIELD *field,
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
@ -316,7 +316,7 @@ int field_opts_off(
#undef set_field_pad
int set_field_pad(
FIELD *field,
FIELD *field,
int ch)
{ return(*(int *)0); }
@ -329,7 +329,7 @@ int field_pad(
#undef set_new_page
int set_new_page(
FIELD *field,
FIELD *field,
NCURSES_BOOL new_page_flag)
{ return(*(int *)0); }
@ -342,7 +342,7 @@ NCURSES_BOOL new_page(
#undef set_field_status
int set_field_status(
FIELD *field,
FIELD *field,
NCURSES_BOOL status)
{ return(*(int *)0); }
@ -355,8 +355,8 @@ NCURSES_BOOL field_status(
#undef set_field_type
int set_field_type(
FIELD *field,
FIELDTYPE *type,
FIELD *field,
FIELDTYPE *type,
...)
{ return(*(int *)0); }
@ -369,7 +369,7 @@ FIELDTYPE *field_type(
#undef set_field_userptr
int set_field_userptr(
FIELD *field,
FIELD *field,
void *usrptr)
{ return(*(int *)0); }
@ -404,7 +404,7 @@ FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
@ -420,7 +420,7 @@ int free_form(
#undef set_form_fields
int set_form_fields(
FORM *form,
FORM *form,
FIELD **fields)
{ return(*(int *)0); }
@ -438,8 +438,8 @@ int field_count(
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
FORM *form,
FIELD *field,
cchar_t *buf)
{ /* void */ }
@ -460,7 +460,7 @@ int _nc_Synchronize_Attributes(
#undef _nc_Synchronize_Options
int _nc_Synchronize_Options(
FIELD *field,
FIELD *field,
Field_Options newopts)
{ return(*(int *)0); }
@ -471,7 +471,7 @@ void _nc_Unset_Current_Field(
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
FORM *form,
FIELD *newfield)
{ return(*(int *)0); }
@ -487,47 +487,47 @@ FIELD *_nc_First_Active_Field(
#undef _nc_Set_Form_Page
int _nc_Set_Form_Page(
FORM *form,
int page,
FORM *form,
int page,
FIELD *field)
{ return(*(int *)0); }
typedef struct
{
int keycode;
int (*cmd) (FORM *);
int keycode;
int (*cmd) (FORM *);
}
Binding_Info;
#undef form_driver
int form_driver(
FORM *form,
FORM *form,
int c)
{ return(*(int *)0); }
#undef form_driver_w
int form_driver_w(
FORM *form,
int type,
FORM *form,
int type,
wchar_t c)
{ return(*(int *)0); }
#undef set_field_buffer
int set_field_buffer(
FIELD *field,
int buffer,
FIELD *field,
int buffer,
const char *value)
{ return(*(int *)0); }
#undef field_buffer
char *field_buffer(
const FIELD *field,
const FIELD *field,
int buffer)
{ return(*(char **)0); }
#undef _nc_Widen_String
wchar_t *_nc_Widen_String(
char *source,
char *source,
int *lengthp)
{ return(*(wchar_t **)0); }
@ -535,7 +535,7 @@ wchar_t *_nc_Widen_String(
#undef set_field_init
int set_field_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -546,7 +546,7 @@ Form_Hook field_init(
#undef set_field_term
int set_field_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -557,7 +557,7 @@ Form_Hook field_term(
#undef set_form_init
int set_form_init(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -568,7 +568,7 @@ Form_Hook form_init(
#undef set_form_term
int set_form_term(
FORM *form,
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
@ -581,7 +581,7 @@ Form_Hook form_term(
#undef set_form_opts
int set_form_opts(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -592,13 +592,13 @@ Form_Options form_opts(
#undef form_opts_on
int form_opts_on(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts_off
int form_opts_off(
FORM *form,
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
@ -606,7 +606,7 @@ int form_opts_off(
#undef set_form_page
int set_form_page(
FORM *form,
FORM *form,
int page)
{ return(*(int *)0); }
@ -643,8 +643,8 @@ int form_request_by_name(
#undef scale_form
int scale_form(
const FORM *form,
int *rows,
const FORM *form,
int *rows,
int *cols)
{ return(*(int *)0); }
@ -652,7 +652,7 @@ int scale_form(
#undef set_form_sub
int set_form_sub(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -665,7 +665,7 @@ WINDOW *form_sub(
#undef set_form_userptr
int set_form_userptr(
FORM *form,
FORM *form,
void *usrptr)
{ return(*(int *)0); }
@ -678,7 +678,7 @@ void *form_userptr(
#undef set_form_win
int set_form_win(
FORM *form,
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
@ -748,38 +748,38 @@ FIELDTYPE *_nc_TYPE_ENUM(void)
#undef _nc_generic_fieldtype
FIELDTYPE *_nc_generic_fieldtype(
NCURSES_BOOL (*const field_check)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const char_check)(
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
int p1,
FORM *p2,
FIELD *p3,
const void *p4),
NCURSES_BOOL (*const next)(
FORM *p1,
FIELD *p2,
const void *p3),
FORM *p1,
FIELD *p2,
const void *p3),
NCURSES_BOOL (*const prev)(
FORM *p1,
FIELD *p2,
const void *p3),
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,
FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator)(
void **p1))
{ return(*(int *)0); }
#undef _nc_form_cursor
WINDOW *_nc_form_cursor(
const FORM *form,
int *pRow,
const FORM *form,
int *pRow,
int *pCol)
{ return(*(WINDOW **)0); }

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 1998-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -30,7 +30,7 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
# $Id: Caps,v 1.46 2020/10/17 21:30:19 tom Exp $
# $Id: Caps,v 1.56 2024/04/20 21:05:02 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it's there to help the terminfo maintainer avoid emitting
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@ -98,8 +98,8 @@
# 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 to the ncurses
# library what to do with the terminfo data after it's read in.
# as a terminfo object, and breaking this would be bad. It is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It's up to you what you have the compiler do with it.
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
# FORMATTING THE TABLES
#
# We manually specify a (minimum) column width for the capability name
# and terminfo code columns in the tables to achieve a consistent
# arrangement; as used here, tbl(1) cannot know the width required by
# one table's data while formatting another's.
#
# The longest capability names (C variables) are
# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
# 25n), and the longest terminfo code is "setcolor" (8n).
#
# The tables are a tight fit on traditional man(7) implementations that
# use a line length of 65n, and the "Description" column has little room
# within which the formatter can make breaking or adjustment decisions.
# Words like "micro_..._address" and "parm_..._micro" don't break.
# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%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
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%Tables of capabilities
#%.I \%ncurses
#%recognizes in a
#%.I \%term\%info
#%terminal type description and available to
#%.IR \%term\%info -using
#%code follow.
#%.bP
#%The capability name identifies the symbol by which the programmer
#%using the
#%.I \%term\%info
#%API accesses the capability.
#%.bP
#%The TI
#%.RI ( \%term\%info )
#%code is the short name used by a person composing or updating a
#%terminal type entry.
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%Whenever possible,
#%these codes are the same as or similar to those of 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.
#%.IP
#%.I \%term\%info
#%codes have no hard length limit,
#%but
#%.I \%ncurses
#%maintains an informal one of 5 characters to keep them short and to
#%allow the tabs in the source file
#%.I Caps
#%to line up nicely.
#%(Some standard codes exceed this limit regardless.)
#%.bP
#%The TC
#%.RI ( termcap )
#%code is that used by the corresponding API of
#%.IR \%ncurses .
#%(Some capabilities are new,
#%and have names that BSD
#%.I termcap
#%did not originate.)
#%.bP
#%The description field attempts to convey the capability's semantics.
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
#%The description field employs a handful of notations.
#%.TP
#%.B (P)
#%indicates that padding may be specified.
#%.TP
#%.B (P*)
#%indicates that padding may vary in proportion to the number of output
#%lines affected.
#%.TP
#%.BI # i
#%indicates the
#%.IR i th
#%parameter of a string capability;
#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
#%parameters listed.
#%.IP
#%If the description lists no parameters,
#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
#%behavior,
#%for instance if the string contains percent signs.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Boolean Capability Name TI TC Description
#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@ -252,18 +288,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@ -282,20 +316,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%but are not yet documented in the man page.
#%They came in with SVr4's printer support.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@ -314,18 +349,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@ -388,6 +421,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@ -414,8 +451,8 @@ key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
keypad_local rmkx str ke - - YBCGE leave keyboard transmit mode
keypad_xmit smkx str ks - - YBCGE enter keyboard transmit mode
lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
lab_f10 lf10 str la - - ----- label on function key f10 if not f10
@ -450,6 +487,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@ -516,6 +557,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@ -578,6 +623,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@ -601,7 +650,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@ -646,6 +695,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@ -691,19 +744,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw18.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@ -712,7 +766,7 @@ get_mouse getm str Gm - - ----- Curses should get button events, parameter #1
set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
device_type devt str dv - - ----- Indicate language/codeset support
device_type devt str dv - - ----- Indicate language, codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
@ -740,9 +794,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
#%.ad
#%
#%.in .8i
#%.PP
#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@ -751,15 +804,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
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
@ -769,7 +823,6 @@ 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
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@ -883,7 +936,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it's not listed in the
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2022,2023 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,7 +28,7 @@
#
# Author: Thomas E. Dickey
#
# $Id: Caps-ncurses,v 1.10 2020/09/29 19:05:19 tom Exp $
# $Id: Caps-ncurses,v 1.15 2023/10/28 21:55:47 tom Exp $
#
#############################################################################
#
@ -344,6 +344,7 @@ infoalias ksel kslt IBM key_select
used_by ncurses
userdef CO num n number of indexed colors overlaying RGB space
userdef E3 str - clears the terminal's scrollback buffer.
userdef NQ bool - terminal does not support query/response
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.
@ -401,7 +402,21 @@ 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 vim
userdef BD str - disables bracketed paste
userdef BE str - enables bracketed paste
userdef PE str - is sent after pasted text
userdef PS str - is sent before pasted text
userdef RV str - report terminal secondary device attributes
userdef XR str - report terminal version as a free-format string.
userdef XF bool - terminal supports xterm focus in/out
userdef fd str - disable xterm focus-events
userdef fe str - enable xterm focus-events
userdef rv str - response to RV, regular expression
userdef xr str - response to XR, regular expression
#
used_by xterm
userdef csl str - clear status line
userdef kDC3 str - alt delete-character
userdef kDC4 str - shift+alt delete-character
userdef kDC5 str - control delete-character
@ -458,4 +473,6 @@ userdef ka2 str - vt220-keypad extensions
userdef kb1 str - vt220-keypad extensions
userdef kb3 str - vt220-keypad extensions
userdef kc2 str - vt220-keypad extensions
userdef kxIN str - mouse response on focus-in
userdef kxOUT str - mouse response on focus-out
#############################################################################

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.aix4,v 1.18 2020/10/17 21:30:19 tom Exp $
# $Id: Caps.aix4,v 1.28 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it's there to help the terminfo maintainer avoid emitting
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@ -98,8 +98,8 @@
# 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 to the ncurses
# library what to do with the terminfo data after it's read in.
# as a terminfo object, and breaking this would be bad. It is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It's up to you what you have the compiler do with it.
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
# FORMATTING THE TABLES
#
# We manually specify a (minimum) column width for the capability name
# and terminfo code columns in the tables to achieve a consistent
# arrangement; as used here, tbl(1) cannot know the width required by
# one table's data while formatting another's.
#
# The longest capability names (C variables) are
# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
# 25n), and the longest terminfo code is "setcolor" (8n).
#
# The tables are a tight fit on traditional man(7) implementations that
# use a line length of 65n, and the "Description" column has little room
# within which the formatter can make breaking or adjustment decisions.
# Words like "micro_..._address" and "parm_..._micro" don't break.
# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%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
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%Tables of capabilities
#%.I \%ncurses
#%recognizes in a
#%.I \%term\%info
#%terminal type description and available to
#%.IR \%term\%info -using
#%code follow.
#%.bP
#%The capability name identifies the symbol by which the programmer
#%using the
#%.I \%term\%info
#%API accesses the capability.
#%.bP
#%The TI
#%.RI ( \%term\%info )
#%code is the short name used by a person composing or updating a
#%terminal type entry.
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%Whenever possible,
#%these codes are the same as or similar to those of 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.
#%.IP
#%.I \%term\%info
#%codes have no hard length limit,
#%but
#%.I \%ncurses
#%maintains an informal one of 5 characters to keep them short and to
#%allow the tabs in the source file
#%.I Caps
#%to line up nicely.
#%(Some standard codes exceed this limit regardless.)
#%.bP
#%The TC
#%.RI ( termcap )
#%code is that used by the corresponding API of
#%.IR \%ncurses .
#%(Some capabilities are new,
#%and have names that BSD
#%.I termcap
#%did not originate.)
#%.bP
#%The description field attempts to convey the capability's semantics.
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
#%The description field employs a handful of notations.
#%.TP
#%.B (P)
#%indicates that padding may be specified.
#%.TP
#%.B (P*)
#%indicates that padding may vary in proportion to the number of output
#%lines affected.
#%.TP
#%.BI # i
#%indicates the
#%.IR i th
#%parameter of a string capability;
#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
#%parameters listed.
#%.IP
#%If the description lists no parameters,
#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
#%behavior,
#%for instance if the string contains percent signs.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Boolean Capability Name TI TC Description
#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@ -252,18 +288,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@ -282,20 +316,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%but are not yet documented in the man page.
#%They came in with SVr4's printer support.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@ -314,18 +349,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@ -388,6 +421,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@ -450,6 +487,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@ -598,6 +639,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@ -671,6 +716,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@ -703,7 +752,7 @@ key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@ -748,6 +797,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@ -793,19 +846,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw18.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@ -842,9 +896,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
#%.ad
#%
#%.in .8i
#%.PP
#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@ -853,15 +906,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
#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
@ -871,7 +925,6 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#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
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@ -985,7 +1038,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it's not listed in the
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2002-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.hpux11,v 1.16 2020/10/17 21:30:19 tom Exp $
# $Id: Caps.hpux11,v 1.26 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it's there to help the terminfo maintainer avoid emitting
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@ -98,8 +98,8 @@
# 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 to the ncurses
# library what to do with the terminfo data after it's read in.
# as a terminfo object, and breaking this would be bad. It is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It's up to you what you have the compiler do with it.
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
# FORMATTING THE TABLES
#
# We manually specify a (minimum) column width for the capability name
# and terminfo code columns in the tables to achieve a consistent
# arrangement; as used here, tbl(1) cannot know the width required by
# one table's data while formatting another's.
#
# The longest capability names (C variables) are
# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
# 25n), and the longest terminfo code is "setcolor" (8n).
#
# The tables are a tight fit on traditional man(7) implementations that
# use a line length of 65n, and the "Description" column has little room
# within which the formatter can make breaking or adjustment decisions.
# Words like "micro_..._address" and "parm_..._micro" don't break.
# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%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
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%Tables of capabilities
#%.I \%ncurses
#%recognizes in a
#%.I \%term\%info
#%terminal type description and available to
#%.IR \%term\%info -using
#%code follow.
#%.bP
#%The capability name identifies the symbol by which the programmer
#%using the
#%.I \%term\%info
#%API accesses the capability.
#%.bP
#%The TI
#%.RI ( \%term\%info )
#%code is the short name used by a person composing or updating a
#%terminal type entry.
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%Whenever possible,
#%these codes are the same as or similar to those of 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.
#%.IP
#%.I \%term\%info
#%codes have no hard length limit,
#%but
#%.I \%ncurses
#%maintains an informal one of 5 characters to keep them short and to
#%allow the tabs in the source file
#%.I Caps
#%to line up nicely.
#%(Some standard codes exceed this limit regardless.)
#%.bP
#%The TC
#%.RI ( termcap )
#%code is that used by the corresponding API of
#%.IR \%ncurses .
#%(Some capabilities are new,
#%and have names that BSD
#%.I termcap
#%did not originate.)
#%.bP
#%The description field attempts to convey the capability's semantics.
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
#%The description field employs a handful of notations.
#%.TP
#%.B (P)
#%indicates that padding may be specified.
#%.TP
#%.B (P*)
#%indicates that padding may vary in proportion to the number of output
#%lines affected.
#%.TP
#%.BI # i
#%indicates the
#%.IR i th
#%parameter of a string capability;
#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
#%parameters listed.
#%.IP
#%If the description lists no parameters,
#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
#%behavior,
#%for instance if the string contains percent signs.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Boolean Capability Name TI TC Description
#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@ -235,7 +271,7 @@ dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t106
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)
# end Booleans for HPUX 9, 10 (non-color curses)
needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
hard_cursor chts bool HC - - ----- cursor is hard to see
@ -253,18 +289,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@ -284,20 +318,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%but are not yet documented in the man page.
#%They came in with SVr4's printer support.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@ -316,18 +351,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@ -390,6 +423,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@ -452,6 +489,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@ -517,6 +558,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@ -577,6 +622,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@ -609,7 +658,7 @@ key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
req_for_input rfi str RF - - ----- send next input char (for ptys)
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@ -654,6 +703,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@ -699,19 +752,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw18.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@ -748,9 +802,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
#%.ad
#%
#%.in .8i
#%.PP
#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@ -759,17 +812,18 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%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;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
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 Q1 - - ----- Enter horizontal highlight mode
enter_left_hl_mode elhlm str Q2 - - ----- Enter left highlight mode
@ -785,7 +839,6 @@ 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
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@ -899,7 +952,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it's not listed in the
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -30,7 +30,7 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
# $Id: Caps.keys,v 1.15 2020/10/17 21:30:19 tom Exp $
# $Id: Caps.keys,v 1.25 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
@ -50,7 +50,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@ -60,7 +60,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it's there to help the terminfo maintainer avoid emitting
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@ -100,8 +100,8 @@
# 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 to the ncurses
# library what to do with the terminfo data after it's read in.
# as a terminfo object, and breaking this would be bad. It is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@ -110,7 +110,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It's up to you what you have the compiler do with it.
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@ -155,67 +155,104 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
# FORMATTING THE TABLES
#
# We manually specify a (minimum) column width for the capability name
# and terminfo code columns in the tables to achieve a consistent
# arrangement; as used here, tbl(1) cannot know the width required by
# one table's data while formatting another's.
#
# The longest capability names (C variables) are
# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
# 25n), and the longest terminfo codes are "setcolor", "kcdelete",
# "kcinsert", "kadelete", and "kcinsert" (8n).
#
# The tables are a tight fit on traditional man(7) implementations that
# use a line length of 65n, and the "Description" column has little room
# within which the formatter can make breaking or adjustment decisions.
# Words like "micro_..._address" and "parm_..._micro" don't break.
# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%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
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%Tables of capabilities
#%.I \%ncurses
#%recognizes in a
#%.I \%term\%info
#%terminal type description and available to
#%.IR \%term\%info -using
#%code follow.
#%.bP
#%The capability name identifies the symbol by which the programmer
#%using the
#%.I \%term\%info
#%API accesses the capability.
#%.bP
#%The TI
#%.RI ( \%term\%info )
#%code is the short name used by a person composing or updating a
#%terminal type entry.
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%Whenever possible,
#%these codes are the same as or similar to those of 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.
#%.IP
#%.I \%term\%info
#%codes have no hard length limit,
#%but
#%.I \%ncurses
#%maintains an informal one of 5 characters to keep them short and to
#%allow the tabs in the source file
#%.I Caps
#%to line up nicely.
#%(Some standard codes exceed this limit regardless.)
#%.bP
#%The TC
#%.RI ( termcap )
#%code is that used by the corresponding API of
#%.IR \%ncurses .
#%(Some capabilities are new,
#%and have names that BSD
#%.I termcap
#%did not originate.)
#%.bP
#%The description field attempts to convey the capability's semantics.
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
#%The description field employs a handful of notations.
#%.TP
#%.B (P)
#%indicates that padding may be specified.
#%.TP
#%.B (P*)
#%indicates that padding may vary in proportion to the number of output
#%lines affected.
#%.TP
#%.BI # i
#%indicates the
#%.IR i th
#%parameter of a string capability;
#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
#%parameters listed.
#%.IP
#%If the description lists no parameters,
#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
#%behavior,
#%for instance if the string contains percent signs.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Boolean Capability Name TI TC Description
#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@ -254,18 +291,16 @@ semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@ -284,20 +319,21 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%but are not yet documented in the man page.
#%They came in with SVr4's printer support.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
@ -316,18 +352,16 @@ buttons btns num BT - - ----- number of buttons on mouse
bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
bit_image_type bitype num Yp - - ----- type of bit-image device
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@ -390,6 +424,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@ -452,6 +490,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@ -518,6 +560,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@ -580,6 +626,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@ -603,7 +653,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
label_format fln str Lf - - ----- label format
set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
@ -736,6 +786,10 @@ change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@ -781,19 +835,20 @@ superscript_characters supcs str Zv - - ----- List of superscriptable characte
these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
zero_motion zerom str Zx - - ----- No motion for subsequent character
#%.TE
#%.ad
#%
#%.PP
#%.
#%The following string capabilities are present in the SVr4.0 term structure,
#%but were originally not documented in the man page.
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw18.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
mouse_info minfo str Mi - - ----- Mouse status information
@ -830,9 +885,8 @@ pc_term_options pctrm str S6 - - ----- PC terminal options
scancode_escape scesc str S7 - - ----- Escape for scancode emulation
alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
#%.TE
#%.ad
#%
#%.in .8i
#%.PP
#%.
#%The XSI Curses standard added these hardcopy capabilities.
#%They were used in some post-4.1 versions of System V curses,
#%e.g., Solaris 2.5 and IRIX 6.x.
@ -841,15 +895,16 @@ alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulatio
#%If your compiled terminfo entries use these,
#%they may not be binary-compatible with System V terminfo
#%entries after SVr4.1; beware!
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
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
@ -859,7 +914,6 @@ 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
#
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@ -973,7 +1027,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it's not listed in the
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2002-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.osf1r5,v 1.14 2020/10/17 21:30:19 tom Exp $
# $Id: Caps.osf1r5,v 1.24 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it's there to help the terminfo maintainer avoid emitting
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@ -98,8 +98,8 @@
# 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 to the ncurses
# library what to do with the terminfo data after it's read in.
# as a terminfo object, and breaking this would be bad. It is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It's up to you what you have the compiler do with it.
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
# FORMATTING THE TABLES
#
# We manually specify a (minimum) column width for the capability name
# and terminfo code columns in the tables to achieve a consistent
# arrangement; as used here, tbl(1) cannot know the width required by
# one table's data while formatting another's.
#
# The longest capability names (C variables) are
# "enter_near_letter_quality" and "bit_image_carriage_return" (tied at
# 25n), and the longest terminfo code is "setcolor" (8n).
#
# The tables are a tight fit on traditional man(7) implementations that
# use a line length of 65n, and the "Description" column has little room
# within which the formatter can make breaking or adjustment decisions.
# Words like "micro_..._address" and "parm_..._micro" don't break.
# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%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
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%Tables of capabilities
#%.I \%ncurses
#%recognizes in a
#%.I \%term\%info
#%terminal type description and available to
#%.IR \%term\%info -using
#%code follow.
#%.bP
#%The capability name identifies the symbol by which the programmer
#%using the
#%.I \%term\%info
#%API accesses the capability.
#%.bP
#%The TI
#%.RI ( \%term\%info )
#%code is the short name used by a person composing or updating a
#%terminal type entry.
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%Whenever possible,
#%these codes are the same as or similar to those of 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.
#%.IP
#%.I \%term\%info
#%codes have no hard length limit,
#%but
#%.I \%ncurses
#%maintains an informal one of 5 characters to keep them short and to
#%allow the tabs in the source file
#%.I Caps
#%to line up nicely.
#%(Some standard codes exceed this limit regardless.)
#%.bP
#%The TC
#%.RI ( termcap )
#%code is that used by the corresponding API of
#%.IR \%ncurses .
#%(Some capabilities are new,
#%and have names that BSD
#%.I termcap
#%did not originate.)
#%.bP
#%The description field attempts to convey the capability's semantics.
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
#%The description field employs a handful of notations.
#%.TP
#%.B (P)
#%indicates that padding may be specified.
#%.TP
#%.B (P*)
#%indicates that padding may vary in proportion to the number of output
#%lines affected.
#%.TP
#%.BI # i
#%indicates the
#%.IR i th
#%parameter of a string capability;
#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
#%parameters listed.
#%.IP
#%If the description lists no parameters,
#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
#%behavior,
#%for instance if the string contains percent signs.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Boolean Capability Name TI TC Description
#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@ -252,18 +288,16 @@ prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@ -298,18 +332,16 @@ output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inc
print_rate cps num Ym - - ----- print rate in characters per second
wide_char_size widcs num Yn - - ----- character step size when in double wide mode
#%.TE
#%.ad
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@ -372,6 +404,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@ -434,6 +470,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@ -589,6 +629,10 @@ ena_acs enacs str eA - - ----- enable alternate char set
end_bit_image_region endbi str Yy - - ----- End a bit-image region
enter_am_mode smam str SA - - ----- turn on automatic margins
enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
enter_italics_mode sitm str ZH - - ----- Enter italic mode
enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
@ -635,6 +679,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@ -673,6 +721,10 @@ key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
key_restart krst str &4 KEY_RESTART 0567 ----- restart key
key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
#%.TE
#%.TS
#%center;
#%Lbw(25n)2 Lbw(8n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@ -743,7 +795,7 @@ set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
set_color_band setcolor str Yz - - ----- Change to ribbon color #1
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
set_page_length slines str YZ - - ----- Set page length to #1 lines
@ -891,7 +943,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it's not listed in the
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#

View file

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2023,2024 Thomas E. Dickey #
# Copyright 2001-2015,2016 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.uwin,v 1.13 2020/10/17 21:30:19 tom Exp $
# $Id: Caps.uwin,v 1.23 2024/04/20 21:05:02 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
@ -48,7 +48,7 @@
#
# Column 1: terminfo variable name
# Column 2: terminfo capability name
# Column 3: capability type (boolean, numeric, or string)
# Column 3: capability type (Boolean, numeric, or string)
# Column 4: termcap capability name
# Column 5: KEY_xxx name, if any, `-' otherwise
# Column 6: value for KEY_xxx name, if any, `-' otherwise
@ -58,7 +58,7 @@
#
# The codes following [Y-] in column 7 describe the versions of termcap which
# use the given capability. This information is not used by the curses library
# proper; rather, it's there to help the terminfo maintainer avoid emitting
# proper; rather, it is there to help the terminfo maintainer avoid emitting
# termcap entry translations that are more than 1023 bytes long (and tank a
# lot of old termcap-using programs). The codes read as follows:
# B = mentioned in the BSD man page for 4.4BSD curses
@ -98,8 +98,8 @@
# 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 to the ncurses
# library what to do with the terminfo data after it's read in.
# as a terminfo object, and breaking this would be bad. It is up to the ncurses
# library what to do with the terminfo data after it is read in.
#
# 4. List it in the aliases table with an IGNORE target field. If you
# do this, the capability will be ignored on input (though the user will
@ -108,7 +108,7 @@
# 5. List it in the extensions table. If you do this, the compiler will
# silently accept the capability, but the curses library proper will never
# see it (because it won't be written out as part of the terminfo object
# format). It's up to you what you have the compiler do with it.
# format). It is up to you what you have the compiler do with it.
#
# There are two opposite reasons to choose option 5. One is when you want
# to eat the capability silently and discard it when doing translations
@ -153,67 +153,103 @@
# to buy space for non-essentials Emacs is still using. Capabilities high
# on that hit list: rc, sc, uc.
#
# FORMATTING THE TABLES
#
# We manually specify a (minimum) column width for the capability name
# and terminfo code columns in the tables to achieve a consistent
# arrangement; as used here, tbl(1) cannot know the width required by
# one table's data while formatting another's.
#
# The longest capability names (C variable) is
# "hue_lightness_saturation" (24n), and the longest terminfo code is
# "colornm" (7n).
#
# The tables are a tight fit on traditional man(7) implementations that
# use a line length of 65n, and the "Description" column has little room
# within which the formatter can make breaking or adjustment decisions.
# Words like "micro_..._address" and "parm_..._micro" don't break.
# Reducing the inter-column gaps to 2 ens gives them enough room. --GBR
#
#############################################################################
#
# STANDARD CAPABILITIES
#
#%The following is a complete table of the capabilities included in a
#%terminfo description block and available to terminfo-using code. In each
#%line of the table,
#%
#%The \fBvariable\fR is the name by which the programmer (at the terminfo level)
#%accesses the capability.
#%
#%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
#%identical or very similar names). Semantics are also intended to match
#%those of the specification.
#%
#%The termcap code is the old
#%.B termcap
#%capability name (some capabilities are new, and have names which termcap
#%did not originate).
#%.P
#%Capability names have no hard length limit, but an informal limit of 5
#%characters has been adopted to keep them short and to allow the tabs in
#%the source file
#%.B Caps
#%to line up nicely.
#%
#%Finally, the description field attempts to convey the semantics of the
#%capability. You may find some codes in the description field:
#%.TP
#%(P)
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%Tables of capabilities
#%.I \%ncurses
#%recognizes in a
#%.I \%term\%info
#%terminal type description and available to
#%.IR \%term\%info -using
#%code follow.
#%.bP
#%The capability name identifies the symbol by which the programmer
#%using the
#%.I \%term\%info
#%API accesses the capability.
#%.bP
#%The TI
#%.RI ( \%term\%info )
#%code is the short name used by a person composing or updating a
#%terminal type entry.
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of
#%lines affected
#%.TP
#%(#\d\fIi\fP\u)
#%indicates the \fIi\fP\uth\d parameter.
#%
#%Whenever possible,
#%these codes are the same as or similar to those of 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.
#%.IP
#%.I \%term\%info
#%codes have no hard length limit,
#%but
#%.I \%ncurses
#%maintains an informal one of 5 characters to keep them short and to
#%allow the tabs in the source file
#%.I Caps
#%to line up nicely.
#%(Some standard codes exceed this limit regardless.)
#%.bP
#%The TC
#%.RI ( termcap )
#%code is that used by the corresponding API of
#%.IR \%ncurses .
#%(Some capabilities are new,
#%and have names that BSD
#%.I termcap
#%did not originate.)
#%.bP
#%The description field attempts to convey the capability's semantics.
#%.PP
#% These are the boolean capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBBooleans name Code\fR
#%The description field employs a handful of notations.
#%.TP
#%.B (P)
#%indicates that padding may be specified.
#%.TP
#%.B (P*)
#%indicates that padding may vary in proportion to the number of output
#%lines affected.
#%.TP
#%.BI # i
#%indicates the
#%.IR i th
#%parameter of a string capability;
#%the programmer should pass the string to \fB\%tparm\fP(3X) with the
#%parameters listed.
#%.IP
#%If the description lists no parameters,
#%passing the string to \fB\%tparm\fP(3X) may produce unexpected
#%behavior,
#%for instance if the string contains percent signs.
#%.
#%.PP
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
#%\& Code \&
#%Boolean Capability Name TI TC Description
#%_
auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
auto_right_margin am bool am - - YBCGE terminal has automatic margins
no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
@ -245,18 +281,16 @@ back_color_erase bce bool ut - - ----- screen erased with background color
can_change ccc bool cc - - ----- terminal can re-define existing colors
hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
#%.TE
#%.ad
#%
#%These are the numeric capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBNumeric name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
#%\& Code \&
#%Numeric Capability Name TI TC Description
#%_
columns cols num co - - YBCGE number of columns in a line
init_tabs it num it - - YB-G- tabs initially every # spaces
lines lines num li - - YBCGE number of lines on screen or page
@ -276,24 +310,16 @@ max_colors colors num Co - - ----- maximum number of colors on screen
max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
#%.TE
#%.ad
#%
#%The following numeric capabilities are present in the SVr4.0 term structure,
#%but are not yet documented in the man page. They came in with SVr4's
#%printer support.
#%
#%.na
#%
#%These are the string capabilities:
#%
#%.na
#%.TS H
#%center expand;
#%c l l c
#%c l l c
#%lw25 lw6 lw2 lw20.
#%\fBVariable Cap- TCap Description\fR
#%\fBString name Code\fR
#%.PP
#%.
#%.TS
#%center;
#%Lb Cb S Lb
#%Lb Lb Lb Lb
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
#%\& Code \&
#%String Capability Name TI TC Description
#%_
back_tab cbt str bt - - YBCGE back tab (P)
bell bel str bl - - YB-GE audible signal (bell) (P)
carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
@ -356,6 +382,10 @@ key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
#%.TE
#%.TS
#%center;
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
@ -418,6 +448,10 @@ prtr_on mc5 str po - - -B-G-* turn on printer
repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
reset_1string rs1 str r1 - - -B--- reset string
reset_2string rs2 str r2 - - -B--- reset string
#%.TE
#%.TS
#%center;
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
reset_3string rs3 str r3 - - -B--- reset string
reset_file rf str rf - - -B--- name of reset file
restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
@ -484,6 +518,10 @@ key_resume kres str &5 KEY_RESUME 0570 ----- resume key
key_save ksav str &6 KEY_SAVE 0571 ----- save key
key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
key_undo kund str &8 KEY_UNDO 0630 ----- undo key
#%.TE
#%.TS
#%center;
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
@ -546,6 +584,10 @@ key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
#%.TE
#%.TS
#%center;
#%Lbw(24n)2 Lbw(7n)2 Lb2 Lx.
key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
@ -569,7 +611,7 @@ key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
clr_bol el1 str cb - - ----- Clear to beginning of line
clear_margins mgc str MC - - ----- clear right and left soft margins
set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
set_left_margin smgl str ML - - ----- set left soft margin at current column (not in BSD \fItermcap\fP)
set_right_margin smgr str MR - - ----- set right soft margin at current column
device_type devt str dv - - ----- Indicate language/codeset support
code_set_init csin str ci - - ----- Init sequence for multiple codesets
@ -593,7 +635,6 @@ set_background setb str Sb - - ----- Set background color #1
set_color_pair scp str sp - - ----- Set current color pair to #1
set_foreground setf str Sf - - ----- Set foreground color #1
#%.TE
#%.ad
#%
# The magic token below tells the tic compiler-generator code that all the caps
# past it should be ignored (not written out) when dumping terminfo objects. It
@ -707,7 +748,7 @@ has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
return_does_clr_eol OTxr bool xr - - YB--- return clears the line
# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
#
# mytinfo described this as a termcap capability, but it's not listed in the
# mytinfo described this as a termcap capability, but it is not listed in the
# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
# package, like System V, behaves as though it is always true.
#

View file

@ -1,7 +1,7 @@
#! /bin/sh
# $Id: MKkey_defs.sh,v 1.21 2020/08/17 10:45:33 tom Exp $
# $Id: MKkey_defs.sh,v 1.24 2024/01/19 12:26:17 tom Exp $
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2022,2024 Thomas E. Dickey #
# Copyright 2001-2013,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -35,7 +35,7 @@
#
# Extract function-key definitions from the Caps file
#
: ${AWK-awk}
: "${AWK-awk}"
test $# = 0 && set Caps
@ -44,7 +44,8 @@ pass1=pass1_$$
pass2=pass2_$$
pass3=pass3_$$
pass4=pass4_$$
trap 'rm -f $data pass[1234]_$$' EXIT INT QUIT TERM HUP
trap 'rm -f $data pass[1234]_$$; exit 1' 1 2 3 15
trap 'rm -f $data pass[1234]_$$' 0
# change repeated tabs (used for readability) to single tabs (needed to make
# awk see the right field alignment of the corresponding columns):
@ -63,10 +64,10 @@ fi
# add keys that we generate automatically:
cat >>$data <<EOF
key_resize kr1 str R1 KEY_RESIZE + NCURSES_EXT_FUNCS Terminal resize event
key_resize kr1 str R1 KEY_RESIZE + NCURSES_SIGWINCH Terminal resize event
EOF
THIS=./`basename $0`
THIS=./`basename "$0"`
cat <<EOF
/*
@ -145,7 +146,7 @@ $5 != "-" && $6 != "-" {
if (index($7,"NCURSES_") == 1) {
ifdef = 1;
printf "\n";
printf "#ifdef %s\n", $7;
printf "#if %s\n", $7;
}
if ($5 == "KEY_F(0)" ) {
printf "#define "

View file

@ -1,7 +1,7 @@
#! /bin/sh
# $Id: MKncurses_def.sh,v 1.4 2020/02/02 23:34:34 tom Exp $
# $Id: MKncurses_def.sh,v 1.5 2022/07/16 17:03:59 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 2020,2022 Thomas E. Dickey #
# Copyright 2000,2003 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -56,7 +56,7 @@ cat <<EOF
EOF
${AWK-awk} <$DEFS '
"${AWK-awk}" <"$DEFS" '
!/^[@#]/ {
if ( NF == 1 )
{

View file

@ -26,7 +26,7 @@ BEGIN {
lcurl = "{";
rcurl = "}";
print "/****************************************************************************"
print " * Copyright 2018-2019,2020 Thomas E. Dickey *"
print " * Copyright 2018-2021,2023 Thomas E. Dickey *"
print " * Copyright 1998-2013,2017 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
@ -60,7 +60,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
print "/* $Id: MKterm.h.awk.in,v 1.78 2020/10/31 23:14:24 tom Exp $ */"
print "/* $Id: MKterm.h.awk.in,v 1.85 2023/04/23 19:15:36 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@ -244,28 +244,28 @@ END {
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 " * The first field in TERMINAL is used in macros."
print " * The remaining fields are private."
print " */"
print "#ifdef NCURSES_INTERNALS"
print ""
print "#undef TERMINAL"
print "#define TERMINAL struct term"
print "TERMINAL;"
print ""
if (@NCURSES_EXT_COLORS@) {
declare_termtype("int","2");
} else {
print "typedef TERMTYPE TERMTYPE2;"
print "#undef TERMTYPE2"
print "#define TERMTYPE2 TERMTYPE"
}
print "#else"
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 ""
print "#endif /* NCURSES_INTERNALS */"
print ""
print ""
@ -325,16 +325,11 @@ END {
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(char *) _nc_tiparm(int, const char *, ...);"
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 "#endif /* NCURSES_INTERNALS */"
print ""
print "/*"
print " * Normal entry points"
print " */"
@ -360,6 +355,8 @@ END {
print "#endif"
print ""
print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
print "extern NCURSES_EXPORT(char *) tiparm_s (int, int, const char *, ...); /* special */"
print "extern NCURSES_EXPORT(int) tiscan_s (int *, int *, const char *); /* special */"
print ""
print "#endif /* __NCURSES_H */"
print ""
@ -406,7 +403,7 @@ END {
print "/*"
print " * Debugging features."
print " */"
print "extern NCURSES_EXPORT(void) exit_terminfo(int) GCC_NORETURN;"
print "extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);"
print ""
print "#ifdef __cplusplus"
printf "%s\n", rcurl;

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.51 2020/09/18 22:55:10 tom Exp $
# $Id: Makefile.in,v 1.53 2021/07/03 18:56:51 tom Exp $
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2020,2021 Thomas E. Dickey #
# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -92,6 +92,21 @@ AUTO_SRC = \
term.h
################################################################################
@MAKE_PHONY@.PHONY : all
@MAKE_PHONY@.PHONY : check
@MAKE_PHONY@.PHONY : clean
@MAKE_PHONY@.PHONY : depend
@MAKE_PHONY@.PHONY : distclean
@MAKE_PHONY@.PHONY : install
@MAKE_PHONY@.PHONY : install.libs
@MAKE_PHONY@.PHONY : libs
@MAKE_PHONY@.PHONY : mostlyclean
@MAKE_PHONY@.PHONY : realclean
@MAKE_PHONY@.PHONY : sources
@MAKE_PHONY@.PHONY : uninstall
@MAKE_PHONY@.PHONY : uninstall.libs
all \
libs \
depend \

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,11 +33,11 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: capdefaults.c,v 1.15 2020/02/02 23:34:34 tom Exp $ */
/* $Id: capdefaults.c,v 1.16 2021/09/04 10:52:55 tom Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file is
* that the two places where it's needed want the macros to generate
* that the two places where it is needed require the macros to generate
* offsets to different structures. See the file Caps for explanations of
* these conversions.
*

View file

@ -1,4 +1,4 @@
/* $Id*/
/* $Id: curses.events,v 1.4 2024/01/19 09:24:17 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@ -50,6 +50,6 @@ typedef struct
extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
#define KEY_EVENT 0633 /* We were interrupted by an event */
#define KEY_EVENT 0634 /* We were interrupted by an event */
#endif /* NCURSES_WGETCH_EVENTS */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2023,2024 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,11 +33,40 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: curses.h.in,v 1.269 2020/08/17 14:14:12 tom Exp $ */
/* $Id: curses.h.in,v 1.282 2024/01/19 11:50:07 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
/*
The symbols beginning NCURSES_ or USE_ are configuration choices.
A few of the former can be overridden by applications at compile-time.
Most of the others correspond to configure-script options (or checks
by the configure-script for features of the system on which it is built).
These symbols can be overridden by applications at compile-time:
NCURSES_NOMACROS suppresses macro definitions in favor of functions
NCURSES_WATTR_MACROS suppresses wattr_* macro definitions
NCURSES_WIDECHAR is an alternative for declaring wide-character functions.
These symbols are used only when building ncurses:
NCURSES_ATTR_T
NCURSES_FIELD_INTERNALS
NCURSES_INTERNALS
These symbols are set by the configure script:
NCURSES_ENABLE_STDBOOL_H
NCURSES_EXPANDED
NCURSES_EXT_COLORS
NCURSES_EXT_FUNCS
NCURSES_EXT_PUTWIN
NCURSES_NO_PADDING
NCURSES_OSPEED_COMPAT
NCURSES_PATHSEP
NCURSES_REENTRANT
NCURSES_SIGWINCH
*/
#define CURSES 1
#define CURSES_H 1
@ -60,10 +89,22 @@
*/
#include <ncurses_dll.h>
/*
* Extra headers.
*/
#if @HAVE_STDINT_H@
#include <stdint.h>
#endif
#ifdef __cplusplus
#else
#if @HAVE_STDNORETURN_H@
#include <stdnoreturn.h>
#undef GCC_NORETURN
#define GCC_NORETURN _Noreturn
#endif
#endif
/*
* User-definable tweak to disable the include of <stdbool.h>.
*/
@ -130,6 +171,19 @@
#define NCURSES_REENTRANT @cf_cv_enable_reentrant@
#endif
/*
* KEY_RESIZE is an extended feature that relies upon the SIGWINCH handler
* in ncurses.
*/
#if @NCURSES_EXT_FUNCS@
#ifndef NCURSES_SIGWINCH
#define NCURSES_SIGWINCH @cf_cv_enable_sigwinch@
#endif
#else
#undef NCURSES_SIGWINCH
#define NCURSES_SIGWINCH 0
#endif
/*
* In certain environments, we must work around linker problems for data
*/
@ -391,7 +445,14 @@ extern NCURSES_EXPORT_VAR(chtype) acs_map[];
*/
#define _NEWINDEX -1
#ifdef NCURSES_INTERNALS
#undef SCREEN
#define SCREEN struct screen
SCREEN;
#else
typedef struct screen SCREEN;
#endif
typedef struct _win_st WINDOW;
typedef chtype attr_t; /* ...must be at least as wide as chtype */
@ -510,14 +571,10 @@ struct _win_st
/*
* We cannot define these in ncurses_cfg.h, since they require parameters to be
* passed (that is non-portable). If you happen to be using gcc with warnings
* enabled, define
* GCC_PRINTF
* GCC_SCANF
* to improve checking of calls to printw(), etc.
* passed (that is non-portable).
*/
#ifndef GCC_PRINTFLIKE
#if defined(GCC_PRINTF) && !defined(printf)
#ifndef printf
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#else
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
@ -525,7 +582,7 @@ struct _win_st
#endif
#ifndef GCC_SCANFLIKE
#if defined(GCC_SCANF) && !defined(scanf)
#ifndef scanf
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
#else
#define GCC_SCANFLIKE(fmt,var) /*nothing*/
@ -773,10 +830,14 @@ 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) 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) vwprintw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_printw) /* implemented */
GCC_PRINTFLIKE(2,0);
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *, va_list) /* implemented */
GCC_PRINTFLIKE(2,0);
extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_scanw) /* implemented */
GCC_SCANFLIKE(2,0);
extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *, va_list) /* implemented */
GCC_SCANFLIKE(2,0);
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 */
@ -849,6 +910,8 @@ extern NCURSES_EXPORT(char *) tparm (const char *, NCURSES_TPARM_ARG,NCURSES_TPA
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
extern NCURSES_EXPORT(char *) tiparm_s (int, int, const char *, ...); /* special */
extern NCURSES_EXPORT(int) tiscan_s (int *, int *, const char *); /* special */
/*
* These functions are not in X/Open, but we use them in macro definitions:
@ -878,11 +941,9 @@ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */
#define NCURSES_EXT_FUNCS @NCURSES_PATCH@
typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);
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(const char *) curses_version (void);
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 *);
@ -892,20 +953,31 @@ 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) is_cbreak(void);
extern NCURSES_EXPORT(int) is_echo(void);
extern NCURSES_EXPORT(int) is_nl(void);
extern NCURSES_EXPORT(int) is_raw(void);
extern NCURSES_EXPORT(bool) is_term_resized (int, int);
extern NCURSES_EXPORT(int) key_defined (const char *);
extern NCURSES_EXPORT(char *) keybound (int, int);
extern NCURSES_EXPORT(int) keyok (int, bool);
extern NCURSES_EXPORT(void) nofilter(void);
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);
extern NCURSES_EXPORT(int) set_tabsize (int);
extern NCURSES_EXPORT(int) use_default_colors (void);
extern NCURSES_EXPORT(int) use_extended_names (bool);
extern NCURSES_EXPORT(int) use_legacy_coding (int);
extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *);
extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *);
extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int);
extern NCURSES_EXPORT(void) nofilter(void);
#if @NCURSES_XNAMES@
#undef NCURSES_XNAMES
#define NCURSES_XNAMES @NCURSES_XNAMES@
extern NCURSES_EXPORT(int) use_extended_names (bool);
#endif
/*
* These extensions provide access to information stored in the WINDOW even
@ -1020,20 +1092,24 @@ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_tioctl) (SCREEN*, bool); /* impl
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */
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(get_escdelay) (SCREEN*); /* 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(int) NCURSES_SP_NAME(is_cbreak) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_echo) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_nl) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(is_raw) (SCREEN*); /* 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(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* 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 */

View file

@ -1,4 +1,4 @@
/* $Id: curses.tail,v 1.25 2019/12/14 22:28:39 tom Exp $ */
/* $Id: curses.tail,v 1.27 2023/08/05 19:43:46 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@ -13,12 +13,12 @@
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6))
#endif
#define NCURSES_BUTTON_RELEASED 001L
#define NCURSES_BUTTON_PRESSED 002L
#define NCURSES_BUTTON_CLICKED 004L
#define NCURSES_DOUBLE_CLICKED 010L
#define NCURSES_TRIPLE_CLICKED 020L
#define NCURSES_RESERVED_EVENT 040L
#define NCURSES_BUTTON_RELEASED 001UL
#define NCURSES_BUTTON_PRESSED 002UL
#define NCURSES_BUTTON_CLICKED 004UL
#define NCURSES_DOUBLE_CLICKED 010UL
#define NCURSES_TRIPLE_CLICKED 020UL
#define NCURSES_RESERVED_EVENT 040UL
/* event masks */
#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)
@ -174,7 +174,7 @@ 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;
extern GCC_NORETURN NCURSES_EXPORT(void) exit_curses (int);
#include <unctrl.h>

View file

@ -1,4 +1,4 @@
/* $Id: curses.wide,v 1.50 2017/03/26 16:05:21 tom Exp $ */
/* $Id: curses.wide,v 1.51 2021/05/22 20:28:29 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@ -219,10 +219,12 @@ extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* imple
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(erasewchar) (SCREEN*, wchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(killwchar) (SCREEN*, wchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
#endif
#ifndef NCURSES_NOMACROS

View file

@ -1,7 +1,7 @@
#!/bin/sh
# $Id: edit_cfg.sh,v 1.14 2020/02/02 23:34:34 tom Exp $
# $Id: edit_cfg.sh,v 1.16 2022/07/16 18:02:32 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 2020,2022 Thomas E. Dickey #
# Copyright 1998-2001,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -39,15 +39,16 @@
#
BAK=save$$
TMP=edit$$
trap "rm -f $BAK $TMP" 0 1 2 3 15
trap "rm -f $BAK $TMP; exit 1" 1 2 3 15
trap "rm -f $BAK $TMP" 0
for name in \
HAVE_TCGETATTR \
HAVE_TERMIOS_H \
HAVE_TERMIO_H \
BROKEN_LINKER
do
mv $2 $BAK
if ( grep "[ ]$name[ ]" $1 2>&1 >$TMP )
mv "$2" "$BAK"
if ( grep "[ ]${name}[ ]" "$1" >$TMP 2>&1 )
then
value=1
else
@ -58,11 +59,11 @@ do
-e "s@#define ${name}.*\$@#define $name $value@" \
-e "s@#if $name\$@#if $value /* $name */@" \
-e "s@#if !$name\$@#if $value /* !$name */@" \
$BAK >$2
if (cmp -s $2 $BAK)
"$BAK" >"$2"
if (cmp -s "$2" "$BAK")
then
mv $BAK $2
mv "$BAK" "$2"
else
rm -f $BAK
rm -f "$BAK"
fi
done

View file

@ -1,6 +1,6 @@
# $Id: headers,v 1.15 2020/08/29 18:51:13 tom Exp $
# $Id: headers,v 1.16 2023/04/22 12:09:09 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 2020,2023 Thomas E. Dickey #
# Copyright 1998-2012,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -39,11 +39,9 @@ ncurses_dll.h
term.h
termcap.h
# Headers used only for tic, other programs using internal interfaces
# Header used by tack 1.08
@ ticlib
$(srcdir)/tic.h
$(srcdir)/term_entry.h
$(srcdir)/nc_tparm.h
# Porting
@ port_win32con

View file

@ -0,0 +1,80 @@
/****************************************************************************
* Copyright 2021,2023 Thomas E. Dickey *
* *
* 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. *
****************************************************************************/
/* $Id: nc_access.h,v 1.6 2023/05/06 10:54:55 tom Exp $ */
#ifndef NC_ACCESS_included
#define NC_ACCESS_included 1
/* *INDENT-OFF* */
#include <ncurses_cfg.h>
#include <curses.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Turn off the 'use_terminfo_vars()' symbol to limit access to environment
* variables when running with privileges.
*/
#if defined(USE_ROOT_ENVIRON) && defined(USE_SETUID_ENVIRON)
#define use_terminfo_vars() 1
#else
#define use_terminfo_vars() _nc_env_access()
#endif
extern NCURSES_EXPORT(int) _nc_env_access (void);
/*
* Turn off this symbol to limit access to files when running setuid.
*/
#ifdef USE_ROOT_ACCESS
#define safe_fopen(name,mode) fopen(name,mode)
#define safe_open2(name,flags) open(name,flags)
#define safe_open3(name,flags,mode) open(name,flags,mode)
#else
#define safe_fopen(name,mode) _nc_safe_fopen(name,mode)
#define safe_open2(name,flags) _nc_safe_open3(name,flags,0)
#define safe_open3(name,flags,mode) _nc_safe_open3(name,flags,mode)
extern NCURSES_EXPORT(FILE *) _nc_safe_fopen (const char *, const char *);
extern NCURSES_EXPORT(int) _nc_safe_open3 (const char *, int, mode_t);
#endif
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif /* NC_ACCESS_included */

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2019,2020 Thomas E. Dickey *
* Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -30,7 +30,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: nc_alloc.h,v 1.27 2020/07/04 20:01:13 tom Exp $ */
/* $Id: nc_alloc.h,v 1.30 2021/11/20 23:33:38 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
@ -73,27 +73,26 @@ extern "C" {
#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS
#define HAVE_NC_FREEALL 1
struct termtype;
extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN GCC_DEPRECATED("use exit_terminfo");
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_tinfo(int) 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 GCC_NORETURN NCURSES_EXPORT(void) _nc_free_tic(int);
extern void _nc_leaks_dump_entry(void);
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;
extern GCC_NORETURN NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int);
#endif
extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int);
#else /* !NCURSES_INTERNALS */
extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN GCC_DEPRECATED("use exit_curses");
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_DEPRECATED("use exit_curses");
#endif
#define ExitProgram(code) exit_curses(code)
#else
extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN GCC_DEPRECATED("use exit_curses");
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_DEPRECATED("use exit_curses");
#endif /* NO_LEAKS, etc */
#ifndef HAVE_NC_FREEALL

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2008-2010,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -31,7 +31,7 @@
* Author: Thomas Dickey, 2008-on *
****************************************************************************/
/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 tom Exp $ */
/* $Id: nc_mingw.h,v 1.10 2023/02/25 19:59:24 tom Exp $ */
#ifndef NC_MINGW_H
#define NC_MINGW_H 1
@ -50,9 +50,6 @@
#undef sleep
#define sleep(n) Sleep((n) * 1000)
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for struct timeval */
#endif
@ -67,10 +64,12 @@ extern "C" {
#include <ncurses_dll.h>
#if !HAVE_CLOCK_GETTIME && !HAVE_GETTIMEOFDAY
NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GETTIMEOFDAY 2
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#endif
#define SIGHUP 1
#define SIGKILL 9

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 Thomas E. Dickey *
* Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2012-2013,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -41,7 +41,7 @@
#endif
/*
* $Id: nc_string.h,v 1.8 2020/02/02 23:34:34 tom Exp $
* $Id: nc_string.h,v 1.9 2021/04/25 00:10:43 tom Exp $
*
* String-hacks. Use these macros to stifle warnings on (presumably) correct
* uses of strcat, strcpy and sprintf.
@ -76,7 +76,11 @@
#endif
#if USE_STRING_HACKS && HAVE_SNPRINTF
#ifdef __cplusplus
#define _nc_SPRINTF NCURSES_VOID snprintf
#else
#define _nc_SPRINTF NCURSES_VOID (snprintf)
#endif
#define _nc_SLIMIT(n) NCURSES_CAST(size_t,n),
#else
#define _nc_SPRINTF NCURSES_VOID sprintf

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2006-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -31,7 +31,7 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
/* $Id: nc_tparm.h,v 1.11 2020/05/27 23:33:31 tom Exp $ */
/* $Id: nc_tparm.h,v 1.12 2023/04/16 17:57:28 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
@ -78,6 +78,7 @@
#endif
#ifdef NCURSES_INTERNALS
#define TIPARM_0(s) _nc_tiparm(0,s)
#define TIPARM_1(s,a) _nc_tiparm(1,s,a)
#define TIPARM_2(s,a,b) _nc_tiparm(2,s,a,b)
#define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c)

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2008-2010,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -31,7 +31,7 @@
* Author: Thomas Dickey, 2008-on *
****************************************************************************/
/* $Id: nc_win32.h,v 1.9 2020/09/13 00:17:30 tom Exp $ */
/* $Id: nc_win32.h,v 1.10 2023/02/25 20:09:23 tom Exp $ */
#ifndef NC_WIN32_H
#define NC_WIN32_H 1
@ -79,9 +79,11 @@ extern "C" {
#include <ncurses_dll.h>
#if !HAVE_CLOCK_GETTIME && !HAVE_GETTIMEOFDAY
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GETTIMEOFDAY 2
extern NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
#endif
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))

View file

@ -1,6 +1,6 @@
# $Id: ncurses_defs,v 1.95 2020/08/01 19:48:21 tom Exp $
# $Id: ncurses_defs,v 1.110 2024/03/02 20:38:23 tom Exp $
##############################################################################
# Copyright 2018-2019,2020 Thomas E. Dickey #
# Copyright 2018-2023,2024 Thomas E. Dickey #
# Copyright 2000-2016,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -48,16 +48,19 @@ HAVE_BIG_CORE
HAVE_BSD_CGETENT
HAVE_BSD_SIGNAL_H
HAVE_BSD_STRING_H
HAVE_BTOWC
HAVE_BTOWC
HAVE_BUILTIN_H
HAVE_CHGAT 1
HAVE_CLOCK_GETTIME
HAVE_COLOR_CONTENT 1
HAVE_COLOR_SET 1
HAVE_CONSISTENT_GETENV
HAVE_CONSISTENT_MB_LEN_MAX
HAVE_COPYWIN 1
HAVE_CURSCR 1
HAVE_CURSES_DATA_TABSIZE 1
HAVE_CURSES_DATA_TTYTYPE 1
HAVE_CURSES_TRACE 1
HAVE_DELSCREEN 1
HAVE_DERWIN 1
HAVE_DIRENT_H
@ -68,6 +71,8 @@ HAVE_EXIT_TERMINFO 1
HAVE_FCNTL_H
HAVE_FILTER 1
HAVE_FORM_H
HAVE_FPATHCONF
HAVE_GETAUXVAL
HAVE_GETBEGX 1
HAVE_GETCURX 1
HAVE_GETCWD
@ -79,6 +84,7 @@ HAVE_GETOPT_H
HAVE_GETPARX 1
HAVE_GETTIMEOFDAY
HAVE_GETTTYNAM
HAVE_GETUID
HAVE_GETWIN 1
HAVE_GPM_H
HAVE_GPP_BUILTIN_H
@ -105,6 +111,7 @@ HAVE_LINK
HAVE_LOCALECONV
HAVE_LOCALE_H
HAVE_LONG_FILE_NAMES
HAVE_MATH_FUNCS
HAVE_MATH_H
HAVE_MBLEN
HAVE_MBRLEN
@ -119,16 +126,18 @@ HAVE_MVVLINE 1
HAVE_MVWIN 1
HAVE_MVWVLINE 1
HAVE_NANOSLEEP
HAVE_NAPMS 1
HAVE_NC_ALLOC_H
HAVE_NEWPAD 1
HAVE_PANEL_H
HAVE_PATH_TTYS
HAVE_PCRE2POSIX_H
HAVE_PCREPOSIX_H
HAVE_POLL
HAVE_POLL_H
HAVE_PURIFY
HAVE_PUTENV
HAVE_PUTWC
HAVE_PUTWC
HAVE_PUTWIN 1
HAVE_REGEXPR_H_FUNCS
HAVE_REGEXP_H_FUNCS
@ -144,6 +153,7 @@ HAVE_SELECT
HAVE_SETBUF
HAVE_SETBUFFER
HAVE_SETENV
HAVE_SETFSUID
HAVE_SETUPTERM 1
HAVE_SETVBUF
HAVE_SGTTY_H
@ -161,6 +171,7 @@ HAVE_STRSTR
HAVE_SYMLINK
HAVE_SYSCONF
HAVE_SYS_BSDTYPES_H
HAVE_SYS_AUXV_H
HAVE_SYS_IOCTL_H
HAVE_SYS_PARAM_H
HAVE_SYS_POLL_H
@ -182,20 +193,23 @@ HAVE_TERM_H 1
HAVE_TGETENT 1
HAVE_TIGETNUM 1
HAVE_TIGETSTR 1
HAVE_TIPARM 1
HAVE_TIPARM_S 1
HAVE_TISCAN_S 1
HAVE_TIMES
HAVE_TPUTS_SP
HAVE_TSEARCH
HAVE_TTYENT_H
HAVE_TYPEAHEAD 1
HAVE_TYPEINFO
HAVE_TYPE_ATTR_T
HAVE_TYPE_SIGACTION
HAVE_UNCTRL_H 1
HAVE_UNGET_WCH 1
HAVE_UNISTD_H
HAVE_UNLINK
HAVE_USE_DEFAULT_COLORS
HAVE_USE_ENV 1
HAVE_USE_EXTENDED_NAMES
HAVE_USE_EXTENDED_NAMES NCURSES_XNAMES
HAVE_USE_SCREEN
HAVE_USE_WINDOW
HAVE_VFSCANF
@ -207,16 +221,18 @@ HAVE_VW_PRINTW 1
HAVE_WCHGAT 1
HAVE_WCSRTOMBS
HAVE_WCSTOMBS
HAVE_WCTOB
HAVE_WCTOB
HAVE_WCTOMB
HAVE_WCTYPE_H
HAVE_WINSDELLN 1
HAVE_WINSSTR 1
HAVE_WMEMCHR
HAVE_WORKING_POLL
HAVE_WRESIZE
HAVE_WSYNCDOWN 1
HAVE__DOSCAN
HAVE__TRACEF
HAVE__NC_TPARM_ANALYZE 1
MIXEDCASE_FILENAMES
NCURSES_CHAR_EQ
NCURSES_EXPANDED

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2023 Thomas E. Dickey *
* Copyright 2009,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -26,7 +26,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen Exp $ */
/* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
@ -92,7 +92,11 @@
# define NCURSES_API __cdecl
#else
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# if (__GNUC__ >= 4) && !defined(__cplusplus)
# define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default")))
# else
# define NCURSES_EXPORT_GENERAL_EXPORT
# endif
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
#endif

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -28,10 +28,10 @@
****************************************************************************/
/****************************************************************************
* Author: Juergen Pfeifer, 2008-on *
* Author: Juergen Pfeifer, 2008-on *
****************************************************************************/
/* $Id: ncurses_mingw.h,v 1.6 2020/02/02 23:34:34 tom Exp $ */
/* $Id: ncurses_mingw.h,v 1.7 2021/06/17 21:26:02 tom Exp $ */
/*
* This is a placeholder up to now and describes what needs to be implemented
@ -67,14 +67,14 @@ struct termios
};
extern NCURSES_EXPORT(int) _nc_mingw_tcsetattr(
int fd,
int optional_actions,
int fd,
int optional_actions,
const struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcgetattr(
int fd,
int fd,
struct termios* arg);
extern NCURSES_EXPORT(int) _nc_mingw_tcflush(
int fd,
int fd,
int queue);
extern NCURSES_EXPORT(void) _nc_set_term_driver(void* term);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 1998-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -33,7 +33,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
/* $Id: term_entry.h,v 1.60 2020/02/29 15:46:00 anonymous.maarten Exp $ */
/* $Id: term_entry.h,v 1.64 2023/04/22 13:37:14 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@ -135,6 +135,7 @@ struct entry {
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)
#define for_entry_list2(qp,q0) for (qp = q0; qp; qp = qp->next)
#define MAX_LINE 132
@ -142,7 +143,7 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
/*
* Note that WANTED and PRESENT are not simple inverses! If a capability
* has been explicitly cancelled, it's not considered WANTED.
* has been explicitly cancelled, it is not considered WANTED.
*/
#define WANTED(s) ((s) == ABSENT_STRING)
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
@ -176,6 +177,8 @@ extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
/* free_ttype.c: elementary allocation code */
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
/* lib_termcap.c: trim sgr0 string for termcap users */
@ -208,26 +211,6 @@ extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
#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

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -32,7 +32,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: termcap.h.in,v 1.19 2020/02/02 23:34:34 tom Exp $ */
/* $Id: termcap.h.in,v 1.20 2021/06/17 21:26:02 tom Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
@ -49,13 +49,13 @@ extern "C"
#include <sys/types.h>
#undef NCURSES_OSPEED
#define NCURSES_OSPEED @NCURSES_OSPEED@
#undef NCURSES_OSPEED
#define NCURSES_OSPEED @NCURSES_OSPEED@
extern NCURSES_EXPORT_VAR(char) PC;
extern NCURSES_EXPORT_VAR(char *) UP;
extern NCURSES_EXPORT_VAR(char *) BC;
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
#if !defined(NCURSES_TERM_H_incl)
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);

View file

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 1998-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -34,7 +34,7 @@
****************************************************************************/
/*
* $Id: tic.h,v 1.81 2020/02/02 23:34:34 tom Exp $
* $Id: tic.h,v 1.87 2023/04/22 13:37:21 tom Exp $
* tic.h - Global variables and structures for the terminfo compiler.
*/
@ -135,8 +135,7 @@ extern "C" {
#define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT)
#define set_trace_level(n) \
_nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \
+ DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \
_nc_tracing &= TRACE_MAXIMUM, \
_nc_tracing |= DEBUG_LEVEL(n)
#ifdef TRACE
@ -302,11 +301,11 @@ extern NCURSES_EXPORT_VAR(long) _nc_start_line;
/* comp_error.c: warning & abort messages */
extern NCURSES_EXPORT(const char *) _nc_get_source (void);
extern NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _nc_get_type (char *name);
extern NCURSES_EXPORT(void) _nc_set_source (const char *const);
extern NCURSES_EXPORT(void) _nc_set_type (const char *const);
extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern GCC_NORETURN NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
@ -337,7 +336,8 @@ extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *);
extern NCURSES_EXPORT(int) _nc_tparm_analyze(TERMINAL *, const char *, char **, int *);
extern NCURSES_EXPORT(void) _nc_reset_tparm(TERMINAL *);
/* lib_trace.c */
extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
@ -347,6 +347,14 @@ 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 */
/* comp_expand.c: expand string into readable form */
extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
/* comp_hash.c: name lookup */
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
(const char *, const HashValue *);
extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
/* comp_main.c: compiler main */
extern const char * _nc_progname;
@ -361,31 +369,6 @@ 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 2018,2020 Thomas E. Dickey *
* Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2008-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@ -28,10 +28,10 @@
****************************************************************************/
/****************************************************************************
* Author: Juergen Pfeifer, 2008-on *
* Author: Juergen Pfeifer, 2008-on *
****************************************************************************/
/* $Id: win32_curses.h,v 1.2 2020/11/14 23:52:46 tom Exp $ */
/* $Id: win32_curses.h,v 1.3 2021/06/17 21:26:02 tom Exp $ */
/*
* This is the interface we use on Windows to mimic the control of the settings

View file

@ -1,7 +1,8 @@
#! /bin/sh
#
#!/bin/sh
# install - install a program, script, or datafile
#
scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@ -34,261 +35,507 @@
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# set DOITPROG to echo to test this script
# Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
# put in absolute paths if you don't have them in your path; or use env. vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
posix_mkdir=
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
stripcmd=
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
src=
dst=
dir_arg=
dst_arg=
-d) dir_arg=true
shift
continue;;
copy_on_change=false
is_target_a_directory=possibly
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
Options:
--help display this help and exit.
--version display version info and exit.
-s) stripcmd=$stripprog
shift
continue;;
-c (ignored)
-C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright 2019,2020 Thomas E. Dickey *
.\" Copyright 2019-2023,2024 Thomas E. Dickey *
.\" Copyright 2010-2014,2016 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
@ -27,98 +27,123 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: MKada_config.in,v 1.12 2020/02/02 23:34:34 tom Exp $
.\" $Id: MKada_config.in,v 1.35 2024/04/20 21:13:27 tom Exp $
.TH adacurses@USE_CFG_SUFFIX@\-config 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
.ds C adacurses@USE_CFG_SUFFIX@\-config
.TH ADACURSES "1" "" "" "User Commands"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.ds ' \(aq
.\}
.el \{\
.ie t .ds `` ``
.el .ds `` ""
.ie t .ds '' ''
.el .ds '' ""
.ie t .ds ' \(aq
.el .ds ' '
.\}
.
.\" Fix broken EX/EE macros on DWB troff.
.\" Detect it: only DWB sets up a `)Y` register.
.if !\n(.g .if \n()Y \{\
.\" Revert the undesired changes to indentation.
.am EX
.in -5n
..
.am EE
.in +5n
..
.\}
.
.SH NAME
adacurses@USE_CFG_SUFFIX@\-config \- helper script for @ADA_LIBNAME@ libraries
\fB\%adacurses@USE_CFG_SUFFIX@\-config\fP \-
configuration helper for \fI@ADA_LIBNAME@\fP libraries
.SH SYNOPSIS
.B \*C
[\fIoptions\fR]
.RB [ \-\-cflags ]
.RB [ \-\-libs ]
.PP
.B \*C \-\-version
.PP
.B \*C \-\-help
.SH DESCRIPTION
This is a shell script which simplifies configuring an application to use
the @ADA_LIBNAME@ library binding to ncurses.
This program development aid simplifies the process of configuring
applications to use the \fI@ADA_LIBNAME@\fP library binding to
\fI\%ncurses\fP.
.SH OPTIONS
.TP 11 \" "--version" + 2n
\fB\-\-cflags\fP
reports the GNAT (Ada compiler) flags needed to compile with
\fI@ADA_LIBNAME@\fP.
.TP
\fB\-\-cflags\fR
echos the gnat (Ada compiler) flags needed to compile with @ADA_LIBNAME@.
\fB\-\-libs\fP
reports the GNAT libraries needed to link with \fI@ADA_LIBNAME@\fP.
.TP
\fB\-\-libs\fR
echos the gnat libraries needed to link with @ADA_LIBNAME@.
\fB\-\-version\fP
reports the release and patch date information of the \fI\%ncurses\fP
libraries used to configure and build \fI@ADA_LIBNAME@\fP and exits
successfully.
.TP
\fB\-\-version\fR
echos the release+patchdate version of the ncurses libraries used
to configure and build @ADA_LIBNAME@.
.TP
\fB\-\-help\fR
prints a list of the \fB\*C\fP script's options.
\fB\-\-help\fP
issues a usage message and exits successfully.
.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
Omitting options implies \*(``\fB\-\-cflags \-\-libs\fP\*(''.
.SH EXAMPLES
Consider a program using \fI@ADA_LIBNAME@\fP to write the message
\*(``Hello, world!\*('' in the center of the screen and wait for the
user to press the \*(``q\*('' key before exiting.
Populate a file \fIhello.adb\fP with the following.
.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
.if \n(LL>67n .RS 4
.EX
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
procedure Hello is
Visibility : Cursor_Visibility := Invisible;
Message : constant String := "Hello, World!";
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!");
Move_Cursor (Line => Lines / 2,
Column => (Columns \- Message\*'Length) / 2);
Add (Str => Message);
while not done loop
c := Get_Keystroke (Standard_Window);
case c is
when Character'Pos ('q') => done := True;
when others => null;
when Character\*'Pos (\*'q\*') => done := True;
when others => null;
end case;
Nap_Milli_Seconds (50);
end loop;
End_Windows;
end Hello;
.fi
.RE
.EE
.if \n(LL>67n .RE
.ne 2
.PP
Then, using
.RS
.ft CW
gnatmake `adacurses-config --cflags` hello -largs `adacurses-config --libs`
.ft
.RS 4
.EX
gnatmake \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-cflags\(ga hello \e
\-largs \(gaadacurses@USE_CFG_SUFFIX@\-config \-\-libs\(ga
.EE
.RE
.PP
or (simpler):
.RS
.ft CW
gnatmake hello `adacurses-config`
.ft
or, more simply,
.RS 4
.EX
gnatmake hello \(gaadacurses@USE_CFG_SUFFIX@\-config\(ga
.EE
.RE
.PP
you will compile and link the program.
you can compile and link the program.
.SH "SEE ALSO"
\fBcurses\fR(3X)
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
\fB\%curses\fP(3X)

View file

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright 2020 Thomas E. Dickey *
.\" Copyright 2020-2023,2024 Thomas E. Dickey *
.\" Copyright 2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
@ -27,73 +27,78 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: MKncu_config.in,v 1.4 2020/02/02 23:34:34 tom Exp $
.TH @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config 1 ""
.\" $Id: MKncu_config.in,v 1.24 2024/04/20 21:13:38 tom Exp $
.TH @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config 1 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
.SH NAME
@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \- helper script for ncurses libraries
\fB\%@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config\fP \-
configuration helper for \fI\%ncurses\fP libraries
.SH SYNOPSIS
.B @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config
[\fIoptions\fR]
.SH DESCRIPTION
This is a shell script which simplifies configuring applications against
a particular set of ncurses libraries.
.SH OPTIONS
.TP
\fB\-\-prefix\fR
echos the package\-prefix of ncurses
.TP
\fB\-\-exec\-prefix\fR
echos the executable\-prefix of ncurses
.TP
\fB\-\-cflags\fR
echos the C compiler flags needed to compile with ncurses
.TP
\fB\-\-libs\fR
echos the libraries needed to link with ncurses
.TP
\fB\-\-version\fR
echos the release+patchdate version of ncurses
.TP
\fB\-\-abi\-version\fR
echos the ABI version of ncurses
.TP
\fB\-\-mouse\-version\fR
echos the mouse\-interface version of ncurses
.TP
\fB\-\-bindir\fR
echos the directory containing ncurses programs
.TP
\fB\-\-datadir\fR
echos the directory containing ncurses data
.TP
\fB\-\-includedir\fR
echos the directory containing ncurses header files
.TP
\fB\-\-libdir\fR
echos the directory containing ncurses libraries
.TP
\fB\-\-mandir\fR
echos the directory containing ncurses manpages
.TP
\fB\-\-terminfo\fR
echos the $TERMINFO terminfo database path, e.g.,
.RS
@TERMINFO@
.RE
.TP
\fB\-\-terminfo\-dirs\fR
echos the $TERMINFO_DIRS directory list, e.g.,
.RS
@TERMINFO_DIRS@
.RE
.TP
\fB\-\-termpath\fR
echos the $TERMPATH termcap list, if support for termcap is configured.
.TP
\fB\-\-help\fR
prints this message
.SH "SEE ALSO"
\fBcurses\fR(3X)
.B @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config
.I option
\&.\|.\|.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.B "@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \-\-version"
.PP
.B "@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \-\-help"
.SH DESCRIPTION
This program development aid simplifies the process of configuring
applications against a particular set of \fI\%ncurses\fP libraries.
.SH OPTIONS
.TP 18 \" "--mouse-version" + 2n + adjustment for PDF
\fB\-\-prefix\fP
reports the package prefix of \fI\%ncurses\fP.
.TP
\fB\-\-exec\-prefix\fP
reports the executable prefix of \fI\%ncurses\fP.
.TP
\fB\-\-cflags\fP
reports the C compiler flags needed to compile with \fI\%ncurses\fP.
.TP
\fB\-\-libs\fP
reports the libraries needed to link with \fI\%ncurses\fP.
.TP
\fB\-\-abi\-version\fP
reports the ABI version of \fI\%ncurses\fP.
.TP
\fB\-\-mouse\-version\fP
reports the mouse\-interface version of \fI\%ncurses\fP.
.TP
\fB\-\-bindir\fP
reports the directory containing \fI\%ncurses\fP programs.
.TP
\fB\-\-datadir\fP
reports the directory containing \fI\%ncurses\fP data.
.TP
\fB\-\-includedir\fP
reports the directory containing \fI\%ncurses\fP header files.
.TP
\fB\-\-libdir\fP
reports the directory containing \fI\%ncurses\fP libraries.
.TP
\fB\-\-mandir\fP
reports the directory containing \fI\%ncurses\fP man pages.
.TP
\fB\-\-terminfo\fP
reports the \fI\%TERMINFO\fP \fIterminfo\fP database path,
for example \fI\%@TERMINFO@\fP.
.TP
\fB\-\-terminfo\-dirs\fP
reports the \fI\%TERMINFO_DIRS\fP supplemental search path for the
\fIterminfo\fP database,
for example \fI\%@TERMINFO_DIRS@\fP.
.TP
\fB\-\-termpath\fP
reports the \fI\%TERMPATH\fP supplemental search path for the
\fItermcap\fP database,
if support for \fItermcap\fP is configured.
.PP
The following options cause all others to be ignored.
.TP 11 .\" "--version" + 2n
\fB\-\-help\fP
issues a usage message and exits successfully.
.TP
\fB\-\-version\fP
issues the release and patch date information of \fI\%ncurses\fP and
exits successfully.
.SH "SEE ALSO"
\fB\%curses\fP(3X)

View file

@ -1,10 +1,10 @@
#!/bin/sh
# $Id: MKterminfo.sh,v 1.18 2020/02/02 23:34:34 tom Exp $
# $Id: MKterminfo.sh,v 1.20 2024/01/13 20:37:40 tom Exp $
#
# MKterminfo.sh -- generate terminfo.5 from Caps tabular data
#
#***************************************************************************
# Copyright 2018-2019,2020 Thomas E. Dickey *
# Copyright 2018-2020,2022 Thomas E. Dickey *
# Copyright 1998-2003,2017 Free Software Foundation, Inc. *
# *
# Permission is hereby granted, free of charge, to any person obtaining a *
@ -50,7 +50,7 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi
#
head=$1
head="$1"
shift 1
caps=
while test $# -gt 1
@ -58,7 +58,7 @@ do
caps="$caps $1"
shift 1
done
tail=$1
tail="$1"
cat <<EOF
'\\" t
.\\" DO NOT EDIT THIS FILE BY HAND!
@ -67,12 +67,12 @@ cat <<EOF
.\\" 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
cat "$head"
temp=temp$$
sorted=sorted$$
unsorted=unsorted$$
trap "code=\$?; rm -f $sorted $temp $unsorted; exit \$code" EXIT HUP INT QUIT TERM
trap 'code=$?; rm -f $sorted $temp $unsorted; exit $code' EXIT HUP INT QUIT TERM
rm -f $sorted $temp $unsorted
cat $caps | sed -n "\
@ -83,7 +83,9 @@ cat $caps | sed -n "\
/^#/d
s/[ ][ ]*/ /g
s/$/T}/
s/ [A-Z0-9_()\-][A-Z0-9_()\-]* [0-9\-][0-9\-]* [Y\-][B\-][C\-][G\-][EK\-]\** / T{/
s/ [A-Z0-9_()\-][A-Z0-9_()\-]* [0-9\-][0-9\-]* [Y\-][B\-][C\-][G\-][EK\-]\** / T{\\
.ad l\
/
s/ bool / /p
s/ num / /p
s/ str / /p
@ -118,4 +120,4 @@ sed -e 's/^\.\.$//' $sorted | tr "\005\006" "\012\134"
sed -e '/^center expand;/s, expand,,' \
-e '/^\.TS/,/^\\/s, lw[1-9][0-9]*\., l.,' \
$tail
"$tail"

View file

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.50 2020/02/02 23:34:34 tom Exp $
# $Id: Makefile.in,v 1.54 2022/10/22 16:36:40 tom Exp $
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2019-2021,2022 Thomas E. Dickey #
# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -52,6 +52,21 @@ INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
################################################################################
@MAKE_PHONY@.PHONY : all
@MAKE_PHONY@.PHONY : clean
@MAKE_PHONY@.PHONY : depend
@MAKE_PHONY@.PHONY : distclean
@MAKE_PHONY@.PHONY : install
@MAKE_PHONY@.PHONY : install.man
@MAKE_PHONY@.PHONY : libs
@MAKE_PHONY@.PHONY : mostlyclean
@MAKE_PHONY@.PHONY : realclean
@MAKE_PHONY@.PHONY : sources
@MAKE_PHONY@.PHONY : uninstall
@MAKE_PHONY@.PHONY : uninstall.man
all \
sources : terminfo.5
depend :
@ -84,8 +99,8 @@ mostlyclean :
clean: mostlyclean
rm -f terminfo.5
../edit_man.sed : make_sed.sh @MANPAGE_RENAMES@
../edit_man.sed : make_sed.sh
$(SHELL) $(srcdir)/make_sed.sh @MANPAGE_RENAMES@ >../edit_man.sed
distclean realclean: clean
rm -f Makefile *-config.1 ../edit_man.* ../man_alias.*
-rm -f Makefile *-config.1 ../edit_man.* ../man_alias.* man_db.renames

View file

@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
.\" Copyright 2018-2019,2020 Thomas E. Dickey *
.\" Copyright 2018-2023,2024 Thomas E. Dickey *
.\" Copyright 1998-2010,2016 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
@ -28,64 +28,76 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: captoinfo.1m,v 1.30 2020/02/02 23:34:34 tom Exp $
.TH @CAPTOINFO@ 1M ""
.ds n 5
.ds d @TERMINFO@
.\" $Id: captoinfo.1m,v 1.63 2024/03/23 20:37:25 tom Exp $
.TH @CAPTOINFO@ 1M 2024-03-23 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.\}
.el \{\
.ie t .ds `` ``
.el .ds `` ""
.ie t .ds '' ''
.el .ds '' ""
.\}
.SH NAME
\fB@CAPTOINFO@\fR \- convert a \fItermcap\fR description into a \fIterminfo\fR description
\fB\%@CAPTOINFO@\fP \-
convert a \fItermcap\fP description into a \fI\%term\%info\fP 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 ...
.B @CAPTOINFO@
.RI [ tic-option ]
.RI [ file
\&.\|.\|.]
.P
.B "@CAPTOINFO@ \-V"
.SH DESCRIPTION
\fB@CAPTOINFO@\fR looks in each given text
\fIfile\fR for \fBtermcap\fR descriptions.
For each
one found, an equivalent \fBterminfo\fR description is written to standard
output.
Termcap \fBtc\fR capabilities are translated directly to terminfo
\fBuse\fR capabilities.
\fB\%@CAPTOINFO@\fP translates terminal descriptions.
It looks in each given text \fIfile\fP for \fI\%termcap\fP entries and,
for each one found,
writes an equivalent \fI\%\%term\%info\fP description to the standard
output stream.
\fI\%termcap\fP \fBtc\fP capabilities translate to \fI\%\%term\%info\fP
\*(``\fBuse\fP\*('' capabilities.
.PP
If no \fIfile\fR is given, then the environment variable \fBTERMCAP\fR is used
for the filename or entry.
If \fBTERMCAP\fR is a full pathname to a file, only
the terminal whose name is specified in the environment variable \fBTERM\fR is
extracted from that file.
If the environment variable \fBTERMCAP\fR is not
set, then the file \fB\*d\fR is read.
.TP 5
\fB\-v\fR
print out tracing information on standard error as the program runs.
.TP 5
\fB\-V\fR
print out the version of the program in use on standard error and exit.
.TP 5
\fB\-1\fR
cause the fields to print out one to a line.
Otherwise, the fields
will be printed several to a line to a maximum width of 60
characters.
.TP 5
\fB\-w\fR
change the output to \fIwidth\fR characters.
.SH FILES
.TP 20
\*d
Compiled terminal description database.
.SH TRANSLATIONS FROM NONSTANDARD CAPABILITIES
If no \fIfile\fPs are specified,
\fB\%@CAPTOINFO@\fP interprets the content of the environment variable
\fI\%TERMCAP\fP as a file name,
and extracts only the entry for the terminal named in the environment
variable \fITERM\fP from it.
If the environment variable \fI\%TERMCAP\fP is not set,
\fB\%@CAPTOINFO@\fP reads
.IR \%/etc/termcap .
.PP
Some obsolete nonstandard capabilities will automatically be translated
into standard (SVr4/XSI Curses) terminfo capabilities by \fB@CAPTOINFO@\fR.
Whenever one of these automatic translations is done, the program
will issue an notification to stderr, inviting the user to check that
it has not mistakenly translated a completely unknown and random
capability and/or syntax error.
This utility is implemented as a link to \fB\%@TIC@\fP(1M),
with the latter's
.B \-I
option implied.
You can use other \fB\%@TIC@\fP options such as
.BR \-1 ,
.BR \-f ,
.BR \-v ,
.BR \-w ,
and
.BR \-x .
The \fB\-V\fP option reports the version of \fI\%ncurses\fP associated
with this program and exits with a successful status.
.SS "Translations from Nonstandard Capabilities"
\fB\%@CAPTOINFO@\fP translates some obsolete,
nonstandard capabilities into standard
(SVr4/XSI Curses)
\fI\%\%term\%info\fP capabilities.
It issues a diagnostic to the standard error stream for each,
inviting the user to check that it has not mistakenly translated an
unknown or mistyped capability name.
.PP
.TS H
c c c c
c c c c
l l l l.
Nonstd Std From Terminfo
name name capability
.\" DWB 3.3 tbl requires the two junk "L" specifiers in the first row.
.TS
center;
Cb S L L
Cb Cb Cb Cb
Cb Cb C Lb.
Name
Obsolete Standard Origin \f(BIterminfo\fP capability
_
BO mr AT&T enter_reverse_mode
CI vi AT&T cursor_invisible
@ -106,64 +118,72 @@ PS pf XENIX prtr_on
PU kP XENIX key_ppage
RT @8 XENIX kent
UP ku XENIX kcuu1
KA k; Tek key_f10
KB F1 Tek key_f11
KC F2 Tek key_f12
KD F3 Tek key_f13
KE F4 Tek key_f14
KF F5 Tek key_f15
BC Sb Tek set_background
FC Sf Tek set_foreground
HS mh Iris enter_dim_mode
KA k; Tektronix key_f10
KB F1 Tektronix key_f11
KC F2 Tektronix key_f12
KD F3 Tektronix key_f13
KE F4 Tektronix key_f14
KF F5 Tektronix key_f15
BC Sb Tektronix set_background
FC Sf Tektronix set_foreground
HS mh IRIX enter_dim_mode
.TE
.PP
XENIX termcap also used to have a set of extension capabilities
for forms drawing, designed to take advantage of the IBM PC
high-half graphics.
They were as follows:
XENIX \fI\%termcap\fP had a set of extension capabilities,
corresponding to box drawing characters of CCSID
(\*(``code page\*('') 437,
as follows.
.PP
.TS H
c c
l l.
Cap Graphic
.TS
center;
cb cb
cb l .
\f(BItermcap\fP Name Graphic
_
G2 upper left
G3 lower left
G1 upper right
G4 lower right
GR pointing right
GL pointing left
GU pointing up
GD pointing down
G2 upper left corner
G3 lower left corner
G1 upper right corner
G4 lower right corner
GR tee pointing right
GL tee pointing left
GU tee pointing up
GD tee pointing down
GH horizontal line
GV vertical line
GC intersection
G6 upper left
G7 lower left
G5 upper right
G8 lower right
Gr tee pointing right
Gr tee pointing left
Gu tee pointing up
Gd tee pointing down
Gh horizontal line
Gv vertical line
Gc intersection
GG acs magic cookie count
G6 double upper left corner
G7 double lower left corner
G5 double upper right corner
G8 double lower right corner
Gr double tee pointing right
Gr double tee pointing left
Gu double tee pointing up
Gd double tee pointing down
Gh double horizontal line
Gv double vertical line
Gc double intersection
.\" TODO: There are about 40 box drawing code points in CCSID 437;
.\" were there no XENIX capabilities for the mixed single- and double-
.\" line intersections?
.\"
.\" TODO: GG doesn't seem to fit with the others; explain it.
GG ACS magic cookie count
.TE
.PP
If the single-line capabilities occur in an entry, they will automatically
be composed into an \fBacsc\fR string.
The double-line capabilities and
\fBGG\fR are discarded with a warning message.
\fB\%@CAPTOINFO@\fP composes single-line capabilities into an \fBacsc\fP
string,
and discards \fBGG\fP and double-line capabilities with a warning
diagnostic.
.PP
IBM's AIX has a \fI\%\%term\%info\fP facility descended from SVr1
\fI\%\%term\%info\fP,
but which is incompatible with the SVr4 format.
\fB\%@CAPTOINFO@\fP translates the following AIX extensions.
.PP
IBM's AIX has a terminfo facility descended from SVr1 terminfo but incompatible
with the SVr4 format.
The following AIX extensions are automatically
translated:
.TS
c c
l l.
center;
cb cb
l l .
IBM XSI
_
ksel kslt
@ -174,34 +194,42 @@ font2 s2ds
font3 s3ds
.TE
.PP
Additionally, the AIX \fIbox1\fR capability will be automatically translated to
an \fBacsc\fR string.
Additionally,
this program translates the AIX \fBbox1\fP capability to an \fBacsc\fP
string.
.PP
Hewlett-Packard's terminfo library supports two nonstandard terminfo
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 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.
The HP-UX \fI\%\%term\%info\fP library supports two nonstandard
\fI\%\%term\%info\fP capabilities,
\fBmeml\fP (memory lock) and \fBmemu\fP (memory unlock).
\fB\%@CAPTOINFO@\fP discards these with a warning message.
.SH FILES
.TP
.I /etc/termcap
default \fI\%termcap\fP terminal capability database
.SH PORTABILITY
X/Open Curses, Issue 7 (2009) describes \fBtic\fP briefly,
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
SVr4 systems provide \fB\%captoinfo\fP as a separate application from
\fBtic\fP.
Its
.B \-v
option does not accept a trace level argument
.IR n ;
repeat
.B \-v
.I n
times instead.
.PP
NetBSD does not provide this application.
.SH SEE ALSO
\fB@INFOCMP@\fR(1M),
\fBcurses\fR(3X),
\fBterminfo\fR(\*n)
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.SH AUTHOR
.SH AUTHORS
Eric S. Raymond <esr@snark.thyrsus.com>
and
.br
Thomas E. Dickey <dickey@invisible-island.net>
Thomas E. Dickey <dickey@invisible\-island.net>
.SH SEE ALSO
\fB\%@INFOCMP@\fP(1M),
\fB\%@TIC@\fP(1M),
\fB\%curses\fP(3X),
\fB\%terminfo\fP(5)

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