From 332fa27640b1901ac632e6d37a4aa9643d0f8594 Mon Sep 17 00:00:00 2001
From: Lorry Tar Creator Announcing ncurses 6.2
+ Announcing ncurses 6.3
Overview
@@ -103,38 +100,33 @@
including
Full manual pages are provided for the library and tools.
@@ -163,10 +155,10 @@ NotesThese notes are for ncurses - 6.2, released February 12, 2020.
+ 6.3, released October 21, 2021.This release is designed to be source-compatible with - ncurses 5.0 through 6.1; providing + ncurses 5.0 through 6.2; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is @@ -178,47 +170,28 @@ this announcement.
The most important - bug-fixes/improvements dealt with user-defined capabilities - in terminal descriptions. The release notes also mention some - other bug-fixes, but are focused on new features and improvements - to existing features since ncurses - 6.1 release.
+ bug-fixes/improvements dealt with portability issues. The + release notes also mention some other bug-fixes, but are focused + on new features and improvements to existing features since + ncurses 6.2 release.There are several new features:
+There are a few new features:
- O_EDGE_INSERT_STAY tells the form library to optionally - delay cursor movement on a field edge/boundary
-- O_INPUT_FIELD extension to form library allows a dynamic - field to shrink if the new limit is smaller than the current - field size.
+A new (experimental) driver, for the Windows Terminal + configuration is provided.
added - exit_curses and - exit_terminfo to replace internal symbols for - leak-checking.
-added - curses_trace, to replace trace().
+A script is provided which enables OpenBSD users to + upgrade their system to use ncurses 6.3 (OpenBSD developers + are also invited to do this).
mouse decoding now handles shift/control/alt logic when - decoding xterm's 1006 mode
-ncurses now defines a limit for - wgetnstr, - wgetn_wstr when length is negative or “too - large”.
-there is now no buffer-size limit when reading the - - $TERMCAP variable.
-the - $TERMCAP variable may be interpreted as a - fallback to a terminfo entry
+modify lib_mouse.c to check for out-of-range button + numbers, convert those to position reports.
- mvcur now decides whether to use hard-tabs, - using xt, - tbc and - hts as clues.
-extended colors are improved by modifying an internal call - to - vid_puts to pass extended color pairs e.g., from - tty_update.c and lib_mvcur.c
-the initialization functions now avoid - relying upon persistent data for the result from getenv
-scrolling is improved:
- -improved loop limits in _nc_scroll_window - handle a case where the scrolled data is a pad which is - taller than the window.
-add sp-funcs for + erasewchar, + killwchar.
These are revised features:
used “const” in some prototypes - rather than NCURSES_CONST where X/Open Curses was - updated to do this, e.g., wscanw, newterm, - the terminfo interface. Also use “const” - for consistency in the termcap interface, which was withdrawn - by X/Open Curses in Issue 5 (2007). As of Issue 7, X/Open - Curses still lacks “const” for certain - return values, e.g., - keyname.
-modified - wbkgd and - wbkgrnd to improve compatibility with SVr4 - curses, changing the way the window rendition is updated when - the background character is modified
-improved terminfo write/read by modifying the fourth item - of the extended header to denote the number of valid strings - in the extended string table (see - term(5)).
-modified the initialization checks for mouse so that the - xterm+sm+1006 - block will work with terminal descriptions not mentioning - xterm.
-These were done to limit or ultimately deprecate features:
deprecated safe-sprintf, - since the vsnprintf function, which does what was - needed, was standardized long ago.
-mark wgetch-events feature as deprecated.
-marked - vwprintw and vwscanw as deprecated; - recommend using - vw_printw and vw_scanw, - respectively.
-prevent KEY_EVENT from appearing in
+ curses.h unless the configure option
+ --enable-wgetch-events
is used.
added deprecation warnings for internal functions called - by older versions of tack.
+modify MKkey_defs.sh to hide ncurses' + definition of KEY_EVENTS to reduce Visual + Studio C++ redefinition warnings.
+removed unused _nc_import_termtype2 function.
+reduce build-warnings by excluding ncurses-internals from + deprecation warnings.
check parameter of - set_escdelay, return ERR if negative.
-check parameter of - set_tabsize, return ERR if not greater than zero
-correct a status-check in _nc_read_tic_entry() so that if - reading a hex/b64 - $TERMINFO, and the - $TERM does not match, fall-through to the - compiled-in search list.
-amend check for - repeat_char to handle a case where setlocale() - was called after - initscr
-move macro for - is_linetouched inside - NCURSES_NOMACROS - ifndef.
-use _nc_copy_termtype2 rather than direct - assignment in - setupterm, in case it is called repeatedly using fallback - terminfo descriptions
-improve workaround for Solaris wcwidth versus line-drawing - characters
+drop symbols GCC_PRINTF and GCC_SCANF + from <curses.h>, to simplify use.
add checks in - repair_subwindows to keep the current position - and scroll-margins inside the resized subwindow.
+apply gcc format attribute to prototypes which use a + va_list parameter rather than a “...” + variable-length parameter list.
correct a buffer-limit in write_entry.c for - systems that use caseless filenames.
+modify <term.h> so that it is not necessary to + include <curses.h> before <term.h>.
improved build-time utility report_offsets:
- -add categories, e.g., "w" for wide-character, "t" for - threads to make the report more readable. Reorganized the - structures reported to make the categories more - apparent.
-add NCURSES_GLOBALS and - NCURSES_PRESCREEN to report to show how similar - the different libtinfo configurations are.
-provide for wide-characters as background character in + wbkgrnd
modified some header files to ensure that those include - necessary files except for the previously-documented - cases
+improve parameter-checking for tparm, adding function + _nc_tiparm() to handle the most-used case, which accepts only + numeric parameters.
added some traces in initialization to show whether a - fallback entry is used.
+use return-value from vsnprintf to reallocate as + needed to allow for buffers larger than the screen size.
made minor optimization to reduce calls to - _nc_reserve_pairs
+add another fflush(stdout) in _nc_flush + to handle time-delays in the middle of strings such as flash + when the application uses low-level calls rather than + curses.
fix a special case in PutAttrChar where a cell is - marked as alternate-character set, but the terminal does not - actually support the given graphic character. This would - happen in an older terminal such as vt52, which - lacks most line-drawing capability.
+add a check to guard against repeat_char emitting + digits which could be interpreted as BSD-style padding when + --enable-bsdpad is configured.
corrected flag for "seq" method of db 1.8.5 interface, - needed by toe on some of the BSDs.
-modify comparison in make_hash.c to correct a special case - in collision handling for Caps-hpux11
-add extended_slk_color{,_sp} symbols to the appropriate - package/*.{map,sym} files
-modify lib_setup to avoid calling pthread_self() without - first verifying that the address is valid, i.e., for weak - symbols
-add a couple of broken-linker symbols to the list of - versioned symbols to help with link-time optimization versus - weak symbols.
+check for screen size-change in scr_init and + scr_restore, in + case a screen dump does not match the current screen + dimensions
Several improvements were made to the utility programs:
+Several improvements were made to the + utility programs:
implement “+m” option
+add check for duplicate “use=” + clauses.
+add check to report instances where tparm + would detect an error in an expression.
+add user-defined capabilities from mintty to + Caps-ncurses, for checking consistency.
+improve warning when oc/op do not mention SGR 39/49
+ for xterm compatible XT
flag.
improve checks for number of parameters of
+ smglp
, smgrp
,
+ smgtp
, and smgbp
.
improve “-c” option to validate + the number and type of parameters and compare against + expected number/type before deciding which set of + parameter-lists to use in tparm calls.
+improve check for errors detected in
+ tparm
.
improve format of output, to ensure that the messages + contain only printable text.
+modify to eliminate unnecessary
+ “\
” to escape
+ “:
” in terminfo format.
remove check that assumes that none or both + parameterized and non-parameterized margin-setting + capabilities are present.
+modify output of “toe -as” to + show first description found rather than the last.
+add a check to ensure that a “termcap + file” is text rather than binary.
+Several changes were made to the generated ncurses*config - scripts and the analogous “.pc” files to - reduce differences between the configurations they report:
+modify to allow multiple commands per line.
+modified the ncurse*-config and pc-files to more closely - match for the -I and -l options.
-improve parameter-checking by analyzing all extended
+ string capabilities, e.g., as used in the Cs
+ and Ms
capabilities of the tmux
+ description.
filtered out linker-specs from the --libs - report.
-make warning messages consistently using alias names + when those are used, rather than the underlying program's + name.
+amended the ncurses*-config and pc-files to take into - account the rpath hack which differed between those - files.
-improve usage message for aliases such as + clear, by eliminating tput-specific + portions.
+modified generated ncurses*config and ncurses.pc, - ncursesw.pc, etc., to list helper libraries such as gpm for - static linking.
-modify initialization to avoid opening + /dev/tty for cases other than + reset/init, e.g., for clear.
+Along with the library and utilities, improvements were made to the ncurses-examples. - Most of this activity aimed at improving the test-packages. A few - changes are more generally useful, e.g., for the main ncurses + "https://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples. Most of + this activity aimed at improving the test-packages. A few changes + are more generally useful, e.g., for the main ncurses test-program, and for analyzing traces using the tracemunch script:
improve recovery from error when reading command-character - in test/ncurses.c, showing the relevant error - message and not exiting on EINTR.
+add “-r” option to the dots + test-programs, to help with scripting a performance + comparison.
improve tracemunch, by keeping track of - TERMINAL* values, and if tracing was first turned on - after initialization, attempt to show distinct screen, window - and terminal names anyway.
+build-fix for test_opaque, for configurations + without opaque curses structs, e.g., ncurses 5.7.
modify tracemunch to accept filename parameters - in addition to use as a pipe/filter.
+improve tracemunch logic for "RUN" + compaction.
update tracemunch to work with perl - 5.26.2, which changed the rules for escaping regular - expressions.
+improve tracemunch's coverage of form/menu/panel + libraries.
add some checks in tracemunch for undefined - variables.
+improve tracemunch's checking/reporting the type + for the first parameter, e.g., "WINDOW*" rather than + "#1".
modify TurnOn/TurnOff macros (in - lib_vidattr.c and lib_vid_attr.c) to avoid expansion of - “CUR” in trace.
+modify tracemunch and the panel library to show + readable traces for panel- and user-pointers.
A variety of improvements were made to existing programs, both - new features as well as options added to make the set of programs - more consistent.
- -add “-l” option to test/background, - to dump screen contents in a form that lets different curses - implementations be compared.
-add “@” command to test/ncurses - F-test, to allow rapid jump to different character pages.
-added enum, regex examples to test/demo_forms
-amend Scaled256() macro in test/picsmap.c to cover the - full range 0..1000
-corrected pathname used in Ada95 sample programs for - explain.txt, to work with test-packages, and used an - awk script to split the resulting pathname when it would be - too long for a single line.
-ignore interrupted system-call in test/ncurses's - command-line, e.g., if the terminal were resized.
-improved ifdef's for TABSIZE variable, to help - with AIX/HPUX ports.
-There are several new terminal descriptions:
-alacritty, domterm, kitty, - mintty, mintty-direct, ms-terminal, - n7900, nsterm-build309, - nsterm-direct, screen5, ti703, - ti707, ti703-w, ti707-w - vscode, vscode-direct, xterm-mono, - xterm.js
+absolute, + att610+cvis, + foot, + foot-direct, + hp98550-color, + hpterm-color2, + hterm, + hterm-256color, + linux-s, + putty+keypad, + putty+screen, + putty-screen, + screen.linux-s, + scrt/securecrt, + tmux-direct, + vt220+cvis, + vt220+cvis8, + vt220+pcedit, + vt220+vtedit, + vt220-base, + vt52+keypad, + xterm+256color2, + xterm+88color2, + xterm-direct16, + xterm-direct256, + xterm+nofkeys, + and xterm+nopcfkeys.
There are many changes to existing terminal descriptions. Some were updates to several descriptions:
while others affected specific descriptions. These were retested, to take into account changes by their developers:
-terminator, st
+kitty+common, + mlterm3, + ms-terminal
while these are specific fixes based on reviewing @@ -831,156 +632,133 @@
A few entries use extensions (user-defined terminal capabilities):
fills in overlooked descriptions of features which were - described in the NEWS - file but treated sketchily in manual pages.
+ described in the NEWS file + but treated sketchily in manual pages. @@ -1015,95 +792,67 @@Corrections:
make opts extension for getcchar + work as documented for ncurses + 6.1, adding “-g” flag to + demo_new_pair to illustrate.
+modify tset + “-q” option to refrain from modifying + terminal modes, to match the documentation.
+Clarify in manual pages that
- vwprintw and
- vwscanw are obsolete.
- They have not been part of X/Open Curses since 2007.
New/improved history and portability sections:
improve documentation for + tparm and static/dynamic variables.
+Improvements for user_caps.5:
+add history note to curs_scanw.3x + for <stdarg.h> and <varargs.h>
+add history note to curs_printw.3x + for <stdarg.h> and <varargs.h>
+add portability note to ncurses.3x + regarding <stdarg.h>
+add historical notes to tput, + + curses-terminfo and curses-color + manpages based on source-code for SVr2, SVr3 and + SVr4.
+improve history section for tset manpage + based on the 1BSD tarball, which preceded BSD's SCCS + checkins by more than three years.
+Other improvements:
explain in + ncurses.3x that functions in the tinfo library do not + rely upon wide-characters.
+improve manual page for panel + library, extending the portability section as well as + documenting error-returns.
+add section on margins to terminfo.5, + adapted from X/Open Curses.
+improve man/term.5 + section on legacy storage format.
+add a note in + terminfo.5 explaining that no-parameter strings such + as sgr0 or cnorm + should not be used with tparm.
+improve description of BSD-style padding in curs_termcap.3x
+improve discussion of padding versus tparm + and tputs in + man/curs_terminfo.3x
+add a note in manual page to explain + ungetch vs unget_wch.
+improve description of error-returns in waddch + and waddnstr + manual pages.
+Some of the improvements are more subtle, relating to the way - the information is presented. For instance, the generated - terminfo.5 file uses a different table layout, allowing it to use - space on wide terminals more effectively.
+ the information is presented. For instance, hyphenation is + suppressed in the HTML files generated from manual pages because + an upgrade to groff gave noticeably poorer results, + interfering with the process of creating links between the + resulting webpages.While there were many bugs fixed during development of ncurses - 6.2, only a few (the reason for this release) were both important + 6.3, only a few (the reason for this release) were both important and interesting. Most of the bug-fixes were for local issues which did not affect compatibility across releases. Since those - are detailed in the NEWS file no elaboration is needed here.
+ are detailed in the NEWS file no elaboration is + needed here. -The interesting bugs were in tic/infocmp's handling of - user-defined capabilities. These were not recent bugs. Initially - it was a simple problem:
+The interesting bugs were:
One of simpleterm's contributors copied some definitions - for using tmux's user-defined capabilities in +
modify wbkgd and - late in 2016.
+ "https://invisible-island.net/ncurses/man/curs_bkgrnd.3x.html#h3-bkgrnd">wbkgrnd to + avoid storing a null in the background character, because it + may be used in cases where the corresponding 0x80 is not + treated as a null. ----diff --git a/st.info b/st.info -@@ -185,7 +185,10 @@ st| simpleterm, - tsl=\E]0;, - xenl, - vpa=\E[%i%p1%dd, -- -+# Tmux unofficial extensions, see TERMINFO EXTENSIONS in tmux(1) -+ Se, -+ Ss, -+ Tc, - - st-256color| simpleterm with 256 colors, - use=st, --
Later, in (referring to a version from - mid-2017), a user asked to have it updated in - ncurses.
+This was a regression introduced in ncurses 6.2 (reported + on the mailing list), for which the workaround was to specify + a blank for the background character.
However, it had an error from the change in late 2016. The - terminal description made what tmux expected to be - string actually a - boolean.
- -Over the years, there were problems with each of - simpleterm's terminal descriptions. I repaired those, and - usually dealt with the problem.
-The difference in this case was that when compiling the - terminal database, tic may have in memory the - definitions for more than one terminal description (so that - it can resolve “use=” clauses). Seeing - two different types for the same name, in certain situations - it would incorrectly merge the symbol tables for the two - terminal descriptions.
-On simpleterm's side, their bug was finally fixed in +
remove output-related checks for nl/nonl (also - late 2019, three years after the bug was created.
-For ncurses, the elapsed time to fix this bug was less than - three years. Someone reported a problem with the terminal - description a few weeks after releasing ncurses 6.1 (in tmux #1264), and - the terminal description was updated that week (ncurses patch - 20180224):
- --- --20180224 - + modify _nc_resolve_uses2() to detect incompatible types when merging - a "use=" clause of extended capabilities. The problem was seen in a - defective terminfo integrated from simpleterm sources in 20171111, - compounded by repair in 20180121. - + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD --
The larger part of that change added a check to prevent a - simple merge of terminal descriptions where the same user-defined - name was used with different types. But it raised some - questions:
- -Was there a reliable way to manage terminal descriptions - which used the same extended name in different ways?
+ "https://lists.gnu.org/archive/html/bug-ncurses/2020-09/msg00018.html"> + reported on the mailing list).Should ncurses provide a registry of well-known extended - names, with their types?
-Since the correction to - terminfo.src could have been readily adopted by - packagers, there was nothing more to be done from ncurses' - standpoint on that part. But improving ncurses to prevent issues - like that is the reason for making a release.
+improve tparm implementation of %P and + %g, more closely matching SVr4 terminfo. Those + denote static and dynamic variables in + terminfo expressions.
-Nothing more (constructive) was mentioned with regard to - simpleterm. But a few problems were found in the handling of - user-defined capabilities:
- -Forward-references to user-defined capabilities in a - “use=” clause did not allocate new data - for each use. In tic, successive compilation of - terminal entries could add user-defined capabilities to the - wrong terminal entry.
- -This was not noticed before, since xterm's terminal - descriptions were the main users of the feature, and almost - all of the uses of the building-blocks which contained - user-defined capabilities were backward-references.
-There is one (documented) case where ncurses 6.1 supports - a user-defined capability that could be any type (i.e., - “RGB”). The check added in February 2018 to guard - against mismatches did not handle all of the combinations - needed.
+Exactly what those terms meant was never documented before + in any implementation of curses, aside from source code. + Unlike the other two fixes, the problem was discovered while + studying OpenBSD's version of tset.
Both of these issues dated from the original implementation of - user-defined capabilities. Fixing them does not change the - terminal database, but a older tic without the fixes - will not be able to handle terminfo sources which rely upon those - fixes. Starting in June 2019, the download link for the terminfo - source file was capped at that date. The development sources have - an up-to-date copy of the file, for people with a legitimate need - for it.
- -The “-c” (check) option of tic - is not very useful if it cannot offer advice on parameters needed - for user-defined capabilities. The various Caps files - were reorganized to reduce redundancy, and in the common portion - (Caps-ncurses), - a registry of user-defined capabilities is provided for use by - tic. While users can still define their own custom - capabilities, tic will not offer any advice when their - parameters do not match.
- -In ncurses 6.2, tic makes a special check to allow - any type for RGB, but its being able to do this relies - upon fixes made in the ncurses library in mid-2019.
-There are a few new/modified configure options:
helps work around a filename conflict with Debian packages - versus test-packages.
+new configure option and check for gcc + -fvisibility=hidden feature
allows one to rename the “AdaCurses” library - (at least one packager prefers a lowercase name).
+corrected to allow turning leak-checking off later in a + set of options.
now ensures there is a value, and adds the fallback - information to top-level Makefile summary.
+new configure option makes the _Noreturn
+ keyword optional to ease transition.
check for pcre-posix library to help with MinGW port.
+revised option also controls whether $LDFLAGS
+ from the build is provided in “-config”
+ and “.pc” files.
add configure option which tells ncurses to disallow most + file-opens by setuid processes.
+changed default to help packagers who reuse wide ncursesw + header file with non-wide ncurses library.
+help work around problems building fallback source using - pre-6.0 tic/infocmp.
+revised option uses the actual search path from + pkg-config or pkgconf using the output from + --debug.
option value can now be a relative pathname.
+new several --with-xxx-libname options, + to help with pkgsrc
ignore $TERMINFO - as a default value in configure script if it came from the - infocmp -Q option.
+add a special case in the configure script to work around + one of the build-time breakages reported for OpenBSD 6 here:
+ +++ https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
+
distinguish gcc from icc and clang when the - --enable-warnings option is not used, to avoid - unnecessary warnings about unrecognized inline options
+modify configure check for libtool to prevent + accidental use of an OpenBSD program which uses the same + name.
consistently prepend new libraries as they are found - during configuration, rather than relying upon the linker to - resolve order dependencies of libraries.
+modify configuration checks for build-time tic/infocmp to + use AC_CHECK_TOOL. That can still be overridden by + --with-tic-path and --with-infocmp-path + when fallbacks are used, but even if not using fallbacks, the + improved check may help with cross-compiling.
modified configure scripts to reduce relinking/ranlib - during library install :
- -relax modification-time comparison in + CF_LINK_FUNCS to allow it to accept link() function + with NFS filesystems which change the mtime on the link + target, e.g., several BSD systems.
add configure check for getenv to work around - implementation shown in Emscripten which overwrites the - previous return value on each call.
- -Use that to optionally suppress START_TRACE - macro, whose call to getenv may not work - properly
+modify configure check for c89/c99 aliases of + clang to use its -std option instead, + because some platforms, in particular macOS, do not provide + workable c89/c99 aliases.
change target configure level for _XOPEN_SOURCE - to 600 to address use of vsscanf and - setenv.
+modify CF_NCURSES_CONFIG to work around + Xcode's c99 "-W" option, which conflicts with + conventional use for passing linker options.
reduce use of _GNU_SOURCE for current glibc where - _DEFAULT_SOURCE combines with - _XOPEN_SOURCE
+modify configure scripts to filter out redefinitions of + _XOPEN_SOURCE, e.g., for NetBSD which generally supports 500, + but 600 is needed for ncursesw.
+Allow for Cygwin's newlib when checking for the - _DEFAULT_SOURCE symbol.
+Here are some of the other portability fixes:
-MidnightBSD is now checked for the - _XOPEN_SOURCE-related definitions.
+change configure-check and source-code for gcc's noreturn + attribute to assume it is a prefix rather than suffix, + matching c11's _Noreturn convention.
If the check for va_copy or __va_copy - fails,
- -modify mk-1st.awk to account for extra-suffix configure + option.
several changes to support a port to Ultrix 3.1:
- -build-fix for termsort module when configured with + termcap.
The test/configure script (used for ncurses-examples) - is improved:
- -modify configure script and makefiles to support ".PHONY" + make program feature.
Here are some of the other portability fixes:
- -added dummy "check" rule in top-level and test-Makefile to - simplify building test-packages for ArchLinux.
+amend libtool configuration to add dependency for + install.tic, etc., in ncurses/Makefile on the lower-level + libraries.
dropped library-dependency on psapi for MinGW port, since - win_driver.c defines PSAPI_VERSION to 2, making it - use GetProcessImageFileName from kernel32.dll
+modify Ada95 source-generation utility to write to a file + given as parameter rather than to the standard output, + allowing builds with MinGW.
made build-fixes for configuration using --program-suffix - with Ada95, noticed with MacOS but applicable to other - platforms without libpanelw, etc.
+amend tic/infocmp check to allow for the respective tool's + absence.
modified ncurses/Makefile.in to fix a case where - Debian/testing changes to the ld --as-needed configuration - broke ncurses-examples test packages.
+build-fixes for gnat 10.1.1, whose gnatmake drops + integration with gprbuild.
used _WIN32/_WIN64 in preference to - __MINGW32__/__MINGW64__ symbols to simplify - building with Microsoft Visual C++, since the former are - defined in both compiler configurations.
+correct configure version-check/warning for g++ to allow + for 10.x
The ncurses utilities have options to allow you to filter terminfo entries for use with less capable curses/terminfo versions such - as the HP/UX and AIX ports.
+ as the HP-UX and AIX ports. @@ -1645,10 +1266,10 @@ diff --git a/st.info b/st.infoThe API is 8-bit clean and base-level conformant with the X/OPEN curses specification, XSI curses (that is, it - implements all BASE level features, and most EXTENDED - features). It includes many function calls not supported - under SVr4 curses (but portability of all calls is documented - so you can use the SVr4 subset only).
+ implements all BASE level features, and most + EXTENDED features). It includes many function calls + not supported under SVr4 curses (but portability of all calls + is documented so you can use the SVr4 subset only).Support for direct-color terminals, such as modern + xterm.
+Support for 256-color terminals, such as modern xterm.
The - tic/captoinfo - utility provided with ncurses - has the ability to translate many termcaps from the XENIX, - IBM and AT&T extension sets.
+The tic/captoinfo utility + provided with ncurses has the + ability to translate many termcaps from the XENIX, IBM and + AT&T extension sets.
A BSD-like - tset utility is provided.
+ "https://invisible-island.net/ncurses/man/tset.1.html">tset utility is provided.The table-of-entries utility - toe makes it easy for users to see exactly what - terminal types are available on the system.
+ "https://invisible-island.net/ncurses/man/toe.1m.html">toe makes it easy for users to see + exactly what terminal types are available on the system.The library meets the XSI requirement that every macro
- entry point have a corresponding function which may be linked
+ entry point has a corresponding function which may be linked
(and will be prototype-checked) if the macro definition is
disabled with #undef
.
Extensive documentation is provided (see the - Additional Reading section of the - ncurses FAQ for online documentation).
+ "https://invisible-island.net/ncurses/ncurses.faq.html#additional_reading">Additional + Reading section of the ncurses FAQ for online + documentation).Curses Development Kit
-directory-editor
- +https://invisible-island.net/dialog/
+https://invisible-island.net/dialog/
a replacement for ssh
.
terminfo action checker
- +vi-like-emacs may be built to use the terminfo, termcap or curses interfaces.
-https://invisible-island.net/vile/
+https://invisible-island.net/vile/
@@ -2040,13 +1659,13 @@ diff --git a/st.info b/st.infoOngoing development work is done by Thomas E. Dickey. Thomas E. Dickey has acted as the maintainer for the Free Software - Foundation, which holds a copyright - on ncurses for releases 4.2 through 6.1. Following the - release of ncurses 6.1, effective as of release 6.2, copyright - for ncurses reverted to Thomas E. Dickey (see the - ncurses FAQ for additional information).
+ Foundation, which held a copyright on ncurses for + releases 4.2 through 6.1. Following the release of ncurses 6.1, + effective as of release 6.2, copyright for ncurses reverted to + Thomas E. Dickey (see the ncurses FAQ for + additional information).Contact the current maintainers at
@@ -2061,7 +1680,6 @@ diff --git a/st.info b/st.info "mailto:bug-ncurses-request@gnu.org">bug-ncurses-request@gnu.org containing the line: -@@ -2085,10 +1703,10 @@ diff --git a/st.info b/st.info
subscribe
<name>@<host.domain>ftp://ftp.invisible-island.net/ncurses/6.1/ + "ftp://ftp.invisible-island.net/ncurses/6.2/">ftp://ftp.invisible-island.net/ncurses/6.2/ and
+ "https://invisible-mirror.net/archives/ncurses/6.2/">https://invisible-mirror.net/archives/ncurses/6.2/ .
https://invisible-mirror.net/archives/ncurses/6.1/ .There is an archive of the mailing list here:
@@ -2107,30 +1725,28 @@ diff --git a/st.info b/st.info which may be interesting by themselves:-
- - ncurses licensing
+- ncurses licensing
-- Symbol - versioning in ncurses
+- Symbol versioning + in ncurses
-- Comments - on ncurses versus Comments on + ncurses versus slang (S-Lang)
-- tack – - terminfo action checker
+- Comments on + OpenBSD
-- tctest - – termcap library checker
+- tack – terminfo action + checker
+ +- tctest – termcap + library checker
- - Terminal Database
+ "https://invisible-island.net/ncurses/ncurses.html#download_database">Terminal + DatabaseOther @@ -2158,11 +1774,9 @@ diff --git a/st.info b/st.info
Release Notes -
- Library improvements -
- New features
@@ -2173,7 +1787,6 @@ diff --git a/st.info b/st.info- Program improvements -
diff --git a/doc/html/man/curs_delch.3x.html b/doc/html/man/curs_delch.3x.html index 341efbf..31c163a 100644 --- a/doc/html/man/curs_delch.3x.html +++ b/doc/html/man/curs_delch.3x.html @@ -1,4 +1,4 @@ - @@ -55,24 +55,24 @@ #include <curses.h> int delch(void); - int wdelch(WINDOW *win); - int mvdelch(int y, int x); - int mvwdelch(WINDOW *win, int y, int x); + int wdelch(WINDOW *win); + int mvdelch(int y, int x); + int mvwdelch(WINDOW *win, int y, int x);
- Utilities
@@ -2189,7 +1802,6 @@ diff --git a/st.info b/st.info- Configuration changes -
- Major changes
diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index f2de0a2..66f34d8 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -1,6 +1,6 @@ - @@ -126,7 +126,7 @@SEE ALSO
curses(3x) - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html index f66e368..fc21e32 100644 --- a/doc/html/man/captoinfo.1m.html +++ b/doc/html/man/captoinfo.1m.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int wadd_wch( WINDOW *win, const cchar_t *wch ); int mvadd_wch( int y, int x, const cchar_t *wch ); int mvwadd_wch( WINDOW *win, int y, int x, const cchar_t *wch ); + int echo_wchar( const cchar_t *wch ); int wecho_wchar( WINDOW *win, const cchar_t *wch ); @@ -66,20 +67,20 @@DESCRIPTION
add_wch
- The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the com- - plex character wch into the given window at its current position, which - is then advanced. These functions perform wrapping and special-charac- - ter processing as follows: + The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the + complex character wch into the given window at its current position, + which is then advanced. These functions perform wrapping and special- + character processing as follows: o If wch refers to a spacing character, then any previous character at that location is removed. A new character specified by wch is - placed at that location with rendition specified by wch. The cur- - sor then advances to the next spacing character on the screen. + placed at that location with rendition specified by wch. The + cursor then advances to the next spacing character on the screen. o If wch refers to a non-spacing character, all previous characters at that location are preserved. The non-spacing characters of wch - are added to the spacing complex character, and the rendition spec- - ified by wch is ignored. + are added to the spacing complex character, and the rendition + specified by wch is ignored. o If the character part of wch is a tab, newline, backspace or other control character, the window is updated and the cursor moves as if @@ -88,18 +89,18 @@echo_wchar
The echo_wchar function is functionally equivalent to a call to add_wch - followed by a call to refresh(3x). Similarly, the wecho_wchar is func- - tionally equivalent to a call to wadd_wch followed by a call to wre- - fresh. The knowledge that only a single character is being output is - taken into consideration and, for non-control characters, a consider- - able performance gain might be seen by using the *echo* functions - instead of their equivalents. + followed by a call to refresh(3x). Similarly, the wecho_wchar is + functionally equivalent to a call to wadd_wch followed by a call to + wrefresh. The knowledge that only a single character is being output + is taken into consideration and, for non-control characters, a + considerable performance gain might be seen by using the *echo* + functions instead of their equivalents.Line Graphics
Like addch(3x), addch_wch accepts symbols which make it simple to draw - lines and other frequently used special characters. These symbols cor- - respond to the same VT100 line-drawing set as addch(3x). + lines and other frequently used special characters. These symbols + correspond to the same VT100 line-drawing set as addch(3x). ACS Unicode ASCII acsc Glyph Name Default Default char Name @@ -111,8 +112,8 @@ WACS_CKBOARD 0x2592 : a checker board (stipple) WACS_DARROW 0x2193 v . arrow pointing down WACS_DEGREE 0x00b0 ' f degree symbol - WACS_DIAMOND 0x25c6 + ` diamond + WACS_DIAMOND 0x25c6 + ` diamond WACS_GEQUAL 0x2265 > > greater-than-or-equal-to WACS_HLINE 0x2500 - q horizontal line WACS_LANTERN 0x2603 # i lantern symbol @@ -188,7 +189,24 @@RETURN VALUE
All routines return the integer ERR upon failure and OK on success. - Functions with a "mv" prefix first perform a cursor movement using + X/Open does not define any error conditions. This implementation + returns an error + + o if the window pointer is null or + + o if it is not possible to add a complete character in the window. + + The latter may be due to different causes: + + o If scrollok is not enabled, writing a character at the lower right + margin succeeds. However, an error is returned because it is not + possible to wrap to a new line + + o If an error is detected when converting a multibyte character to a + sequence of bytes, or if it is not possible to add all of the + resulting bytes in the window, an error is returned. + + Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if the window pointer is null. @@ -198,77 +216,77 @@PORTABILITY
- All of these functions are described in the XSI Curses standard, Issue - 4. The defaults specified for line-drawing characters apply in the + All of these functions are described in the XSI Curses standard, Issue + 4. The defaults specified for line-drawing characters apply in the POSIX locale. - X/Open Curses makes it clear that the WACS_ symbols should be defined + X/Open Curses makes it clear that the WACS_ symbols should be defined as a pointer to cchar_t data, e.g., in the discussion of border_set. A few implementations are problematic: o NetBSD curses defines the symbols as a wchar_t within a cchar_t. o HPUX curses equates some of the ACS_ symbols to the analogous WACS_ - symbols as if the ACS_ symbols were wide characters. The misde- - fined symbols are the arrows and other symbols which are not used - for line-drawing. + symbols as if the ACS_ symbols were wide characters. The + misdefined symbols are the arrows and other symbols which are not + used for line-drawing. X/Open Curses does not define symbols for thick- or double-lines. SVr4 - curses implementations defined their line-drawing symbols in terms of - intermediate symbols. This implementation extends those symbols, pro- - viding new definitions which are not in the SVr4 implementations. - - Not all Unicode-capable terminals provide support for VT100-style - alternate character sets (i.e., the acsc capability), with their corre- - sponding line-drawing characters. X/Open Curses did not address the - aspect of integrating Unicode with line-drawing characters. Existing - implementations of Unix curses (AIX, HPUX, Solaris) use only the acsc - character-mapping to provide this feature. As a result, those imple- - mentations can only use single-byte line-drawing characters. Ncurses - 5.3 (2002) provided a table of Unicode values to solve these problems. - NetBSD curses incorporated that table in 2010. - - In this implementation, the Unicode values are used instead of the ter- - minal description's acsc mapping as discussed in ncurses(3x) for the - environment variable NCURSES_NO_UTF8_ACS. In contrast, for the same + curses implementations defined their line-drawing symbols in terms of + intermediate symbols. This implementation extends those symbols, + providing new definitions which are not in the SVr4 implementations. + + Not all Unicode-capable terminals provide support for VT100-style + alternate character sets (i.e., the acsc capability), with their + corresponding line-drawing characters. X/Open Curses did not address + the aspect of integrating Unicode with line-drawing characters. + Existing implementations of Unix curses (AIX, HPUX, Solaris) use only + the acsc character-mapping to provide this feature. As a result, those + implementations can only use single-byte line-drawing characters. + Ncurses 5.3 (2002) provided a table of Unicode values to solve these + problems. NetBSD curses incorporated that table in 2010. + + In this implementation, the Unicode values are used instead of the + terminal description's acsc mapping as discussed in ncurses(3x) for the + environment variable NCURSES_NO_UTF8_ACS. In contrast, for the same cases, the line-drawing characters described in curs_addch(3x) will use only the ASCII default values. - Having Unicode available does not solve all of the problems with line- + Having Unicode available does not solve all of the problems with line- drawing for curses: - o The closest Unicode equivalents to the VT100 graphics S1, S3, S7 - and S9 frequently are not displayed at the regular intervals which + o The closest Unicode equivalents to the VT100 graphics S1, S3, S7 + and S9 frequently are not displayed at the regular intervals which the terminal used. - o The lantern is a special case. It originated with the AT&T 4410 - terminal in the early 1980s. There is no accessible documentation + o The lantern is a special case. It originated with the AT&T 4410 + terminal in the early 1980s. There is no accessible documentation depicting the lantern symbol on the AT&T terminal. Lacking documentation, most readers assume that a storm lantern was intended. But there are several possibilities, all with problems. - Unicode 6.0 (2010) does provide two lantern symbols: U+1F383 and - U+1F3EE. Those were not available in 2002, and are irrelevant - since they lie outside the BMP and as a result are not generally + Unicode 6.0 (2010) does provide two lantern symbols: U+1F383 and + U+1F3EE. Those were not available in 2002, and are irrelevant + since they lie outside the BMP and as a result are not generally available in terminals. They are not storm lanterns, in any case. Most storm lanterns have a tapering glass chimney (to guard against tipping); some have a wire grid protecting the chimney. - For the tapering appearance, U+2603 was adequate. In use on a + For the tapering appearance, U+2603 was adequate. In use on a terminal, no one can tell what the image represents. Unicode calls it a snowman. - Others have suggested these alternatives: S U+00A7 (section mark), - O U+0398 (theta), O U+03A6 (phi), d U+03B4 (delta), U+2327 (x in a - rectangle), U+256C (forms double vertical and horizontal), and - U+2612 (ballot box with x). + Others have suggested these alternatives: <section> U+00A7 (section + mark), <Theta> U+0398 (theta), <Phi> U+03A6 (phi), <delta> U+03B4 + (delta), U+2327 (x in a rectangle), U+256C (forms double vertical + and horizontal), and U+2612 (ballot box with x).SEE ALSO
- curses(3x), curs_addch(3x), curs_attr(3x), curs_clear(3x), curs_out- - opts(3x), curs_refresh(3x), putwc(3) + curses(3x), curs_addch(3x), curs_attr(3x), curs_clear(3x), + curs_outopts(3x), curs_refresh(3x), putwc(3) diff --git a/doc/html/man/curs_add_wchstr.3x.html b/doc/html/man/curs_add_wchstr.3x.html index 60b5b7c..deb49e1 100644 --- a/doc/html/man/curs_add_wchstr.3x.html +++ b/doc/html/man/curs_add_wchstr.3x.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int add_wchnstr(const cchar_t *wchstr, int n); int wadd_wchstr(WINDOW * win, const cchar_t *wchstr); int wadd_wchnstr(WINDOW * win, const cchar_t *wchstr, int n); + int mvadd_wchstr(int y, int x, const cchar_t *wchstr); int mvadd_wchnstr(int y, int x, const cchar_t *wchstr, int n); int mvwadd_wchstr(WINDOW *win, int y, int x, const cchar_t *wchstr); @@ -112,7 +113,7 @@SEE ALSO
- curs_addwstr(3x), curses(3x). + curses(3x), curs_addwstr(3x). Comparable functions in the narrow-character (ncurses) library are de- scribed in curs_addchstr(3x). diff --git a/doc/html/man/curs_addch.3x.html b/doc/html/man/curs_addch.3x.html index fa2f94d..b19e72e 100644 --- a/doc/html/man/curs_addch.3x.html +++ b/doc/html/man/curs_addch.3x.html @@ -1,7 +1,7 @@ - @@ -55,12 +55,13 @@SYNOPSIS
#include <curses.h> - int addch(const chtype ch); - int waddch(WINDOW *win, const chtype ch); - int mvaddch(int y, int x, const chtype ch); - int mvwaddch(WINDOW *win, int y, int x, const chtype ch); - int echochar(const chtype ch); - int wechochar(WINDOW *win, const chtype ch); + int addch(const chtype ch); + int waddch(WINDOW *win, const chtype ch); + int mvaddch(int y, int x, const chtype ch); + int mvwaddch(WINDOW *win, int y, int x, const chtype ch); + + int echochar(const chtype ch); + int wechochar(WINDOW *win, const chtype ch);DESCRIPTION
@@ -95,34 +96,35 @@ o Tabs are considered to be at every eighth column. The tab interval may be altered by setting the TABSIZE variable. - If ch is any other control character, it is drawn in ^X notation. - Calling winch after adding a control character does not return the - character itself, but instead returns the ^-representation of the con- - trol character. + If ch is any other nonprintable character, it is drawn in printable + form, i.e., the ^X notation used by unctrl(3x). Calling winch after + adding a nonprintable character does not return the character itself, + but instead returns the printable representation of the character. Video attributes can be combined with a character argument passed to addch or related functions by logical-ORing them into the character. (Thus, text, including attributes, can be copied from one place to - another using inch(3x) and addch.) See the curs_attr(3x) page for val- - ues of predefined video attribute constants that can be usefully OR'ed - into characters. + another using inch(3x) and addch.) See the curs_attr(3x) page for + values of predefined video attribute constants that can be usefully + OR'ed into characters.Echoing characters
The echochar and wechochar routines are equivalent to a call to addch followed by a call to refresh(3x), or a call to waddch followed by a call to wrefresh. The knowledge that only a single character is being - output is used and, for non-control characters, a considerable perfor- - mance gain may be seen by using these routines instead of their equiva- - lents. + output is used and, for non-control characters, a considerable + performance gain may be seen by using these routines instead of their + equivalents.Line Graphics
The following variables may be used to add line drawing characters to the screen with routines of the addch family. The default character listed below is used if the acsc capability does not define a terminal- - specific replacement for it, or if the terminal and locale configura- - tion requires Unicode but the library is unable to use Unicode. + specific replacement for it, or if the terminal and locale + configuration requires Unicode but the library is unable to use + Unicode. The names are taken from VT100 nomenclature. @@ -165,14 +167,25 @@RETURN VALUE
All routines return the integer ERR upon failure and OK on success (the - SVr4 manuals specify only "an integer value other than ERR") upon suc- - cessful completion, unless otherwise noted in the preceding routine + SVr4 manuals specify only "an integer value other than ERR") upon + successful completion, unless otherwise noted in the preceding routine descriptions. - Functions with a "mv" prefix first perform a cursor movement using + Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if the window pointer is null. + If it is not possible to add a complete character, an error is + returned: + + o If scrollok is not enabled, writing a character at the lower right + margin succeeds. However, an error is returned because it is not + possible to wrap to a new line + + o If an error is detected when converting a multibyte character to a + sequence of bytes, or if it is not possible to add all of the + resulting bytes in the window, an error is returned. +NOTES
Note that addch, mvaddch, mvwaddch, and echochar may be macros. @@ -186,9 +199,9 @@ACS Symbols
X/Open Curses states that the ACS_ definitions are char constants. For - the wide-character implementation (see curs_add_wch), there are analo- - gous WACS_ definitions which are cchar_t constants. Some implementa- - tions are problematic: + the wide-character implementation (see curs_add_wch), there are + analogous WACS_ definitions which are cchar_t constants. Some + implementations are problematic: o Some implementations define the ACS symbols to a constant (such as Solaris), while others define those to entries in an array. @@ -198,20 +211,20 @@ for compatibility. o HPUX curses equates some of the ACS_ symbols to the analogous WACS_ - symbols as if the ACS_ symbols were wide characters. The misde- - fined symbols are the arrows and other symbols which are not used - for line-drawing. + symbols as if the ACS_ symbols were wide characters. The + misdefined symbols are the arrows and other symbols which are not + used for line-drawing. o X/Open Curses (issues 2 through 7) has a typographical error for - the ACS_LANTERN symbol, equating its "VT100+ Character" to I (capi- - tal I), while the header files for SVr4 curses and the various + the ACS_LANTERN symbol, equating its "VT100+ Character" to I + (capital I), while the header files for SVr4 curses and the various implementations use i (lowercase). None of the terminal descriptions on Unix platforms use uppercase- - I, except for Solaris (i.e., screen's terminal description, appar- - ently based on the X/Open documentation around 1995). On the other - hand, the terminal description gs6300 (AT&T PC6300 with EMOTS Ter- - minal Emulator) uses lowercase-i. + I, except for Solaris (i.e., screen's terminal description, + apparently based on the X/Open documentation around 1995). On the + other hand, the terminal description gs6300 (AT&T PC6300 with EMOTS + Terminal Emulator) uses lowercase-i. Some ACS symbols (ACS_S3, ACS_S7, ACS_LEQUAL, ACS_GEQUAL, ACS_PI, ACS_NEQUAL, ACS_STERLING) were not documented in any publicly released @@ -228,9 +241,9 @@ o whether the locale uses UTF-8 encoding. - In certain cases, the terminal is unable to display line-drawing char- - acters except by using UTF-8 (see the discussion of NCURSES_NO_UTF8_ACS - in ncurses(3x)). + In certain cases, the terminal is unable to display line-drawing + characters except by using UTF-8 (see the discussion of + NCURSES_NO_UTF8_ACS in ncurses(3x)).Character Set
@@ -238,9 +251,9 @@ single character. As discussed in curs_attr(3x), that character may have been more than eight bits in an SVr3 or SVr4 implementation, but in the X/Open Curses model, the details are not given. The important - distinction between SVr4 curses and X/Open Curses is that the non-char- - acter information (attributes and color) was separated from the charac- - ter information which is packed in a chtype to pass to waddch. + distinction between SVr4 curses and X/Open Curses is that the non- + character information (attributes and color) was separated from the + character information which is packed in a chtype to pass to waddch. In this implementation, chtype holds an eight-bit character. But ncurses allows multibyte characters to be passed in a succession of @@ -257,8 +270,8 @@ multibyte character by moving the current location (e.g., using wmove), ncurses discards the partially built character, starting over again. - For portability to other implementations, do not rely upon this behav- - ior: + For portability to other implementations, do not rely upon this + behavior: o check if a character can be represented as a single byte in the current locale before attempting call waddch, and @@ -277,8 +290,8 @@SEE ALSO
- curses(3x), curs_attr(3x), curs_clear(3x), curs_inch(3x), curs_out- - opts(3x), curs_refresh(3x), curs_variables(3x), putc(3). + curses(3x), curs_attr(3x), curs_clear(3x), curs_inch(3x), + curs_outopts(3x), curs_refresh(3x), curs_variables(3x), putc(3). Comparable functions in the wide-character (ncursesw) library are described in curs_add_wch(3x). diff --git a/doc/html/man/curs_addchstr.3x.html b/doc/html/man/curs_addchstr.3x.html index 7871292..78abdeb 100644 --- a/doc/html/man/curs_addchstr.3x.html +++ b/doc/html/man/curs_addchstr.3x.html @@ -1,4 +1,4 @@ - @@ -55,14 +55,15 @@SYNOPSIS
#include <curses.h> - int addchstr(const chtype *chstr); - int addchnstr(const chtype *chstr, int n); - int waddchstr(WINDOW *win, const chtype *chstr); - int waddchnstr(WINDOW *win, const chtype *chstr, int n); - int mvaddchstr(int y, int x, const chtype *chstr); - int mvaddchnstr(int y, int x, const chtype *chstr, int n); - int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr); - int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n); + int addchstr(const chtype *chstr); + int addchnstr(const chtype *chstr, int n); + int waddchstr(WINDOW *win, const chtype *chstr); + int waddchnstr(WINDOW *win, const chtype *chstr, int n); + + int mvaddchstr(int y, int x, const chtype *chstr); + int mvaddchnstr(int y, int x, const chtype *chstr, int n); + int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr); + int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);DESCRIPTION
@@ -106,7 +107,7 @@SEE ALSO
- curs_addstr(3x), curses(3x). + curses(3x), curs_addstr(3x). Comparable functions in the wide-character (ncursesw) library are de- scribed in curs_add_wchstr(3x). diff --git a/doc/html/man/curs_addstr.3x.html b/doc/html/man/curs_addstr.3x.html index 243afe4..71abb99 100644 --- a/doc/html/man/curs_addstr.3x.html +++ b/doc/html/man/curs_addstr.3x.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int addnstr(const char *str, int n); int waddstr(WINDOW *win, const char *str); int waddnstr(WINDOW *win, const char *str, int n); + int mvaddstr(int y, int x, const char *str); int mvaddnstr(int y, int x, const char *str, int n); int mvwaddstr(WINDOW *win, int y, int x, const char *str); @@ -67,16 +68,16 @@DESCRIPTION
These functions write the (null-terminated) character string str on the - given window. It is similar to calling waddch once for each character - in the string. + given window. It is similar to calling waddch once for each byte in + the string. The mv functions perform cursor movement once, before writing any char- acters. Thereafter, the cursor is advanced as a side-effect of writing to the window. - The four functions with n as the last argument write at most n charac- - ters, or until a terminating null is reached. If n is -1, then the en- - tire string will be added. + The four functions with n as the last argument write at most n bytes, + or until a terminating null is reached. If n is -1, then the entire + string will be added.RETURN VALUE
@@ -93,7 +94,15 @@ Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if - the window pointer is null. + the window pointer is null. If an error is returned by the wmove, no + characters are added to the window. + + If an error is returned by waddch (e.g., because the window is not + large enough, or an illegal byte sequence was detected) only part of + the string may be added. Aside from that, there is a special case in + waddch where an error may be returned after successfully writing a + character to the lower-right corner of a window when scrollok is dis- + abled.NOTES
diff --git a/doc/html/man/curs_addwstr.3x.html b/doc/html/man/curs_addwstr.3x.html index 6fea2ae..5285206 100644 --- a/doc/html/man/curs_addwstr.3x.html +++ b/doc/html/man/curs_addwstr.3x.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int addnwstr(const wchar_t *wstr, int n); int waddwstr(WINDOW *win, const wchar_t *wstr); int waddnwstr(WINDOW *win, const wchar_t *wstr, int n); + int mvaddwstr(int y, int x, const wchar_t *wstr); int mvaddnwstr(int y, int x, const wchar_t *wstr, int n); int mvwaddwstr(WINDOW *win, int y, int x, const wchar_t *wstr); diff --git a/doc/html/man/curs_attr.3x.html b/doc/html/man/curs_attr.3x.html index 4e9cccc..13ead71 100644 --- a/doc/html/man/curs_attr.3x.html +++ b/doc/html/man/curs_attr.3x.html @@ -1,4 +1,4 @@ - @@ -56,8 +56,10 @@ void bkgdset(chtype ch); void wbkgdset(WINDOW *win, chtype ch); + int bkgd(chtype ch); int wbkgd(WINDOW *win, chtype ch); + chtype getbkgd(WINDOW *win); @@ -65,8 +67,8 @@bkgdset
The bkgdset and wbkgdset routines manipulate the background of the - named window. The window background is a chtype consisting of any com- - bination of attributes (i.e., rendition) and a character. The + named window. The window background is a chtype consisting of any + combination of attributes (i.e., rendition) and a character. The attribute part of the background is combined (OR'ed) with all non-blank characters that are written into the window with waddch. Both the character and attribute parts of the background are combined with the @@ -97,9 +99,9 @@ This implementation, like SVr4 curses, does not store the background and window attribute contributions to each cell separately. It updates - the rendition by comparing the character, non-color attributes and col- - ors contained in the background. For each cell in the window, whether - or not it is blank: + the rendition by comparing the character, non-color attributes and + colors contained in the background. For each cell in the window, + whether or not it is blank: o The library first compares the character, and if it matches the current character part of the background, it replaces that with the @@ -107,20 +109,20 @@ o The library then checks if the cell uses color, i.e., its color pair value is nonzero. If not, it simply replaces the attributes - and color pair in the cell with those from the new background char- - acter. + and color pair in the cell with those from the new background + character. o If the cell uses color, and that matches the color in the current background, the library removes attributes which may have come from the current background and adds attributes from the new background. - It finishes by setting the cell to use the color from the new back- - ground. + It finishes by setting the cell to use the color from the new + background. o If the cell uses color, and that does not match the color in the current background, the library updates only the non-color - attributes, first removing those which may have come from the cur- - rent background, and then adding attributes from the new back- - ground. + attributes, first removing those which may have come from the + current background, and then adding attributes from the new + background. If the background's character value is zero, a space is assumed. @@ -136,8 +138,8 @@RETURN VALUE
These functions are described in the XSI Curses standard, Issue 4. It - specifies that bkgd and wbkgd return ERR on failure, but gives no fail- - ure conditions. + specifies that bkgd and wbkgd return ERR on failure, but gives no + failure conditions. The routines bkgd and wbkgd return the integer OK, unless the library has not been initialized. diff --git a/doc/html/man/curs_bkgrnd.3x.html b/doc/html/man/curs_bkgrnd.3x.html index a1ab924..8e60e21 100644 --- a/doc/html/man/curs_bkgrnd.3x.html +++ b/doc/html/man/curs_bkgrnd.3x.html @@ -1,4 +1,4 @@ - @@ -56,8 +56,10 @@ int bkgrnd( const cchar_t *wch); int wbkgrnd( WINDOW *win, const cchar_t *wch); + void bkgrndset(const cchar_t *wch ); void wbkgrndset(WINDOW *win, const cchar_t *wch); + int getbkgrnd(cchar_t *wch); int wgetbkgrnd(WINDOW *win, cchar_t *wch); @@ -71,8 +73,8 @@ The attribute part of the background is combined (OR'ed) with all non- blank characters that are written into the window with waddch. Both the character and attribute parts of the background are combined with - the blank characters. The background becomes a property of the charac- - ter and moves with the character through any scrolling and + the blank characters. The background becomes a property of the + character and moves with the character through any scrolling and insert/delete line/character operations. To the extent possible on a particular terminal, the attribute part of @@ -82,8 +84,8 @@bkgrnd
The bkgrnd and wbkgrnd functions set the background property of the - current or specified window and then apply this setting to every char- - acter position in that window: + current or specified window and then apply this setting to every + character position in that window: o The rendition of every character on the screen is changed to the new background rendition. diff --git a/doc/html/man/curs_border.3x.html b/doc/html/man/curs_border.3x.html index f148f20..e70367d 100644 --- a/doc/html/man/curs_border.3x.html +++ b/doc/html/man/curs_border.3x.html @@ -1,4 +1,4 @@ - @@ -54,20 +54,24 @@SYNOPSIS
#include <curses.h> - int border(chtype ls, chtype rs, chtype ts, chtype bs, - chtype tl, chtype tr, chtype bl, chtype br); - int wborder(WINDOW *win, chtype ls, chtype rs, - chtype ts, chtype bs, chtype tl, chtype tr, - chtype bl, chtype br); - int box(WINDOW *win, chtype verch, chtype horch); - int hline(chtype ch, int n); - int whline(WINDOW *win, chtype ch, int n); - int vline(chtype ch, int n); - int wvline(WINDOW *win, chtype ch, int n); - int mvhline(int y, int x, chtype ch, int n); - int mvwhline(WINDOW *, int y, int x, chtype ch, int n); - int mvvline(int y, int x, chtype ch, int n); - int mvwvline(WINDOW *, int y, int x, chtype ch, int n); + + int border(chtype ls, chtype rs, chtype ts, chtype bs, + chtype tl, chtype tr, chtype bl, chtype br); + int wborder(WINDOW *win, chtype ls, chtype rs, + chtype ts, chtype bs, chtype tl, chtype tr, + chtype bl, chtype br); + + int box(WINDOW *win, chtype verch, chtype horch); + + int hline(chtype ch, int n); + int whline(WINDOW *win, chtype ch, int n); + int vline(chtype ch, int n); + int wvline(WINDOW *win, chtype ch, int n); + + int mvhline(int y, int x, chtype ch, int n); + int mvwhline(WINDOW *win, int y, int x, chtype ch, int n); + int mvvline(int y, int x, chtype ch, int n); + int mvwvline(WINDOW *win, int y, int x, chtype ch, int n);DESCRIPTION
diff --git a/doc/html/man/curs_border_set.3x.html b/doc/html/man/curs_border_set.3x.html index 9c1f845..fad5c0e 100644 --- a/doc/html/man/curs_border_set.3x.html +++ b/doc/html/man/curs_border_set.3x.html @@ -1,4 +1,4 @@ - @@ -52,16 +52,19 @@SYNOPSIS
- # include <curses.h> + #include <curses.h> int erase(void); - int werase(WINDOW *win); + int werase(WINDOW *win); + int clear(void); - int wclear(WINDOW *win); + int wclear(WINDOW *win); + int clrtobot(void); - int wclrtobot(WINDOW *win); + int wclrtobot(WINDOW *win); + int clrtoeol(void); - int wclrtoeol(WINDOW *win); + int wclrtoeol(WINDOW *win);DESCRIPTION
@@ -85,12 +88,14 @@RETURN VALUE
- All routines return the integer OK on success and ERR on failure. The - SVr4.0 manual says "or a non-negative integer if immedok is set", but - this appears to be an error. + All routines return the integer OK on success and ERR on failure. - X/Open defines no error conditions. In this implementation, functions - using a window pointer parameter return an error if it is null. + X/Open defines no error conditions. In this implementation, + + o functions using a window pointer parameter return an error if it is + null + + o wclrtoeol returns an error if the cursor position is about to wrap.NOTES
@@ -103,17 +108,22 @@ standard specifies that they return ERR on failure, but specifies no error conditions. - Some historic curses implementations had, as an undocumented feature, - the ability to do the equivalent of clearok(..., 1) by saying touch- + The SVr4.0 manual says that these functions could return "a non-nega- + tive integer if immedok is set", referring to the return-value of wre- + fresh. In that implementation, wrefresh would return a count of the + number of characters written to the terminal. + + Some historic curses implementations had, as an undocumented feature, + the ability to do the equivalent of clearok(..., 1) by saying touch- win(stdscr) or clear(stdscr). This will not work under ncurses. This implementation, and others such as Solaris, sets the current posi- tion to 0,0 after erasing via werase and wclear. That fact is not doc- - umented in other implementations, and may not be true of implementa- + umented in other implementations, and may not be true of implementa- tions which were not derived from SVr4 source. Not obvious from the description, most implementations clear the screen - after wclear even for a subwindow or derived window. If you do not + after wclear even for a subwindow or derived window. If you do not want to clear the screen during the next wrefresh, use werase instead. diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html index 591ed40..22964c4 100644 --- a/doc/html/man/curs_color.3x.html +++ b/doc/html/man/curs_color.3x.html @@ -1,6 +1,6 @@ - @@ -61,22 +61,22 @@ bool has_colors(void); bool can_change_color(void); - int init_pair(short pair, short f, short b); - int init_color(short color, short r, short g, short b); + int init_pair(short pair, short f, short b); + int init_color(short color, short r, short g, short b); /* extensions */ - int init_extended_pair(int pair, int f, int b); - int init_extended_color(int color, int r, int g, int b); + int init_extended_pair(int pair, int f, int b); + int init_extended_color(int color, int r, int g, int b); - int color_content(short color, short *r, short *g, short *b); - int pair_content(short pair, short *f, short *b); + int color_content(short color, short *r, short *g, short *b); + int pair_content(short pair, short *f, short *b); /* extensions */ - int extended_color_content(int color, int *r, int *g, int *b); - int extended_pair_content(int pair, int *f, int *b); + int extended_color_content(int color, int *r, int *g, int *b); + int extended_pair_content(int pair, int *f, int *b); /* extensions */ void reset_color_pairs(void); - int COLOR_PAIR(int n); + int COLOR_PAIR(int n); PAIR_NUMBER(attrs); @@ -135,8 +135,8 @@ o If the parameter passed to waddch is not blank, or it does not use the special color pair 0, curses prefers the color pair from the - parameter, if it is nonzero. Otherwise, it tries the window at- - tribute next, and finally the background character. + parameter, if it is nonzero. Otherwise, it tries the window attri- + bute next, and finally the background character. Some curses functions such as wprintw call waddch. Those do not com- bine its parameter with a color pair. Consequently those calls use on- @@ -439,6 +439,50 @@ o Color RGB values are not settable. +HISTORY
+ SVr3.2 introduced color support to curses in 1987. + + SVr4 made internal changes, e.g., moving the storage for the color + state from SP (the SCREEN structure) to cur_term (the TERMINAL struc- + ture), but provided the same set of library functions. + + SVr4 curses limits the number of color pairs to 64, reserving color + pair zero (0) as the terminal's initial uncolored state. This limit + arises because the color pair information is a bitfield in the chtype + data type (denoted by A_COLOR). + + Other implementations of curses had different limits: + + o PCCurses (1987-1990) provided for only eight (8) colors. + + o PDCurses (1992-present) inherited the 8-color limitation from PC- + Curses, but changed this to 256 in version 2.5 (2001), along with + changing chtype from 16-bits to 32-bits. + + o X/Open Curses (1992-present) added a new structure cchar_t to store + the character, attributes and color-pair values, allowing increased + range of color-pairs. Both color-pairs and color-values used a + signed short, limiting values to 15 bits. + + o ncurses (1992-present) uses eight bits for A_COLOR in chtype val- + ues. + + Version 5.3 provided a wide-character interface (2002), but left + color-pairs as part of the attributes-field. + + Since version 6 (2015), ncurses uses a separate int for color-pairs + in the cchar_t values. When those color-pair values fit in 8 bits, + ncurses allows color-pairs to be manipulated via the functions us- + ing chtype values. + + o NetBSD curses used 6 bits from 2000 (when colors were first sup- + ported) until 2004. At that point, NetBSD changed to use 10 bits. + As of 2021, that size is unchanged. Like ncurses before version 6, + the NetBSD color-pair information is stored in the attributes field + of cchar_t, limiting the number of color-pairs by the size of the + bitfield. + +PORTABILITY
This implementation satisfies XSI Curses's minimum maximums for COLORS and COLOR_PAIRS. @@ -511,6 +555,7 @@- RETURN VALUE
- NOTES
+- HISTORY
- PORTABILITY
- SEE ALSO
DESCRIPTION
These routines delete the character under the cursor; all characters to the right of the cursor on the same line are moved to the left one position and the last character on the line is filled with a blank. - The cursor position does not change (after moving to y, x, if speci- - fied). (This does not imply use of the hardware delete character fea- - ture.) + The cursor position does not change (after moving to y, x, if + specified). (This does not imply use of the hardware delete character + feature.)RETURN VALUE
- All routines return the integer ERR upon failure and an OK (SVr4 speci- - fies only "an integer value other than ERR") upon successful comple- - tion. + All routines return the integer ERR upon failure and an OK (SVr4 + specifies only "an integer value other than ERR") upon successful + completion. Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if diff --git a/doc/html/man/curs_deleteln.3x.html b/doc/html/man/curs_deleteln.3x.html index 83add2b..e2cdde0 100644 --- a/doc/html/man/curs_deleteln.3x.html +++ b/doc/html/man/curs_deleteln.3x.html @@ -1,4 +1,4 @@ - @@ -55,11 +55,13 @@ #include <curses.h> int deleteln(void); - int wdeleteln(WINDOW *win); - int insdelln(int n); - int winsdelln(WINDOW *win, int n); + int wdeleteln(WINDOW *win); + + int insdelln(int n); + int winsdelln(WINDOW *win, int n); + int insertln(void); - int winsertln(WINDOW *win); + int winsertln(WINDOW *win);DESCRIPTION
@@ -74,14 +76,14 @@ the cursor), and move the remaining lines up. The bottom n lines are cleared. The current cursor position remains the same. - The insertln and winsertln routines insert a blank line above the cur- - rent line and the bottom line is lost. + The insertln and winsertln routines insert a blank line above the + current line and the bottom line is lost.RETURN VALUE
- All routines return the integer ERR upon failure and an OK (SVr4 speci- - fies only "an integer value other than ERR") upon successful comple- - tion. + All routines return the integer ERR upon failure and an OK (SVr4 + specifies only "an integer value other than ERR") upon successful + completion. X/Open defines no error conditions. In this implementation, if the window parameter is null, an error is returned. @@ -98,8 +100,8 @@ These routines do not require a hardware line delete or insert feature in the terminal. In fact, they will not use hardware line - delete/insert unless idlok(..., TRUE) has been set on the current win- - dow. + delete/insert unless idlok(..., TRUE) has been set on the current + window.SEE ALSO
diff --git a/doc/html/man/curs_extend.3x.html b/doc/html/man/curs_extend.3x.html index b37889a..1a84cf6 100644 --- a/doc/html/man/curs_extend.3x.html +++ b/doc/html/man/curs_extend.3x.html @@ -1,6 +1,6 @@ - @@ -55,7 +55,7 @@ #include <curses.h> const char * curses_version(void); - int use_extended_names(bool enable); + int use_extended_names(bool enable);DESCRIPTION
@@ -65,15 +65,17 @@curses_version
Use curses_version to get the version number, including patch level of - the library, e.g., 5.0.19991023 + the library, prefixed by "ncurses", e.g., + + ncurses 5.0.19991023use_extended_names
- The use_extended_names function controls whether the calling applica- - tion is able to use user-defined or nonstandard names which may be com- - piled into the terminfo description, i.e., via the terminfo or termcap - interfaces. Normally these names are available for use, since the - essential decision is made by using the -x option of tic to compile + The use_extended_names function controls whether the calling + application is able to use user-defined or nonstandard names which may + be compiled into the terminfo description, i.e., via the terminfo or + termcap interfaces. Normally these names are available for use, since + the essential decision is made by using the -x option of tic to compile extended terminal definitions. However you can disable this feature to ensure compatibility with other implementations of curses. diff --git a/doc/html/man/curs_get_wch.3x.html b/doc/html/man/curs_get_wch.3x.html index 6656205..232e8a2 100644 --- a/doc/html/man/curs_get_wch.3x.html +++ b/doc/html/man/curs_get_wch.3x.html @@ -1,6 +1,6 @@ - @@ -58,10 +58,13 @@ int wget_wch(WINDOW *win, wint_t *wch); int mvget_wch(int y, int x, wint_t *wch); int mvwget_wch(WINDOW *win, int y, int x, wint_t *wch); + int unget_wch(const wchar_t wch);DESCRIPTION
+ +wget_wch
The get_wch, wget_wch, mvget_wch, and mvwget_wch functions read a char- acter from the terminal associated with the current or specified win- dow. In no-delay mode, if no input is waiting, the value ERR is re- @@ -99,23 +102,30 @@ fine_key(3x) have no names, but also are expected to have values outside the range of 8-bit characters. + +unget_wch
The unget_wch function pushes the wide character wch back onto the head of the input queue, so the wide character is returned by the next call to get_wch. The pushback of one character is guaranteed. If the pro- gram calls unget_wch too many times without an intervening call to get_wch, the operation may fail. + Unlike ungetch and wgetch, unget_wch cannot distinguish special charac- + ters returned by wget_wch from ordinary characters. An application can + push special keys which it may read via wget_wch by checking for the + KEY_CODE_YES result, and using ungetch for those special keys. +NOTES
- The header file <curses.h> automatically includes the header file + The header file <curses.h> automatically includes the header file <stdio.h>. - Applications should not define the escape key by itself as a single- + Applications should not define the escape key by itself as a single- character function. - When using get_wch, wget_wch, mvget_wch, or mvwget_wch, applications + When using get_wch, wget_wch, mvget_wch, or mvwget_wch, applications should not use nocbreak mode and echo mode at the same time. Depending - on the state of the tty driver when each character is typed, the pro- + on the state of the tty driver when each character is typed, the pro- gram may produce undesirable results. All functions except wget_wch and unget_wch may be macros. @@ -123,14 +133,14 @@RETURN VALUE
When get_wch, wget_wch, mvget_wch, and mvwget_wch functions successful- - ly report the pressing of a function key, they return KEY_CODE_YES. + ly report the pressing of a function key, they return KEY_CODE_YES. When they successfully report a wide character, they return OK. Other- wise, they return ERR. Upon successful completion, unget_wch returns OK. Otherwise, the func- tion returns ERR. - Functions with a "mv" prefix first perform a cursor movement using + Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if the window pointer is null. @@ -147,7 +157,12 @@
- NAME
- SYNOPSIS
-- DESCRIPTION
+- DESCRIPTION + +
- NOTES
- RETURN VALUE
- SEE ALSO
diff --git a/doc/html/man/curs_get_wstr.3x.html b/doc/html/man/curs_get_wstr.3x.html index 4169df2..8b781cc 100644 --- a/doc/html/man/curs_get_wstr.3x.html +++ b/doc/html/man/curs_get_wstr.3x.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int getn_wstr(wint_t *wstr, int n); int wget_wstr(WINDOW *win, wint_t *wstr); int wgetn_wstr(WINDOW *win, wint_t *wstr, int n); + int mvget_wstr(int y, int x, wint_t *wstr); int mvgetn_wstr(int y, int x, wint_t *wstr, int n); int mvwget_wstr(WINDOW *win, int y, int x, wint_t *wstr); diff --git a/doc/html/man/curs_getcchar.3x.html b/doc/html/man/curs_getcchar.3x.html index adee87e..b749f02 100644 --- a/doc/html/man/curs_getcchar.3x.html +++ b/doc/html/man/curs_getcchar.3x.html @@ -1,6 +1,6 @@ - @@ -73,8 +73,8 @@getcchar
The getcchar function gets a wide-character string and rendition from a - cchar_t argument. When wch is not a null pointer, the getcchar func- - tion does the following: + cchar_t argument. When wch is not a null pointer, the getcchar + function does the following: o Extracts information from a cchar_t value wcval @@ -123,8 +123,8 @@ o For functions which retrieve the color, e.g., getcchar, if opts is set it is treated as a pointer to int, and used to retrieve the - color pair as an int value, in addition retrieving it via the stan- - dard pointer to short parameter. + color pair as an int value, in addition retrieving it via the + standard pointer to short parameter.NOTES
@@ -134,8 +134,8 @@RETURN VALUE
- When wch is a null pointer, getcchar returns the number of wide charac- - ters referenced by wcval, including one for a trailing null. + When wch is a null pointer, getcchar returns the number of wide + characters referenced by wcval, including one for a trailing null. When wch is not a null pointer, getcchar returns OK upon successful completion, and ERR otherwise. @@ -180,8 +180,8 @@ of spacing and non-spacing characters (CCHARW_MAX). That was probably due to a misreading of the AIX 4 header files, because the X/Open Curses document was not generally available at that time. Later (in - 2002), this detail was overlooked when beginning to implement the func- - tions using the structure. + 2002), this detail was overlooked when beginning to implement the + functions using the structure. In practice, even four non-spacing characters may seem enough. X/Open Curses documents possible uses for non-spacing characters, including diff --git a/doc/html/man/curs_getch.3x.html b/doc/html/man/curs_getch.3x.html index 63817d5..f912849 100644 --- a/doc/html/man/curs_getch.3x.html +++ b/doc/html/man/curs_getch.3x.html @@ -1,4 +1,4 @@ - @@ -57,9 +57,13 @@ int getch(void); int wgetch(WINDOW *win); + int mvgetch(int y, int x); int mvwgetch(WINDOW *win, int y, int x); + int ungetch(int ch); + + /* extension */ int has_key(int ch); @@ -176,11 +180,11 @@ KEY_ENTER Enter or send KEY_SRESET Soft (partial) reset KEY_RESET Reset or hard reset + KEY_PRINT Print or copy KEY_LL Home down or bottom (lower left) KEY_A1 Upper left of keypad KEY_A3 Upper right of keypad - KEY_B2 Center of keypad KEY_C1 Lower left of keypad KEY_C3 Lower right of keypad @@ -371,8 +375,8 @@SEE ALSO
- curses(3x), curs_inopts(3x), curs_outopts(3x), curs_mouse(3x), - curs_move(3x), curs_refresh(3x), curs_variables(3x), resizeterm(3x). + curses(3x), curs_inopts(3x), curs_mouse(3x), curs_move(3x), curs_out- + opts(3x), curs_refresh(3x), curs_variables(3x), resizeterm(3x). Comparable functions in the wide-character (ncursesw) library are de- scribed in curs_get_wch(3x). diff --git a/doc/html/man/curs_getstr.3x.html b/doc/html/man/curs_getstr.3x.html index ca39dbf..3460ac7 100644 --- a/doc/html/man/curs_getstr.3x.html +++ b/doc/html/man/curs_getstr.3x.html @@ -1,6 +1,6 @@ - @@ -54,22 +54,22 @@SYNOPSIS
#include <curses.h> - void getyx(WINDOW *win, int y, int x); - void getparyx(WINDOW *win, int y, int x); - void getbegyx(WINDOW *win, int y, int x); - void getmaxyx(WINDOW *win, int y, int x); + void getyx(WINDOW *win, int y, int x); + void getparyx(WINDOW *win, int y, int x); + void getbegyx(WINDOW *win, int y, int x); + void getmaxyx(WINDOW *win, int y, int x);DESCRIPTION
The getyx macro places the current cursor position of the given window in the two integer variables y and x. - If win is a subwindow, the getparyx macro places the beginning coordi- - nates of the subwindow relative to the parent window into two integer - variables y and x. Otherwise, -1 is placed into y and x. + If win is a subwindow, the getparyx macro places the beginning + coordinates of the subwindow relative to the parent window into two + integer variables y and x. Otherwise, -1 is placed into y and x. - Like getyx, the getbegyx and getmaxyx macros store the current begin- - ning coordinates and size of the specified window. + Like getyx, the getbegyx and getmaxyx macros store the current + beginning coordinates and size of the specified window.RETURN VALUE
@@ -90,17 +90,18 @@ getcury, getmaxx, getmaxy, getparx and getpary for compatibility with older versions of curses. - Although X/Open Curses does not address this, many implementations pro- - vide members of the WINDOW structure containing values corresponding to - these macros. For best portability, do not rely on using the data in - WINDOW, since some implementations make WINDOW opaque (do not allow + Although X/Open Curses does not address this, many implementations + provide members of the WINDOW structure containing values corresponding + to these macros. For best portability, do not rely on using the data + in WINDOW, since some implementations make WINDOW opaque (do not allow direct use of its members). Besides the problem of opaque structures, the data stored in like-named members may not have like-values in different implementations. For example, the WINDOW._maxx and WINDOW._maxy values in ncurses have (at - least since release 1.8.1) differed by one from some other implementa- - tions. The difference is hidden by means of the macro getmaxyx. + least since release 1.8.1) differed by one from some other + implementations. The difference is hidden by means of the macro + getmaxyx.SEE ALSO
diff --git a/doc/html/man/curs_in_wch.3x.html b/doc/html/man/curs_in_wch.3x.html index ed9dd6a..71cee61 100644 --- a/doc/html/man/curs_in_wch.3x.html +++ b/doc/html/man/curs_in_wch.3x.html @@ -1,4 +1,4 @@ - @@ -55,9 +55,10 @@ #include <curses.h> int in_wch(cchar_t *wcval); + int win_wch(WINDOW *win, cchar_t *wcval); + int mvin_wch(int y, int x, cchar_t *wcval); int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval); - int win_wch(WINDOW *win, cchar_t *wcval);DESCRIPTION
@@ -68,8 +69,8 @@RETURN VALUE
No errors are defined in the XSI Curses standard. This implementation - checks for null pointers, returns ERR in that case. Also, the mv rou- - tines check for error moving the cursor, returning ERR in that case. + checks for null pointers, returns ERR in that case. Also, the mv + routines check for error moving the cursor, returning ERR in that case. Otherwise they return OK. Functions with a "mv" prefix first perform a cursor movement using diff --git a/doc/html/man/curs_in_wchstr.3x.html b/doc/html/man/curs_in_wchstr.3x.html index 089801b..748d073 100644 --- a/doc/html/man/curs_in_wchstr.3x.html +++ b/doc/html/man/curs_in_wchstr.3x.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int in_wchnstr(cchar_t *wchstr, int n); int win_wchstr(WINDOW *win, cchar_t *wchstr); int win_wchnstr(WINDOW *win, cchar_t *wchstr, int n); + int mvin_wchstr(int y, int x, cchar_t *wchstr); int mvin_wchnstr(int y, int x, cchar_t *wchstr, int n); int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wchstr); diff --git a/doc/html/man/curs_inch.3x.html b/doc/html/man/curs_inch.3x.html index 8de0774..397664a 100644 --- a/doc/html/man/curs_inch.3x.html +++ b/doc/html/man/curs_inch.3x.html @@ -1,7 +1,7 @@ - @@ -56,15 +56,16 @@ #include <curses.h> chtype inch(void); - chtype winch(WINDOW *win); - chtype mvinch(int y, int x); - chtype mvwinch(WINDOW *win, int y, int x); + chtype winch(WINDOW *win); + + chtype mvinch(int y, int x); + chtype mvwinch(WINDOW *win, int y, int x);DESCRIPTION
These routines return the character, of type chtype, at the current - position in the named window. If any attributes are set for that posi- - tion, their values are OR'ed into the value returned. Constants + position in the named window. If any attributes are set for that + position, their values are OR'ed into the value returned. Constants defined in <curses.h> can be used with the & (logical AND) operator to extract the character or attributes alone. @@ -114,8 +115,8 @@ X/Open Curses does not specify the size and layout of attributes, color and character values in chtype; it is implementation-dependent. This implementation uses 8 bits for character values. An application using - more bits, e.g., a Unicode value, should use the wide-character equiva- - lents to these functions. + more bits, e.g., a Unicode value, should use the wide-character + equivalents to these functions.SEE ALSO
@@ -123,8 +124,8 @@ gives an overview of the WINDOW and chtype data types. curs_attr(3x) - goes into more detail, pointing out portability problems and con- - straints on the use of chtype for returning window information. + goes into more detail, pointing out portability problems and + constraints on the use of chtype for returning window information. curs_in_wch(3x) describes comparable functions for the wide-character (ncursesw) diff --git a/doc/html/man/curs_inchstr.3x.html b/doc/html/man/curs_inchstr.3x.html index f0f9a70..c0f0740 100644 --- a/doc/html/man/curs_inchstr.3x.html +++ b/doc/html/man/curs_inchstr.3x.html @@ -1,4 +1,4 @@ - @@ -55,14 +55,15 @@SYNOPSIS
#include <curses.h> - int inchstr(chtype *chstr); - int inchnstr(chtype *chstr, int n); - int winchstr(WINDOW *win, chtype *chstr); - int winchnstr(WINDOW *win, chtype *chstr, int n); - int mvinchstr(int y, int x, chtype *chstr); - int mvinchnstr(int y, int x, chtype *chstr, int n); - int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr); - int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n); + int inchstr(chtype *chstr); + int inchnstr(chtype *chstr, int n); + int winchstr(WINDOW *win, chtype *chstr); + int winchnstr(WINDOW *win, chtype *chstr, int n); + + int mvinchstr(int y, int x, chtype *chstr); + int mvinchnstr(int y, int x, chtype *chstr, int n); + int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr); + int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);DESCRIPTION
diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html index 395a786..691d684 100644 --- a/doc/html/man/curs_initscr.3x.html +++ b/doc/html/man/curs_initscr.3x.html @@ -1,4 +1,4 @@ - @@ -56,7 +56,9 @@ WINDOW *initscr(void); int endwin(void); + bool isendwin(void); + SCREEN *newterm(const char *type, FILE *outfd, FILE *infd); SCREEN *set_term(SCREEN *new); void delscreen(SCREEN* sp); diff --git a/doc/html/man/curs_inopts.3x.html b/doc/html/man/curs_inopts.3x.html index 24f2ef9..cba08b0 100644 --- a/doc/html/man/curs_inopts.3x.html +++ b/doc/html/man/curs_inopts.3x.html @@ -1,4 +1,4 @@ - @@ -47,9 +47,9 @@NAME
- cbreak, nocbreak, echo, noecho, halfdelay, intrflush, keypad, meta, - nodelay, notimeout, raw, noraw, noqiflush, qiflush, timeout, wtimeout, - typeahead - curses input options + cbreak, nocbreak, echo, noecho, halfdelay, intrflush, keypad, meta, nl, + nonl, nodelay, notimeout, raw, noraw, qiflush, noqiflush, timeout, + wtimeout, typeahead - curses input optionsSYNOPSIS
@@ -57,21 +57,30 @@ int cbreak(void); int nocbreak(void); + int echo(void); int noecho(void); - int halfdelay(int tenths); - int intrflush(WINDOW *win, bool bf); - int keypad(WINDOW *win, bool bf); - int meta(WINDOW *win, bool bf); - int nodelay(WINDOW *win, bool bf); + + int intrflush(WINDOW *win, bool bf); + int keypad(WINDOW *win, bool bf); + int meta(WINDOW *win, bool bf); + int nodelay(WINDOW *win, bool bf); + int notimeout(WINDOW *win, bool bf); + + int nl(void); + int nonl(void); + int raw(void); int noraw(void); - void noqiflush(void); + void qiflush(void); - int notimeout(WINDOW *win, bool bf); - void timeout(int delay); - void wtimeout(WINDOW *win, int delay); - int typeahead(int fd); + void noqiflush(void); + + int halfdelay(int tenths); + void timeout(int delay); + void wtimeout(WINDOW *win, int delay); + + int typeahead(int fd);DESCRIPTION
@@ -83,7 +92,7 @@ behavior is needed. -cbreak
+cbreak/nocbreak
Normally, the tty driver buffers typed characters until a newline or carriage return is typed. The cbreak routine disables line buffering and erase/kill character-processing (interrupt and flow control charac- @@ -153,73 +162,80 @@ FALSE) is called. +nl/nonl
+ The nl and nonl routines control whether the underlying display device + translates the return key into newline on input. + +nodelay
The nodelay option causes getch to be a non-blocking call. If no input - is ready, getch returns ERR. If disabled (bf is FALSE), getch waits + is ready, getch returns ERR. If disabled (bf is FALSE), getch waits until a key is pressed. - While interpreting an input escape sequence, wgetch(3x) sets a timer - while waiting for the next character. If notimeout(win, TRUE) is - called, then wgetch does not set a timer. The purpose of the timeout - is to differentiate between sequences received from a function key and - those typed by a user. + +notimeout
+ When interpreting an escape sequence, wgetch(3x) sets a timer while + waiting for the next character. If notimeout(win, TRUE) is called, + then wgetch does not set a timer. The purpose of the timeout is to + differentiate between sequences received from a function key and those + typed by a user.raw/noraw
- The raw and noraw routines place the terminal into or out of raw mode. - Raw mode is similar to cbreak mode, in that characters typed are imme- - diately passed through to the user program. The differences are that - in raw mode, the interrupt, quit, suspend, and flow control characters - are all passed through uninterpreted, instead of generating a signal. - The behavior of the BREAK key depends on other bits in the tty driver + The raw and noraw routines place the terminal into or out of raw mode. + Raw mode is similar to cbreak mode, in that characters typed are imme- + diately passed through to the user program. The differences are that + in raw mode, the interrupt, quit, suspend, and flow control characters + are all passed through uninterpreted, instead of generating a signal. + The behavior of the BREAK key depends on other bits in the tty driver that are not set by curses. -noqiflush
- When the noqiflush routine is used, normal flush of input and output - queues associated with the INTR, QUIT and SUSP characters will not be - done [see termios(3)]. When qiflush is called, the queues will be - flushed when these control characters are read. You may want to call - noqiflush in a signal handler if you want output to continue as though +qiflush/noqiflush
+ When the noqiflush routine is used, normal flush of input and output + queues associated with the INTR, QUIT and SUSP characters will not be + done [see termios(3)]. When qiflush is called, the queues will be + flushed when these control characters are read. You may want to call + noqiflush in a signal handler if you want output to continue as though the interrupt had not occurred, after the handler exits.timeout/wtimeout
The timeout and wtimeout routines set blocking or non-blocking read for - a given window. If delay is negative, blocking read is used (i.e., - waits indefinitely for input). If delay is zero, then non-blocking + a given window. If delay is negative, blocking read is used (i.e., + waits indefinitely for input). If delay is zero, then non-blocking read is used (i.e., read returns ERR if no input is waiting). If delay - is positive, then read blocks for delay milliseconds, and returns ERR - if there is still no input. Hence, these routines provide the same - functionality as nodelay, plus the additional capability of being able + is positive, then read blocks for delay milliseconds, and returns ERR + if there is still no input. Hence, these routines provide the same + functionality as nodelay, plus the additional capability of being able to block for only delay milliseconds (where delay is positive).typeahead
The curses library does "line-breakout optimization" by looking for ty- peahead periodically while updating the screen. If input is found, and - it is coming from a tty, the current update is postponed until re- - fresh(3x) or doupdate is called again. This allows faster response to - commands typed in advance. Normally, the input FILE pointer passed to + it is coming from a tty, the current update is postponed until re- + fresh(3x) or doupdate is called again. This allows faster response to + commands typed in advance. Normally, the input FILE pointer passed to newterm, or stdin in the case that initscr was used, will be used to do this typeahead checking. The typeahead routine specifies that the file - descriptor fd is to be used to check for typeahead instead. If fd is + descriptor fd is to be used to check for typeahead instead. If fd is -1, then no typeahead checking is done.RETURN VALUE
- All routines that return an integer return ERR upon failure and OK + All routines that return an integer return ERR upon failure and OK (SVr4 specifies only "an integer value other than ERR") upon successful - completion, unless otherwise noted in the preceding routine descrip- + completion, unless otherwise noted in the preceding routine descrip- tions. - X/Open does not define any error conditions. In this implementation, - functions with a window parameter will return an error if it is null. + X/Open does not define any error conditions. In this implementation, + functions with a window parameter will return an error if it is null. Any function will also return an error if the terminal was not initial- ized. Also, halfdelay - returns an error if its parameter is outside the range + returns an error if its parameter is outside the range 1..255. @@ -227,13 +243,20 @@ These functions are described in the XSI Curses standard, Issue 4. The ncurses library obeys the XPG4 standard and the historical practice - of the AT&T curses implementations, in that the echo bit is cleared - when curses initializes the terminal state. BSD curses differed from - this slightly; it left the echo bit on at initialization, but the BSD - raw call turned it off as a side-effect. For best portability, set - echo or noecho explicitly just after initialization, even if your pro- + of the AT&T curses implementations, in that the echo bit is cleared + when curses initializes the terminal state. BSD curses differed from + this slightly; it left the echo bit on at initialization, but the BSD + raw call turned it off as a side-effect. For best portability, set + echo or noecho explicitly just after initialization, even if your pro- gram remains in cooked mode. + The XSI Curses standard is ambiguous on the question of whether raw + should disable the CRLF translations controlled by nl and nonl. BSD + curses did turn off these translations; AT&T curses (at least as late + as SVr1) did not. We chose to do so, on the theory that a programmer + requesting raw input wants a clean (ideally 8-bit clean) connection + that the operating system will not alter. + When keypad is first enabled, ncurses loads the key-definitions for the current terminal description. If the terminal description includes ex- tended string capabilities, e.g., from using the -x option of tic, then @@ -263,8 +286,8 @@NOTES
- Note that echo, noecho, halfdelay, intrflush, meta, nodelay, notimeout, - noqiflush, qiflush, timeout, and wtimeout may be macros. + Note that echo, noecho, halfdelay, intrflush, meta, nl, nonl, nodelay, + notimeout, noqiflush, qiflush, timeout, and wtimeout may be macros. The noraw and nocbreak calls follow historical practice in that they attempt to restore to normal ("cooked") mode from raw and cbreak modes @@ -287,15 +310,17 @@- SYNOPSIS
- DESCRIPTION
-
diff --git a/doc/html/man/curs_ins_wch.3x.html b/doc/html/man/curs_ins_wch.3x.html index 2a37348..65bfab0 100644 --- a/doc/html/man/curs_ins_wch.3x.html +++ b/doc/html/man/curs_ins_wch.3x.html @@ -1,4 +1,4 @@ - @@ -55,9 +55,10 @@ #include <curses.h> int ins_wch(const cchar_t *wch); - int wins_wch(WINDOW *win, const cchar_t *wch); - int mvins_wch(int y, int x, const cchar_t *wch); - int mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch); + int wins_wch(WINDOW *win, const cchar_t *wch); + + int mvins_wch(int y, int x, const cchar_t *wch); + int mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch);- cbreak
+- cbreak/nocbreak
- echo/noecho
- halfdelay
- intrflush
- keypad
- meta
+- nl/nonl
- nodelay
+- notimeout
- raw/noraw
-- noqiflush
+- qiflush/noqiflush
- timeout/wtimeout
- typeahead
DESCRIPTION
diff --git a/doc/html/man/curs_ins_wstr.3x.html b/doc/html/man/curs_ins_wstr.3x.html index d30ad4f..0aee76a 100644 --- a/doc/html/man/curs_ins_wstr.3x.html +++ b/doc/html/man/curs_ins_wstr.3x.html @@ -1,4 +1,4 @@ - @@ -59,6 +59,7 @@ int ins_nwstr(const wchar_t *wstr, int n); int wins_wstr(WINDOW *win, const wchar_t *wstr); int wins_nwstr(WINDOW *win, const wchar_t *wstr, int n); + int mvins_wstr(int y, int x, const wchar_t *wstr); int mvins_nwstr(int y, int x, const wchar_t *wstr, int n); int mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr); diff --git a/doc/html/man/curs_insch.3x.html b/doc/html/man/curs_insch.3x.html index 1bda98e..c26261e 100644 --- a/doc/html/man/curs_insch.3x.html +++ b/doc/html/man/curs_insch.3x.html @@ -1,4 +1,4 @@ - @@ -54,10 +54,11 @@SYNOPSIS
#include <curses.h> - int insch(chtype ch); - int winsch(WINDOW *win, chtype ch); - int mvinsch(int y, int x, chtype ch); - int mvwinsch(WINDOW *win, int y, int x, chtype ch); + int insch(chtype ch); + int winsch(WINDOW *win, chtype ch); + + int mvinsch(int y, int x, chtype ch); + int mvwinsch(WINDOW *win, int y, int x, chtype ch);DESCRIPTION
@@ -71,8 +72,8 @@RETURN VALUE
All routines that return an integer return ERR upon failure and OK (SVr4 specifies only "an integer value other than ERR") upon successful - completion, unless otherwise noted in the preceding routine descrip- - tions. + completion, unless otherwise noted in the preceding routine + descriptions. Functions with a "mv" prefix first perform a cursor movement using wmove, and return an error if the position is outside the window, or if @@ -80,8 +81,8 @@NOTES
- These routines do not necessarily imply use of a hardware insert char- - acter feature. + These routines do not necessarily imply use of a hardware insert + character feature. Note that insch, mvinsch, and mvwinsch may be macros. diff --git a/doc/html/man/curs_insstr.3x.html b/doc/html/man/curs_insstr.3x.html index 7c9efa7..aa32c31 100644 --- a/doc/html/man/curs_insstr.3x.html +++ b/doc/html/man/curs_insstr.3x.html @@ -1,6 +1,6 @@ - @@ -53,14 +53,15 @@SYNOPSIS
#include <curses.h> - int insstr(const char *str); - int insnstr(const char *str, int n); - int winsstr(WINDOW *win, const char *str); - int winsnstr(WINDOW *win, const char *str, int n); - int mvinsstr(int y, int x, const char *str); - int mvinsnstr(int y, int x, const char *str, int n); - int mvwinsstr(WINDOW *win, int y, int x, const char *str); - int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n); + int insstr(const char *str); + int insnstr(const char *str, int n); + int winsstr(WINDOW *win, const char *str); + int winsnstr(WINDOW *win, const char *str, int n); + + int mvinsstr(int y, int x, const char *str); + int mvinsnstr(int y, int x, const char *str, int n); + int mvwinsstr(WINDOW *win, int y, int x, const char *str); + int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);DESCRIPTION
@@ -78,8 +79,8 @@RETURN VALUE
All routines that return an integer return ERR upon failure and OK (SVr4 specifies only "an integer value other than ERR") upon successful - completion, unless otherwise noted in the preceding routine descrip- - tions. + completion, unless otherwise noted in the preceding routine + descriptions. X/Open defines no error conditions. In this implementation, if the window parameter is null or the str parameter is null, an error is @@ -98,10 +99,10 @@ These functions are described in the XSI Curses standard, Issue 4, which adds const qualifiers to the arguments. - The Single Unix Specification, Version 2 states that insnstr and win- - snstr perform wrapping. This is probably an error, since it makes this - group of functions inconsistent. Also, no implementation of curses - documents this inconsistency. + The Single Unix Specification, Version 2 states that insnstr and + winsnstr perform wrapping. This is probably an error, since it makes + this group of functions inconsistent. Also, no implementation of + curses documents this inconsistency.SEE ALSO
diff --git a/doc/html/man/curs_instr.3x.html b/doc/html/man/curs_instr.3x.html index f5aecfc..b783e98 100644 --- a/doc/html/man/curs_instr.3x.html +++ b/doc/html/man/curs_instr.3x.html @@ -1,4 +1,4 @@ - @@ -54,27 +54,28 @@SYNOPSIS
#include <curses.h> - int instr(char *str); - int innstr(char *str, int n); - int winstr(WINDOW *win, char *str); - int winnstr(WINDOW *win, char *str, int n); - int mvinstr(int y, int x, char *str); - int mvinnstr(int y, int x, char *str, int n); - int mvwinstr(WINDOW *win, int y, int x, char *str); - int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); + int instr(char *str); + int innstr(char *str, int n); + int winstr(WINDOW *win, char *str); + int winnstr(WINDOW *win, char *str, int n); + + int mvinstr(int y, int x, char *str); + int mvinnstr(int y, int x, char *str, int n); + int mvwinstr(WINDOW *win, int y, int x, char *str); + int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);DESCRIPTION
These routines return a string of characters in str, extracted starting at the current cursor position in the named window. Attributes are stripped from the characters. The four functions with n as the last - argument return a leading substring at most n characters long (exclu- - sive of the trailing NUL). + argument return a leading substring at most n characters long + (exclusive of the trailing NUL).RETURN VALUE
- All of the functions return ERR upon failure, or the number of charac- - ters actually read into the string. + All of the functions return ERR upon failure, or the number of + characters actually read into the string. X/Open Curses defines no error conditions. In this implementation: diff --git a/doc/html/man/curs_inwstr.3x.html b/doc/html/man/curs_inwstr.3x.html index f70cc78..411094f 100644 --- a/doc/html/man/curs_inwstr.3x.html +++ b/doc/html/man/curs_inwstr.3x.html @@ -1,4 +1,4 @@ - @@ -58,6 +58,7 @@ int innwstr(wchar_t *wstr, int n); int winwstr(WINDOW *win, wchar_t *wstr); int winnwstr(WINDOW *win, wchar_t *wstr, int n); + int mvinwstr(int y, int x, wchar_t *wstr); int mvinnwstr(int y, int x, wchar_t *wstr, int n); int mvwinwstr(WINDOW *win, int y, int x, wchar_t *wstr); @@ -68,22 +69,22 @@ These routines return a string of wchar_t wide characters in wstr, extracted starting at the current cursor position in the named window. - The four functions with n as the last argument return a leading sub- - string at most n characters long (exclusive of the trailing NUL). + The four functions with n as the last argument return a leading + substring at most n characters long (exclusive of the trailing NUL). Transfer stops at the end of the current line, or when n characters have been stored at the location referenced by wstr. - If the size n is not large enough to store a complete complex charac- - ter, an error is generated. + If the size n is not large enough to store a complete complex + character, an error is generated.NOTES
All routines except winnwstr may be macros. - Each cell in the window holds a complex character (i.e., base- and com- - bining-characters) together with attributes and color. These functions - store only the wide characters, ignoring attributes and color. Use - in_wchstr to return the complex characters from a window. + Each cell in the window holds a complex character (i.e., base- and + combining-characters) together with attributes and color. These + functions store only the wide characters, ignoring attributes and + color. Use in_wchstr to return the complex characters from a window.RETURN VALUE
diff --git a/doc/html/man/curs_kernel.3x.html b/doc/html/man/curs_kernel.3x.html index f90c1a6..f042412 100644 --- a/doc/html/man/curs_kernel.3x.html +++ b/doc/html/man/curs_kernel.3x.html @@ -1,4 +1,4 @@ - @@ -57,12 +57,16 @@ int def_prog_mode(void); int def_shell_mode(void); + int reset_prog_mode(void); int reset_shell_mode(void); + int resetty(void); int savetty(void); + void getsyx(int y, int x); void setsyx(int y, int x); + int ripoffline(int line, int (*init)(WINDOW *, int)); int curs_set(int visibility); int napms(int ms); diff --git a/doc/html/man/curs_legacy.3x.html b/doc/html/man/curs_legacy.3x.html index 24071db..181060c 100644 --- a/doc/html/man/curs_legacy.3x.html +++ b/doc/html/man/curs_legacy.3x.html @@ -1,4 +1,4 @@ - @@ -53,20 +53,24 @@SYNOPSIS
#include <curses.h> - int getattrs(const WINDOW *win); - int getbegx(const WINDOW *win); - int getbegy(const WINDOW *win); - int getcurx(const WINDOW *win); - int getcury(const WINDOW *win); - int getmaxx(const WINDOW *win); - int getmaxy(const WINDOW *win); - int getparx(const WINDOW *win); - int getpary(const WINDOW *win); + int getattrs(const WINDOW *win); + + int getbegx(const WINDOW *win); + int getbegy(const WINDOW *win); + + int getcurx(const WINDOW *win); + int getcury(const WINDOW *win); + + int getmaxx(const WINDOW *win); + int getmaxy(const WINDOW *win); + + int getparx(const WINDOW *win); + int getpary(const WINDOW *win);DESCRIPTION
- These legacy functions are simpler to use than the X/Open Curses func- - tions: + These legacy functions are simpler to use than the X/Open Curses + functions: o The getattrs function returns the same attribute data as wattr_get. @@ -91,8 +95,8 @@RETURN VALUE
- Except as noted, these functions return an integer, or ERR if the win- - dow parameter is null. + Except as noted, these functions return an integer, or ERR if the + window parameter is null.NOTES
@@ -105,12 +109,13 @@PORTABILITY
- These functions were supported on Version 7, BSD or System V implemen- - tations. None of those implementations checked the window parameter. + These functions were supported on Version 7, BSD or System V + implementations. None of those implementations checked the window + parameter. - The getattrs function and macro are defined to return a (signed) inte- - ger for compatibility with those implementations although an unsigned - type would have been more appropriate. + The getattrs function and macro are defined to return a (signed) + integer for compatibility with those implementations although an + unsigned type would have been more appropriate.SEE ALSO
diff --git a/doc/html/man/curs_memleaks.3x.html b/doc/html/man/curs_memleaks.3x.html index 18b38c9..627bb72 100644 --- a/doc/html/man/curs_memleaks.3x.html +++ b/doc/html/man/curs_memleaks.3x.html @@ -1,6 +1,6 @@ - @@ -47,36 +47,36 @@NAME
- _nc_freeall, _nc_free_and_exit, _nc_free_tinfo - curses memory-leak - checking + exit_curses, exit_terminfo - curses memory-leak checkingSYNOPSIS
#include <curses.h> + void exit_curses(int code); - void exit_curses(int); - void exit_terminfo(int); + #include <term.h> + void exit_terminfo(int code); - /* deprecated */ + /* deprecated (intentionally not declared in curses.h or term.h) */ void _nc_freeall(void); - void _nc_free_and_exit(int); - void _nc_free_tinfo(int); + void _nc_free_and_exit(int code); + void _nc_free_tinfo(int code);DESCRIPTION
- These functions are used to simplify analysis of memory leaks in the + These functions are used to simplify analysis of memory leaks in the ncurses library. Any implementation of curses must not free the memory associated with a - screen, since (even after calling endwin), it must be available for use - in the next call to refresh(3x). There are also chunks of memory held - for performance reasons. That makes it hard to analyze curses applica- - tions for memory leaks. When using the specially configured debugging - version of the ncurses library, applications can call functions which - free those chunks of memory, simplifying the process of memory-leak - checking. - - Some of the functions are named with a "_nc_" prefix because they are + screen, since (even after calling endwin(3x)), it must be available for + use in the next call to refresh(3x). There are also chunks of memory + held for performance reasons. That makes it hard to analyze curses ap- + plications for memory leaks. When using the specially configured de- + bugging version of the ncurses library, applications can call functions + which free those chunks of memory, simplifying the process of memory- + leak checking. + + Some of the functions are named with a "_nc_" prefix because they are not intended for use in the non-debugging library: _nc_freeall @@ -89,18 +89,18 @@ ply exiting (with the given exit-code) is safer. _nc_free_tinfo - Use this function if only the low-level terminfo functions (and + Use this function if only the low-level terminfo functions (and corresponding library) are used. Like _nc_free_and_exit, it exits the program after freeing memory. - The functions prefixed "_nc" are normally not available; they must be + The functions prefixed "_nc" are normally not available; they must be configured into the library at build time using the --disable-leaks op- - tion. That compiles-in code that frees memory that normally would not + tion. That compiles-in code that frees memory that normally would not be freed. - The exit_curses and exit_terminfo functions call _nc_free_and_exit and - _nc_free_tinfo if the library is configured to support memory-leak - checking. If the library is not configured to support memory-leak + The exit_curses and exit_terminfo functions call _nc_free_and_exit and + _nc_free_tinfo if the library is configured to support memory-leak + checking. If the library is not configured to support memory-leak checking, they simply call exit. diff --git a/doc/html/man/curs_mouse.3x.html b/doc/html/man/curs_mouse.3x.html index 81fe57a..240f615 100644 --- a/doc/html/man/curs_mouse.3x.html +++ b/doc/html/man/curs_mouse.3x.html @@ -1,4 +1,4 @@ - @@ -64,13 +64,18 @@ } MEVENT; bool has_mouse(void); + int getmouse(MEVENT *event); int ungetmouse(MEVENT *event); + mmask_t mousemask(mmask_t newmask, mmask_t *oldmask); + bool wenclose(const WINDOW *win, int y, int x); + bool mouse_trafo(int* pY, int* pX, bool to_screen); - bool wmouse_trafo(const WINDOW* win, int* pY, int* pX, - bool to_screen); + bool wmouse_trafo(const WINDOW* win, + int* pY, int* pX, bool to_screen); + int mouseinterval(int erval); @@ -107,12 +112,12 @@ BUTTON2_PRESSED mouse button 2 down BUTTON2_RELEASED mouse button 2 up BUTTON2_CLICKED mouse button 2 clicked + BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked --------------------------------------------------------------------- BUTTON3_PRESSED mouse button 3 down BUTTON3_RELEASED mouse button 3 up - BUTTON3_CLICKED mouse button 3 clicked BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked diff --git a/doc/html/man/curs_move.3x.html b/doc/html/man/curs_move.3x.html index fcdbd40..e2c6991 100644 --- a/doc/html/man/curs_move.3x.html +++ b/doc/html/man/curs_move.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,8 @@SYNOPSIS
#include <curses.h> - int move(int y, int x); - int wmove(WINDOW *win, int y, int x); + int move(int y, int x); + int wmove(WINDOW *win, int y, int x);DESCRIPTION
diff --git a/doc/html/man/curs_opaque.3x.html b/doc/html/man/curs_opaque.3x.html index cc6909e..3515909 100644 --- a/doc/html/man/curs_opaque.3x.html +++ b/doc/html/man/curs_opaque.3x.html @@ -1,4 +1,4 @@ - @@ -55,21 +55,21 @@SYNOPSIS
#include <curses.h> - bool is_cleared(const WINDOW *win); - bool is_idcok(const WINDOW *win); - bool is_idlok(const WINDOW *win); - bool is_immedok(const WINDOW *win); - bool is_keypad(const WINDOW *win); - bool is_leaveok(const WINDOW *win); - bool is_nodelay(const WINDOW *win); - bool is_notimeout(const WINDOW *win); - bool is_pad(const WINDOW *win); - bool is_scrollok(const WINDOW *win); - bool is_subwin(const WINDOW *win); - bool is_syncok(const WINDOW *win); - WINDOW * wgetparent(const WINDOW *win); - int wgetdelay(const WINDOW *win); - int wgetscrreg(const WINDOW *win, int *top, int *bottom); + bool is_cleared(const WINDOW *win); + bool is_idcok(const WINDOW *win); + bool is_idlok(const WINDOW *win); + bool is_immedok(const WINDOW *win); + bool is_keypad(const WINDOW *win); + bool is_leaveok(const WINDOW *win); + bool is_nodelay(const WINDOW *win); + bool is_notimeout(const WINDOW *win); + bool is_pad(const WINDOW *win); + bool is_scrollok(const WINDOW *win); + bool is_subwin(const WINDOW *win); + bool is_syncok(const WINDOW *win); + WINDOW * wgetparent(const WINDOW *win); + int wgetdelay(const WINDOW *win); + int wgetscrreg(const WINDOW *win, int *top, int *bottom);DESCRIPTION
diff --git a/doc/html/man/curs_outopts.3x.html b/doc/html/man/curs_outopts.3x.html index 75175d1..819134c 100644 --- a/doc/html/man/curs_outopts.3x.html +++ b/doc/html/man/curs_outopts.3x.html @@ -1,4 +1,4 @@ - @@ -48,7 +48,7 @@NAME
clearok, idlok, idcok, immedok, leaveok, setscrreg, wsetscrreg, - scrollok, nl, nonl - curses output options + scrollok - curses output optionsSYNOPSIS
@@ -59,11 +59,10 @@ void idcok(WINDOW *win, bool bf); void immedok(WINDOW *win, bool bf); int leaveok(WINDOW *win, bool bf); + int scrollok(WINDOW *win, bool bf); + int setscrreg(int top, int bot); int wsetscrreg(WINDOW *win, int top, int bot); - int scrollok(WINDOW *win, bool bf); - int nl(void); - int nonl(void);DESCRIPTION
@@ -118,7 +117,17 @@ cursor motions. -setscrreg
+scrollok
+ The scrollok option controls what happens when the cursor of a window + is moved off the edge of the window or scrolling region, either as a + result of a newline action on the bottom line, or typing the last char- + acter of the last line. If disabled, (bf is FALSE), the cursor is left + on the bottom line. If enabled, (bf is TRUE), the window is scrolled + up one line (Note that to get the physical scrolling effect on the ter- + minal, it is also necessary to call idlok). + + +setscrreg/wsetscrreg
The setscrreg and wsetscrreg routines allow the application programmer to set a software scrolling region in a window. The top and bot param- eters are the line numbers of the top and bottom margin of the @@ -132,57 +141,37 @@ line capability, they will probably be used by the output routines.) -scrollok
- The scrollok option controls what happens when the cursor of a window - is moved off the edge of the window or scrolling region, either as a - result of a newline action on the bottom line, or typing the last char- - acter of the last line. If disabled, (bf is FALSE), the cursor is left - on the bottom line. If enabled, (bf is TRUE), the window is scrolled - up one line (Note that to get the physical scrolling effect on the ter- - minal, it is also necessary to call idlok). - - -nl, nonl
- The nl and nonl routines control whether the underlying display device - translates the return key into newline on input, and whether it trans- - lates newline into return and line-feed on output (in either case, the - call addch('\n') does the equivalent of return and line feed on the - virtual screen). Initially, these translations do occur. If you dis- - able them using nonl, curses will be able to make better use of the - line-feed capability, resulting in faster cursor motion. Also, curses - will then be able to detect the return key. - -RETURN VALUE
- The functions setscrreg and wsetscrreg return OK upon success and ERR - upon failure. All other routines that return an integer always return + The functions setscrreg and wsetscrreg return OK upon success and ERR + upon failure. All other routines that return an integer always return OK. X/Open Curses does not define any error conditions. - In this implementation, those functions that have a window pointer will - return an error if the window pointer is null. + In this implementation, - wclrtoeol - returns an error if the cursor position is about to wrap. + o those functions that have a window pointer will return an error if + the window pointer is null - wsetscrreg - returns an error if the scrolling region limits extend out- - side the window. + o wsetscrreg returns an error if the scrolling region limits extend + outside the window. - X/Open does not define any error conditions. This implementation re- + X/Open does not define any error conditions. This implementation re- turns an error if the window pointer is null.PORTABILITY
These functions are described in the XSI Curses standard, Issue 4. - The XSI Curses standard is ambiguous on the question of whether raw - should disable the CRLF translations controlled by nl and nonl. BSD - curses did turn off these translations; AT&T curses (at least as late - as SVr1) did not. We choose to do so, on the theory that a programmer - requesting raw input wants a clean (ideally 8-bit clean) connection - that the operating system will not alter. + From the outset, ncurses used nl/nonl to control the conversion of new- + lines to carriage return/line-feed on output as well as input. XSI + Curses documents only the use of these functions for input. This dif- + ference arose from converting the pcurses source (which used ioctl + calls with the sgttyb structure) to termios (i.e., the POSIX terminal + interface). In the former, both input and output were controlled via a + single option CRMOD, while the latter separates these features. Be- + cause that conversion interferes with output optimization, nl/nonl were + amended after ncurses 6.2 to eliminate their effect on output. Some historic curses implementations had, as an undocumented feature, the ability to do the equivalent of clearok(..., 1) by saying touch- @@ -201,8 +190,8 @@NOTES
- Note that clearok, leaveok, scrollok, idcok, nl, nonl and setscrreg may - be macros. + Note that clearok, leaveok, scrollok, idcok, and setscrreg may be + macros. The immedok routine is useful for windows that are used as terminal em- ulators. @@ -227,9 +216,8 @@- idcok
- immedok
- leaveok
-- setscrreg
- scrollok
-- nl, nonl
+- setscrreg/wsetscrreg
- RETURN VALUE
diff --git a/doc/html/man/curs_overlay.3x.html b/doc/html/man/curs_overlay.3x.html index f858ada..31d8ed9 100644 --- a/doc/html/man/curs_overlay.3x.html +++ b/doc/html/man/curs_overlay.3x.html @@ -1,4 +1,4 @@ - @@ -53,7 +53,7 @@SYNOPSIS
#include <curses.h> - int mcprint(char *data, int len); + int mcprint(char *data, int len);DESCRIPTION
@@ -64,15 +64,15 @@ printer or to know how much buffering it has. Your application is responsible for keeping the rate of writes to the printer below its continuous throughput rate (typically about half of its nominal cps - rating). Dot-matrix printers and 6-page-per-minute lasers can typi- - cally handle 80cps, so a good conservative rule of thumb is to sleep - for a second after shipping each 80-character line. + rating). Dot-matrix printers and 6-page-per-minute lasers can + typically handle 80cps, so a good conservative rule of thumb is to + sleep for a second after shipping each 80-character line.RETURN VALUE
The mcprint function returns ERR if the write operation aborted for - some reason. In this case, errno will contain either an error associ- - ated with write(2) or one of the following: + some reason. In this case, errno will contain either an error + associated with write(2) or one of the following: ENODEV Capabilities for printer redirection do not exist. diff --git a/doc/html/man/curs_printw.3x.html b/doc/html/man/curs_printw.3x.html index c38fc4e..6028260 100644 --- a/doc/html/man/curs_printw.3x.html +++ b/doc/html/man/curs_printw.3x.html @@ -1,4 +1,4 @@ - @@ -54,14 +54,14 @@SYNOPSIS
#include <curses.h> - int printw(const char *fmt, ...); - int wprintw(WINDOW *win, const char *fmt, ...); - int mvprintw(int y, int x, const char *fmt, ...); - int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...); - int vw_printw(WINDOW *win, const char *fmt, va_list varglist); + int printw(const char *fmt, ...); + int wprintw(WINDOW *win, const char *fmt, ...); + int mvprintw(int y, int x, const char *fmt, ...); + int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...); + int vw_printw(WINDOW *win, const char *fmt, va_list varglist); /* obsolete */ - int vwprintw(WINDOW *win, const char *fmt, va_list varglist); + int vwprintw(WINDOW *win, const char *fmt, va_list varglist);DESCRIPTION
@@ -70,7 +70,7 @@ printf is output instead as though waddstr were used on the given win- dow. - The vwprintw and wv_printw routines are analogous to vprintf [see + The vwprintw and vw_printw routines are analogous to vprintf [see printf(3)] and perform a wprintw using a variable argument list. The third argument is a va_list, a pointer to a list of arguments, as de- fined in <stdarg.h>. @@ -91,21 +91,48 @@ the window pointer is null. +HISTORY
+ While printw was implemented in 4BSD, it was unused until 4.2BSD (which + used it in games). That early version of curses was before the ANSI C + standard. It did not use <varargs.h>, though that was available. In + 1991 (a couple of years after SVr4 was generally available, and after + the C standard was published), other developers updated the library, + using <stdarg.h> internally in 4.4BSD curses. Even with this improve- + ment, BSD curses did not use function prototypes (or even declare func- + tions) in the <curses.h> header until 1992. + + SVr2 documented printw, wprintw tersely as "printf on stdscr" and + tersely as "printf on win", respectively. + + SVr3 added mvprintw, and mvwprintw, with a three-line summary saying + that they were analogous to printf(3), explaining that the string which + would be output from printf(3) would instead be output using waddstr on + the given window. SVr3 also added vwprintw, saying that the third pa- + rameter is a va_list, defined in <varargs.h>, and referring the reader + to the manual pages for varargs and vprintf for detailed descriptions. + + SVr4 added no new variations of printw, but provided for using + <varargs.h> or <stdarg.h> to define the va_list type. + + X/Open Curses added vw_printw to replace vwprintw, stating that its + va_list definition requires <stdarg.h>. + +PORTABILITY
- In this implementation, vw_printw and vwprintw are equivalent, to sup- + In this implementation, vw_printw and vwprintw are equivalent, to sup- port legacy applications. However, the latter (vwprintw) is obsolete: - o The XSI Curses standard, Issue 4 described these functions. The - function vwprintw is marked TO BE WITHDRAWN, and is to be replaced + o The XSI Curses standard, Issue 4 described these functions. The + function vwprintw is marked TO BE WITHDRAWN, and is to be replaced by a function vw_printw using the <stdarg.h> interface. - o The Single Unix Specification, Version 2 states that vw_printw is - preferred to vwprintw since the latter requires including - <varargs.h>, which cannot be used in the same file as <stdarg.h>. - This implementation uses <stdarg.h> for both, because that header + o The Single Unix Specification, Version 2 states that vw_printw is + preferred to vwprintw since the latter requires including + <varargs.h>, which cannot be used in the same file as <stdarg.h>. + This implementation uses <stdarg.h> for both, because that header is included in <curses.h>. - o X/Open Curses, Issue 5 (December 2007) marked vwprintw (along with + o X/Open Curses, Issue 5 (December 2007) marked vwprintw (along with vwscanw and the termcap interface) as withdrawn. @@ -123,6 +150,7 @@SYNOPSIS DESCRIPTION RETURN VALUE +HISTORY PORTABILITY SEE ALSO diff --git a/doc/html/man/curs_refresh.3x.html b/doc/html/man/curs_refresh.3x.html index c239ed8..035591d 100644 --- a/doc/html/man/curs_refresh.3x.html +++ b/doc/html/man/curs_refresh.3x.html @@ -1,4 +1,4 @@ - @@ -55,11 +55,12 @@ #include <curses.h> int refresh(void); - int wrefresh(WINDOW *win); - int wnoutrefresh(WINDOW *win); + int wrefresh(WINDOW *win); + int wnoutrefresh(WINDOW *win); int doupdate(void); - int redrawwin(WINDOW *win); - int wredrawln(WINDOW *win, int beg_line, int num_lines); + + int redrawwin(WINDOW *win); + int wredrawln(WINDOW *win, int beg_line, int num_lines);DESCRIPTION
diff --git a/doc/html/man/curs_scanw.3x.html b/doc/html/man/curs_scanw.3x.html index a757666..d011449 100644 --- a/doc/html/man/curs_scanw.3x.html +++ b/doc/html/man/curs_scanw.3x.html @@ -1,4 +1,4 @@ - @@ -54,14 +54,15 @@SYNOPSIS
#include <curses.h> - int scanw(const char *fmt, ...); - int wscanw(WINDOW *win, const char *fmt, ...); - int mvscanw(int y, int x, const char *fmt, ...); - int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...); - int vw_scanw(WINDOW *win, const char *fmt, va_list varglist); + int scanw(const char *fmt, ...); + int wscanw(WINDOW *win, const char *fmt, ...); + int mvscanw(int y, int x, const char *fmt, ...); + int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...); + + int vw_scanw(WINDOW *win, const char *fmt, va_list varglist); /* obsolete */ - int vwscanw(WINDOW *win, const char *fmt, va_list varglist); + int vwscanw(WINDOW *win, const char *fmt, va_list varglist);DESCRIPTION
@@ -89,41 +90,70 @@ the window pointer is null. +HISTORY
+ While scanw was implemented in 4BSD, none of the BSD releases used it + until 4.4BSD (in a game). That early version of curses was before the + ANSI C standard. It did not use <varargs.h>, though that was + available. In 1991 (a couple of years after SVr4 was generally + available, and after the C standard was published), other developers + updated the library, using <stdarg.h> internally in 4.4BSD curses. + Even with this improvement, BSD curses did not use function prototypes + (or even declare functions) in the <curses.h> header until 1992. + + SVr2 documented scanw, wscanw tersely as "scanf through stdscr" and + tersely as "scanf through win", respectively. + + SVr3 added mvscanw, and mvwscanw, with a three-line summary saying that + they were analogous to scanf(3), explaining that the string which would + be output from scanf(3) would instead be output using waddstr on the + given window. SVr3 also added vwscanw, saying that the third parameter + is a va_list, defined in <varargs.h>, and referring the reader to the + manual pages for varargs and vprintf for detailed descriptions. + (Because the SVr3 documentation does not mention vscanf, that reference + to vprintf may not be an error). + + SVr4 added no new variations of scanw, but provided for using + <varargs.h> or <stdarg.h> to define the va_list type. + + X/Open Curses added vw_scanw to replace vwscanw, stating that its + va_list definition requires <stdarg.h>. + +PORTABILITY
In this implementation, vw_scanw and vwscanw are equivalent, to support legacy applications. However, the latter (vwscanw) is obsolete: - o The XSI Curses standard, Issue 4 described these functions, noting - that the function vwscanw is marked TO BE WITHDRAWN, and is to be + o The XSI Curses standard, Issue 4 described these functions, noting + that the function vwscanw is marked TO BE WITHDRAWN, and is to be replaced by a function vw_scanw using the <stdarg.h> interface. - o The Single Unix Specification, Version 2 states that vw_scanw is - preferred to vwscanw since the latter requires including - <varargs.h>, which cannot be used in the same file as <stdarg.h>. - This implementation uses <stdarg.h> for both, because that header + o The Single Unix Specification, Version 2 states that vw_scanw is + preferred to vwscanw since the latter requires including + <varargs.h>, which cannot be used in the same file as <stdarg.h>. + This implementation uses <stdarg.h> for both, because that header is included in <curses.h>. - o X/Open Curses, Issue 5 (December 2007) marked vwscanw (along with + o X/Open Curses, Issue 5 (December 2007) marked vwscanw (along with vwprintw and the termcap interface) as withdrawn. - Both XSI and The Single Unix Specification, Version 2 state that these + Both XSI and The Single Unix Specification, Version 2 state that these functions return ERR or OK. - o Since the underlying scanf(3) can return the number of items + o Since the underlying scanf(3) can return the number of items scanned, and the SVr4 code was documented to use this feature, this - is probably an editing error which was introduced in XSI, rather + is probably an editing error which was introduced in XSI, rather than being done intentionally. - o This implementation returns the number of items scanned, for com- - patibility with SVr4 curses. As of 2018, NetBSD curses also - returns the number of items scanned. Both ncurses and NetBSD + o This implementation returns the number of items scanned, for + compatibility with SVr4 curses. As of 2018, NetBSD curses also + returns the number of items scanned. Both ncurses and NetBSD curses call vsscanf to scan the string, which returns EOF on error. - o Portable applications should only test if the return value is ERR, + o Portable applications should only test if the return value is ERR, since the OK value (zero) is likely to be misleading. - One possible way to get useful results would be to use a "%n" con- - version at the end of the format string to ensure that something + One possible way to get useful results would be to use a "%n" + conversion at the end of the format string to ensure that something was processed. @@ -141,6 +171,7 @@SYNOPSIS DESCRIPTION RETURN VALUE +HISTORY PORTABILITY SEE ALSO diff --git a/doc/html/man/curs_scr_dump.3x.html b/doc/html/man/curs_scr_dump.3x.html index f07d40a..71bc263 100644 --- a/doc/html/man/curs_scr_dump.3x.html +++ b/doc/html/man/curs_scr_dump.3x.html @@ -1,6 +1,6 @@ - @@ -54,21 +54,27 @@SYNOPSIS
#include <curses.h> - int scr_dump(const char *filename); - int scr_restore(const char *filename); - int scr_init(const char *filename); - int scr_set(const char *filename); + int scr_dump(const char *filename); + int scr_restore(const char *filename); + int scr_init(const char *filename); + int scr_set(const char *filename);DESCRIPTION
+ +scr_dump
The scr_dump routine dumps the current contents of the virtual screen to the file filename. + +scr_restore
The scr_restore routine sets the virtual screen to the contents of filename, which must have been written using scr_dump. The next call to doupdate restores the physical screen to the way it looked in the dump file. + +scr_init
The scr_init routine reads in the contents of filename and uses them to initialize the curses data structures about what the terminal currently has on its screen. If the data is determined to be valid, curses bases @@ -83,6 +89,8 @@ o if the terminal has been written to since the preceding scr_dump call. + +scr_set
The scr_set routine is a combination of scr_restore and scr_init. It tells the program that the information in filename is what is currently on the screen, and also what the program wants on the screen. This can @@ -124,7 +132,14 @@
- NAME
- SYNOPSIS
-- DESCRIPTION
+- DESCRIPTION +
+
+- scr_dump
+- scr_restore
+- scr_init
+- scr_set
+- RETURN VALUE
- NOTES
- PORTABILITY
diff --git a/doc/html/man/curs_scroll.3x.html b/doc/html/man/curs_scroll.3x.html index 0b0e892..0cf24be 100644 --- a/doc/html/man/curs_scroll.3x.html +++ b/doc/html/man/curs_scroll.3x.html @@ -1,4 +1,4 @@ - @@ -53,9 +53,10 @@SYNOPSIS
#include <curses.h> - int scroll(WINDOW *win); - int scrl(int n); - int wscrl(WINDOW *win, int n); + int scroll(WINDOW *win); + + int scrl(int n); + int wscrl(WINDOW *win, int n);DESCRIPTION
diff --git a/doc/html/man/curs_slk.3x.html b/doc/html/man/curs_slk.3x.html index bfa1a94..1e4f954 100644 --- a/doc/html/man/curs_slk.3x.html +++ b/doc/html/man/curs_slk.3x.html @@ -1,6 +1,6 @@ - @@ -59,6 +59,7 @@ int slk_init(int fmt); int slk_set(int labnum, const char *label, int fmt); + /* extension */ int slk_wset(int labnum, const wchar_t *label, int fmt); char *slk_label(int labnum); diff --git a/doc/html/man/curs_sp_funcs.3x.html b/doc/html/man/curs_sp_funcs.3x.html index a83cece..6e1b0fe 100644 --- a/doc/html/man/curs_sp_funcs.3x.html +++ b/doc/html/man/curs_sp_funcs.3x.html @@ -1,6 +1,6 @@ - @@ -48,7 +48,7 @@NAME
PC, UP, BC, ospeed, tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs - - direct curses interface to the terminfo capability database + curses emulation of termcapSYNOPSIS
@@ -60,17 +60,17 @@ extern char * BC; extern short ospeed; - int tgetent(char *bp, const char *name); - int tgetflag(const char *id); - int tgetnum(const char *id); - char *tgetstr(const char *id, char **area); - char *tgoto(const char *cap, int col, int row); - int tputs(const char *str, int affcnt, int (*putc)(int)); + int tgetent(char *bp, const char *name); + int tgetflag(const char *id); + int tgetnum(const char *id); + char *tgetstr(const char *id, char **area); + char *tgoto(const char *cap, int col, int row); + int tputs(const char *str, int affcnt, int (*putc)(int));DESCRIPTION
These routines are included as a conversion aid for programs that use - the termcap library. Their parameters are the same and the routines + the termcap library. Their parameters are the same, but the routines are emulated using the terminfo database. Thus, they can only be used to query the capabilities of entries for which a terminfo entry has been compiled. @@ -184,62 +184,131 @@ style parser if the string does not appear to be terminfo). Because terminfo conventions for representing padding in string capa- - bilities differ from termcap's, tputs("50"); will put out a literal - "50" rather than busy-waiting for 50 milliseconds. Cope with it. + bilities differ from termcap's, users can be surprised: - Note that termcap has nothing analogous to terminfo's sgr string. One - consequence of this is that termcap applications assume me (terminfo - sgr0) does not reset the alternate character set. This implementation + o tputs("50") in a terminfo system will put out a literal "50" rather + than busy-waiting for 50 milliseconds. + + o However, if ncurses is configured to support termcap, it may also + have been configured to support the BSD-style padding. + + In that case, tputs inspects strings passed to it, looking for dig- + its at the beginning of the string. + + tputs("50") in a termcap system may wait for 50 milliseconds rather + than put out a literal "50" + + Note that termcap has nothing analogous to terminfo's sgr string. One + consequence of this is that termcap applications assume me (terminfo + sgr0) does not reset the alternate character set. This implementation checks for, and modifies the data shown to the termcap interface to ac- commodate termcap's limitation in this respect.PORTABILITY
- These functions are provided for supporting legacy applications, and + +Standards
+ These functions are provided for supporting legacy applications, and should not be used in new programs: o The XSI Curses standard, Issue 4 describes these functions. Howev- - er, they are marked TO BE WITHDRAWN and may be removed in future + er, they are marked TO BE WITHDRAWN and may be removed in future versions. o X/Open Curses, Issue 5 (December 2007) marked the termcap interface (along with vwprintw and vwscanw) as withdrawn. - Neither the XSI Curses standard nor the SVr4 man pages documented the - return values of tgetent correctly, though all three were in fact re- - turned ever since SVr1. In particular, an omission in the XSI Curses - documentation has been misinterpreted to mean that tgetent returns OK - or ERR. Because the purpose of these functions is to provide compati- - bility with the termcap library, that is a defect in XCurses, Issue 4, + Neither the XSI Curses standard nor the SVr4 man pages documented the + return values of tgetent correctly, though all three were in fact re- + turned ever since SVr1. In particular, an omission in the XSI Curses + documentation has been misinterpreted to mean that tgetent returns OK + or ERR. Because the purpose of these functions is to provide compati- + bility with the termcap library, that is a defect in XCurses, Issue 4, Version 2 rather than in ncurses. + +Compatibility with BSD Termcap
External variables are provided for support of certain termcap applica- tions. However, termcap applications' use of those variables is poorly documented, e.g., not distinguishing between input and output. In par- - ticular, some applications are reported to declare and/or modify os- + ticular, some applications are reported to declare and/or modify os- peed. - The comment that only the first two characters of the id parameter are + The comment that only the first two characters of the id parameter are used escapes many application developers. The original BSD 4.2 termcap library (and historical relics thereof) did not require a trailing null - NUL on the parameter name passed to tgetstr, tgetnum and tgetflag. - Some applications assume that the termcap interface does not require + NUL on the parameter name passed to tgetstr, tgetnum and tgetflag. + Some applications assume that the termcap interface does not require the trailing NUL for the parameter name. Taking into account these is- sues: - o As a special case, tgetflag matched against a single-character - identifier provided that was at the end of the terminal descrip- + o As a special case, tgetflag matched against a single-character + identifier provided that was at the end of the terminal descrip- tion. You should not rely upon this behavior in portable programs. - This implementation disallows matches against single-character ca- + This implementation disallows matches against single-character ca- pability names. - o This implementation disallows matches by the termcap interface + o This implementation disallows matches by the termcap interface against extended capability names which are longer than two charac- ters. + The BSD termcap function tgetent returns the text of a termcap entry in + the buffer passed as an argument. This library (like other terminfo + implementations) does not store terminal descriptions as text. It sets + the buffer contents to a null-terminated string. + + +Other Compatibility
+ This library includes a termcap.h header, for compatibility with other + implementations. But the header is rarely used because the other im- + plementations are not strictly compatible. + + The original BSD termcap (through 4.3BSD) had no header file which gave + function prototypes, because that was a feature of ANSI C. BSD termcap + was written several years before C was standardized. However, there + were two different termcap.h header files in the BSD sources: + + o One was used internally by the jove editor in 2BSD through 4.4BSD. + It defined global symbols for the termcap variables which it used. + + o The other appeared in 4.4BSD Lite Release 2 (mid-1993) as part of + libedit (also known as the editline library). The CSRG source his- + tory shows that this was added in mid-1992. The libedit header + file was used internally, as a convenience for compiling the edit- + line library. It declared function prototypes, but no global vari- + ables. + + The header file from libedit was added to NetBSD's termcap library in + mid-1994. + + Meanwhile, GNU termcap was under development, starting in 1990. The + first release (termcap 1.0) in 1991 included a termcap.h header. The + second release (termcap 1.1) in September 1992 modified the header to + use const for the function prototypes in the header where one would ex- + pect the parameters to be read-only. This was a difference versus the + original BSD termcap. The prototype for tputs also differed, but in + that instance, it was libedit which differed from BSD termcap. + + A copy of GNU termcap 1.3 was bundled with bash in mid-1993, to support + the readline library. + + A termcap.h file was provided in ncurses 1.8.1 (November 1993). That + reflected influence by emacs (rather than jove) and GNU termcap: + + o it provided declarations for a few global symbols used by emacs + + o it provided function prototypes (using const). + + o a prototype for tparam (a GNU termcap feature) was provided. + + Later (in mid-1996) the tparam function was removed from ncurses. As a + result, there are differences between any of the four implementations, + which must be taken into account by programs which can work with all + termcap library interfaces. +SEE ALSO
- curses(3x), terminfo(5), term_variables(3x), putc(3). + curses(3x), putc(3), term_variables(3x), terminfo(5). https://invisible-island.net/ncurses/tctest.html @@ -261,7 +330,13 @@RETURN VALUE BUGS -PORTABILITY +PORTABILITY + + SEE ALSO diff --git a/doc/html/man/curs_terminfo.3x.html b/doc/html/man/curs_terminfo.3x.html index 4c4246b..11c211d 100644 --- a/doc/html/man/curs_terminfo.3x.html +++ b/doc/html/man/curs_terminfo.3x.html @@ -1,6 +1,6 @@ - @@ -57,11 +57,13 @@ typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); + int get_escdelay(void); - int set_escdelay(int size); - int set_tabsize(int size); - int use_screen(SCREEN *scr, NCURSES_SCREEN_CB func, void *data); - int use_window(WINDOW *win, NCURSES_WINDOW_CB func, void *data); + int set_escdelay(int ms); + int set_tabsize(int cols); + + int use_screen(SCREEN *scr, NCURSES_SCREEN_CB func, void *data); + int use_window(WINDOW *win, NCURSES_WINDOW_CB func, void *data);DESCRIPTION
@@ -178,9 +180,9 @@ clrtobot window (stdscr) clrtoeol window (stdscr) color_content screen + color_set window (stdscr) copywin window locks(source, target) - cur_term terminal curs_set screen curscr screen (readonly) @@ -245,9 +247,9 @@ inchstr window (stdscr) init_color screen init_pair screen + initscr global locks(screenlist) innstr window (stdscr) - innwstr window (stdscr) ins_nwstr window (stdscr) ins_wch window (stdscr) @@ -312,9 +314,9 @@ mvgetstr screen (input-operation) mvhline window (stdscr) mvhline_set window (stdscr) + mvin_wch window (stdscr) mvin_wchnstr window (stdscr) - mvin_wchstr window (stdscr) mvinch window (stdscr) mvinchnstr window (stdscr) @@ -379,9 +381,9 @@ newscr screen (readonly) newterm global locks(screenlist) newwin global locks(windowlist) + nl screen nocbreak screen - nodelay window noecho screen nofilter global @@ -446,9 +448,9 @@ slk_restore screen slk_set screen slk_touch screen + slk_wset screen standend window - standout window start_color screen stdscr screen (readonly) @@ -513,9 +515,9 @@ wattr_on window wattr_set window wattroff window + wattron window wattrset window - wbkgd window wbkgdset window wbkgrnd window @@ -580,9 +582,9 @@ wsyncup screen (affects window plus parents) wtimeout window wtouchln window + wunctrl global (static data) wvline window - wvline_set window diff --git a/doc/html/man/curs_touch.3x.html b/doc/html/man/curs_touch.3x.html index acbbb6a..7f7f9ee 100644 --- a/doc/html/man/curs_touch.3x.html +++ b/doc/html/man/curs_touch.3x.html @@ -1,6 +1,6 @@ - @@ -53,12 +53,16 @@SYNOPSIS
#include <curses.h> - int touchwin(WINDOW *win); - int touchline(WINDOW *win, int start, int count); - int untouchwin(WINDOW *win); - int wtouchln(WINDOW *win, int y, int n, int changed); - bool is_linetouched(WINDOW *win, int line); - bool is_wintouched(WINDOW *win); + + int touchline(WINDOW *win, int start, int count); + + int touchwin(WINDOW *win); + int wtouchln(WINDOW *win, int y, int n, int changed); + + int untouchwin(WINDOW *win); + + bool is_linetouched(WINDOW *win, int line); + bool is_wintouched(WINDOW *win);DESCRIPTION
diff --git a/doc/html/man/curs_trace.3x.html b/doc/html/man/curs_trace.3x.html index a60ae97..658be0e 100644 --- a/doc/html/man/curs_trace.3x.html +++ b/doc/html/man/curs_trace.3x.html @@ -1,4 +1,4 @@ - @@ -56,17 +56,22 @@SYNOPSIS
#include <curses.h> - const char *unctrl(chtype c); - wchar_t *wunctrl(cchar_t *c); - const char *keyname(int c); - const char *key_name(wchar_t w); + const char *unctrl(chtype c); + wchar_t *wunctrl(cchar_t *c); + + const char *keyname(int c); + const char *key_name(wchar_t w); + void filter(void); void nofilter(void); - void use_env(bool f); - void use_tioctl(bool f); - int putwin(WINDOW *win, FILE *filep); - WINDOW *getwin(FILE *filep); - int delay_output(int ms); + + void use_env(bool f); + void use_tioctl(bool f); + + int putwin(WINDOW *win, FILE *filep); + WINDOW *getwin(FILE *filep); + + int delay_output(int ms); int flushinp(void); @@ -176,6 +181,7 @@ uses operating system calls unless over- ridden by $LINES or $COLUMNS environment variables. + TRUE TRUE ncurses updates $LINES and $COLUMNS based on operating system calls. FALSE TRUE ncurses ignores $LINES and $COLUMNS, us- @@ -302,9 +308,9 @@ X/Open Curses documented. o the parameter is in the range 128-159, i.e., a C1 control code. If - use_legacy_coding has been called with a 2 parameter, unctrl re- - turns the parameter, i.e., a one-character string with the parame- - ter as the first character. Otherwise, it returns "~@", "~A", + use_legacy_coding(3x) has been called with a 2 parameter, unctrl + returns the parameter, i.e., a one-character string with the param- + eter as the first character. Otherwise, it returns "~@", "~A", etc., analogous to "^@", "^A", C0 controls. X/Open Curses does not document whether unctrl can be called before @@ -321,16 +327,16 @@ "^", and strip the parameter to 7 bits. Or they may ignore C1 controls and treat all of the upper-128 codes as printable. This implementation uses 8 bits but does not modify the string to reflect locale. The - use_legacy_coding function allows the caller to change the output of - unctrl. + use_legacy_coding(3x) function allows the caller to change the output + of unctrl. Likewise, the meta(3x) function allows the caller to change the output of keyname, i.e., it determines whether to use the "M-" prefix for - "meta" keys (codes in the range 128 to 255). Both use_legacy_coding - and meta succeed only after curses is initialized. X/Open Curses does - not document the treatment of codes 128 to 159. When treating them as - "meta" keys (or if keyname is called before initializing curses), this - implementation returns strings "M-^@", "M-^A", etc. + "meta" keys (codes in the range 128 to 255). Both use_legacy_cod- + ing(3x) and meta(3x) succeed only after curses is initialized. X/Open + Curses does not document the treatment of codes 128 to 159. When + treating them as "meta" keys (or if keyname is called before initializ- + ing curses), this implementation returns strings "M-^@", "M-^A", etc. X/Open Curses documents unctrl as declared in <unctrl.h>, which ncurses does. However, ncurses' <curses.h> includes <unctrl.h>, matching the @@ -345,9 +351,9 @@SEE ALSO
- legacy_coding(3x), curses(3x), curs_initscr(3x), curs_inopts(3x), - curs_kernel(3x), curs_scr_dump(3x), curs_sp_funcs(3x), curs_vari- - ables(3x), legacy_coding(3x). + curses(3x), curs_initscr(3x), curs_inopts(3x), curs_kernel(3x), + curs_scr_dump(3x), curs_sp_funcs(3x), curs_variables(3x), legacy_cod- + ing(3x). diff --git a/doc/html/man/curs_variables.3x.html b/doc/html/man/curs_variables.3x.html index 7f8e1f3..471b348 100644 --- a/doc/html/man/curs_variables.3x.html +++ b/doc/html/man/curs_variables.3x.html @@ -1,4 +1,4 @@ - diff --git a/doc/html/man/curs_window.3x.html b/doc/html/man/curs_window.3x.html index 786ca4f..3f4c964 100644 --- a/doc/html/man/curs_window.3x.html +++ b/doc/html/man/curs_window.3x.html @@ -1,6 +1,6 @@ - @@ -88,6 +88,14 @@ A new full-screen window is created by calling newwin(0,0,0,0). + Regardless of the function used for creating a new window (e.g., + newwin, subwin, derwin, newpad), rather than a duplicate (with dupwin), + all of the window modes are initialized to the default values. These + functions set window modes after a window is created: + + idcok, idlok, immedok, keypad, leaveok, nodelay, scrollok, + setscrreg, syncok, wbkgdset, wbkgrndset, and wtimeout +delwin
Calling delwin deletes the named window, freeing all memory associated diff --git a/doc/html/man/default_colors.3x.html b/doc/html/man/default_colors.3x.html index df63f3a..ca1403b 100644 --- a/doc/html/man/default_colors.3x.html +++ b/doc/html/man/default_colors.3x.html @@ -1,4 +1,4 @@ - @@ -48,23 +48,23 @@NAME
- use_default_colors, assume_default_colors - use terminal's default col- - ors + use_default_colors, assume_default_colors - use terminal's default + colorsSYNOPSIS
#include <curses.h> int use_default_colors(void); - int assume_default_colors(int fg, int bg); + int assume_default_colors(int fg, int bg);DESCRIPTION
- The use_default_colors and assume_default_colors functions are exten- - sions to the curses library. They are used with terminals that support - ISO 6429 color, or equivalent. These terminals allow the application - to reset color to an unspecified default value (e.g., with SGR 39 or - SGR 49). + The use_default_colors and assume_default_colors functions are + extensions to the curses library. They are used with terminals that + support ISO 6429 color, or equivalent. These terminals allow the + application to reset color to an unspecified default value (e.g., with + SGR 39 or SGR 49). Applications that paint a colored background over the whole screen do not take advantage of SGR 39 and SGR 49. Some applications are @@ -72,8 +72,8 @@ text. For example, there are several implementations of the ls program which use colors to denote different file types or permissions. These "color ls" programs do not necessarily modify the background color, - typically using only the setaf terminfo capability to set the fore- - ground color. Full-screen applications that use default colors can + typically using only the setaf terminfo capability to set the + foreground color. Full-screen applications that use default colors can achieve similar visual effects. The first function, use_default_colors tells the curses library to @@ -82,8 +82,8 @@ default background and init_pair(x,-1,COLOR_BLUE) will initialize pair x as default foreground on blue. - The other, assume_default_colors is a refinement which tells which col- - ors to paint for color pair 0. This function recognizes a special + The other, assume_default_colors is a refinement which tells which + colors to paint for color pair 0. This function recognizes a special color number -1, which denotes the default terminal color. The following are equivalent: @@ -91,8 +91,8 @@ assume_default_colors(-1,-1); These are ncurses extensions. For other curses implementations, color - number -1 does not mean anything, just as for ncurses before a success- - ful call of use_default_colors or assume_default_colors. + number -1 does not mean anything, just as for ncurses before a + successful call of use_default_colors or assume_default_colors. Other curses implementations do not allow an application to modify color pair 0. They assume that the background is COLOR_BLACK, but do @@ -121,16 +121,16 @@ ls" programs. Attempting to manage the background color of the screen for this application would give unsatisfactory results for a variety of reasons. This extension was devised after noting that color xterm (and - similar programs) provides a background color which does not necessar- - ily correspond to any of the ANSI colors. While a special terminfo - entry could be constructed using nine colors, there was no mechanism - provided within curses to account for the related orig_pair and - back_color_erase capabilities. + similar programs) provides a background color which does not + necessarily correspond to any of the ANSI colors. While a special + terminfo entry could be constructed using nine colors, there was no + mechanism provided within curses to account for the related orig_pair + and back_color_erase capabilities. - The assume_default_colors function was added to solve a different prob- - lem: support for applications which would use environment variables and - other configuration to bypass curses' notion of the terminal's default - colors, setting specific values. + The assume_default_colors function was added to solve a different + problem: support for applications which would use environment variables + and other configuration to bypass curses' notion of the terminal's + default colors, setting specific values.PORTABILITY
@@ -140,7 +140,7 @@SEE ALSO
- curs_color(3x), ded(1). + ded(1), curs_color(3x).AUTHOR
diff --git a/doc/html/man/define_key.3x.html b/doc/html/man/define_key.3x.html index 47aa7ac..edd8721 100644 --- a/doc/html/man/define_key.3x.html +++ b/doc/html/man/define_key.3x.html @@ -1,4 +1,4 @@ - @@ -54,7 +54,7 @@SYNOPSIS
#include <curses.h> - int define_key(const char *definition, int keycode); + int define_key(const char *definition, int keycode);DESCRIPTION
@@ -69,10 +69,10 @@RETURN VALUE
- The keycode must be greater than zero, and the string non-null, other- - wise ERR is returned. ERR may also be returned if there is insuffi- - cient memory to allocate the data to store the definition. If no error - is detected, OK is returned. + The keycode must be greater than zero, and the string non-null, + otherwise ERR is returned. ERR may also be returned if there is + insufficient memory to allocate the data to store the definition. If + no error is detected, OK is returned.PORTABILITY
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html index 82a8afe..dd6d574 100644 --- a/doc/html/man/form.3x.html +++ b/doc/html/man/form.3x.html @@ -1,4 +1,4 @@ - @@ -59,8 +59,8 @@ The form library provides terminal-independent facilities for composing form screens on character-cell terminals. The library includes: field routines, which create and modify form fields; and form routines, which - group fields into forms, display forms on the screen, and handle inter- - action with the user. + group fields into forms, display forms on the screen, and handle + interaction with the user. The form library uses the curses libraries. To use the form library, link with the options -lform -lcurses. @@ -85,7 +85,8 @@Routine Name Index
The following table lists each form routine and the name of the manual - page on which it is described. + page on which it is described. Routines flagged with "*" are ncurses- + specific, not present in SVr4. curses Routine Name Manual Page Name -------------------------------------------------- @@ -111,8 +112,8 @@ field_term form_hook(3x) field_type form_field_validation(3x) field_userptr form_field_userptr(3x) - form_driver form_driver(3x) + form_driver form_driver(3x) form_driver_w form_driver(3x)* form_fields form_field(3x) form_init form_hook(3x) @@ -120,8 +121,8 @@ form_opts_off form_opts(3x) form_opts_on form_opts(3x) form_page form_page(3x) - form_request_by_name form_requestname(3x) - form_request_name form_requestname(3x) + form_request_by_name form_requestname(3x)* + form_request_name form_requestname(3x)* form_sub form_win(3x) form_term form_hook(3x) form_userptr form_userptr(3x) @@ -163,15 +164,15 @@ set_form_win form_win(3x) set_max_field form_field_buffer(3x) set_new_page form_new_page(3x) - unfocus_current_field form_page(3x) + unfocus_current_field form_page(3x)* unpost_form form_post(3x)RETURN VALUE
- Routines that return pointers return NULL on error, and set errno to - the corresponding error-code returned by functions returning an inte- - ger. Routines that return an integer return one of the following error - codes: + Routines that return pointers return NULL on error, and set errno to + the corresponding error-code returned by functions returning an + integer. Routines that return an integer return one of the following + error codes: E_OK The routine succeeded. @@ -210,19 +211,19 @@NOTES
- The header file <form.h> automatically includes the header files + The header file <form.h> automatically includes the header files <curses.h> and <eti.h>. In your library list, libform.a should be before libncurses.a; that is, - you want to say "-lform -lncurses", not the other way around (which + you want to say "-lform -lncurses", not the other way around (which would give you a link error when using static libraries).PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. - The menu facility was documented in SVr4.2 in Character User Interface + The menu facility was documented in SVr4.2 in Character User Interface Programming (UNIX SVR4.2). It is not part of X/Open Curses. @@ -233,21 +234,21 @@ o NetBSD curses. - A few functions in this implementation are extensions added for + A few functions in this implementation are extensions added for ncurses, but not provided by other implementations, e.g., form_driver_w, unfocus_current_field.AUTHORS
- Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric S. + Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric S. Raymond.SEE ALSO
- curses(3x) and related pages whose names begin "form_" for detailed + curses(3x) and related pages whose names begin "form_" for detailed descriptions of the entry points. - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/form_cursor.3x.html b/doc/html/man/form_cursor.3x.html index 5430124..12ae82e 100644 --- a/doc/html/man/form_cursor.3x.html +++ b/doc/html/man/form_cursor.3x.html @@ -1,4 +1,4 @@ - @@ -53,7 +53,8 @@SYNOPSIS
#include <form.h> - int pos_form_cursor(FORM *form); + + int pos_form_cursor(FORM *form);DESCRIPTION
@@ -88,8 +89,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_data.3x.html b/doc/html/man/form_data.3x.html index d3d94d4..84d50f0 100644 --- a/doc/html/man/form_data.3x.html +++ b/doc/html/man/form_data.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <form.h> - bool data_ahead(const FORM *form); - bool data_behind(const FORM *form); + + bool data_ahead(const FORM *form); + bool data_behind(const FORM *form);DESCRIPTION
@@ -75,8 +76,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_driver.3x.html b/doc/html/man/form_driver.3x.html index b5bebe1..2804fab 100644 --- a/doc/html/man/form_driver.3x.html +++ b/doc/html/man/form_driver.3x.html @@ -1,4 +1,4 @@ - @@ -52,6 +52,7 @@SYNOPSIS
#include <form.h> + int form_driver(FORM *form, int c); int form_driver_w(FORM *form, int c, wchar_t wch); @@ -67,19 +68,19 @@ and character codes returned by wgetch(3x). o The input is a printable character. Printable characters (which - must be positive, less than 256) are checked according to the pro- - gram's locale settings. + must be positive, less than 256) are checked according to the + program's locale settings. o The input is the KEY_MOUSE special key associated with an mouse event.form_driver_w
- This extension simplifies the use of the forms library using wide char- - acters. The input is either a key code (a request) or a wide character - returned by get_wch(3x). The type must be passed as well, to enable - the library to determine whether the parameter is a wide character or a - request. + This extension simplifies the use of the forms library using wide + characters. The input is either a key code (a request) or a wide + character returned by get_wch(3x). The type must be passed as well, to + enable the library to determine whether the parameter is a wide + character or a request.Form-driver requests
@@ -111,8 +112,8 @@ REQ_LEFT_FIELD Move left to a field. REQ_NEW_LINE Insert or overlay a new line. REQ_NEXT_CHAR Move to the next char. - REQ_NEXT_CHOICE Display next field choice. + REQ_NEXT_CHOICE Display next field choice. REQ_NEXT_FIELD Move to the next field. REQ_NEXT_LINE Move to the next line. REQ_NEXT_PAGE Move to the next page. @@ -209,8 +210,8 @@ that field and E_UNKNOWN_COMMAND is returned. This return value makes sense, because a double click usually means that an field- specific action should be returned. It is exactly the purpose - of this return value to signal that an application specific com- - mand should be executed. + of this return value to signal that an application specific + command should be executed. o If a translation into a request was done, form_driver returns the result of this request. @@ -258,8 +259,8 @@SEE ALSO
- curses(3x), form(3x), form_field_buffer(3x), form_field_validation(3x), - form_fieldtype(3x), form_variables(3x), getch(3x). + curses(3x), form(3x), form_fieldtype(3x), form_field_buffer(3x), + form_field_validation(3x), form_variables(3x), getch(3x).NOTES
@@ -268,8 +269,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_field.3x.html b/doc/html/man/form_field.3x.html index 1c6060b..ca07472 100644 --- a/doc/html/man/form_field.3x.html +++ b/doc/html/man/form_field.3x.html @@ -1,4 +1,4 @@ - @@ -53,10 +53,11 @@SYNOPSIS
#include <form.h> - int set_form_fields(FORM *form, FIELD **fields); - FIELD **form_fields(const FORM *form); - int field_count(const FORM *form); - int move_field(FIELD *field, int frow, int fcol); + + int set_form_fields(FORM *form, FIELD **fields); + FIELD **form_fields(const FORM *form); + int field_count(const FORM *form); + int move_field(FIELD *field, int frow, int fcol);DESCRIPTION
@@ -67,18 +68,18 @@ The function field_count returns the count of fields in form. - The function move_field moves the given field (which must be discon- - nected) to a specified location on the screen. + The function move_field moves the given field (which must be + disconnected) to a specified location on the screen.RETURN VALUE
The function form_fields returns a pointer (which may be NULL). It - does not set errno. + does not set errno. The function field_count returns ERR if the form parameter is NULL. - The functions set_form_fields and move_field return one of the follow- - ing codes on error: + The functions set_form_fields and move_field return one of the + following codes on error: E_OK The routine succeeded. @@ -105,8 +106,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. The SVr4 forms library documentation specifies the field_count error value as -1 (which is the value of ERR). diff --git a/doc/html/man/form_field_attributes.3x.html b/doc/html/man/form_field_attributes.3x.html index e1b4b97..0ec75c6 100644 --- a/doc/html/man/form_field_attributes.3x.html +++ b/doc/html/man/form_field_attributes.3x.html @@ -1,4 +1,4 @@ - @@ -53,19 +53,22 @@SYNOPSIS
#include <form.h> - int set_field_fore(FIELD *field, chtype attr); - chtype field_fore(const FIELD *field); - int set_field_back(FIELD *field, chtype attr); - chtype field_back(const FIELD *field); - int set_field_pad(FIELD *field, int pad); - int field_pad(const FIELD *field); + + int set_field_fore(FIELD *field, chtype attr); + chtype field_fore(const FIELD *field); + + int set_field_back(FIELD *field, chtype attr); + chtype field_back(const FIELD *field); + + int set_field_pad(FIELD *field, int pad); + int field_pad(const FIELD *field);DESCRIPTION
The function set_field_fore sets the foreground attribute of field. This is the highlight used to display the field contents. The function - field_fore returns the foreground attribute. The default is A_STAND- - OUT. + field_fore returns the foreground attribute. The default is + A_STANDOUT. The function set_field_back sets the background attribute of form. This is the highlight used to display the extent fields in the form. The @@ -100,8 +103,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_field_buffer.3x.html b/doc/html/man/form_field_buffer.3x.html index b4fc8d0..aabd869 100644 --- a/doc/html/man/form_field_buffer.3x.html +++ b/doc/html/man/form_field_buffer.3x.html @@ -1,4 +1,4 @@ - @@ -54,11 +54,13 @@SYNOPSIS
#include <form.h> - int set_field_buffer(FIELD *field, int buf, const char *value); - char *field_buffer(const FIELD *field, int buffer); - int set_field_status(FIELD *field, bool status); - bool field_status(const FIELD *field); - int set_max_field(FIELD *field, int max); + int set_field_buffer(FIELD *field, int buf, const char *value); + char *field_buffer(const FIELD *field, int buffer); + + int set_field_status(FIELD *field, bool status); + bool field_status(const FIELD *field); + + int set_max_field(FIELD *field, int max);DESCRIPTION
@@ -68,8 +70,8 @@ o Buffer 0 is the displayed value of the field. o Other numbered buffers may be allocated by applications through - the nbuf argument of (see form_field_new(3x)) but are not manip- - ulated by the forms library. + the nbuf argument of (see form_field_new(3x)) but are not + manipulated by the forms library. The function field_buffer returns a pointer to the contents of the given numbered buffer: @@ -103,8 +105,8 @@RETURN VALUE
- The field_buffer function returns NULL on error. It sets errno accord- - ing to their success: + The field_buffer function returns NULL on error. It sets errno + according to their success: E_OK The routine succeeded. @@ -133,14 +135,14 @@ The header file <form.h> automatically includes the header file When configured for wide characters, field_buffer returns a pointer to - temporary storage (allocated and freed by the library). The applica- - tion should not attempt to modify the data. It will be freed on the - next call to field_buffer to return the same buffer. <curses.h>. + temporary storage (allocated and freed by the library). The + application should not attempt to modify the data. It will be freed on + the next call to field_buffer to return the same buffer. <curses.h>.PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. The set_max_field function checks for an ncurses extension O_INPUT_FIELD which allows a dynamic field to shrink if the new limit diff --git a/doc/html/man/form_field_info.3x.html b/doc/html/man/form_field_info.3x.html index 38c2bec..e107bfd 100644 --- a/doc/html/man/form_field_info.3x.html +++ b/doc/html/man/form_field_info.3x.html @@ -1,4 +1,4 @@ - @@ -53,20 +53,24 @@SYNOPSIS
#include <form.h> - int field_info(const FIELD *field, int *rows, int *cols, - int *frow, int *fcol, int *nrow, int *nbuf); - int dynamic_field_info(const FIELD *field, int *rows, int *cols, int - *max); + + int field_info(const FIELD *field, + int *rows, int *cols, + int *frow, int *fcol, + int *nrow, int *nbuf); + + int dynamic_field_info(const FIELD *field, + int *rows, int *cols, int *max);DESCRIPTION
- The function field_info returns the sizes and other attributes passed - in to the field at its creation time. The attributes are: height, - width, row of upper-left corner, column of upper-left corner, number + The function field_info returns the sizes and other attributes passed + in to the field at its creation time. The attributes are: height, + width, row of upper-left corner, column of upper-left corner, number off-screen rows, and number of working buffers. - The function dynamic_field_info returns the actual size of the field, - and its maximum possible size. If the field has no size limit, the + The function dynamic_field_info returns the actual size of the field, + and its maximum possible size. If the field has no size limit, the location addressed by the third argument will be set to 0. A field can be made dynamic by turning off the O_STATIC option with field_opts_off. @@ -84,7 +88,7 @@SEE ALSO
- curses(3x) and related pages whose names begin "form_" for detailed + curses(3x) and related pages whose names begin "form_" for detailed descriptions of the entry points. @@ -94,11 +98,11 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. - A null (zero pointer) is accepted for any of the return values, to - ignore that value. Not all implementations allow this, e.g., Solaris + A null (zero pointer) is accepted for any of the return values, to + ignore that value. Not all implementations allow this, e.g., Solaris 2.7 does not. diff --git a/doc/html/man/form_field_just.3x.html b/doc/html/man/form_field_just.3x.html index 2b501e5..4db92bf 100644 --- a/doc/html/man/form_field_just.3x.html +++ b/doc/html/man/form_field_just.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <form.h> - int set_field_just(FIELD *field, int justification); - int field_just(const FIELD *field); + + int set_field_just(FIELD *field, int justification); + int field_just(const FIELD *field);DESCRIPTION
@@ -65,8 +66,8 @@RETURN VALUE
- The function field_just returns one of: NO_JUSTIFICATION, JUS- - TIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. + The function field_just returns one of: NO_JUSTIFICATION, + JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. The function set_field_just returns one of the following: @@ -90,8 +91,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_field_new.3x.html b/doc/html/man/form_field_new.3x.html index aa68005..03ced38 100644 --- a/doc/html/man/form_field_new.3x.html +++ b/doc/html/man/form_field_new.3x.html @@ -1,4 +1,4 @@ - @@ -54,12 +54,13 @@SYNOPSIS
#include <form.h> - FIELD *new_field(int height, int width, - int toprow, int leftcol, - int offscreen, int nbuffers); - FIELD *dup_field(FIELD *field, int toprow, int leftcol); - FIELD *link_field(FIELD *field, int toprow, int leftcol); - int free_field(FIELD *field); + + FIELD *new_field(int height, int width, + int toprow, int leftcol, + int offscreen, int nbuffers); + FIELD *dup_field(FIELD *field, int toprow, int leftcol); + FIELD *link_field(FIELD *field, int toprow, int leftcol); + int free_field(FIELD *field);DESCRIPTION
@@ -81,8 +82,8 @@RETURN VALUE
- The function, new_field, dup_field, link_field return NULL on error. - They set errno according to their success: + The functions new_field, dup_field, link_field return NULL on error. + They set errno according to their success: E_OK The routine succeeded. @@ -113,8 +114,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. It may be unwise to count on the set of attributes copied by dup_field being portable; the System V forms library documents are not very diff --git a/doc/html/man/form_field_opts.3x.html b/doc/html/man/form_field_opts.3x.html index d370db1..278af87 100644 --- a/doc/html/man/form_field_opts.3x.html +++ b/doc/html/man/form_field_opts.3x.html @@ -1,4 +1,4 @@ - @@ -54,10 +54,12 @@SYNOPSIS
#include <form.h> - int set_field_opts(FIELD *field, Field_Options opts); - int field_opts_on(FIELD *field, Field_Options opts); - int field_opts_off(FIELD *field, Field_Options opts); - Field_Options field_opts(const FIELD *field); + + int set_field_opts(FIELD *field, Field_Options opts); + Field_Options field_opts(const FIELD *field); + + int field_opts_on(FIELD *field, Field_Options opts); + int field_opts_off(FIELD *field, Field_Options opts);DESCRIPTION
@@ -120,12 +122,12 @@ discarded. O_EDGE_INSERT_STAY - When inserting into a field up to the boundary position, option- - ally delay the scrolling, so that the last inserted character - remains visible, but advance the cursor to reflect the insertion. - This allows the form library to display the inserted character in - one-character fields as well as allowing the library to maintain - consistent state. + When inserting into a field up to the boundary position, + optionally delay the scrolling, so that the last inserted + character remains visible, but advance the cursor to reflect the + insertion. This allows the form library to display the inserted + character in one-character fields as well as allowing the library + to maintain consistent state. O_INPUT_FIELD The set_max_field function checks for this extension, which allows @@ -158,8 +160,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_field_userptr.3x.html b/doc/html/man/form_field_userptr.3x.html index 3545f5a..f134877 100644 --- a/doc/html/man/form_field_userptr.3x.html +++ b/doc/html/man/form_field_userptr.3x.html @@ -1,4 +1,4 @@ - @@ -54,19 +54,20 @@SYNOPSIS
#include <form.h> - int set_field_userptr(FIELD *field, void*userptr); - void *field_userptr(const FIELD *field); + + int set_field_userptr(FIELD *field, void *userptr); + void *field_userptr(const FIELD *field);DESCRIPTION
- Every form field has a field that can be used to hold application-spe- - cific data (that is, the form-driver code leaves it alone). These + Every form field has a field that can be used to hold application- + specific data (that is, the form-driver code leaves it alone). These functions get and set that field.RETURN VALUE
The function field_userptr returns a pointer (which may be NULL). It - does not set errno. + does not set errno. The function set_field_userptr returns E_OK (success). @@ -81,8 +82,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. The user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility. diff --git a/doc/html/man/form_field_validation.3x.html b/doc/html/man/form_field_validation.3x.html index 4975302..c278107 100644 --- a/doc/html/man/form_field_validation.3x.html +++ b/doc/html/man/form_field_validation.3x.html @@ -1,4 +1,4 @@ - @@ -52,87 +52,123 @@SYNOPSIS
#include <form.h> - int set_field_type(FIELD *field, FIELDTYPE *type, ...); - FIELDTYPE *field_type(const FIELD *field); - void *field_arg(const FIELD *field); - FIELDTYPE *TYPE_ALNUM; - FIELDTYPE *TYPE_ALPHA; - FIELDTYPE *TYPE_ENUM; - FIELDTYPE *TYPE_INTEGER; - FIELDTYPE *TYPE_NUMERIC; - FIELDTYPE *TYPE_REGEXP; - FIELDTYPE *TYPE_IPV4; + void *field_arg(const FIELD *field); + FIELDTYPE *field_type(const FIELD *field); + int set_field_type(FIELD *field, FIELDTYPE *type, ...); + + /* predefined field types */ + FIELDTYPE *TYPE_ALNUM; + FIELDTYPE *TYPE_ALPHA; + FIELDTYPE *TYPE_ENUM; + FIELDTYPE *TYPE_INTEGER; + FIELDTYPE *TYPE_NUMERIC; + FIELDTYPE *TYPE_REGEXP; + FIELDTYPE *TYPE_IPV4;DESCRIPTION
- The function set_field_type declares a data type for a given form - field. This is the type checked by validation functions. The prede- - fined types are as follows: + By default, no validation is done on form fields. You can associate a + form with with a field type, making the form library validate input. + + +field_arg
+ Returns a pointer to the field's argument block. The argument block is + an opaque structure containing a copy of the arguments provided in a + set_field_type call. + + +field_type
+ Returns a pointer to the field type associated with the form field, + i.e., by calling set_field_type. + + +set_field_type
+ The function set_field_type associates a field type with a given form + field. This is the type checked by validation functions. Most field + types are configurable, via arguments which the caller provides when + calling set_field_type. + + Several field types are predefined by the form library. + + +Predefined types
+ It is possible to set up new programmer-defined field types. Field + types are implemented via the FIELDTYPE data structure, which contains + several pointers to functions. + + See the form_fieldtype(3x) manual page, which describes functions which + can be used to construct a field-type dynamically. + + The predefined types are as follows: TYPE_ALNUM - Alphanumeric data. Requires a third int argument, a minimum field - width. + Alphanumeric data. Required parameter: + + o a third int argument, a minimum field width. TYPE_ALPHA - Character data. Requires a third int argument, a minimum field - width. + Character data. Required parameter: + + o a third int argument, a minimum field width. TYPE_ENUM - Accept one of a specified set of strings. Requires additional - parameters: + Accept one of a specified set of strings. Required parameters: o a third (char **) argument pointing to a string list; o a fourth int flag argument to enable case-sensitivity; - o and a fifth int flag argument specifying whether a partial - match must be a unique one. If this flag is off, a prefix - matches the first of any set of more than one list elements - with that prefix. + o a fifth int flag argument specifying whether a partial match + must be a unique one. If this flag is off, a prefix matches + the first of any set of more than one list elements with that + prefix. - The library copies the string list, so you may use a list that - lives in automatic variables on the stack. + The library copies the string list, so you may use a list that + lives in automatic variables on the stack. TYPE_INTEGER - Integer data, parsable to an integer by atoi(3). Requires addi- - tional parameters: + Integer data, parsable to an integer by atoi(3). Required + parameters: o a third int argument controlling the precision, o a fourth long argument constraining minimum value, - o and a fifth long constraining maximum value. If the maximum - value is less than or equal to the minimum value, the range is - simply ignored. On return, the field buffer is formatted - according to the printf format specification ".*ld", where the - "*" is replaced by the precision argument. + o a fifth long constraining maximum value. If the maximum value + is less than or equal to the minimum value, the range is + simply ignored. + + On return, the field buffer is formatted according to the printf + format specification ".*ld", where the "*" is replaced by the + precision argument. - For details of the precision handling see printf(3). + For details of the precision handling see printf(3). TYPE_NUMERIC - Numeric data (may have a decimal-point part). This requires addi- - tional parameters: + Numeric data (may have a decimal-point part). Required + parameters: o a third int argument controlling the precision, o a fourth double argument constraining minimum value, o and a fifth double constraining maximum value. If your system - supports locales, the decimal point character must be the one - specified by your locale. If the maximum value is less than + supports locales, the decimal point character must be the one + specified by your locale. If the maximum value is less than or equal to the minimum value, the range is simply ignored. - On return, the field buffer is formatted according to the - printf format specification ".*f", where the "*" is replaced - by the precision argument. + On return, the field buffer is formatted according to the printf + format specification ".*f", where the "*" is replaced by the + precision argument. - For details of the precision handling see printf(3). + For details of the precision handling see printf(3). TYPE_REGEXP - Regular expression data. Requires a regular expression (char *) - third argument. The data is valid if the regular expression - matches it. + Regular expression data. Required parameter: + + o a third argument, a regular expression (char *) string. The + data is valid if the regular expression matches it. Regular expressions are in the format of regcomp and regexec. @@ -145,22 +181,22 @@ trailing spaces around the digits. TYPE_IPV4 - An Internet Protocol Version 4 address. This requires no addi- - tional argument. The library checks whether or not the buffer has - the form a.b.c.d, where a,b,c and d are numbers between 0 and 255. - Trailing blanks in the buffer are ignored. The address itself is + An Internet Protocol Version 4 address. Required parameter: + + o none + + The form library checks whether or not the buffer has the form + a.b.c.d, where a, b, c, and d are numbers in the range 0 to 255. + Trailing blanks in the buffer are ignored. The address itself is not validated. This is an ncurses extension; this field type may not be available in other curses implementations. - It is possible to set up new programmer-defined field types. See the - form_fieldtype(3x) manual page. -RETURN VALUE
- The functions field_type and field_arg return NULL on error. The func- - tion set_field_type returns one of the following: + The functions field_type and field_arg return NULL on error. The + function set_field_type returns one of the following: E_OK The routine succeeded. @@ -169,7 +205,7 @@SEE ALSO
- curses(3x), form(3x), form_variables(3x). + curses(3x), form(3x), form_fieldtype(3x), form_variables(3x).NOTES
@@ -178,8 +214,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
@@ -194,7 +230,14 @@
- NAME
- SYNOPSIS
-- DESCRIPTION
+- DESCRIPTION + +
- RETURN VALUE
- SEE ALSO
- NOTES
diff --git a/doc/html/man/form_fieldtype.3x.html b/doc/html/man/form_fieldtype.3x.html index 4b35013..386219b 100644 --- a/doc/html/man/form_fieldtype.3x.html +++ b/doc/html/man/form_fieldtype.3x.html @@ -1,4 +1,4 @@ - @@ -53,63 +53,95 @@SYNOPSIS
#include <form.h> - FIELDTYPE *new_fieldtype( - bool (* const field_check)(FIELD *, const void *), - bool (* const char_check)(int, const void *)); - int free_fieldtype(FIELDTYPE *fieldtype); - int set_fieldtype_arg( - FIELDTYPE *fieldtype, - void *(* const make_arg)(va_list *), - void *(* const copy_arg)(const void *), - void (* const free_arg)(void *)); - int set_fieldtype_choice( - FIELDTYPE *fieldtype, - bool (* const next_choice)(FIELD *, const void *), - bool (* const prev_choice)(FIELD *, const void *)); - FIELDTYPE *link_fieldtype(FIELDTYPE *type1, - FIELDTYPE *type2); + + FIELDTYPE *new_fieldtype( + bool (* const field_check)(FIELD *, const void *), + bool (* const char_check)(int, const void *)); + int free_fieldtype(FIELDTYPE *fieldtype); + + int set_fieldtype_arg( + FIELDTYPE *fieldtype, + void *(* const make_arg)(va_list *), + void *(* const copy_arg)(const void *), + void (* const free_arg)(void *)); + int set_fieldtype_choice( + FIELDTYPE *fieldtype, + bool (* const next_choice)(FIELD *, const void *), + bool (* const prev_choice)(FIELD *, const void *)); + + FIELDTYPE *link_fieldtype(FIELDTYPE *type1, + FIELDTYPE *type2);DESCRIPTION
+ +new_fieldtype
The function new_fieldtype creates a new field type usable for data - validation. You supply it with field_check, a predicate to check the - validity of an entered data string whenever the user attempts to leave - a field. The (FIELD *) argument is passed in so the validation predi- - cate can see the field's buffer, sizes and other attributes; the second - argument is an argument-block structure, about which more below. + validation. Its parameters are function pointers: + + field_check + This function checks the validity of an entered data string + whenever the user attempts to leave a field. It has two + arguments: + + o The (FIELD *) argument is passed in so the validation + predicate can see the field's buffer, sizes and other + attributes. - You also supply new_fieldtype with char_check, a function to validate - input characters as they are entered; it will be passed the character - to be checked and a pointer to an argument-block structure. + o The second argument is an argument-block structure, about + which more below. - The function free_fieldtype frees the space allocated for a given vali- - dation type. + char_check + This function validates input characters as they are entered. The + form library passes it the character to be checked and a pointer + to an argument-block structure. + +free_fieldtype
+ The free_fieldtype function frees the space allocated for a given + validation type by new_fieldtype. + + +set_fieldtype_arg
The function set_fieldtype_arg associates three storage-management - functions with a field type. The make_arg function is automatically - applied to the list of arguments you give set_field_type when attaching - validation to a field; its job is to bundle these into an allocated - argument-block object which can later be passed to validation predi- - cated. The other two hook arguments should copy and free argument- - block structures. They will be used by the forms-driver code. You - must supply the make_arg function, the other two are optional, you may - supply NULL for them. In this case it is assumed that make_arg does - not allocate memory but simply loads the argument into a single scalar - value. + functions with a field type: + + make_arg + This function is automatically applied to the list of arguments + you give set_field_type when attaching validation to a field. It + stores the arguments in an allocated argument-block object which + is used when validating input. + + copy_arg + This function may be used by applications to copy argument-blocks. + free_arg + Frees an argument-block structure. + + You must supply the make_arg function. The other two are optional: you + may supply NULL for them. In this case, the form library assumes that + make_arg does not allocate memory but simply loads the argument into a + single scalar value. + + +set_fieldtype_choice
+ The form driver requests REQ_NEXT_CHOICE and REQ_PREV_CHOICE assume + that the possible values of a field form an ordered set, and provide + the forms user with a way to move through the set. + + The set_fieldtype_choice function allows forms programmers to define + successor and predecessor functions for the field type. These + functions take the field pointer and an argument-block structure as + arguments. + + +link_fieldtype
The function link_fieldtype creates a new field type from the two given types. They are connected by an logical 'OR'. - The form driver requests REQ_NEXT_CHOICE and REQ_PREV_CHOICE assume - that the possible values of a field form an ordered set, and provide - the forms user with a way to move through the set. The set_field- - type_choice function allows forms programmers to define successor and - predecessor functions for the field type. These functions take the - field pointer and an argument-block structure as arguments. -RETURN VALUE
- The pointer-valued routines return NULL on error. They set errno + The pointer-valued routines return NULL on error. They set errno according to their success: E_OK The routine succeeded. @@ -138,21 +170,17 @@SEE ALSO
- curses(3x), form(3x). + curses(3x), form(3x), form_field_validation(3x).NOTES
The header file <form.h> automatically includes the header file <curses.h>. - All of the (char *) arguments of these functions should actually be - (void *). The type has been left uncorrected for strict compatibility - with System V. -PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
@@ -167,7 +195,15 @@
- NAME
- SYNOPSIS
-- DESCRIPTION
+- DESCRIPTION + +
- RETURN VALUE
- SEE ALSO
- NOTES
diff --git a/doc/html/man/form_hook.3x.html b/doc/html/man/form_hook.3x.html index bac8d43..db12999 100644 --- a/doc/html/man/form_hook.3x.html +++ b/doc/html/man/form_hook.3x.html @@ -1,4 +1,4 @@ - @@ -53,14 +53,18 @@SYNOPSIS
#include <form.h> - int set_field_init(FORM *form, Form_Hook func); - Form_Hook field_init(const FORM *form); - int set_field_term(FORM *form, Form_Hook func); - Form_Hook field_term(const FORM *form); - int set_form_init(FORM *form, Form_Hook func); - Form_Hook form_init(const FORM *form); - int set_form_term(FORM *form, Form_Hook func); - Form_Hook form_term(const FORM *form); + + int set_field_init(FORM *form, Form_Hook func); + Form_Hook field_init(const FORM *form); + + int set_field_term(FORM *form, Form_Hook func); + Form_Hook field_term(const FORM *form); + + int set_form_init(FORM *form, Form_Hook func); + Form_Hook form_init(const FORM *form); + + int set_form_term(FORM *form, Form_Hook func); + Form_Hook form_term(const FORM *form);DESCRIPTION
@@ -107,8 +111,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_new.3x.html b/doc/html/man/form_new.3x.html index fc27103..59b09a0 100644 --- a/doc/html/man/form_new.3x.html +++ b/doc/html/man/form_new.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <form.h> - FORM *new_form(FIELD **fields); - int free_form(FORM *form); + + FORM *new_form(FIELD **fields); + int free_form(FORM *form);DESCRIPTION
@@ -66,7 +67,7 @@RETURN VALUE
- The function new_form returns NULL on error. It sets errno according + The function new_form returns NULL on error. It sets errno according to the function's success: E_OK The routine succeeded. @@ -101,8 +102,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_new_page.3x.html b/doc/html/man/form_new_page.3x.html index c14bb9d..7a14ed6 100644 --- a/doc/html/man/form_new_page.3x.html +++ b/doc/html/man/form_new_page.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <form.h> - int set_new_page(FIELD *field, bool new_page_flag); - bool new_page(const FIELD *field); + + int set_new_page(FIELD *field, bool new_page_flag); + bool new_page(const FIELD *field);DESCRIPTION
@@ -87,8 +88,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_opts.3x.html b/doc/html/man/form_opts.3x.html index cf680af..3c9d87f 100644 --- a/doc/html/man/form_opts.3x.html +++ b/doc/html/man/form_opts.3x.html @@ -1,4 +1,4 @@ - @@ -54,10 +54,12 @@SYNOPSIS
#include <form.h> - int set_form_opts(FORM *form, Field_Options opts); - int form_opts_on(FORM *form, Field_Options opts); - int form_opts_off(FORM *form, Field_Options opts); - Field_Options form_opts(const FORM *form); + + int set_form_opts(FORM *form, Field_Options opts); + Field_Options form_opts(const FORM *form); + + int form_opts_on(FORM *form, Field_Options opts); + int form_opts_off(FORM *form, Field_Options opts);DESCRIPTION
@@ -102,8 +104,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_page.3x.html b/doc/html/man/form_page.3x.html index e06fffd..a1b3cad 100644 --- a/doc/html/man/form_page.3x.html +++ b/doc/html/man/form_page.3x.html @@ -1,4 +1,4 @@ - @@ -53,12 +53,16 @@SYNOPSIS
#include <form.h> - int set_current_field(FORM *form, FIELD *field); - FIELD *current_field(const FORM *); - int unfocus_current_field(FORM *form); - int set_form_page(FORM *form, int n); - int form_page(const FORM *form); - int field_index(const FIELD *field); + + int set_current_field(FORM *form, FIELD *field); + FIELD *current_field(const FORM *form); + + int unfocus_current_field(FORM *form); + + int set_form_page(FORM *form, int n); + int form_page(const FORM *form); + + int field_index(const FIELD *field);DESCRIPTION
@@ -110,8 +114,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. The unfocus_current_field function is an ncurses extension. diff --git a/doc/html/man/form_post.3x.html b/doc/html/man/form_post.3x.html index 9a18331..3534f1e 100644 --- a/doc/html/man/form_post.3x.html +++ b/doc/html/man/form_post.3x.html @@ -1,4 +1,4 @@ - @@ -48,14 +48,15 @@NAME
- post_form, unpost_form - write or erase forms from associated subwin- - dows + post_form, unpost_form - write or erase forms from associated + subwindowsSYNOPSIS
#include <form.h> - int post_form(FORM *form); - int unpost_form(FORM *form); + + int post_form(FORM *form); + int unpost_form(FORM *form);DESCRIPTION
@@ -104,8 +105,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/form_requestname.3x.html b/doc/html/man/form_requestname.3x.html index 9245e4b..91dea4a 100644 --- a/doc/html/man/form_requestname.3x.html +++ b/doc/html/man/form_requestname.3x.html @@ -1,4 +1,4 @@ - @@ -54,23 +54,30 @@SYNOPSIS
#include <form.h> - const char *form_request_name(int request); - int form_request_by_name(const char *name); + + const char *form_request_name(int request); + int form_request_by_name(const char *name);DESCRIPTION
+ +form_request_name
The function form_request_name returns the printable name of a form request code. + + +form_request_name_by_name
The function form_request_by_name searches in the name-table for a request with the given name and returns its request code. Otherwise E_NO_MATCH is returned.RETURN VALUE
- form_request_name returns NULL on error and sets errno to E_BAD_ARGU- - MENT. + form_request_name returns NULL on error and sets errno to + E_BAD_ARGUMENT. + form_request_by_name returns E_NO_MATCH on error. It does not set - errno. + errno.SEE ALSO
@@ -100,7 +107,12 @@
- NAME
- SYNOPSIS
-- DESCRIPTION
+- DESCRIPTION + +
- RETURN VALUE
- SEE ALSO
- NOTES
diff --git a/doc/html/man/form_userptr.3x.html b/doc/html/man/form_userptr.3x.html index 4675f54..bdc2f2d 100644 --- a/doc/html/man/form_userptr.3x.html +++ b/doc/html/man/form_userptr.3x.html @@ -1,4 +1,4 @@ - @@ -54,8 +54,9 @@SYNOPSIS
#include <form.h> - int set_form_userptr(FORM *form, void *userptr); - void* form_userptr(const FORM *form); + + int set_form_userptr(FORM *form, void *userptr); + void* form_userptr(const FORM *form);DESCRIPTION
@@ -66,7 +67,7 @@RETURN VALUE
The function form_userptr returns a pointer (which may be NULL). It - does not set errno. + does not set errno. The function set_form_userptr returns E_OK (success). @@ -81,8 +82,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions. The user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility. diff --git a/doc/html/man/form_variables.3x.html b/doc/html/man/form_variables.3x.html index f78a53e..218a09c 100644 --- a/doc/html/man/form_variables.3x.html +++ b/doc/html/man/form_variables.3x.html @@ -1,4 +1,4 @@ - @@ -65,8 +65,9 @@DESCRIPTION
These are building blocks for the form library, defining fields that - can be created using set_fieldtype(3x). Each provides functions for - field- and character-validation, according to the given datatype. + can be created using the form_fieldtype(3x) functions. Each provides + functions for field- and character-validation, according to the given + datatype.TYPE_ALNUM
@@ -98,7 +99,7 @@PORTABILITY
- The TYPE_IPV4 variable is an extension not provided by older implemen- + The TYPE_IPV4 variable is an extension not provided by older implemen- tations of the form library. diff --git a/doc/html/man/form_win.3x.html b/doc/html/man/form_win.3x.html index 5295fca..2c870e0 100644 --- a/doc/html/man/form_win.3x.html +++ b/doc/html/man/form_win.3x.html @@ -1,4 +1,4 @@ - @@ -53,29 +53,32 @@SYNOPSIS
#include <form.h> - int set_form_win(FORM *form, WINDOW *win); - WINDOW *form_win(const FORM *form); - int set_form_sub(FORM *form, WINDOW *sub); - WINDOW *form_sub(const FORM *form); - int scale_form(const FORM *form, int *rows, int *columns); + + int set_form_win(FORM *form, WINDOW *win); + WINDOW *form_win(const FORM *form); + + int set_form_sub(FORM *form, WINDOW *sub); + WINDOW *form_sub(const FORM *form); + + int scale_form(const FORM *form, int *rows, int *columns);DESCRIPTION
Every form has an associated pair of curses windows. The form window - displays any title and border associated with the window; the form sub- - window displays the items of the form that are currently available for - selection. + displays any title and border associated with the window; the form + subwindow displays the items of the form that are currently available + for selection. - The first four functions get and set those windows. It is not neces- - sary to set either window; by default, the driver code uses stdscr for - both. + The first four functions get and set those windows. It is not + necessary to set either window; by default, the driver code uses stdscr + for both. In the set_ functions, window argument of NULL is treated as though it were stsdcr. A form argument of NULL is treated as a request to change the system default form window or subwindow. - The function scale_form returns the minimum size required for the sub- - window of form. + The function scale_form returns the minimum size required for the + subwindow of form.RETURN VALUE
@@ -107,8 +110,8 @@PORTABILITY
- These routines emulate the System V forms library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V forms library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html index 0f1f0e5..03b2568 100644 --- a/doc/html/man/infocmp.1m.html +++ b/doc/html/man/infocmp.1m.html @@ -1,7 +1,7 @@ - @@ -59,9 +59,9 @@DESCRIPTION
- infocmp can be used to compare a binary terminfo entry with other ter- - minfo entries, rewrite a terminfo description to take advantage of the - use= terminfo field, or print out a terminfo description from the + infocmp can be used to compare a binary terminfo entry with other + terminfo entries, rewrite a terminfo description to take advantage of + the use= terminfo field, or print out a terminfo description from the binary file (term) in a variety of formats. In all cases, the boolean fields will be printed first, followed by the numeric fields, followed by the string fields. @@ -77,8 +77,8 @@ infocmp compares the terminfo description of the first terminal termname with each of the descriptions given by the entries for the other terminal's termnames. If a capability is defined for only one of - the terminals, the value returned depends on the type of the capabil- - ity: + the terminals, the value returned depends on the type of the + capability: o F for missing boolean variables @@ -96,12 +96,12 @@ -c produces a list of each capability that is common between two or more entries. Missing capabilities are ignored. Each item in the - list shows "=" after the capability name, followed by the capabil- - ity value. + list shows "=" after the capability name, followed by the + capability value. - The -u option provides a related output, showing the first termi- - nal description rewritten to use the second as a building block - via the "use=" clause. + The -u option provides a related output, showing the first + terminal description rewritten to use the second as a building + block via the "use=" clause. -n produces a list of each capability that is in none of the given entries. Each item in the list shows "!" before the capability @@ -116,8 +116,8 @@Source Listing Options [-I] [-L] [-C] [-r]
- The -I, -L, and -C options will produce a source listing for each ter- - minal named. + The -I, -L, and -C options will produce a source listing for each + terminal named. -I use the terminfo names -L use the long C variable name listed in <term.h> @@ -143,27 +143,27 @@ excess whitespace (use the -0 option for that). All padding information for strings will be collected together and - placed at the beginning of the string where termcap expects it. Manda- - tory padding (padding information with a trailing "/") will become + placed at the beginning of the string where termcap expects it. + Mandatory padding (padding information with a trailing "/") will become optional. All termcap variables no longer supported by terminfo, but which are - derivable from other terminfo variables, will be output. Not all ter- - minfo capabilities will be translated; only those variables which were - part of termcap will normally be output. Specifying the -r option will - take off this restriction, allowing all capabilities to be output in - termcap form. Normally you would use both the -C and -r options. The - actual format used incorporates some improvements for escaped charac- - ters from terminfo format. For a stricter BSD-compatible translation, - use the -K option rather than -C. - - Note that because padding is collected to the beginning of the capabil- - ity, not all capabilities are output. Mandatory padding is not sup- - ported. Because termcap strings are not as flexible, it is not always - possible to convert a terminfo string capability into an equivalent - termcap format. A subsequent conversion of the termcap file back into - terminfo format will not necessarily reproduce the original terminfo - source. + derivable from other terminfo variables, will be output. Not all + terminfo capabilities will be translated; only those variables which + were part of termcap will normally be output. Specifying the -r option + will take off this restriction, allowing all capabilities to be output + in termcap form. Normally you would use both the -C and -r options. + The actual format used incorporates some improvements for escaped + characters from terminfo format. For a stricter BSD-compatible + translation, use the -K option rather than -C. + + Note that because padding is collected to the beginning of the + capability, not all capabilities are output. Mandatory padding is not + supported. Because termcap strings are not as flexible, it is not + always possible to convert a terminfo string capability into an + equivalent termcap format. A subsequent conversion of the termcap file + back into terminfo format will not necessarily reproduce the original + terminfo source. Some common terminfo parameter sequences, their termcap equivalents, and some terminal types which commonly have such sequences, are: @@ -179,10 +179,10 @@Use= Option [-u]
- The -u option produces a terminfo source description of the first ter- - minal termname which is relative to the sum of the descriptions given - by the entries for the other terminals termnames. It does this by ana- - lyzing the differences between the first termname and the other + The -u option produces a terminfo source description of the first + terminal termname which is relative to the sum of the descriptions + given by the entries for the other terminals termnames. It does this + by analyzing the differences between the first termname and the other termnames and producing a description with use= fields for the other terminals. In this manner, it is possible to retrofit generic terminfo entries into a terminal's description. Or, if two similar terminals @@ -190,48 +190,47 @@ each description is a full description, using infocmp will show what can be done to change one description to be relative to the other. - A capability will get printed with an at-sign (@) if it no longer - exists in the first termname, but one of the other termname entries - contains a value for it. A capability's value gets printed if the - value in the first termname is not found in any of the other termname - entries, or if the first of the other termname entries that has this - capability gives a different value for the capability than that in the - first termname. - - The order of the other termname entries is significant. Since the ter- - minfo compiler tic does a left-to-right scan of the capabilities, spec- - ifying two use= entries that contain differing entries for the same + A capability will be printed with an at-sign (@) if it no longer exists + in the first termname, but one of the other termname entries contains a + value for it. A capability's value will be printed if the value in the + first termname is not found in any of the other termname entries, or if + the first of the other termname entries that has this capability gives + a different value for the capability than that in the first termname. + + The order of the other termname entries is significant. Since the + terminfo compiler tic does a left-to-right scan of the capabilities, + specifying two use= entries that contain differing entries for the same capabilities will produce different results depending on the order that - the entries are given in. infocmp will flag any such inconsistencies + the entries are given in. infocmp will flag any such inconsistencies between the other termname entries as they are found. Alternatively, specifying a capability after a use= entry that contains - that capability will cause the second specification to be ignored. - Using infocmp to recreate a description can be a useful check to make - sure that everything was specified correctly in the original source + that capability will cause the second specification to be ignored. + Using infocmp to recreate a description can be a useful check to make + sure that everything was specified correctly in the original source description. - Another error that does not cause incorrect compiled files, but will - slow down the compilation time, is specifying extra use= fields that + Another error that does not cause incorrect compiled files, but will + slow down the compilation time, is specifying extra use= fields that are superfluous. infocmp will flag any other termname use= fields that were not needed. Changing Databases [-A directory] [-B directory] - Like other ncurses utilities, infocmp looks for the terminal descrip- - tions in several places. You can use the TERMINFO and TERMINFO_DIRS - environment variables to override the compiled-in default list of - places to search (see curses(3x) for details). + Like other ncurses utilities, infocmp looks for the terminal + descriptions in several places. You can use the TERMINFO and + TERMINFO_DIRS environment variables to override the compiled-in default + list of places to search (see curses(3x) for details). - You can also use the options -A and -B to override the list of places + You can also use the options -A and -B to override the list of places to search when comparing terminal descriptions: o The -A option sets the location for the first termname o The -B option sets the location for the other termnames. - Using these options, it is possible to compare descriptions for a ter- - minal with the same name located in two different databases. For - instance, you can use this feature for comparing descriptions for the + Using these options, it is possible to compare descriptions for a + terminal with the same name located in two different databases. For + instance, you can use this feature for comparing descriptions for the same terminal created by different people. @@ -239,27 +238,28 @@ -0 causes the fields to be printed on one line, without wrapping. -1 causes the fields to be printed out one to a line. Otherwise, the - fields will be printed several to a line to a maximum width of 60 + fields will be printed several to a line to a maximum width of 60 characters. - -a tells infocmp to retain commented-out capabilities rather than - discarding them. Capabilities are commented by prefixing them + -a tells infocmp to retain commented-out capabilities rather than + discarding them. Capabilities are commented by prefixing them with a period. -D tells infocmp to print the database locations that it knows about, and exit. - -E Dump the capabilities of the given terminal as tables, needed in - the C initializer for a TERMTYPE structure (the terminal capabil- - ity structure in the <term.h>). This option is useful for prepar- - ing versions of the curses library hardwired for a given terminal - type. The tables are all declared static, and are named according - to the type and the name of the corresponding terminal entry. + -E Dump the capabilities of the given terminal as tables, needed in + the C initializer for a TERMTYPE structure (the terminal + capability structure in the <term.h>). This option is useful for + preparing versions of the curses library hardwired for a given + terminal type. The tables are all declared static, and are named + according to the type and the name of the corresponding terminal + entry. Before ncurses 5.0, the split between the -e and -E options was not needed; but support for extended names required making the - arrays of terminal capabilities separate from the TERMTYPE struc- - ture. + arrays of terminal capabilities separate from the TERMTYPE + structure. -e Dump the capabilities of the given terminal as a C initializer for a TERMTYPE structure (the terminal capability structure in the @@ -279,16 +279,16 @@ -f Display complex terminfo strings which contain if/then/else/endif expressions indented for readability. - -G Display constant literals in decimal form rather than their char- - acter equivalents. + -G Display constant literals in decimal form rather than their + character equivalents. -g Display constant character literals in quoted form rather than their decimal equivalents. -i Analyze the initialization (is1, is2, is3), and reset (rs1, rs2, - rs3), strings in the entry, as well as those used for start- - ing/stopping cursor-positioning mode (smcup, rmcup) as well as - starting/stopping keymap mode (smkx, rmkx). + rs3), strings in the entry, as well as those used for + starting/stopping cursor-positioning mode (smcup, rmcup) as well + as starting/stopping keymap mode (smkx, rmkx). For each string, the code tries to analyze it into actions in terms of the other capabilities in the entry, certain X3.64/ISO @@ -355,9 +355,9 @@ -p Ignore padding specifications when comparing strings. - -Q n Rather than show source in terminfo (text) format, print the com- - piled (binary) format in hexadecimal or base64 form, depending on - the option's value: + -Q n Rather than show source in terminfo (text) format, print the + compiled (binary) format in hexadecimal or base64 form, depending + on the option's value: 1 hexadecimal @@ -376,14 +376,14 @@ and using "-" for absent capabilities, "@" for canceled rather than "NULL". - o However, show differences between absent and cancelled capa- - bilities. + o However, show differences between absent and cancelled + capabilities. o Omit the "Reconstructed from" comment for source listings. -Rsubset Restrict output to a given subset. This option is for use with - archaic versions of terminfo like those on SVr1, Ultrix, or HP/UX + archaic versions of terminfo like those on SVr1, Ultrix, or HP-UX that do not support the full set of SVR4/XSI Curses terminfo; and variants such as AIX that have their own extensions incompatible with SVr4/XSI. @@ -391,20 +391,20 @@ o Available terminfo subsets are "SVr1", "Ultrix", "HP", and "AIX"; see terminfo(5) for details. - o You can also choose the subset "BSD" which selects only capa- - bilities with termcap equivalents recognized by 4.4BSD. The - -C option sets the "BSD" subset as a side-effect. + o You can also choose the subset "BSD" which selects only + capabilities with termcap equivalents recognized by 4.4BSD. + The -C option sets the "BSD" subset as a side-effect. o If you select any other value for -R, it is the same as no - subset, i.e., all capabilities are used. The -I option like- - wise selects no subset as a side-effect. + subset, i.e., all capabilities are used. The -I option + likewise selects no subset as a side-effect. -s [d|i|l|c] The -s option sorts the fields within each type according to the argument below: - d leave fields in the order that they are stored in the ter- - minfo database. + d leave fields in the order that they are stored in the + terminfo database. i sort by terminfo name. @@ -420,17 +420,17 @@ -T eliminates size-restrictions on the generated text. This is mainly useful for testing and analysis, since the compiled - descriptions are limited (e.g., 1023 for termcap, 4096 for ter- - minfo). + descriptions are limited (e.g., 1023 for termcap, 4096 for + terminfo). -t tells tic to discard commented-out capabilities. Normally when translating from terminfo to termcap, untranslatable capabilities are commented-out. -U tells infocmp to not post-process the data after parsing the - source file. This feature helps when comparing the actual con- - tents of two source files, since it excludes the inferences that - infocmp makes to fill in missing data. + source file. This feature helps when comparing the actual + contents of two source files, since it excludes the inferences + that infocmp makes to fill in missing data. -V reports the version of ncurses which was used in this program, and exits. @@ -459,22 +459,22 @@HISTORY
- Although System V Release 2 provided a terminfo library, it had no doc- - umented tool for decompiling the terminal descriptions. Tony Hansen + Although System V Release 2 provided a terminfo library, it had no + documented tool for decompiling the terminal descriptions. Tony Hansen (AT&T) wrote the first infocmp in early 1984, for System V Release 3. - Eric Raymond used the AT&T documentation in 1995 to provide an equiva- - lent infocmp for ncurses. In addition, he added a few new features - such as: + Eric Raymond used the AT&T documentation in 1995 to provide an + equivalent infocmp for ncurses. In addition, he added a few new + features such as: - o the -e option, to support fallback (compiled-in) terminal descrip- - tions + o the -e option, to support fallback (compiled-in) terminal + descriptions o the -i option, to help with analysis Later, Thomas Dickey added the -x (user-defined capabilities) option, - and the -E option to support fallback entries with user-defined capa- - bilities. + and the -E option to support fallback entries with user-defined + capabilities. For a complete list, see the EXTENSIONS section. @@ -493,13 +493,14 @@ The -0, -1, -E, -F, -G, -Q, -R, -T, -V, -a, -e, -f, -g, -i, -l, -p, -q and -t options are not supported in SVr4 curses. - SVr4 infocmp does not distinguish between absent and cancelled capabil- - ities. Also, it shows missing integer capabilities as -1 (the internal - value used to represent missing integers). This implementation shows - those as "NULL", for consistency with missing strings. + SVr4 infocmp does not distinguish between absent and cancelled + capabilities. Also, it shows missing integer capabilities as -1 (the + internal value used to represent missing integers). This + implementation shows those as "NULL", for consistency with missing + strings. - The -r option's notion of "termcap" capabilities is System V Release - 4's. Actual BSD curses versions will have a more restricted set. To + The -r option's notion of "termcap" capabilities is System V Release + 4's. Actual BSD curses versions will have a more restricted set. To see only the 4.4BSD set, use -r -RBSD. @@ -508,12 +509,12 @@SEE ALSO
- captoinfo(1m), infotocap(1m), tic(1m), toe(1m), curses(3x), ter- - minfo(5). user_caps(5). + captoinfo(1m), infotocap(1m), tic(1m), toe(1m), curses(3x), + terminfo(5). user_caps(5). https://invisible-island.net/ncurses/tctest.html - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html index aadf8f4..49a32bd 100644 --- a/doc/html/man/infotocap.1m.html +++ b/doc/html/man/infotocap.1m.html @@ -1,4 +1,4 @@ - @@ -89,9 +89,9 @@SEE ALSO
- curses(3x), tic(1m), infocmp(1m), terminfo(5) + infocmp(1m), tic(1m), curses(3x), terminfo(5) - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/key_defined.3x.html b/doc/html/man/key_defined.3x.html index 073b781..9b77b3b 100644 --- a/doc/html/man/key_defined.3x.html +++ b/doc/html/man/key_defined.3x.html @@ -1,4 +1,4 @@ - @@ -54,7 +54,7 @@SYNOPSIS
#include <curses.h> - int key_defined(const char *definition); + int key_defined(const char *definition);DESCRIPTION
diff --git a/doc/html/man/keybound.3x.html b/doc/html/man/keybound.3x.html index 605fd43..55f2d00 100644 --- a/doc/html/man/keybound.3x.html +++ b/doc/html/man/keybound.3x.html @@ -1,4 +1,4 @@ - @@ -54,7 +54,7 @@SYNOPSIS
#include <curses.h> - char * keybound(int keycode, int count); + char * keybound(int keycode, int count);DESCRIPTION
@@ -67,8 +67,8 @@ The keycode parameter must be greater than zero, else NULL is returned. If it does not correspond to a defined key, then NULL is returned. The count parameter is used to allow the application to iterate through - multiple definitions, counting from zero. When successful, the func- - tion returns a string which must be freed by the caller. + multiple definitions, counting from zero. When successful, the + function returns a string which must be freed by the caller.PORTABILITY
diff --git a/doc/html/man/keyok.3x.html b/doc/html/man/keyok.3x.html index 40281f9..1ce5358 100644 --- a/doc/html/man/keyok.3x.html +++ b/doc/html/man/keyok.3x.html @@ -1,4 +1,4 @@ - @@ -54,7 +54,7 @@SYNOPSIS
#include <curses.h> - int keyok(int keycode, bool enable); + int keyok(int keycode, bool enable);DESCRIPTION
diff --git a/doc/html/man/legacy_coding.3x.html b/doc/html/man/legacy_coding.3x.html index c5745fd..ef4cfa0 100644 --- a/doc/html/man/legacy_coding.3x.html +++ b/doc/html/man/legacy_coding.3x.html @@ -1,6 +1,6 @@ - @@ -54,7 +54,7 @@SYNOPSIS
#include <curses.h> - int use_legacy_coding(int level); + int use_legacy_coding(int level);DESCRIPTION
@@ -66,8 +66,8 @@ The level parameter controls the result: - 0 the library functions normally, rendering nonprinting char- - acters as described in unctrl. + 0 the library functions normally, rendering nonprinting + characters as described in unctrl. 1 the library ignores isprintf for codes in the range 160-255. @@ -90,7 +90,7 @@SEE ALSO
- unctrl. + unctrl(3x).AUTHOR
diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html index 457e7aa..0a74892 100644 --- a/doc/html/man/menu.3x.html +++ b/doc/html/man/menu.3x.html @@ -1,4 +1,4 @@ - @@ -49,20 +49,24 @@NAME
menu_back, menu_fore, menu_grey, menu_pad, set_menu_back, - set_menu_fore, set_menu_grey, set_menu_pad - color and attribute con- - trol for menus + set_menu_fore, set_menu_grey, set_menu_pad - color and attribute + control for menusSYNOPSIS
#include <menu.h> - int set_menu_fore(MENU *menu, chtype attr); - chtype menu_fore(const MENU *menu); - int set_menu_back(MENU *menu, chtype attr); - chtype menu_back(const MENU *menu); - int set_menu_grey(MENU *menu, chtype attr); - chtype menu_grey(const MENU *menu); - int set_menu_pad(MENU *menu, int pad); - int menu_pad(const MENU *menu); + + int set_menu_fore(MENU *menu, chtype attr); + chtype menu_fore(const MENU *menu); + + int set_menu_back(MENU *menu, chtype attr); + chtype menu_back(const MENU *menu); + + int set_menu_grey(MENU *menu, chtype attr); + chtype menu_grey(const MENU *menu); + + int set_menu_pad(MENU *menu, int pad); + int menu_pad(const MENU *menu);DESCRIPTION
@@ -108,8 +112,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_cursor.3x.html b/doc/html/man/menu_cursor.3x.html index 86aff55..266542e 100644 --- a/doc/html/man/menu_cursor.3x.html +++ b/doc/html/man/menu_cursor.3x.html @@ -1,4 +1,4 @@ - @@ -53,14 +53,15 @@SYNOPSIS
#include <menu.h> - int pos_menu_cursor(const MENU *menu); + + int pos_menu_cursor(const MENU *menu);DESCRIPTION
- The function pos_menu_cursor restores the cursor to the current posi- - tion associated with the menu's selected item. This is useful after - curses routines have been called to do screen-painting in response to a - menu select. + The function pos_menu_cursor restores the cursor to the current + position associated with the menu's selected item. This is useful + after curses routines have been called to do screen-painting in + response to a menu select.RETURN VALUE
@@ -88,8 +89,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_driver.3x.html b/doc/html/man/menu_driver.3x.html index bf5da3e..f7000ae 100644 --- a/doc/html/man/menu_driver.3x.html +++ b/doc/html/man/menu_driver.3x.html @@ -1,4 +1,4 @@ - @@ -52,7 +52,8 @@SYNOPSIS
#include <menu.h> - int menu_driver(MENU *menu, int c); + + int menu_driver(MENU *menu, int c);DESCRIPTION
@@ -64,8 +65,8 @@ and character codes returned by wgetch(3x). o The input is a printable character. Printable characters (which - must be positive, less than 256) are checked according to the pro- - gram's locale settings. + must be positive, less than 256) are checked according to the + program's locale settings. o The input is the KEY_MOUSE special key associated with an mouse event. @@ -173,10 +174,10 @@APPLICATION-DEFINED COMMANDS
If the second argument is neither printable nor one of the above pre- - defined menu requests or KEY_MOUSE, the drive assumes it is an applica- - tion-specific command and returns E_UNKNOWN_COMMAND. Application- - defined commands should be defined relative to MAX_COMMAND, the maximum - value of these pre-defined requests. + defined menu requests or KEY_MOUSE, the drive assumes it is an + application-specific command and returns E_UNKNOWN_COMMAND. + Application-defined commands should be defined relative to MAX_COMMAND, + the maximum value of these pre-defined requests.RETURN VALUE
@@ -207,7 +208,7 @@SEE ALSO
- curses(3x), menu(3x), getch(3x). + curses(3x), getch(3x), menu(3x).NOTES
@@ -216,9 +217,9 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. The support for mouse events is - ncurses specific. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions. The support for mouse events + is ncurses specific.AUTHORS
diff --git a/doc/html/man/menu_format.3x.html b/doc/html/man/menu_format.3x.html index 44e2125..da6e492 100644 --- a/doc/html/man/menu_format.3x.html +++ b/doc/html/man/menu_format.3x.html @@ -1,4 +1,4 @@ - @@ -53,16 +53,17 @@SYNOPSIS
#include <menu.h> - int set_menu_format(MENU *menu, int rows, int cols); - void menu_format(const MENU *menu, int *rows, int *cols); + + int set_menu_format(MENU *menu, int rows, int cols); + void menu_format(const MENU *menu, int *rows, int *cols);DESCRIPTION
The function set_menu_format sets the maximum display size of the given menu. If this size is too small to display all menu items, the menu - will be made scrollable. If this size is larger than the menus subwin- - dow and the subwindow is too small to display all menu items, post_menu - will fail. + will be made scrollable. If this size is larger than the menus + subwindow and the subwindow is too small to display all menu items, + post_menu will fail. The default format is 16 rows, 1 column. Calling set_menu_format with a null menu pointer will change this default. A zero row or column @@ -101,8 +102,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_hook.3x.html b/doc/html/man/menu_hook.3x.html index 17b298f..f7bda22 100644 --- a/doc/html/man/menu_hook.3x.html +++ b/doc/html/man/menu_hook.3x.html @@ -1,4 +1,4 @@ - @@ -53,14 +53,18 @@SYNOPSIS
#include <menu.h> - int set_item_init(MENU *menu, Menu_Hook func); - Menu_Hook item_init(const MENU *menu); - int set_item_term(MENU *menu, Menu_Hook func); - Menu_Hook item_term(const MENU *menu); - int set_menu_init(MENU *menu, Menu_Hook func); - Menu_Hook menu_init(const MENU *menu); - int set_menu_term(MENU *menu, Menu_Hook func); - Menu_Hook menu_term(const MENU *menu); + + int set_item_init(MENU *menu, Menu_Hook func); + Menu_Hook item_init(const MENU *menu); + + int set_item_term(MENU *menu, Menu_Hook func); + Menu_Hook item_term(const MENU *menu); + + int set_menu_init(MENU *menu, Menu_Hook func); + Menu_Hook menu_init(const MENU *menu); + + int set_menu_term(MENU *menu, Menu_Hook func); + Menu_Hook menu_term(const MENU *menu);DESCRIPTION
@@ -109,8 +113,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_items.3x.html b/doc/html/man/menu_items.3x.html index e5cdf9c..cb0eaba 100644 --- a/doc/html/man/menu_items.3x.html +++ b/doc/html/man/menu_items.3x.html @@ -1,4 +1,4 @@ - @@ -54,9 +54,10 @@SYNOPSIS
#include <menu.h> - int set_menu_items(MENU *menu, ITEM **items); - ITEM **menu_items(const MENU *menu); - int item_count(const MENU *menu); + + int set_menu_items(MENU *menu, ITEM **items); + ITEM **menu_items(const MENU *menu); + int item_count(const MENU *menu);DESCRIPTION
@@ -70,7 +71,7 @@RETURN VALUE
The function menu_items returns a pointer (which may be NULL). It does - not set errno. + not set errno. The function item_count returns ERR (the general curses error return value) if its menu parameter is NULL. @@ -103,8 +104,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions. The SVr4 menu library documentation specifies the item_count error value as -1 (which is the value of ERR). diff --git a/doc/html/man/menu_mark.3x.html b/doc/html/man/menu_mark.3x.html index d023db2..84b0db6 100644 --- a/doc/html/man/menu_mark.3x.html +++ b/doc/html/man/menu_mark.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <menu.h> - int set_menu_mark(MENU *menu, const char *mark); - const char *menu_mark(const MENU *menu); + + int set_menu_mark(MENU *menu, const char *mark); + const char *menu_mark(const MENU *menu);DESCRIPTION
@@ -76,7 +77,7 @@RETURN VALUE
The function menu_mark returns a pointer (which may be NULL). It does - not set errno. + not set errno. The function set_menu_mark may return the following error codes: @@ -99,8 +100,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_new.3x.html b/doc/html/man/menu_new.3x.html index 5838d7f..082882c 100644 --- a/doc/html/man/menu_new.3x.html +++ b/doc/html/man/menu_new.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <menu.h> - MENU *new_menu(ITEM **items); - int free_menu(MENU *menu); + + MENU *new_menu(ITEM **items); + int free_menu(MENU *menu);DESCRIPTION
@@ -66,7 +67,7 @@RETURN VALUE
- The function new_menu returns NULL on error. It sets errno according + The function new_menu returns NULL on error. It sets errno according to the function's failure: E_NOT_CONNECTED @@ -99,8 +100,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_opts.3x.html b/doc/html/man/menu_opts.3x.html index 5b9ee06..937c4cd 100644 --- a/doc/html/man/menu_opts.3x.html +++ b/doc/html/man/menu_opts.3x.html @@ -1,4 +1,4 @@ - @@ -54,10 +54,12 @@SYNOPSIS
#include <menu.h> - int set_menu_opts(MENU *menu, Menu_Options opts); - int menu_opts_on(MENU *menu, Menu_Options opts); - int menu_opts_off(MENU *menu, Menu_Options opts); - Menu_Options menu_opts(const MENU *menu); + + int set_menu_opts(MENU *menu, Menu_Options opts); + Menu_Options menu_opts(const MENU *menu); + + int menu_opts_on(MENU *menu, Menu_Options opts); + int menu_opts_off(MENU *menu, Menu_Options opts);DESCRIPTION
@@ -94,9 +96,10 @@ other end of the menu. O_MOUSE_MENU - If user clicks with the mouse and it does not fall on the cur- - rently active menu, push KEY_MOUSE and the MEVENT data back on the - queue to allow processing in another part of the calling program. + If user clicks with the mouse and it does not fall on the + currently active menu, push KEY_MOUSE and the MEVENT data back on + the queue to allow processing in another part of the calling + program.RETURN VALUE
@@ -121,8 +124,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_pattern.3x.html b/doc/html/man/menu_pattern.3x.html index 1be9d1b..d9ba95c 100644 --- a/doc/html/man/menu_pattern.3x.html +++ b/doc/html/man/menu_pattern.3x.html @@ -1,4 +1,4 @@ - @@ -52,8 +52,9 @@SYNOPSIS
#include <menu.h> - int set_menu_pattern(MENU *menu, const char *pattern); - char *menu_pattern(const MENU *menu); + + int set_menu_pattern(MENU *menu, const char *pattern); + char *menu_pattern(const MENU *menu);DESCRIPTION
@@ -71,7 +72,7 @@RETURN VALUE
The function menu_pattern returns a pointer, which is NULL if the menu parameter is NULL. Otherwise, it is a pointer to a string which is - empty if no pattern has been set. It does not set errno. + empty if no pattern has been set. It does not set errno. The function set_menu_pattern may return the following error codes: @@ -103,8 +104,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_post.3x.html b/doc/html/man/menu_post.3x.html index a2fc2bc..2930fb9 100644 --- a/doc/html/man/menu_post.3x.html +++ b/doc/html/man/menu_post.3x.html @@ -1,4 +1,4 @@ - @@ -48,14 +48,15 @@NAME
- post_menu, unpost_menu - write or erase menus from associated subwin- - dows + post_menu, unpost_menu - write or erase menus from associated + subwindowsSYNOPSIS
#include <menu.h> - int post_menu(MENU *menu); - int unpost_menu(MENU *menu); + + int post_menu(MENU *menu); + int unpost_menu(MENU *menu);DESCRIPTION
@@ -106,8 +107,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/menu_requestname.3x.html b/doc/html/man/menu_requestname.3x.html index 7b7674b..4d263ed 100644 --- a/doc/html/man/menu_requestname.3x.html +++ b/doc/html/man/menu_requestname.3x.html @@ -1,4 +1,4 @@ - @@ -54,8 +54,9 @@SYNOPSIS
#include <menu.h> - const char *menu_request_name(int request); - int menu_request_by_name(const char *name); + + const char *menu_request_name(int request); + int menu_request_by_name(const char *name);DESCRIPTION
@@ -67,10 +68,10 @@RETURN VALUE
- menu_request_name returns NULL on error and sets errno to E_BAD_ARGU- - MENT. + menu_request_name returns NULL on error and sets errno to + E_BAD_ARGUMENT. menu_request_by_name returns E_NO_MATCH on error. It does not set - errno. + errno.SEE ALSO
diff --git a/doc/html/man/menu_spacing.3x.html b/doc/html/man/menu_spacing.3x.html index f7a812e..7e4b412 100644 --- a/doc/html/man/menu_spacing.3x.html +++ b/doc/html/man/menu_spacing.3x.html @@ -1,4 +1,4 @@ - @@ -54,14 +54,15 @@SYNOPSIS
#include <menu.h> - int set_menu_spacing(MENU *menu, - int spc_description, - int spc_rows, - int spc_columns); - int menu_spacing(const MENU *menu, - int* spc_description, - int* spc_rows, - int* spc_columns); + + int set_menu_spacing(MENU *menu, + int spc_description, + int spc_rows, + int spc_columns); + int menu_spacing(const MENU *menu, + int* spc_description, + int* spc_rows, + int* spc_columns);DESCRIPTION
@@ -73,8 +74,8 @@ spc_rows parameter controls the number of rows that are used for an item. It must not be larger than 3. The menu system inserts the blank lines between item rows, these lines will contain the pad character in - the appropriate positions. The spc_columns parameter controls the num- - ber of blanks between columns of items. It must not be larger than + the appropriate positions. The spc_columns parameter controls the + number of blanks between columns of items. It must not be larger than TABSIZE. A value of 0 for all the spacing values resets them to the default, which is 1 for all of them. The function menu_spacing passes back the spacing info for the menu. diff --git a/doc/html/man/menu_userptr.3x.html b/doc/html/man/menu_userptr.3x.html index 9ced809..4a267be 100644 --- a/doc/html/man/menu_userptr.3x.html +++ b/doc/html/man/menu_userptr.3x.html @@ -1,4 +1,4 @@ - @@ -54,8 +54,9 @@SYNOPSIS
#include <menu.h> - int set_menu_userptr(MENU *menu, void *userptr); - void *menu_userptr(const MENU *menu); + + int set_menu_userptr(MENU *menu, void *userptr); + void *menu_userptr(const MENU *menu);DESCRIPTION
@@ -66,7 +67,7 @@RETURN VALUE
menu_userptr returns a pointer (which may be NULL). It does not set - errno. + errno. set_menu_userptr returns E_OK (success). @@ -81,8 +82,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions. The user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility. diff --git a/doc/html/man/menu_win.3x.html b/doc/html/man/menu_win.3x.html index 020064a..6ada6b6 100644 --- a/doc/html/man/menu_win.3x.html +++ b/doc/html/man/menu_win.3x.html @@ -1,4 +1,4 @@ - @@ -53,29 +53,32 @@SYNOPSIS
#include <menu.h> - int set_menu_win(MENU *menu, WINDOW *win); - WINDOW *menu_win(const MENU *menu); - int set_menu_sub(MENU *menu, WINDOW *sub); - WINDOW *menu_sub(const MENU *menu); - int scale_menu(const MENU *menu, int *rows, int *columns); + + int set_menu_win(MENU *menu, WINDOW *win); + WINDOW *menu_win(const MENU *menu); + + int set_menu_sub(MENU *menu, WINDOW *sub); + WINDOW *menu_sub(const MENU *menu); + + int scale_menu(const MENU *menu, int *rows, int *columns);DESCRIPTION
Every menu has an associated pair of curses windows. The menu window - displays any title and border associated with the window; the menu sub- - window displays the items of the menu that are currently available for - selection. + displays any title and border associated with the window; the menu + subwindow displays the items of the menu that are currently available + for selection. - The first four functions get and set those windows. It is not neces- - sary to set either window; by default, the driver code uses stdscr for - both. + The first four functions get and set those windows. It is not + necessary to set either window; by default, the driver code uses stdscr + for both. In the set_ functions, window argument of NULL is treated as though it were stsdcr. A menu argument of NULL is treated as a request to change the system default menu window or subwindow. - The function scale_menu returns the minimum size required for the sub- - window of menu. + The function scale_menu returns the minimum size required for the + subwindow of menu.RETURN VALUE
@@ -107,8 +110,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/mitem_current.3x.html b/doc/html/man/mitem_current.3x.html index 77f2616..df6aada 100644 --- a/doc/html/man/mitem_current.3x.html +++ b/doc/html/man/mitem_current.3x.html @@ -1,4 +1,4 @@ - @@ -53,11 +53,14 @@SYNOPSIS
#include <menu.h> - int set_current_item(MENU *menu, ITEM *item); - ITEM *current_item(const MENU *menu); - int set_top_row(MENU *menu, int row); - int top_row(const MENU *menu); - int item_index(const ITEM *item); + + int set_current_item(MENU *menu, ITEM *item); + ITEM *current_item(const MENU *menu); + + int set_top_row(MENU *menu, int row); + int top_row(const MENU *menu); + + int item_index(const ITEM *item);DESCRIPTION
@@ -77,7 +80,7 @@RETURN VALUE
current_item returns a pointer (which may be NULL). It does not set - errno. + errno. top_row and item_index return ERR (the general curses error value) if their menu parameter is NULL. @@ -109,8 +112,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions. The SVr4 menu library documentation specifies the top_row and index_item error value as -1 (which is the value of ERR). diff --git a/doc/html/man/mitem_name.3x.html b/doc/html/man/mitem_name.3x.html index a22e0c9..637434a 100644 --- a/doc/html/man/mitem_name.3x.html +++ b/doc/html/man/mitem_name.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <menu.h> - const char *item_name(const ITEM *item); - const char *item_description(const ITEM *item); + + const char *item_name(const ITEM *item); + const char *item_description(const ITEM *item);DESCRIPTION
@@ -65,7 +66,7 @@RETURN VALUE
These routines return a pointer (which may be NULL). They do not set - errno. + errno.SEE ALSO
@@ -78,8 +79,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/mitem_new.3x.html b/doc/html/man/mitem_new.3x.html index f9db946..bb3160d 100644 --- a/doc/html/man/mitem_new.3x.html +++ b/doc/html/man/mitem_new.3x.html @@ -1,4 +1,4 @@ - @@ -53,8 +53,9 @@SYNOPSIS
#include <menu.h> - ITEM *new_item(const char *name, const char *description); - int free_item(ITEM *item); + + ITEM *new_item(const char *name, const char *description); + int free_item(ITEM *item);DESCRIPTION
@@ -69,7 +70,7 @@RETURN VALUE
- The function new_item returns NULL on error. It sets errno according + The function new_item returns NULL on error. It sets errno according to the function's failure: E_BAD_ARGUMENT @@ -102,8 +103,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/mitem_opts.3x.html b/doc/html/man/mitem_opts.3x.html index 3665188..72b0f00 100644 --- a/doc/html/man/mitem_opts.3x.html +++ b/doc/html/man/mitem_opts.3x.html @@ -1,4 +1,4 @@ - @@ -54,10 +54,12 @@SYNOPSIS
#include <menu.h> - int set_item_opts(ITEM *item, Item_Options opts); - int item_opts_on(ITEM *item, Item_Options opts); - int item_opts_off(ITEM *item, Item_Options opts); - Item_Options item_opts(const ITEM *item); + + int set_item_opts(ITEM *item, Item_Options opts); + Item_Options item_opts(const ITEM *item); + + int item_opts_on(ITEM *item, Item_Options opts); + int item_opts_off(ITEM *item, Item_Options opts);DESCRIPTION
@@ -96,8 +98,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/mitem_userptr.3x.html b/doc/html/man/mitem_userptr.3x.html index 00d0a4b..1e9f29f 100644 --- a/doc/html/man/mitem_userptr.3x.html +++ b/doc/html/man/mitem_userptr.3x.html @@ -1,4 +1,4 @@ - @@ -54,19 +54,20 @@SYNOPSIS
#include <menu.h> - int set_item_userptr(ITEM *item, void *userptr); - void *item_userptr(const ITEM *item); + + int set_item_userptr(ITEM *item, void *userptr); + void *item_userptr(const ITEM *item);DESCRIPTION
- Every menu item has a field that can be used to hold application-spe- - cific data (that is, the menu-driver code leaves it alone). These + Every menu item has a field that can be used to hold application- + specific data (that is, the menu-driver code leaves it alone). These functions get and set that field.RETURN VALUE
The function item_userptr returns a pointer (possibly NULL). It does - not set errno. + not set errno. The set_item_userptr always returns E_OK (success). @@ -81,8 +82,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions. The user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility. diff --git a/doc/html/man/mitem_value.3x.html b/doc/html/man/mitem_value.3x.html index 2b55d6e..f900f12 100644 --- a/doc/html/man/mitem_value.3x.html +++ b/doc/html/man/mitem_value.3x.html @@ -1,4 +1,4 @@ - @@ -52,8 +52,9 @@SYNOPSIS
#include <menu.h> - int set_item_value(ITEM *item, bool value); - bool item_value(const ITEM *item); + + int set_item_value(ITEM *item, bool value); + bool item_value(const ITEM *item);DESCRIPTION
@@ -88,8 +89,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/mitem_visible.3x.html b/doc/html/man/mitem_visible.3x.html index 98e0a75..5336712 100644 --- a/doc/html/man/mitem_visible.3x.html +++ b/doc/html/man/mitem_visible.3x.html @@ -1,4 +1,4 @@ - @@ -53,7 +53,8 @@SYNOPSIS
#include <menu.h> - bool item_visible(const ITEM *item); + + bool item_visible(const ITEM *item);DESCRIPTION
@@ -72,8 +73,8 @@PORTABILITY
- These routines emulate the System V menu library. They were not sup- - ported on Version 7 or BSD versions. + These routines emulate the System V menu library. They were not + supported on Version 7 or BSD versions.AUTHORS
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html index 4275f02..f473109 100644 --- a/doc/html/man/ncurses.3x.html +++ b/doc/html/man/ncurses.3x.html @@ -1,7 +1,7 @@ - @@ -60,33 +60,33 @@ method of updating character screens with reasonable optimization. This implementation is "new curses" (ncurses) and is the approved replacement for 4.4BSD classic curses, which has been discontinued. - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). The ncurses library emulates the curses library of System V Release 4 UNIX, and XPG4 (X/Open Portability Guide) curses (also known as XSI curses). XSI stands for X/Open System Interfaces Extension. The ncurses library is freely redistributable in source form. Differences - from the SVr4 curses are summarized under the EXTENSIONS and PORTABIL- - ITY sections below and described in detail in the respective EXTEN- - SIONS, PORTABILITY and BUGS sections of individual man pages. + from the SVr4 curses are summarized under the EXTENSIONS and + PORTABILITY sections below and described in detail in the respective + EXTENSIONS, PORTABILITY and BUGS sections of individual man pages. - The ncurses library also provides many useful extensions, i.e., fea- - tures which cannot be implemented by a simple add-on library but which - require access to the internals of the library. + The ncurses library also provides many useful extensions, i.e., + features which cannot be implemented by a simple add-on library but + which require access to the internals of the library. A program using these routines must be linked with the -lncurses option, or (if it has been generated) with the debugging library -lncurses_g. (Your system integrator may also have installed these libraries under the names -lcurses and -lcurses_g.) The ncurses_g - library generates trace logs (in a file called 'trace' in the current + library generates trace logs (in a file called "trace" in the current directory) that describe curses actions. See also the section on ALTERNATE CONFIGURATIONS. - The ncurses package supports: overall screen, window and pad manipula- - tion; output to windows and pads; reading terminal input; control over - terminal and curses input and output options; environment query rou- - tines; color manipulation; use of soft label keys; terminfo capabili- - ties; and access to low-level terminal-manipulation routines. + The ncurses package supports: overall screen, window and pad + manipulation; output to windows and pads; reading terminal input; + control over terminal and curses input and output options; environment + query routines; color manipulation; use of soft label keys; terminfo + capabilities; and access to low-level terminal-manipulation routines.Initialization
@@ -102,8 +102,8 @@ The function initscr or newterm must be called to initialize the library before any of the other routines that deal with windows and - screens are used. The routine endwin(3x) must be called before exit- - ing. + screens are used. The routine endwin(3x) must be called before + exiting. To get character-at-a-time input without echoing (most interactive, screen oriented programs want this), the following sequence should be @@ -113,28 +113,27 @@ Most programs would additionally use the sequence: - nonl(); intrflush(stdscr, FALSE); keypad(stdscr, TRUE); Before a curses program is run, the tab stops of the terminal should be set and its initialization strings, if defined, must be output. This - can be done by executing the tput init command after the shell environ- - ment variable TERM has been exported. tset(1) is usually responsible - for doing this. [See terminfo(5) for further details.] + can be done by executing the tput init command after the shell + environment variable TERM has been exported. tset(1) is usually + responsible for doing this. [See terminfo(5) for further details.]Datatypes
The ncurses library permits manipulation of data structures, called - windows, which can be thought of as two-dimensional arrays of charac- - ters representing all or part of a CRT screen. A default window called - stdscr, which is the size of the terminal screen, is supplied. Others - may be created with newwin. + windows, which can be thought of as two-dimensional arrays of + characters representing all or part of a CRT screen. A default window + called stdscr, which is the size of the terminal screen, is supplied. + Others may be created with newwin. Note that curses does not handle overlapping windows, that's done by the panel(3x) library. This means that you can either use stdscr or - divide the screen into tiled windows and not using stdscr at all. Mix- - ing the two will result in unpredictable, and undesired, effects. + divide the screen into tiled windows and not using stdscr at all. + Mixing the two will result in unpredictable, and undesired, effects. Windows are referred to by variables declared as WINDOW *. These data structures are manipulated with routines described here and elsewhere @@ -151,36 +150,37 @@ Special windows called pads may also be manipulated. These are windows which are not constrained to the size of the screen and whose contents - need not be completely displayed. See curs_pad(3x) for more informa- - tion. + need not be completely displayed. See curs_pad(3x) for more + information. In addition to drawing characters on the screen, video attributes and colors may be supported, causing the characters to show up in such modes as underlined, in reverse video, or in color on terminals that support such display enhancements. Line drawing characters may be specified to be output. On input, curses is also able to translate - arrow and function keys that transmit escape sequences into single val- - ues. The video attributes, line drawing characters, and input values - use names, defined in <curses.h>, such as A_REVERSE, ACS_HLINE, and - KEY_LEFT. + arrow and function keys that transmit escape sequences into single + values. The video attributes, line drawing characters, and input + values use names, defined in <curses.h>, such as A_REVERSE, ACS_HLINE, + and KEY_LEFT.Environment variables
- If the environment variables LINES and COLUMNS are set, or if the pro- - gram is executing in a window environment, line and column information - in the environment will override information read by terminfo. This - would affect a program running in an AT&T 630 layer, for example, where - the size of a screen is changeable (see ENVIRONMENT). - - If the environment variable TERMINFO is defined, any program using - curses checks for a local terminal definition before checking in the - standard place. For example, if TERM is set to att4424, then the com- - piled terminal definition is found in + If the environment variables LINES and COLUMNS are set, or if the + program is executing in a window environment, line and column + information in the environment will override information read by + terminfo. This would affect a program running in an AT&T 630 layer, + for example, where the size of a screen is changeable (see + ENVIRONMENT). + + If the environment variable TERMINFO is defined, any program using + curses checks for a local terminal definition before checking in the + standard place. For example, if TERM is set to att4424, then the + compiled terminal definition is found in /usr/share/terminfo/a/att4424. - (The a is copied from the first letter of att4424 to avoid creation of - huge directories.) However, if TERMINFO is set to $HOME/myterms, + (The a is copied from the first letter of att4424 to avoid creation of + huge directories.) However, if TERMINFO is set to $HOME/myterms, curses first checks $HOME/myterms/a/att4424, @@ -189,114 +189,104 @@ /usr/share/terminfo/a/att4424. - This is useful for developing experimental definitions or when write + This is useful for developing experimental definitions or when write permission in /usr/share/terminfo is not available. The integer variables LINES and COLS are defined in <curses.h> and will - be filled in by initscr with the size of the screen. The constants + be filled in by initscr with the size of the screen. The constants TRUE and FALSE have the values 1 and 0, respectively. - The curses routines also define the WINDOW * variable curscr which is - used for certain low-level operations like clearing and redrawing a - screen containing garbage. The curscr can be used in only a few rou- - tines. + The curses routines also define the WINDOW * variable curscr which is + used for certain low-level operations like clearing and redrawing a + screen containing garbage. The curscr can be used in only a few + routines.Routine and Argument Names
- Many curses routines have two or more versions. The routines prefixed + Many curses routines have two or more versions. The routines prefixed with w require a window argument. The routines prefixed with p require a pad argument. Those without a prefix generally use stdscr. - The routines prefixed with mv require a y and x coordinate to move to + The routines prefixed with mv require a y and x coordinate to move to before performing the appropriate action. The mv routines imply a call - to move before the call to the other routine. The coordinate y always - refers to the row (of the window), and x always refers to the column. + to move before the call to the other routine. The coordinate y always + refers to the row (of the window), and x always refers to the column. The upper left-hand corner is always (0,0), not (1,1). - The routines prefixed with mvw take both a window argument and x and y - coordinates. The window argument is always specified before the coor- - dinates. + The routines prefixed with mvw take both a window argument and x and y + coordinates. The window argument is always specified before the + coordinates. - In each case, win is the window affected, and pad is the pad affected; + In each case, win is the window affected, and pad is the pad affected; win and pad are always pointers to type WINDOW. - Option setting routines require a Boolean flag bf with the value TRUE - or FALSE; bf is always of type bool. Most of the data types used in - the library routines, such as WINDOW, SCREEN, bool, and chtype are - defined in <curses.h>. Types used for the terminfo routines such as + Option setting routines require a Boolean flag bf with the value TRUE + or FALSE; bf is always of type bool. Most of the data types used in + the library routines, such as WINDOW, SCREEN, bool, and chtype are + defined in <curses.h>. Types used for the terminfo routines such as TERMINAL are defined in <term.h>. - This manual page describes functions which may appear in any configura- - tion of the library. There are two common configurations of the - library: + This manual page describes functions which may appear in any + configuration of the library. There are two common configurations of + the library: ncurses - the "normal" library, which handles 8-bit characters. The nor- - mal (8-bit) library stores characters combined with attributes - in chtype data. + the "normal" library, which handles 8-bit characters. The + normal (8-bit) library stores characters combined with + attributes in chtype data. - Attributes alone (no corresponding character) may be stored in + Attributes alone (no corresponding character) may be stored in chtype or the equivalent attr_t data. In either case, the data is stored in something like an integer. Each cell (row and column) in a WINDOW is stored as a chtype. ncursesw - the so-called "wide" library, which handles multibyte charac- - ters (see the section on ALTERNATE CONFIGURATIONS). The "wide" - library includes all of the calls from the "normal" library. - It adds about one third more calls using data types which store - multibyte characters: + the so-called "wide" library, which handles multibyte + characters (see the section on ALTERNATE CONFIGURATIONS). The + "wide" library includes all of the calls from the "normal" + library. It adds about one third more calls using data types + which store multibyte characters: cchar_t corresponds to chtype. However it is a structure, because - more data is stored than can fit into an integer. The - characters are large enough to require a full integer + more data is stored than can fit into an integer. The + characters are large enough to require a full integer value - and there may be more than one character per cell. - The video attributes and color are stored in separate + The video attributes and color are stored in separate fields of the structure. - Each cell (row and column) in a WINDOW is stored as a + Each cell (row and column) in a WINDOW is stored as a cchar_t. - The setcchar(3x) and getcchar(3x) functions store and + The setcchar(3x) and getcchar(3x) functions store and retrieve the data from a cchar_t structure. wchar_t - stores a "wide" character. Like chtype, this may be an + stores a "wide" character. Like chtype, this may be an integer. wint_t - stores a wchar_t or WEOF - not the same, though both may + stores a wchar_t or WEOF - not the same, though both may have the same size. - The "wide" library provides new functions which are analogous - to functions in the "normal" library. There is a naming con- - vention which relates many of the normal/wide variants: a "_w" - is inserted into the name. For example, waddch becomes + The "wide" library provides new functions which are analogous + to functions in the "normal" library. There is a naming + convention which relates many of the normal/wide variants: a + "_w" is inserted into the name. For example, waddch becomes wadd_wch.Routine Name Index
- The following table lists each curses routine and the name of the man- - ual page on which it is described. Routines flagged with "*" are - ncurses-specific, not described by XPG4 or present in SVr4. + The following table lists the curses routines provided in the "normal" + and "wide" libraries and the names of the manual pages on which they + are described. Routines flagged with "*" are ncurses-specific, not + described by XPG4 or present in SVr4. curses Routine Name Manual Page Name --------------------------------------------- COLOR_PAIR curs_color(3x) PAIR_NUMBER curs_attr(3x) - _nc_free_and_exit curs_memleaks(3x)* - _nc_freeall curs_memleaks(3x)* - _nc_tracebits curs_trace(3x)* - _traceattr curs_trace(3x)* - _traceattr2 curs_trace(3x)* - _tracechar curs_trace(3x)* - _tracechtype curs_trace(3x)* - _tracechtype2 curs_trace(3x)* - _tracedump curs_trace(3x)* - _tracef curs_trace(3x)* - _tracemouse curs_trace(3x)* add_wch curs_add_wch(3x) add_wchnstr curs_add_wchstr(3x) add_wchstr curs_add_wchstr(3x) @@ -313,7 +303,6 @@ attr_off curs_attr(3x) attr_on curs_attr(3x) attr_set curs_attr(3x) - attroff curs_attr(3x) attron curs_attr(3x) attrset curs_attr(3x) @@ -324,6 +313,7 @@ bkgrnd curs_bkgrnd(3x) bkgrndset curs_bkgrnd(3x) border curs_border(3x) + border_set curs_border_set(3x) box curs_border(3x) box_set curs_border_set(3x) @@ -338,6 +328,7 @@ color_set curs_attr(3x) copywin curs_overlay(3x) curs_set curs_kernel(3x) + curses_trace curs_trace(3x)* curses_version curs_extend(3x)* def_prog_mode curs_kernel(3x) def_shell_mode curs_kernel(3x) @@ -358,6 +349,8 @@ erase curs_clear(3x) erasechar curs_termattrs(3x) erasewchar curs_termattrs(3x) + exit_curses curs_memleaks(3x)* + exit_terminfo curs_memleaks(3x)* extended_color_content curs_color(3x)* extended_pair_content curs_color(3x)* extended_slk_color curs_slk(3x)* @@ -379,7 +372,6 @@ getcurx curs_legacy(3x)* getcury curs_legacy(3x)* getmaxx curs_legacy(3x)* - getmaxy curs_legacy(3x)* getmaxyx curs_getyx(3x) getmouse curs_mouse(3x)* @@ -387,6 +379,7 @@ getnstr curs_getstr(3x) getparx curs_legacy(3x)* getpary curs_legacy(3x)* + getparyx curs_getyx(3x) getstr curs_getstr(3x) getsyx curs_kernel(3x) @@ -397,6 +390,7 @@ has_ic curs_termattrs(3x) has_il curs_termattrs(3x) has_key curs_getch(3x)* + has_mouse curs_mouse(3x)* hline curs_border(3x) hline_set curs_border_set(3x) idcok curs_outopts(3x) @@ -445,13 +439,13 @@ key_defined key_defined(3x)* key_name curs_util(3x) keybound keybound(3x)* - keyname curs_util(3x) keyok keyok(3x)* keypad curs_inopts(3x) killchar curs_termattrs(3x) killwchar curs_termattrs(3x) leaveok curs_outopts(3x) + longname curs_termattrs(3x) mcprint curs_print(3x)* meta curs_inopts(3x) @@ -511,13 +505,13 @@ mvwaddnwstr curs_addwstr(3x) mvwaddstr curs_addstr(3x) mvwaddwstr curs_addwstr(3x) - mvwchgat curs_attr(3x) mvwdelch curs_delch(3x) mvwget_wch curs_get_wch(3x) mvwget_wstr curs_get_wstr(3x) mvwgetch curs_getch(3x) mvwgetn_wstr curs_get_wstr(3x) + mvwgetnstr curs_getstr(3x) mvwgetstr curs_getstr(3x) mvwhline curs_border(3x) @@ -547,18 +541,19 @@ newpad curs_pad(3x) newterm curs_initscr(3x) newwin curs_window(3x) - nl curs_outopts(3x) + nl curs_inopts(3x) nocbreak curs_inopts(3x) nodelay curs_inopts(3x) noecho curs_inopts(3x) nofilter curs_util(3x)* - nonl curs_outopts(3x) + nonl curs_inopts(3x) noqiflush curs_inopts(3x) noraw curs_inopts(3x) notimeout curs_inopts(3x) overlay curs_overlay(3x) overwrite curs_overlay(3x) pair_content curs_color(3x) + pecho_wchar curs_pad(3x)* pechochar curs_pad(3x) pnoutrefresh curs_pad(3x) prefresh curs_pad(3x) @@ -569,6 +564,7 @@ raw curs_inopts(3x) redrawwin curs_refresh(3x) refresh curs_refresh(3x) + reset_color_pairs curs_color(3x)* reset_prog_mode curs_kernel(3x) reset_shell_mode curs_kernel(3x) resetty curs_kernel(3x) @@ -577,11 +573,11 @@ restartterm curs_terminfo(3x) ripoffline curs_kernel(3x) savetty curs_kernel(3x) - scanw curs_scanw(3x) scr_dump curs_scr_dump(3x) scr_init curs_scr_dump(3x) scr_restore curs_scr_dump(3x) + scr_set curs_scr_dump(3x) scrl curs_scroll(3x) scroll curs_scroll(3x) @@ -591,7 +587,6 @@ setcchar curs_getcchar(3x) setscrreg curs_outopts(3x) setsyx curs_kernel(3x) - setterm curs_terminfo(3x) setupterm curs_terminfo(3x) slk_attr curs_slk(3x)* slk_attr_off curs_slk(3x) @@ -609,6 +604,7 @@ slk_restore curs_slk(3x) slk_set curs_slk(3x) slk_touch curs_slk(3x) + slk_wset curs_slk(3x)* standend curs_attr(3x) standout curs_attr(3x) start_color curs_color(3x) @@ -643,11 +639,11 @@ use_default_colors default_colors(3x)* use_env curs_util(3x) use_extended_names curs_extend(3x)* - use_legacy_coding legacy_coding(3x)* use_tioctl curs_util(3x)* vid_attr curs_terminfo(3x) vid_puts curs_terminfo(3x) + vidattr curs_terminfo(3x) vidputs curs_terminfo(3x) vline curs_border(3x) @@ -709,11 +705,11 @@ winch curs_inch(3x) winchnstr curs_inchstr(3x) winchstr curs_inchstr(3x) - winnstr curs_instr(3x) winnwstr curs_inwstr(3x) wins_nwstr curs_ins_wstr(3x) wins_wch curs_ins_wch(3x) + wins_wstr curs_ins_wstr(3x) winsch curs_insch(3x) winsdelln curs_deleteln(3x) @@ -742,34 +738,51 @@ wvline curs_border(3x) wvline_set curs_border_set(3x) + Depending on the configuration, additional sets of functions may be + available: + + curs_memleaks(3x) - curses memory-leak checking + + curs_sp_funcs(3x) - curses screen-pointer extension + + curs_threads(3x) - curses thread support + + curs_trace(3x) - curses debugging routines +RETURN VALUE
- Routines that return an integer return ERR upon failure and an integer + Routines that return an integer return ERR upon failure and an integer value other than ERR upon successful completion, unless otherwise noted in the routine descriptions. - As a general rule, routines check for null pointers passed as parame- - ters, and handle this as an error. + As a general rule, routines check for null pointers passed as + parameters, and handle this as an error. - All macros return the value of the w version, except setscrreg, - wsetscrreg, getyx, getbegyx, and getmaxyx. The return values of - setscrreg, wsetscrreg, getyx, getbegyx, and getmaxyx are undefined - (i.e., these should not be used as the right-hand side of assignment + All macros return the value of the w version, except setscrreg, + wsetscrreg, getyx, getbegyx, and getmaxyx. The return values of + setscrreg, wsetscrreg, getyx, getbegyx, and getmaxyx are undefined + (i.e., these should not be used as the right-hand side of assignment statements). + Functions with a "mv" prefix first perform a cursor movement using + wmove, and return an error if the position is outside the window, or if + the window pointer is null. Most "mv"-prefixed functions (except + variadic functions such as mvprintw) are provided both as macros and + functions. + Routines that return pointers return NULL on error.ENVIRONMENT
- The following environment symbols are useful for customizing the run- - time behavior of the ncurses library. The most important ones have + The following environment symbols are useful for customizing the + runtime behavior of the ncurses library. The most important ones have been already discussed in detail.CC command-character
- When set, change occurrences of the command_character (i.e., the cmdch - capability) of the loaded terminfo entries to the value of this vari- - able. Very few terminfo entries provide this feature. + When set, change occurrences of the command_character (i.e., the cmdch + capability) of the loaded terminfo entries to the value of this + variable. Very few terminfo entries provide this feature. Because this name is also used in development environments to represent the C compiler's name, ncurses ignores it if it does not happen to be a @@ -777,34 +790,34 @@BAUDRATE
- The debugging library checks this environment variable when the appli- - cation has redirected output to a file. The variable's numeric value - is used for the baudrate. If no value is found, ncurses uses 9600. - This allows testers to construct repeatable test-cases that take into - account costs that depend on baudrate. + The debugging library checks this environment variable when the + application has redirected output to a file. The variable's numeric + value is used for the baudrate. If no value is found, ncurses uses + 9600. This allows testers to construct repeatable test-cases that take + into account costs that depend on baudrate.COLUMNS
Specify the width of the screen in characters. Applications running in - a windowing environment usually are able to obtain the width of the - window in which they are executing. If neither the COLUMNS value nor - the terminal's screen size is available, ncurses uses the size which + a windowing environment usually are able to obtain the width of the + window in which they are executing. If neither the COLUMNS value nor + the terminal's screen size is available, ncurses uses the size which may be specified in the terminfo database (i.e., the cols capability). - It is important that your application use a correct size for the - screen. This is not always possible because your application may be - running on a host which does not honor NAWS (Negotiations About Window - Size), or because you are temporarily running as another user. How- - ever, setting COLUMNS and/or LINES overrides the library's use of the - screen size obtained from the operating system. + It is important that your application use a correct size for the + screen. This is not always possible because your application may be + running on a host which does not honor NAWS (Negotiations About Window + Size), or because you are temporarily running as another user. + However, setting COLUMNS and/or LINES overrides the library's use of + the screen size obtained from the operating system. - Either COLUMNS or LINES symbols may be specified independently. This - is mainly useful to circumvent legacy misfeatures of terminal descrip- - tions, e.g., xterm which commonly specifies a 65 line screen. For best - results, lines and cols should not be specified in a terminal descrip- - tion for terminals which are run as emulations. + Either COLUMNS or LINES symbols may be specified independently. This + is mainly useful to circumvent legacy misfeatures of terminal + descriptions, e.g., xterm which commonly specifies a 65 line screen. + For best results, lines and cols should not be specified in a terminal + description for terminals which are run as emulations. - Use the use_env function to disable all use of external environment + Use the use_env function to disable all use of external environment (but not including system calls) to determine the screen size. Use the use_tioctl function to update COLUMNS or LINES to match the screen size obtained from system calls or the terminal database. @@ -812,31 +825,31 @@ESCDELAY
Specifies the total time, in milliseconds, for which ncurses will await - a character sequence, e.g., a function key. The default value, 1000 - milliseconds, is enough for most uses. However, it is made a variable + a character sequence, e.g., a function key. The default value, 1000 + milliseconds, is enough for most uses. However, it is made a variable to accommodate unusual applications. - The most common instance where you may wish to change this value is to - work with slow hosts, e.g., running on a network. If the host cannot - read characters rapidly enough, it will have the same effect as if the - terminal did not send characters rapidly enough. The library will + The most common instance where you may wish to change this value is to + work with slow hosts, e.g., running on a network. If the host cannot + read characters rapidly enough, it will have the same effect as if the + terminal did not send characters rapidly enough. The library will still see a timeout. - Note that xterm mouse events are built up from character sequences - received from the xterm. If your application makes heavy use of multi- - ple-clicking, you may wish to lengthen this default value because the - timeout applies to the composed multi-click event as well as the indi- - vidual clicks. + Note that xterm mouse events are built up from character sequences + received from the xterm. If your application makes heavy use of + multiple-clicking, you may wish to lengthen this default value because + the timeout applies to the composed multi-click event as well as the + individual clicks. In addition to the environment variable, this implementation provides a - global variable with the same name. Portable applications should not - rely upon the presence of ESCDELAY in either form, but setting the - environment variable rather than the global variable does not create + global variable with the same name. Portable applications should not + rely upon the presence of ESCDELAY in either form, but setting the + environment variable rather than the global variable does not create problems when compiling an application.HOME
- Tells ncurses where your home directory is. That is where it may read + Tells ncurses where your home directory is. That is where it may read and write auxiliary terminal descriptions: $HOME/.termcap @@ -844,51 +857,51 @@LINES
- Like COLUMNS, specify the height of the screen in characters. See COL- - UMNS for a detailed description. + Like COLUMNS, specify the height of the screen in characters. See + COLUMNS for a detailed description.MOUSE_BUTTONS_123
- This applies only to the OS/2 EMX port. It specifies the order of but- - tons on the mouse. OS/2 numbers a 3-button mouse inconsistently from - other platforms: + This applies only to the OS/2 EMX port. It specifies the order of + buttons on the mouse. OS/2 numbers a 3-button mouse inconsistently + from other platforms: 1 = left 2 = right 3 = middle. This variable lets you customize the mouse. The variable must be three - numeric digits 1-3 in any order, e.g., 123 or 321. If it is not speci- - fied, ncurses uses 132. + numeric digits 1-3 in any order, e.g., 123 or 321. If it is not + specified, ncurses uses 132.NCURSES_ASSUMED_COLORS
- Override the compiled-in assumption that the terminal's default colors - are white-on-black (see default_colors(3x)). You may set the fore- - ground and background color values with this environment variable by - proving a 2-element list: foreground,background. For example, to tell - ncurses to not assume anything about the colors, set this to "-1,-1". - To make it green-on-black, set it to "2,0". Any positive value from - zero to the terminfo max_colors value is allowed. + Override the compiled-in assumption that the terminal's default colors + are white-on-black (see default_colors(3x)). You may set the + foreground and background color values with this environment variable + by proving a 2-element list: foreground,background. For example, to + tell ncurses to not assume anything about the colors, set this to + "-1,-1". To make it green-on-black, set it to "2,0". Any positive + value from zero to the terminfo max_colors value is allowed.NCURSES_CONSOLE2
This applies only to the MinGW port of ncurses. - The Console2 program's handling of the Microsoft Console API call Cre- - ateConsoleScreenBuffer is defective. Applications which use this will - hang. However, it is possible to simulate the action of this call by - mapping coordinates, explicitly saving and restoring the original - screen contents. Setting the environment variable NCGDB has the same + The Console2 program's handling of the Microsoft Console API call + CreateConsoleScreenBuffer is defective. Applications which use this + will hang. However, it is possible to simulate the action of this call + by mapping coordinates, explicitly saving and restoring the original + screen contents. Setting the environment variable NCGDB has the same effect.NCURSES_GPM_TERMS
This applies only to ncurses configured to use the GPM interface. - If present, the environment variable is a list of one or more terminal - names against which the TERM environment variable is matched. Setting - it to an empty value disables the GPM interface; using the built-in + If present, the environment variable is a list of one or more terminal + names against which the TERM environment variable is matched. Setting + it to an empty value disables the GPM interface; using the built-in support for xterm, etc. If the environment variable is absent, ncurses will attempt to open GPM @@ -896,40 +909,40 @@NCURSES_NO_HARD_TABS
- Ncurses may use tabs as part of the cursor movement optimization. In - some cases, your terminal driver may not handle these properly. Set - this environment variable to disable the feature. You can also adjust + Ncurses may use tabs as part of the cursor movement optimization. In + some cases, your terminal driver may not handle these properly. Set + this environment variable to disable the feature. You can also adjust your stty settings to avoid the problem.NCURSES_NO_MAGIC_COOKIE
- Some terminals use a magic-cookie feature which requires special han- - dling to make highlighting and other video attributes display properly. - You can suppress the highlighting entirely for these terminals by set- - ting this environment variable. + Some terminals use a magic-cookie feature which requires special + handling to make highlighting and other video attributes display + properly. You can suppress the highlighting entirely for these + terminals by setting this environment variable.NCURSES_NO_PADDING
- Most of the terminal descriptions in the terminfo database are written - for real "hardware" terminals. Many people use terminal emulators + Most of the terminal descriptions in the terminfo database are written + for real "hardware" terminals. Many people use terminal emulators which run in a windowing environment and use curses-based applications. - Terminal emulators can duplicate all of the important aspects of a - hardware terminal, but they do not have the same limitations. The - chief limitation of a hardware terminal from the standpoint of your - application is the management of dataflow, i.e., timing. Unless a - hardware terminal is interfaced into a terminal concentrator (which - does flow control), it (or your application) must manage dataflow, pre- - venting overruns. The cheapest solution (no hardware cost) is for your - program to do this by pausing after operations that the terminal does - slowly, such as clearing the display. - - As a result, many terminal descriptions (including the vt100) have - delay times embedded. You may wish to use these descriptions, but not + Terminal emulators can duplicate all of the important aspects of a + hardware terminal, but they do not have the same limitations. The + chief limitation of a hardware terminal from the standpoint of your + application is the management of dataflow, i.e., timing. Unless a + hardware terminal is interfaced into a terminal concentrator (which + does flow control), it (or your application) must manage dataflow, + preventing overruns. The cheapest solution (no hardware cost) is for + your program to do this by pausing after operations that the terminal + does slowly, such as clearing the display. + + As a result, many terminal descriptions (including the vt100) have + delay times embedded. You may wish to use these descriptions, but not want to pay the performance penalty. - Set the NCURSES_NO_PADDING environment variable to disable all but - mandatory padding. Mandatory padding is used as a part of special con- - trol sequences such as flash. + Set the NCURSES_NO_PADDING environment variable to disable all but + mandatory padding. Mandatory padding is used as a part of special + control sequences such as flash.NCURSES_NO_SETBUF
@@ -939,44 +952,44 @@ o continued though 5.9 patch 20130126 - ncurses enabled buffered output during terminal initialization. This - was done (as in SVr4 curses) for performance reasons. For testing pur- - poses, both of ncurses and certain applications, this feature was made - optional. Setting the NCURSES_NO_SETBUF variable disabled output - buffering, leaving the output in the original (usually line buffered) + ncurses enabled buffered output during terminal initialization. This + was done (as in SVr4 curses) for performance reasons. For testing + purposes, both of ncurses and certain applications, this feature was + made optional. Setting the NCURSES_NO_SETBUF variable disabled output + buffering, leaving the output in the original (usually line buffered) mode. - In the current implementation, ncurses performs its own buffering and - does not require this workaround. It does not modify the buffering of + In the current implementation, ncurses performs its own buffering and + does not require this workaround. It does not modify the buffering of the standard output. - The reason for the change was to make the behavior for interrupts and - other signals more robust. One drawback is that certain nonconven- - tional programs would mix ordinary stdio calls with ncurses calls and - (usually) work. This is no longer possible since ncurses is not using - the buffered standard output but its own output (to the same file - descriptor). As a special case, the low-level calls such as putp still - use the standard output. But high-level curses calls do not. + The reason for the change was to make the behavior for interrupts and + other signals more robust. One drawback is that certain + nonconventional programs would mix ordinary stdio calls with ncurses + calls and (usually) work. This is no longer possible since ncurses is + not using the buffered standard output but its own output (to the same + file descriptor). As a special case, the low-level calls such as putp + still use the standard output. But high-level curses calls do not.NCURSES_NO_UTF8_ACS
- During initialization, the ncurses library checks for special cases + During initialization, the ncurses library checks for special cases where VT100 line-drawing (and the corresponding alternate character set - capabilities) described in the terminfo are known to be missing. - Specifically, when running in a UTF-8 locale, the Linux console emula- - tor and the GNU screen program ignore these. Ncurses checks the TERM - environment variable for these. For other special cases, you should - set this environment variable. Doing this tells ncurses to use Unicode - values which correspond to the VT100 line-drawing glyphs. That works - for the special cases cited, and is likely to work for terminal emula- - tors. - - When setting this variable, you should set it to a nonzero value. Set- - ting it to zero (or to a nonnumber) disables the special check for + capabilities) described in the terminfo are known to be missing. + Specifically, when running in a UTF-8 locale, the Linux console + emulator and the GNU screen program ignore these. Ncurses checks the + TERM environment variable for these. For other special cases, you + should set this environment variable. Doing this tells ncurses to use + Unicode values which correspond to the VT100 line-drawing glyphs. That + works for the special cases cited, and is likely to work for terminal + emulators. + + When setting this variable, you should set it to a nonzero value. + Setting it to zero (or to a nonnumber) disables the special check for "linux" and "screen". - As an alternative to the environment variable, ncurses checks for an - extended terminfo capability U8. This is a numeric capability which + As an alternative to the environment variable, ncurses checks for an + extended terminfo capability U8. This is a numeric capability which can be compiled using tic -x. For example # linux console, if patched to provide working @@ -988,67 +1001,67 @@ xterm-utf8|xterm relying on UTF-8 line-graphics, U8#1, use=xterm, - The name "U8" is chosen to be two characters, to permit it to be used + The name "U8" is chosen to be two characters, to permit it to be used by applications that use ncurses' termcap interface.NCURSES_TRACE
- During initialization, the ncurses debugging library checks the - NCURSES_TRACE environment variable. If it is defined, to a numeric - value, ncurses calls the trace function, using that value as the argu- - ment. + During initialization, the ncurses debugging library checks the + NCURSES_TRACE environment variable. If it is defined, to a numeric + value, ncurses calls the trace function, using that value as the + argument. - The argument values, which are defined in curses.h, provide several - types of information. When running with traces enabled, your applica- - tion will write the file trace to the current directory. + The argument values, which are defined in curses.h, provide several + types of information. When running with traces enabled, your + application will write the file trace to the current directory. See curs_trace(3x) for more information.TERM
- Denotes your terminal type. Each terminal type is distinct, though + Denotes your terminal type. Each terminal type is distinct, though many are similar. - TERM is commonly set by terminal emulators to help applications find a - workable terminal description. Some of those choose a popular approxi- - mation, e.g., "ansi", "vt100", "xterm" rather than an exact fit. Not - infrequently, your application will have problems with that approach, - e.g., incorrect function-key definitions. - - If you set TERM in your environment, it has no effect on the operation - of the terminal emulator. It only affects the way applications work - within the terminal. Likewise, as a general rule (xterm being a rare - exception), terminal emulators which allow you to specify TERM as a - parameter or configuration value do not change their behavior to match + TERM is commonly set by terminal emulators to help applications find a + workable terminal description. Some of those choose a popular + approximation, e.g., "ansi", "vt100", "xterm" rather than an exact fit. + Not infrequently, your application will have problems with that + approach, e.g., incorrect function-key definitions. + + If you set TERM in your environment, it has no effect on the operation + of the terminal emulator. It only affects the way applications work + within the terminal. Likewise, as a general rule (xterm being a rare + exception), terminal emulators which allow you to specify TERM as a + parameter or configuration value do not change their behavior to match that setting.TERMCAP
- If the ncurses library has been configured with termcap support, - ncurses will check for a terminal's description in termcap form if it + If the ncurses library has been configured with termcap support, + ncurses will check for a terminal's description in termcap form if it is not available in the terminfo database. The TERMCAP environment variable contains either a terminal description - (with newlines stripped out), or a file name telling where the informa- - tion denoted by the TERM environment variable exists. In either case, - setting it directs ncurses to ignore the usual place for this informa- - tion, e.g., /etc/termcap. + (with newlines stripped out), or a file name telling where the + information denoted by the TERM environment variable exists. In either + case, setting it directs ncurses to ignore the usual place for this + information, e.g., /etc/termcap.TERMINFO
- ncurses can be configured to read from multiple terminal databases. - The TERMINFO variable overrides the location for the default terminal - database. Terminal descriptions (in terminal format) are stored in + ncurses can be configured to read from multiple terminal databases. + The TERMINFO variable overrides the location for the default terminal + database. Terminal descriptions (in terminal format) are stored in terminal databases: o Normally these are stored in a directory tree, using subdirectories named by the first letter of the terminal names therein. This is the scheme used in System V, which legacy Unix systems use, - and the TERMINFO variable is used by curses applications on those + and the TERMINFO variable is used by curses applications on those systems to override the default location of the terminal database. - o If ncurses is built to use hashed databases, then each entry in + o If ncurses is built to use hashed databases, then each entry in this list may be the path of a hashed database file, e.g., /usr/share/terminfo.db @@ -1057,30 +1070,30 @@ /usr/share/terminfo/ - The hashed database uses less disk-space and is a little faster - than the directory tree. However, some applications assume the - existence of the directory tree, reading it directly rather than + The hashed database uses less disk-space and is a little faster + than the directory tree. However, some applications assume the + existence of the directory tree, reading it directly rather than using the terminfo library calls. - o If ncurses is built with a support for reading termcap files - directly, then an entry in this list may be the path of a termcap + o If ncurses is built with a support for reading termcap files + directly, then an entry in this list may be the path of a termcap file. o If the TERMINFO variable begins with "hex:" or "b64:", ncurses uses - the remainder of that variable as a compiled terminal description. + the remainder of that variable as a compiled terminal description. You might produce the base64 format using infocmp(1m): TERMINFO="$(infocmp -0 -Q2 -q)" export TERMINFO - The compiled description is used if it corresponds to the terminal + The compiled description is used if it corresponds to the terminal identified by the TERM variable. - Setting TERMINFO is the simplest, but not the only way to set location - of the default terminal database. The complete list of database loca- - tions in order follows: + Setting TERMINFO is the simplest, but not the only way to set location + of the default terminal database. The complete list of database + locations in order follows: - o the last terminal database to which ncurses wrote, if any, is + o the last terminal database to which ncurses wrote, if any, is searched first o the location specified by the TERMINFO environment variable @@ -1089,31 +1102,31 @@ o locations listed in the TERMINFO_DIRS environment variable - o one or more locations whose names are configured and compiled + o one or more locations whose names are configured and compiled into the ncurses library, i.e., - o /usr/local/ncurses/share/terminfo:/usr/share/terminfo (corre- - sponding to the TERMINFO_DIRS variable) + o no default value (corresponding to the TERMINFO_DIRS + variable) o /usr/share/terminfo (corresponding to the TERMINFO variable)TERMINFO_DIRS
- Specifies a list of locations to search for terminal descriptions. - Each location in the list is a terminal database as described in the - section on the TERMINFO variable. The list is separated by colons + Specifies a list of locations to search for terminal descriptions. + Each location in the list is a terminal database as described in the + section on the TERMINFO variable. The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX. - There is no corresponding feature in System V terminfo; it is an exten- - sion developed for ncurses. + There is no corresponding feature in System V terminfo; it is an + extension developed for ncurses.TERMPATH
- If TERMCAP does not hold a file name then ncurses checks the TERMPATH - environment variable. This is a list of filenames separated by spaces + If TERMCAP does not hold a file name then ncurses checks the TERMPATH + environment variable. This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, semicolons on OS/2 EMX. - If the TERMPATH environment variable is not set, ncurses looks in the + If the TERMPATH environment variable is not set, ncurses looks in the files /etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, @@ -1121,38 +1134,38 @@ in that order. The library may be configured to disregard the following variables when - the current user is the superuser (root), or if the application uses + the current user is the superuser (root), or if the application uses setuid or setgid permissions: $TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.ALTERNATE CONFIGURATIONS
- Several different configurations are possible, depending on the config- - ure script options used when building ncurses. There are a few main - options whose effects are visible to the applications developer using - ncurses: + Several different configurations are possible, depending on the + configure script options used when building ncurses. There are a few + main options whose effects are visible to the applications developer + using ncurses: --disable-overwrite The standard include for ncurses is as noted in SYNOPSIS: #include <curses.h> - This option is used to avoid filename conflicts when ncurses is + This option is used to avoid filename conflicts when ncurses is not the main implementation of curses of the computer. If ncurses - is installed disabling overwrite, it puts its headers in a subdi- - rectory, e.g., + is installed disabling overwrite, it puts its headers in a + subdirectory, e.g., #include <ncurses/curses.h> - It also omits a symbolic link which would allow you to use + It also omits a symbolic link which would allow you to use -lcurses to build executables. --enable-widec - The configure script renames the library and (if the --dis- - able-overwrite option is used) puts the header files in a differ- - ent subdirectory. All of the library names have a "w" appended to - them, i.e., instead of + The configure script renames the library and (if the + --disable-overwrite option is used) puts the header files in a + different subdirectory. All of the library names have a "w" + appended to them, i.e., instead of -lncurses @@ -1160,45 +1173,45 @@ -lncursesw - You must also enable the wide-character features in the header - file when compiling for the wide-character library to use the - extended (wide-character) functions. The symbol which enables + You must also enable the wide-character features in the header + file when compiling for the wide-character library to use the + extended (wide-character) functions. The symbol which enables these features has changed since XSI Curses, Issue 4: - o Originally, the wide-character feature required the symbol + o Originally, the wide-character feature required the symbol _XOPEN_SOURCE_EXTENDED but that was only valid for XPG4 (1996). - o Later, that was deemed conflicting with _XOPEN_SOURCE defined + o Later, that was deemed conflicting with _XOPEN_SOURCE defined to 500. - o As of mid-2018, none of the features in this implementation - require a _XOPEN_SOURCE feature greater than 600. However, + o As of mid-2018, none of the features in this implementation + require a _XOPEN_SOURCE feature greater than 600. However, X/Open Curses, Issue 7 (2009) recommends defining it to 700. - o Alternatively, you can enable the feature by defining - NCURSES_WIDECHAR with the caveat that some other header file - than curses.h may require a specific value for _XOPEN_SOURCE + o Alternatively, you can enable the feature by defining + NCURSES_WIDECHAR with the caveat that some other header file + than curses.h may require a specific value for _XOPEN_SOURCE (or a system-specific symbol). - The curses.h file which is installed for the wide-character - library is designed to be compatible with the normal library's - header. Only the size of the WINDOW structure differs, and very + The curses.h file which is installed for the wide-character + library is designed to be compatible with the normal library's + header. Only the size of the WINDOW structure differs, and very few applications require more than a pointer to WINDOWs. - If the headers are installed allowing overwrite, the wide-charac- - ter library's headers should be installed last, to allow applica- - tions to be built using either library from the same set of head- - ers. + If the headers are installed allowing overwrite, the wide- + character library's headers should be installed last, to allow + applications to be built using either library from the same set of + headers. --with-pthread - The configure script renames the library. All of the library - names have a "t" appended to them (before any "w" added by + The configure script renames the library. All of the library + names have a "t" appended to them (before any "w" added by --enable-widec). The global variables such as LINES are replaced by macros to allow read-only access. At the same time, setter-functions are provided - to set these values. Some applications (very few) may require + to set these values. Some applications (very few) may require changes to work with this convention. --with-shared @@ -1208,84 +1221,118 @@ --with-debug --with-profile - The shared and normal (static) library names differ by their suf- - fixes, e.g., libncurses.so and libncurses.a. The debug and pro- - filing libraries add a "_g" and a "_p" to the root names respec- - tively, e.g., libncurses_g.a and libncurses_p.a. + The shared and normal (static) library names differ by their + suffixes, e.g., libncurses.so and libncurses.a. The debug and + profiling libraries add a "_g" and a "_p" to the root names + respectively, e.g., libncurses_g.a and libncurses_p.a. + + --with-termlib + Low-level functions which do not depend upon whether the library + supports wide-characters, are provided in the tinfo library. + + By doing this, it is possible to share the tinfo library between + wide/normal configurations as well as reduce the size of the + library when only low-level functions are needed. + + Those functions are described in these pages: + + o curs_extend(3x) - miscellaneous curses extensions + + o curs_inopts(3x) - curses input options + + o curs_kernel(3x) - low-level curses routines + + o curs_termattrs(3x) - curses environment query routines + + o curs_termcap(3x) - curses emulation of termcap + + o curs_terminfo(3x) - curses interfaces to terminfo database + + o curs_util(3x) - miscellaneous curses utility routines --with-trace The trace function normally resides in the debug library, but it - is sometimes useful to configure this in the shared library. Con- - figure scripts should check for the function's existence rather + is sometimes useful to configure this in the shared library. + Configure scripts should check for the function's existence rather than assuming it is always in the debug library.FILES
/usr/share/tabset - directory containing initialization files for the terminal capa- - bility database /usr/share/terminfo terminal capability database + directory containing initialization files for the terminal + capability database /usr/share/terminfo terminal capability + databaseSEE ALSO
- terminfo(5) and related pages whose names begin "curs_" for detailed + terminfo(5) and related pages whose names begin "curs_" for detailed routine descriptions. curs_variables(3x) user_caps(5) for user-defined capabilitiesEXTENSIONS
- The ncurses library can be compiled with an option (-DUSE_GETCAP) that - falls back to the old-style /etc/termcap file if the terminal setup - code cannot find a terminfo entry corresponding to TERM. Use of this - feature is not recommended, as it essentially includes an entire term- - cap compiler in the ncurses startup code, at significant cost in core - and startup cycles. - - The ncurses library includes facilities for capturing mouse events on - certain terminals (including xterm). See the curs_mouse(3x) manual + The ncurses library can be compiled with an option (-DUSE_GETCAP) that + falls back to the old-style /etc/termcap file if the terminal setup + code cannot find a terminfo entry corresponding to TERM. Use of this + feature is not recommended, as it essentially includes an entire + termcap compiler in the ncurses startup code, at significant cost in + core and startup cycles. + + The ncurses library includes facilities for capturing mouse events on + certain terminals (including xterm). See the curs_mouse(3x) manual page for details. - The ncurses library includes facilities for responding to window resiz- - ing events, e.g., when running in an xterm. See the resizeterm(3x) and - wresize(3x) manual pages for details. In addition, the library may be - configured with a SIGWINCH handler. + The ncurses library includes facilities for responding to window + resizing events, e.g., when running in an xterm. See the + resizeterm(3x) and wresize(3x) manual pages for details. In addition, + the library may be configured with a SIGWINCH handler. - The ncurses library extends the fixed set of function key capabilities - of terminals by allowing the application designer to define additional - key sequences at runtime. See the define_key(3x) key_defined(3x), and + The ncurses library extends the fixed set of function key capabilities + of terminals by allowing the application designer to define additional + key sequences at runtime. See the define_key(3x) key_defined(3x), and keyok(3x) manual pages for details. - The ncurses library can exploit the capabilities of terminals which - implement the ISO-6429 SGR 39 and SGR 49 controls, which allow an - application to reset the terminal to its original foreground and back- - ground colors. From the users' perspective, the application is able to - draw colored text on a background whose color is set independently, - providing better control over color contrasts. See the default_col- - ors(3x) manual page for details. + The ncurses library can exploit the capabilities of terminals which + implement the ISO-6429 SGR 39 and SGR 49 controls, which allow an + application to reset the terminal to its original foreground and + background colors. From the users' perspective, the application is + able to draw colored text on a background whose color is set + independently, providing better control over color contrasts. See the + default_colors(3x) manual page for details. - The ncurses library includes a function for directing application out- - put to a printer attached to the terminal device. See the + The ncurses library includes a function for directing application + output to a printer attached to the terminal device. See the curs_print(3x) manual page for details.PORTABILITY
- The ncurses library is intended to be BASE-level conformant with XSI - Curses. The EXTENDED XSI Curses functionality (including color sup- - port) is supported. + The ncurses library is intended to be BASE-level conformant with XSI + Curses. The EXTENDED XSI Curses functionality (including color + support) is supported. - A small number of local differences (that is, individual differences - between the XSI Curses and ncurses calls) are described in PORTABILITY + A small number of local differences (that is, individual differences + between the XSI Curses and ncurses calls) are described in PORTABILITY sections of the library man pages. - Unlike other implementations, this one checks parameters such as point- - ers to WINDOW structures to ensure they are not null. The main reason - for providing this behavior is to guard against programmer error. The - standard interface does not provide a way for the library to tell an - application which of several possible errors were detected. Relying on - this (or some other) extension will adversely affect the portability of - curses applications. - This implementation also contains several extensions: +Error checking
+ In many cases, X/Open Curses is vague about error conditions, omitting + some of the SVr4 documentation. + + Unlike other implementations, this one checks parameters such as + pointers to WINDOW structures to ensure they are not null. The main + reason for providing this behavior is to guard against programmer + error. The standard interface does not provide a way for the library + to tell an application which of several possible errors were detected. + Relying on this (or some other) extension will adversely affect the + portability of curses applications. + + +Extensions versus portability
+ Most of the extensions provided by ncurses have not been standardized. + Some have been incorporated into other implementations, such as + PDCurses or NetBSD curses. Here are a few to consider: o The routine has_key is not part of XPG4, nor is it present in SVr4. See the curs_getch(3x) manual page for details. @@ -1298,36 +1345,126 @@ are they present in SVr4. See the curs_mouse(3x) manual page for details. - o The routine mcprint was not present in any previous curses imple- - mentation. See the curs_print(3x) manual page for details. + o The routine mcprint was not present in any previous curses + implementation. See the curs_print(3x) manual page for details. o The routine wresize is not part of XPG4, nor is it present in SVr4. See the wresize(3x) manual page for details. - o The WINDOW structure's internal details can be hidden from applica- - tion programs. See curs_opaque(3x) for the discussion of is_scrol- - lok, etc. + o The WINDOW structure's internal details can be hidden from + application programs. See curs_opaque(3x) for the discussion of + is_scrollok, etc. - o This implementation can be configured to provide rudimentary sup- - port for multi-threaded applications. See curs_threads(3x) for + o This implementation can be configured to provide rudimentary + support for multi-threaded applications. See curs_threads(3x) for details. o This implementation can also be configured to provide a set of functions which improve the ability to manage multiple screens. See curs_sp_funcs(3x) for details. + +Padding differences
In historic curses versions, delays embedded in the capabilities cr, ind, cub1, ff and tab activated corresponding delay bits in the UNIX tty driver. In this implementation, all padding is done by sending NUL - bytes. This method is slightly more expensive, but narrows the inter- - face to the UNIX kernel significantly and increases the package's + bytes. This method is slightly more expensive, but narrows the + interface to the UNIX kernel significantly and increases the package's portability correspondingly. -NOTES
+Header files
The header file <curses.h> automatically includes the header files <stdio.h> and <unctrl.h>. + X/Open Curses has more to say, but does not finish the story: + + The inclusion of <curses.h> may make visible all symbols from the + headers <stdio.h>, <term.h>, <termios.h>, and <wchar.h>. + + Here is a more complete story: + + o Starting with BSD curses, all implementations have included + <stdio.h>. + + BSD curses included <curses.h> and <unctrl.h> from an internal + header "curses.ext" ("ext" was a short name for externs). + + BSD curses used <stdio.h> internally (for printw and scanw), but + nothing in <curses.h> itself relied upon <stdio.h>. + + o SVr2 curses added newterm(3x), which relies upon <stdio.h>. That + is, the function prototype uses FILE. + + SVr4 curses added putwin and getwin, which also use <stdio.h>. + + X/Open Curses documents all three of these functions. + + SVr4 curses and X/Open Curses do not require the developer to + include <stdio.h> before including <curses.h>. Both document + curses showing <curses.h> as the only required header. + + As a result, standard <curses.h> will always include <stdio.h>. + + o X/Open Curses is inconsistent with respect to SVr4 regarding + <unctrl.h>. + + As noted in curs_util(3x), ncurses includes <unctrl.h> from + <curses.h> (like SVr4). + + o X/Open's comments about <term.h> and <termios.h> may refer to HP-UX + and AIX: + + HP-UX curses includes <term.h> from <curses.h> to declare setupterm + in curses.h, but ncurses (and Solaris curses) do not. + + AIX curses includes <term.h> and <termios.h>. Again, ncurses (and + Solaris curses) do not. + + o X/Open says that <curses.h> may include <term.h>, but there is no + requirement that it do that. + + Some programs use functions declared in both <curses.h> and + <term.h>, and must include both headers in the same module. Very + old versions of AIX curses required including <curses.h> before + including <term.h>. + + Because ncurses header files include the headers needed to define + datatypes used in the headers, ncurses header files can be included + in any order. But for portability, you should include <curses.h> + before <term.h>. + + o X/Open Curses says "may make visible" because including a header + file does not necessarily make all symbols in it visible (there are + ifdef's to consider). + + For instance, in ncurses <wchar.h> may be included if the proper + symbol is defined, and if ncurses is configured for wide-character + support. If the header is included, its symbols may be made + visible. That depends on the value used for _XOPEN_SOURCE feature + test macro. + + o X/Open Curses documents one required header, in a special case: + <stdarg.h> before <curses.h> to prototype the vw_printw and + vw_scanw functions (as well as the obsolete the vwprintw and + vwscanw functions). Each of those uses a va_list parameter. + + The two obsolete functions were introduced in SVr3. The other + functions were introduced in X/Open Curses. In between, SVr4 + curses provided for the possibility that an application might + include either <varargs.h> or <stdarg.h>. Initially, that was done + by using void* for the va_list parameter. Later, a special type + (defined in <stdio.h>) was introduced, to allow for compiler type- + checking. That special type is always available, because <stdio.h> + is always included by <curses.h>. + + None of the X/Open Curses implementations require an application to + include <stdarg.h> before <curses.h> because they either have + allowed for a special type, or (like ncurses) include <stdarg.h> + directly to provide a portable interface. + + +NOTES
If standard output from a ncurses program is re-directed to something which is not a tty, screen updates will be directed to standard error. This was an undocumented feature of AT&T System V Release 3 curses. @@ -1384,7 +1521,14 @@FILES SEE ALSO EXTENSIONS -PORTABILITY +PORTABILITY + + NOTES AUTHORS diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html index f5fdc4f..9e62696 100644 --- a/doc/html/man/ncurses6-config.1.html +++ b/doc/html/man/ncurses6-config.1.html @@ -1,6 +1,6 @@ - @@ -101,11 +101,11 @@ --terminfo-dirs echos the $TERMINFO_DIRS directory list, e.g., - /usr/local/ncurses/share/terminfo:/usr/share/terminfo + /usr/share/terminfo --termpath - echos the $TERMPATH termcap list, if support for termcap is con- - figured. + echos the $TERMPATH termcap list, if support for termcap is + configured. --help prints this message @@ -113,7 +113,7 @@SEE ALSO
curses(3x) - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/new_pair.3x.html b/doc/html/man/new_pair.3x.html index dec3de1..12214be 100644 --- a/doc/html/man/new_pair.3x.html +++ b/doc/html/man/new_pair.3x.html @@ -1,6 +1,6 @@ - @@ -54,33 +54,33 @@SYNOPSIS
#include <curses.h> - int alloc_pair(int fg, int bg); - int find_pair(int fg, int bg); - int free_pair(int pair); + int alloc_pair(int fg, int bg); + int find_pair(int fg, int bg); + int free_pair(int pair);DESCRIPTION
These functions are an extension to the curses library. They permit an - application to dynamically allocate a color pair using the fore- - ground/background colors rather than assign a fixed color pair number, - and return an unused pair to the pool. + application to dynamically allocate a color pair using the + foreground/background colors rather than assign a fixed color pair + number, and return an unused pair to the pool. The number of colors may be related to the number of possible color pairs for a given terminal, or it may not: - o While almost all terminals allow setting the color attributes inde- - pendently, it is unlikely that your terminal allows you to modify - the attributes of a given character cell without rewriting it. - That is, the foreground and background colors are applied as a + o While almost all terminals allow setting the color attributes + independently, it is unlikely that your terminal allows you to + modify the attributes of a given character cell without rewriting + it. That is, the foreground and background colors are applied as a pair. - o Color pairs are the curses library's way of managing a color pal- - ette on a terminal. If the library does not keep track of the com- - binations of colors which are displayed, it will be inefficient. + o Color pairs are the curses library's way of managing a color + palette on a terminal. If the library does not keep track of the + combinations of colors which are displayed, it will be inefficient. - o For simple terminal emulators with only a few dozen color combina- - tions, it is convenient to use the maximum number of combinations - as the limit on color pairs: + o For simple terminal emulators with only a few dozen color + combinations, it is convenient to use the maximum number of + combinations as the limit on color pairs: COLORS * COLORS @@ -93,8 +93,8 @@ a predefined color scheme. Beyond that lies in the realm of programs using the foreground and - background colors for "ASCII art" (or some other non-textual appli- - cation). + background colors for "ASCII art" (or some other non-textual + application). Also beyond those few dozen pairs, the required size for a table to represent the combinations grows rapidly with an increasing number @@ -105,9 +105,9 @@alloc_pair
- The alloc_pair function accepts parameters for foreground and back- - ground color, and checks if that color combination is already associ- - ated with a color pair. + The alloc_pair function accepts parameters for foreground and + background color, and checks if that color combination is already + associated with a color pair. o If the combination already exists, alloc_pair returns the existing pair. @@ -115,21 +115,21 @@ o If the combination does not exist, alloc_pair allocates a new color pair and returns that. - o If the table fills up, alloc_pair discards the least-recently allo- - cated entry using free_pair and allocates a new color pair. + o If the table fills up, alloc_pair discards the least-recently + allocated entry using free_pair and allocates a new color pair. All of the color pairs are allocated from a table of possible color - pairs. The size of the table is determined by the terminfo pairs capa- - bility. The table is shared with init_pair; in fact alloc_pair calls - init_pair after updating the ncurses library's fast index to the colors - versus color pairs. + pairs. The size of the table is determined by the terminfo pairs + capability. The table is shared with init_pair; in fact alloc_pair + calls init_pair after updating the ncurses library's fast index to the + colors versus color pairs.find_pair
The find_pair function accepts parameters for foreground and background color, and checks if that color combination is already associated with - a color pair, returning the pair number if it has been allocated. Oth- - erwise it returns -1. + a color pair, returning the pair number if it has been allocated. + Otherwise it returns -1.free_pair
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html index 2d44419..24d5087 100644 --- a/doc/html/man/panel.3x.html +++ b/doc/html/man/panel.3x.html @@ -1,4 +1,4 @@ - @@ -55,30 +72,39 @@ cc [flags] sourcefiles -lpanel -lncurses - PANEL *new_panel(WINDOW *win); - int bottom_panel(PANEL *pan); - int top_panel(PANEL *pan); - int show_panel(PANEL *pan); + PANEL *new_panel(WINDOW *win); + + int bottom_panel(PANEL *pan); + int top_panel(PANEL *pan); + int show_panel(PANEL *pan); void update_panels(void); - int hide_panel(PANEL *pan); - WINDOW *panel_window(const PANEL *pan); - int replace_panel(PANEL *pan, WINDOW *window); - int move_panel(PANEL *pan, int starty, int startx); - int panel_hidden(const PANEL *pan); - PANEL *panel_above(const PANEL *pan); - PANEL *panel_below(const PANEL *pan); - int set_panel_userptr(PANEL *pan, const void *ptr); - const void *panel_userptr(const PANEL *pan); - int del_panel(PANEL *pan); + int hide_panel(PANEL *pan); + + WINDOW *panel_window(const PANEL *pan); + int replace_panel(PANEL *pan, WINDOW *window); + int move_panel(PANEL *pan, int starty, int startx); + int panel_hidden(const PANEL *pan); + + PANEL *panel_above(const PANEL *pan); + PANEL *panel_below(const PANEL *pan); + + int set_panel_userptr(PANEL *pan, const void *ptr); + const void *panel_userptr(const PANEL *pan); + + int del_panel(PANEL *pan); + + /* ncurses-extensions */ + PANEL *ground_panel(SCREEN *sp); + PANEL *ceiling_panel(SCREEN *sp);DESCRIPTION
Panels are curses(3x) windows with the added feature of depth. Panel - functions allow the use of stacked windows and ensure the proper por- - tions of each window and the curses stdscr window are hidden or dis- - played when panels are added, moved, modified or removed. The set of - currently visible panels is the stack of panels. The stdscr window is - beneath all panels, and is not considered part of the stack. + functions allow the use of stacked windows and ensure the proper + portions of each window and the curses stdscr window are hidden or + displayed when panels are added, moved, modified or removed. The set + of currently visible panels is the stack of panels. The stdscr window + is beneath all panels, and is not considered part of the stack. A window is associated with every panel. The panel routines enable you to create, move, hide, and show panels, as well as position a panel at @@ -89,95 +115,128 @@FUNCTIONS
- new_panel(win) - allocates a PANEL structure, associates it with win, places - the panel on the top of the stack (causes it to be displayed - above any other panel) and returns a pointer to the new panel. - - update_panels - refreshes the virtual screen to reflect the relations between - the panels in the stack, but does not call doupdate to refresh - the physical screen. Use this function and not wrefresh or - wnoutrefresh. update_panels may be called more than once before - a call to doupdate, but doupdate is the function responsible for - updating the physical screen. - - del_panel(pan) - removes the given panel from the stack and deallocates the - PANEL structure (but not its associated window). - - hide_panel(pan) - removes the given panel from the panel stack and thus hides it - from view. The PANEL structure is not lost, merely removed from - the stack. - - panel_hidden(pan) - returns TRUE if the panel is in the panel stack, FALSE if it is - not. If the panel is a null pointer, return ERR. - - show_panel(pan) - makes a hidden panel visible by placing it on top of the panels - in the panel stack. See COMPATIBILITY below. - - top_panel(pan) - puts the given visible panel on top of all panels in the stack. - See COMPATIBILITY below. - - bottom_panel(pan) - puts panel at the bottom of all panels. - - move_panel(pan,starty,startx) - moves the given panel window so that its upper-left corner is at - starty, startx. It does not change the position of the panel in - the stack. Be sure to use this function, not mvwin, to move a - panel window. - - replace_panel(pan,window) - replaces the current window of panel with window (useful, for - example if you want to resize a panel; if you're using ncurses, - you can call replace_panel on the output of wresize(3x)). It - does not change the position of the panel in the stack. - - panel_above(pan) - returns a pointer to the panel above pan. If the panel argument - is (PANEL *)0, it returns a pointer to the bottom panel in the - stack. - - panel_below(pan) - returns a pointer to the panel just below pan. If the panel - argument is (PANEL *)0, it returns a pointer to the top panel in - the stack. - - set_panel_userptr(pan,ptr) - sets the panel's user pointer. - - panel_userptr(pan) - returns the user pointer for a given panel. - - panel_window(pan) - returns a pointer to the window of the given panel. + +bottom_panel
+ bottom_panel(pan) puts panel pan at the bottom of all panels. + + +ceiling_panel
+ ceiling_panel(sp) acts like panel_below(NULL), for the given SCREEN sp. + + +del_panel
+ del_panel(pan) removes the given panel pan from the stack and + deallocates the PANEL structure (but not its associated window). + + +ground_panel
+ ground_panel(sp) acts like panel_above(NULL), for the given SCREEN sp. + + +hide_panel
+ hide_panel(pan) removes the given panel pan from the panel stack and + thus hides it from view. The PANEL structure is not lost, merely + removed from the stack. + + +move_panel
+ move_panel(pan,starty,startx) moves the given panel pan's window so + that its upper-left corner is at starty, startx. It does not change + the position of the panel in the stack. Be sure to use this function, + not mvwin(3x), to move a panel window. + + +new_panel
+ new_panel(win) allocates a PANEL structure, associates it with win, + places the panel on the top of the stack (causes it to be displayed + above any other panel) and returns a pointer to the new panel. + + +panel_above
+ panel_above(pan) returns a pointer to the panel above pan. If the + panel argument is (PANEL *)0, it returns a pointer to the bottom panel + in the stack. + + +panel_below
+ panel_below(pan) returns a pointer to the panel just below pan. If the + panel argument is (PANEL *)0, it returns a pointer to the top panel in + the stack. + + +panel_hidden
+ panel_hidden(pan) returns TRUE if the panel pan is in the panel stack, + FALSE if it is not. If the panel is a null pointer, return ERR. + + +panel_userptr
+ panel_userptr(pan) returns the user pointer for a given panel pan. + + +panel_window
+ panel_window(pan) returns a pointer to the window of the given panel + pan. + + +replace_panel
+ replace_panel(pan,window) replaces the current window of panel pan with + window This is useful, for example if you want to resize a panel. In + ncurses, you can call replace_panel to resize a panel using a window + resized with wresize(3x). It does not change the position of the panel + in the stack. + + +set_panel_userptr
+ set_panel_userptr(pan,ptr) sets the panel's user pointer. + + +show_panel
+ show_panel(pan) makes a hidden panel visible by placing it on top of + the panels in the panel stack. See COMPATIBILITY below. + + +top_panel
+ top_panel(pan) puts the given visible panel pan on top of all panels in + the stack. See COMPATIBILITY below. + + +update_panels
+ update_panels() refreshes the virtual screen to reflect the relations + between the panels in the stack, but does not call doupdate(3x) to + refresh the physical screen. Use this function and not wrefresh(3x) or + wnoutrefresh(3x). + + update_panels may be called more than once before a call to doupdate, + but doupdate is the function responsible for updating the physical + screen.DIAGNOSTICS
Each routine that returns a pointer returns NULL if an error occurs. - Each routine that returns an int value returns OK if it executes suc- - cessfully and ERR if not. + Each routine that returns an int value returns OK if it executes + successfully and ERR if not. + + Except as noted, the pan and window parameters must be non-null. If + those are null, an error is returned. + + The move_panel function uses mvwin(3x), and will return an error if + mvwin returns an error.COMPATIBILITY
Reasonable care has been taken to ensure compatibility with the native panel facility introduced in System V (inspection of the SVr4 manual pages suggests the programming interface is unchanged). The - PANEL data structures are merely similar. The programmer is cau- - tioned not to directly use PANEL fields. + PANEL data structures are merely similar. The programmer is + cautioned not to directly use PANEL fields. - The functions show_panel and top_panel are identical in this implemen- - tation, and work equally well with displayed or hidden panels. In the - native System V implementation, show_panel is intended for making a - hidden panel visible (at the top of the stack) and top_panel is - intended for making an already-visible panel move to the top of the - stack. You are cautioned to use the correct function to ensure compat- - ibility with native panel libraries. + The functions show_panel and top_panel are identical in this + implementation, and work equally well with displayed or hidden panels. + In the native System V implementation, show_panel is intended for + making a hidden panel visible (at the top of the stack) and top_panel + is intended for making an already-visible panel move to the top of the + stack. You are cautioned to use the correct function to ensure + compatibility with native panel libraries.NOTE
@@ -192,8 +251,25 @@ It is not part of X/Open Curses. - Aside from ncurses, only systems based on SVr4 source code, e.g., - Solaris provide this library. + A few implementations exist: + + o Systems based on SVr4 source code, e.g., Solaris, provide this + library. + + o ncurses (since version 0.6 in 1993) and PDCurses (since version 2.2 + in 1995) provide a panel library whose common ancestor was a public + domain implementation by Warren Tucker published in u386mon 2.20 + (1990). + + According to Tucker, the SystemV panel library was first released + in SVr3.2 (1988), and his implementation helped with a port to + SVr3.1 (1987). + + Several developers have improved each of these; they are no longer + the same as Tucker's implementation. + + o NetBSD 8 (2018) has a panel library begun by Valery Ushakov in + 2015. This is based on the AT&T documentation.FILES
@@ -205,13 +281,17 @@SEE ALSO
curses(3x), curs_variables(3x), - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
- Originally written by Warren Tucker <wht@n4hgf.mt-park.ga.us>, primar- - ily to assist in porting u386mon to systems without a native panels - library. Repackaged for ncurses by Zeyd ben-Halim. + Originally written by Warren Tucker <wht@n4hgf.mt-park.ga.us>, + primarily to assist in porting u386mon to systems without a native + panels library. + + Repackaged for ncurses by Zeyd ben-Halim. + + Juergen Pfeifer and Thomas E. Dickey revised/improved the library. @@ -222,7 +302,27 @@NAME SYNOPSIS DESCRIPTION -FUNCTIONS +FUNCTIONS + + DIAGNOSTICS COMPATIBILITY NOTE diff --git a/doc/html/man/resizeterm.3x.html b/doc/html/man/resizeterm.3x.html index 3705e3c..9a099ea 100644 --- a/doc/html/man/resizeterm.3x.html +++ b/doc/html/man/resizeterm.3x.html @@ -1,4 +1,4 @@ - @@ -55,15 +55,15 @@SYNOPSIS
#include <curses.h> - bool is_term_resized(int lines, int columns); - int resize_term(int lines, int columns); - int resizeterm(int lines, int columns); + bool is_term_resized(int lines, int columns); + int resize_term(int lines, int columns); + int resizeterm(int lines, int columns);DESCRIPTION
This is an extension to the curses library. It provides callers with a - hook into the ncurses data to resize windows, primarily for use by pro- - grams running in an X Window terminal (e.g., xterm). + hook into the ncurses data to resize windows, primarily for use by + programs running in an X Window terminal (e.g., xterm).resizeterm
@@ -76,7 +76,7 @@resize_term
Most of the work is done by the inner function resize_term. The outer function resizeterm adds bookkeeping for the SIGWINCH handler, as well - as repainting the soft-key area (see slk_touch(3x)). + as repainting the soft-key area (see slk_touch(3x)). When resizing the windows, resize_term blank-fills the areas that are extended. The calling application should fill in these areas with @@ -102,15 +102,15 @@RETURN VALUE
Except as noted, these functions return the integer ERR upon failure and OK on success. They will fail if either of the dimensions are less - than or equal to zero, or if an error occurs while (re)allocating mem- - ory for the windows. + than or equal to zero, or if an error occurs while (re)allocating + memory for the windows.NOTES
- While these functions are intended to be used to support a signal han- - dler (i.e., for SIGWINCH), care should be taken to avoid invoking them - in a context where malloc or realloc may have been interrupted, since - it uses those functions. + While these functions are intended to be used to support a signal + handler (i.e., for SIGWINCH), care should be taken to avoid invoking + them in a context where malloc or realloc may have been interrupted, + since it uses those functions. If ncurses is configured to supply its own SIGWINCH handler, @@ -132,9 +132,9 @@ resize the ncurses data structures. If the environment variables LINES or COLUMNS are set, this overrides - the library's use of the window size obtained from the operating sys- - tem. Thus, even if a SIGWINCH is received, no screen size change may - be recorded. + the library's use of the window size obtained from the operating + system. Thus, even if a SIGWINCH is received, no screen size change + may be recorded.PORTABILITY
diff --git a/doc/html/man/scr_dump.5.html b/doc/html/man/scr_dump.5.html index e73ebc0..e01ea35 100644 --- a/doc/html/man/scr_dump.5.html +++ b/doc/html/man/scr_dump.5.html @@ -1,6 +1,6 @@ - @@ -60,8 +60,8 @@ read it back using scr_restore or getwin. The putwin and getwin functions do the work; while scr_dump and - scr_restore conveniently save and restore the whole screen, i.e., std- - scr. + scr_restore conveniently save and restore the whole screen, i.e., + stdscr.ncurses6
@@ -72,8 +72,8 @@ allowing applications (such as file(1)) to recognize curses dump files. - Because ncurses6 uses a new format, that requires a new magic num- - ber was unused by other applications. This 16-bit number was + Because ncurses6 uses a new format, that requires a new magic + number was unused by other applications. This 16-bit number was unused: 0x8888 (octal "\210\210") @@ -82,8 +82,8 @@ 0x88888888 (octal "\210\210\210\210") - This is the pattern submitted to the maintainers of the file pro- - gram: + This is the pattern submitted to the maintainers of the file + program: # # ncurses5 (and before) did not use a magic number, @@ -95,17 +95,17 @@ o The screen dumps are written in textual form, so that internal data sizes are not directly related to the dump-format, and enabling the - library to read dumps from either narrow- or wide-character- con- - figurations. + library to read dumps from either narrow- or wide-character- + configurations. The narrow library configuration holds characters and video attributes in a 32-bit chtype, while the wide-character library stores this information in the cchar_t structure, which is much larger than 32-bits. - o It is possible to read a screen dump into a terminal with a differ- - ent screen-size, because the library truncates or fills the screen - as necessary. + o It is possible to read a screen dump into a terminal with a + different screen-size, because the library truncates or fills the + screen as necessary. o The ncurses6 getwin reads the legacy screen dumps from ncurses5. @@ -139,8 +139,8 @@ X/Open's documentation for enhanced curses says only: The getwin( ) function reads window-related data stored in the file - by putwin( ). The function then creates and initializes a new win- - dow using that data. + by putwin( ). The function then creates and initializes a new + window using that data. The putwin( ) function writes all data associated with win into the stdio stream to which filep points, using an unspecified format. @@ -157,17 +157,17 @@ for applications originally written to be compiled on systems based on the UNIX operating system. Therefore, the features described may not be present on systems that conform to XPG4 or - to earlier XPG releases. The relevant reference pages may pro- - vide additional or more specific portability warnings about use - of the material. + to earlier XPG releases. The relevant reference pages may + provide additional or more specific portability warnings about + use of the material. In the foregoing, emphasis was added to unspecified format and to XPG4 or to earlier XPG releases, for clarity.Unix SystemV
- Unix SystemV curses identified the file format by writing a "magic num- - ber" at the beginning of the dump. The WINDOW data and the lines of + Unix SystemV curses identified the file format by writing a "magic + number" at the beginning of the dump. The WINDOW data and the lines of text follow, all in binary form. The Solaris curses source has these definitions: @@ -198,9 +198,10 @@ be seen using od(1), none of the Unix systems documents the format used for screen-dumps. - The Unix systems do not use identical formats. While collecting infor- - mation for for this manual page, the savescreen test-program produced - dumps of different size (all on 64-bit hardware, on 40x80 screens): + The Unix systems do not use identical formats. While collecting + information for for this manual page, the savescreen test-program + produced dumps of different size (all on 64-bit hardware, on 40x80 + screens): o AIX (51817 bytes) @@ -212,27 +213,27 @@Solaris
- As noted above, Solaris curses has no magic number corresponding to - SVr4 curses. This is odd since Solaris was the first operating system + As noted above, Solaris curses has no magic number corresponding to + SVr4 curses. This is odd since Solaris was the first operating system to pass the SVr4 guidelines. Solaris has two versions of curses: o The default curses library uses the SVr3 magic number. - o There is an alternate curses library in /usr/xpg4. This uses a + o There is an alternate curses library in /usr/xpg4. This uses a textual format with no magic number. - According to the copyright notice, the xpg4 Solaris curses library + According to the copyright notice, the xpg4 Solaris curses library was developed by MKS (Mortice Kern Systems) from 1990 to 1995. - Like ncurses6, there is a file-header with parameters. Unlike - ncurses6, the contents of the window are written piecemeal, with - coordinates and attributes for each chunk of text rather than writ- - ing the whole window from top to bottom. + Like ncurses6, there is a file-header with parameters. Unlike + ncurses6, the contents of the window are written piecemeal, with + coordinates and attributes for each chunk of text rather than + writing the whole window from top to bottom.PDCurses
- PDCurses added support for screen dumps in version 2.7 (2005). Like - Unix SystemV and ncurses5, it writes the WINDOW structure in binary, + PDCurses added support for screen dumps in version 2.7 (2005). Like + Unix SystemV and ncurses5, it writes the WINDOW structure in binary, but begins the file with its three-byte identifier "PDC", followed by a one-byte version, e.g., @@ -243,7 +244,7 @@ As of April 2017, NetBSD curses does not support scr_dump and scr_restore (or scr_init, scr_set), although it has putwin and getwin. - Like ncurses5, NetBSD putwin does not identify its dumps with a useful + Like ncurses5, NetBSD putwin does not identify its dumps with a useful magic number. It writes o the curses shared library major and minor versions as the first two @@ -251,14 +252,14 @@ o followed by a binary dump of the WINDOW, - o some data for wide-characters referenced by the WINDOW structure, + o some data for wide-characters referenced by the WINDOW structure, and o finally, lines as done by other implementations.EXAMPLE
- Given a simple program which writes text to the screen (and for the + Given a simple program which writes text to the screen (and for the sake of example, limiting the screen-size to 10x20): #include <curses.h> @@ -316,13 +317,13 @@ o The actual color pair values are not written to the file. - o All characters are shown in printable form; spaces are "\s" to + o All characters are shown in printable form; spaces are "\s" to ensure they are not overlooked. - o Attributes are written in escaped curly braces, e.g., "\{BOLD}", + o Attributes are written in escaped curly braces, e.g., "\{BOLD}", and may include a color-pair (C1 or C2 in this example). - o The parameters in the header are written out only if they are + o The parameters in the header are written out only if they are nonzero. When reading back, order does not matter. Running the same program with Solaris xpg4 curses gives this dump: @@ -361,13 +362,13 @@ 9,19,0,0, CUR=11,5 - Solaris getwin requires that all parameters are present, and in the - same order. The xpg4 curses library does not know about the bce (back + Solaris getwin requires that all parameters are present, and in the + same order. The xpg4 curses library does not know about the bce (back color erase) capability, and does not color the window background. - On the other hand, the SVr4 curses library does know about the back- - ground color. However, its screen dumps are in binary. Here is the - corresponding dump (using "od -t x1"): + On the other hand, the SVr4 curses library does know about the + background color. However, its screen dumps are in binary. Here is + the corresponding dump (using "od -t x1"): 0000000 1c 01 c3 d6 f3 58 05 00 0b 00 0a 00 14 00 00 00 0000020 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html index 8a785fc..0833c81 100644 --- a/doc/html/man/tabs.1.html +++ b/doc/html/man/tabs.1.html @@ -1,6 +1,6 @@ - @@ -63,20 +63,21 @@ stty tab0 Like clear(1), tabs writes to the standard output. You can redirect - the standard output to a file (which prevents tabs from actually chang- - ing the tabstops), and later cat the file to the screen, setting tab- - stops at that point. - - These are hardware tabs, which cannot be queried rapidly by applica- - tions running in the terminal, if at all. Curses and other full-screen - applications may use hardware tabs in optimizing their output to the - terminal. If the hardware tabstops differ from the information in the - terminal database, the result is unpredictable. Before running curses - programs, you should either reset tab-stops to the standard interval + the standard output to a file (which prevents tabs from actually + changing the tabstops), and later cat the file to the screen, setting + tabstops at that point. + + These are hardware tabs, which cannot be queried rapidly by + applications running in the terminal, if at all. Curses and other + full-screen applications may use hardware tabs in optimizing their + output to the terminal. If the hardware tabstops differ from the + information in the terminal database, the result is unpredictable. + Before running curses programs, you should either reset tab-stops to + the standard interval tabs -8 - or use the reset program, since the normal initialization sequences do + or use the reset program, since the normal initialization sequences do not ensure that tab-stops are reset. @@ -84,29 +85,29 @@General Options
-Tname - Tell tabs which terminal type to use. If this option is not - given, tabs will use the $TERM environment variable. If that is + Tell tabs which terminal type to use. If this option is not + given, tabs will use the $TERM environment variable. If that is not set, it will use the ansi+tabs entry. - -d The debugging option shows a ruler line, followed by two data - lines. The first data line shows the expected tab-stops marked - with asterisks. The second data line shows the actual tab-stops, + -d The debugging option shows a ruler line, followed by two data + lines. The first data line shows the expected tab-stops marked + with asterisks. The second data line shows the actual tab-stops, marked with asterisks. - -n This option tells tabs to check the options and run any debugging + -n This option tells tabs to check the options and run any debugging option, but not to modify the terminal settings. -V reports the version of ncurses which was used in this program, and exits. The tabs program processes a single list of tab stops. The last option - to be processed which defines a list is the one that determines the + to be processed which defines a list is the one that determines the list to be processed.Implicit Lists
- Use a single number as an option, e.g., "-5" to set tabs at the given - interval (in this case 1, 6, 11, 16, 21, etc.). Tabs are repeated up + Use a single number as an option, e.g., "-5" to set tabs at the given + interval (in this case 1, 6, 11, 16, 21, etc.). Tabs are repeated up to the right margin of the screen. Use "-0" to clear all tabs. @@ -115,15 +116,15 @@Explicit Lists
- An explicit list can be defined after the options (this does not use a - "-"). The values in the list must be in increasing numeric order, and - greater than zero. They are separated by a comma or a blank, for exam- - ple, + An explicit list can be defined after the options (this does not use a + "-"). The values in the list must be in increasing numeric order, and + greater than zero. They are separated by a comma or a blank, for + example, tabs 1,6,11,16,21 tabs 1 6 11 16 21 - Use a "+" to treat a number as an increment relative to the previous + Use a "+" to treat a number as an increment relative to the previous value, e.g., tabs 1,+5,+5,+5,+5 @@ -132,57 +133,102 @@Predefined Tab-Stops
- X/Open defines several predefined lists of tab stops. + POSIX defines several predefined lists of tab stops. -a Assembler, IBM S/370, first format + 1,10,16,36,72 -a2 Assembler, IBM S/370, second format + 1,10,16,40,72 -c COBOL, normal format + 1,8,12,16,20,55 -c2 COBOL compact format + 1,6,10,14,49 -c3 COBOL compact format extended + 1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67 -f FORTRAN + 1,7,11,15,19,23 -p PL/I + 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 -s SNOBOL + 1,10,55 -u UNIVAC 1100 Assembler + 1,12,20,44 + + +Margins
+ A few terminals provide the capability for changing their left/right + margins. The tabs program has an option to use this feature: + + +m margin + The effect depends on whether the terminal has the margin + capabilities: + + o If the terminal provides the capability for setting the left + margin, tabs uses this, and adjusts the available width for + tab-stops. + + o If the terminal does not provide the margin capabilities, tabs + imitates the effect, putting the tab stops at the appropriate + place on each line. The terminal's left-margin is not + modified. + + If the margin parameter is omitted, the default is 10. Use +m0 to + reset the left margin, i.e., to the left edge of the terminal's + display. Before setting a left-margin, tabs resets the margin to + reduce problems which might arise on moving the cursor before the + current left-margin. + + When setting or resetting the left-margin, tabs may reset the right- + margin.PORTABILITY
- IEEE Std 1003.1/The Open Group Base Specifications Issue 7 + IEEE Std 1003.1/The Open Group Base Specifications Issue 7 (POSIX.1-2008) describes a tabs utility. However - o This standard describes a +m option, to set a terminal's left-mar- - gin. Very few of the entries in the terminal database provide the - smgl (set_left_margin) or smglp (set_left_margin_parm) capability - needed to support the feature. + o This standard describes a +m option, to set a terminal's left- + margin. Very few of the entries in the terminal database provide + the smgl (set_left_margin) or smglp (set_left_margin_parm) + capability needed to support the feature. - o There is no counterpart in X/Open Curses Issue 7 for this utility, - unlike tput(1). + o There is no counterpart in X/Open Curses Issue 7 for this utility, + unlike tput(1). - The -d (debug) and -n (no-op) options are extensions not provided by + The -d (debug) and -n (no-op) options are extensions not provided by other implementations. - A tabs utility appeared in PWB/Unix 1.0 (1977). There was a reduced - version of the tabs utility in Unix 7th edition and in 3BSD (1979). - The latter supported a single "-n" option (to cause the first tab stop + A tabs utility appeared in PWB/Unix 1.0 (1977). There was a reduced + version of the tabs utility in Unix 7th edition and in 3BSD (1979). + The latter supported a single "-n" option (to cause the first tab stop to be set on the left margin). That option is not documented by POSIX. - The PWB/Unix tabs utility, which was included in System III (1980), - used built-in tables rather than the terminal database, to support a - half-dozen terminal types. It also had built-in logic to support the - left-margin, as well as a feature for copying the tab settings from a - file. - - Later versions of Unix, e.g., SVr4, added support for the terminal - database, but kept the tables, as a fallback. In an earlier develop- - ment effort, the tab-stop initialization provided by tset (1982) and - incorporated into tput uses the terminal database, + The PWB/Unix tabs utility, which was included in System III (1980), + used built-in tables rather than the terminal database, to support a + half-dozen hardcopy terminal (printer) types. It also had built-in + logic to support the left-margin, as well as a feature for copying the + tab settings from a file. + + Later versions of Unix, e.g., SVr4, added support for the terminal + database, but kept the tables to support the printers. In an earlier + development effort, the tab-stop initialization provided by tset (1982) + and incorporated into tput uses the terminal database, + + The +m option was documented in the Base Specifications Issue 5 + (Unix98, 1997), and omitted in Issue 6 (Unix03, 2004) without + documenting the rationale, though an introductory comment "and + optionally adjusts the margin" remains, overlooked in the removal. The + documented tabs utility in Issues 6 and later has no mechanism for + setting margins. The +m option in this implementation differs from the + feature in SVr4 by using terminal capabilities rather than built-in + tables. POSIX documents no limits on the number of tab stops. Documentation for other implementations states that there is a limit on the number of @@ -198,15 +244,15 @@ no known historical version of tabs supports the capability of setting arbitrary tab stops. - However, the Explicit Lists described in this manual page were imple- - mented in PWB/Unix. Those provide the capability of setting abitrary - tab stops. + However, the Explicit Lists described in this manual page were + implemented in PWB/Unix. Those provide the capability of setting + abitrary tab stops.SEE ALSO
- tset(1), infocmp(1m), curses(3x), terminfo(5). + infocmp(1m), tset(1), curses(3x), terminfo(5). - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). @@ -223,6 +269,7 @@Implicit Lists Explicit Lists Predefined Tab-Stops +Margins PORTABILITY diff --git a/doc/html/man/term.5.html b/doc/html/man/term.5.html index bc60a21..941c2d8 100644 --- a/doc/html/man/term.5.html +++ b/doc/html/man/term.5.html @@ -1,6 +1,6 @@ - @@ -65,108 +65,139 @@ A two-level scheme is used to avoid a linear search of a huge UNIX system directory: /usr/share/terminfo/c/name where name is the name of the terminal, and c is the first character of name. Thus, - act4 can be found in the file /usr/share/terminfo/a/act4. Syn- - onyms for the same terminal are implemented by multiple links to - the same compiled file. + act4 can be found in the file /usr/share/terminfo/a/act4. + Synonyms for the same terminal are implemented by multiple links + to the same compiled file. hashed database - Using Berkeley database, two types of records are stored: the ter- - minfo data in the same format as stored in a directory tree with - the terminfo's primary name as a key, and records containing only - aliases pointing to the primary name. + Using Berkeley database, two types of records are stored: the + terminfo data in the same format as stored in a directory tree + with the terminfo's primary name as a key, and records containing + only aliases pointing to the primary name. - If built to write hashed databases, ncurses can still read ter- - minfo databases organized as a directory tree, but cannot write + If built to write hashed databases, ncurses can still read + terminfo databases organized as a directory tree, but cannot write entries into the directory tree. It can write (or rewrite) entries in the hashed database. - ncurses distinguishes the two cases in the TERMINFO and TER- - MINFO_DIRS environment variable by assuming a directory tree for - entries that correspond to an existing directory, and hashed data- - base otherwise. + ncurses distinguishes the two cases in the TERMINFO and + TERMINFO_DIRS environment variable by assuming a directory tree + for entries that correspond to an existing directory, and hashed + database otherwise.LEGACY STORAGE FORMAT
The format has been chosen so that it will be the same on all hardware. - An 8 or more bit byte is assumed, but no assumptions about byte order- - ing or sign extension are made. + An 8 or more bit byte is assumed, but no assumptions about byte + ordering or sign extension are made. - The compiled file is created with the tic program, and read by the rou- - tine setupterm(3x). The file is divided into six parts: the header, - terminal names, boolean flags, numbers, strings, and string table. + The compiled file is created with the tic program, and read by the + routine setupterm(3x). The file is divided into six parts: - The header section begins the file. This section contains six short + a) header, + + b) terminal names, + + c) boolean flags, + + d) numbers, + + e) strings, and + + f) string table. + + The header section begins the file. This section contains six short integers in the format described below. These integers are - (1) the magic number (octal 0432); + (1) the magic number (octal 0432); + + (2) the size, in bytes, of the terminal names section; + + (3) the number of bytes in the boolean flags section; - (2) the size, in bytes, of the names section; + (4) the number of short integers in the numbers section; - (3) the number of bytes in the boolean section; + (5) the number of offsets (short integers) in the strings section; - (4) the number of short integers in the numbers section; + (6) the size, in bytes, of the string table. - (5) the number of offsets (short integers) in the strings section; + The capabilities in the boolean flags, numbers, and strings sections + are in the same order as the file <term.h>. - (6) the size, in bytes, of the string table. + Short integers are signed, in the range -32768 to 32767. They are + stored as two 8-bit bytes. The first byte contains the least + significant 8 bits of the value, and the second byte contains the most + significant 8 bits. (Thus, the value represented is 256*second+first.) + This format corresponds to the hardware of the VAX and PDP-11 (that is, + little-endian machines). Machines where this does not correspond to + the hardware must read the integers as two bytes and compute the + little-endian value. - Short integers are stored in two 8-bit bytes. The first byte contains - the least significant 8 bits of the value, and the second byte contains - the most significant 8 bits. (Thus, the value represented is 256*sec- - ond+first.) The value -1 is represented by the two bytes 0377, 0377; - other negative values are illegal. This value generally means that the - corresponding capability is missing from this terminal. Note that this - format corresponds to the hardware of the VAX and PDP-11 (that is, lit- - tle-endian machines). Machines where this does not correspond to the - hardware must read the integers as two bytes and compute the little- - endian value. + Numbers in a terminal description, whether they are entries in the + numbers or strings table, are positive integers. Boolean flags are + treated as positive one-byte integers. In each case, those positive + integers represent a terminal capability. The terminal compiler tic + uses negative integers to handle the cases where a capability is not + available: - The terminal names section comes next. It contains the first line of - the terminfo description, listing the various names for the terminal, - separated by the "|" character. The section is terminated with an - ASCII NUL character. + o If a capability is absent from this terminal, tic stores a -1 in + the corresponding table. - The boolean flags have one byte for each flag. This byte is either 0 - or 1 as the flag is present or absent. The capabilities are in the - same order as the file <term.h>. + The integer value -1 is represented by two bytes 0377, 0377. + Absent boolean values are represented by the byte 0 (false). - Between the boolean section and the number section, a null byte will be - inserted, if necessary, to ensure that the number section begins on an - even byte (this is a relic of the PDP-11's word-addressed architecture, - originally designed in to avoid IOT traps induced by addressing a word - on an odd byte boundary). All short integers are aligned on a short - word boundary. + o If a capability has been canceled from this terminal, tic stores a + -2 in the corresponding table. - The numbers section is similar to the flags section. Each capability - takes up two bytes, and is stored as a little-endian short integer. If - the value represented is -1, the capability is taken to be missing. + The integer value -2 is represented by two bytes 0377, 0376. + The boolean value -2 is represented by the byte 0376. - The strings section is also similar. Each capability is stored as a - short integer, in the format above. A value of -1 means the capability - is missing. Otherwise, the value is taken as an offset from the begin- - ning of the string table. Special characters in ^X or \c notation are - stored in their interpreted form, not the printing representation. - Padding information $<nn> and parameter information %x are stored - intact in uninterpreted form. + o Other negative values are illegal. - The final section is the string table. It contains all the values of - string capabilities referenced in the string section. Each string is - null terminated. + The terminal names section comes after the header. It contains the + first line of the terminfo description, listing the various names for + the terminal, separated by the "|" character. The terminal names + section is terminated with an ASCII NUL character. + + The boolean flags section has one byte for each flag. Boolean + capabilities are either 1 or 0 (true or false) according to whether the + terminal supports the given capability or not. + + Between the boolean flags section and the number section, a null byte + will be inserted, if necessary, to ensure that the number section + begins on an even byte This is a relic of the PDP-11's word-addressed + architecture, originally designed to avoid traps induced by addressing + a word on an odd byte boundary. All short integers are aligned on a + short word boundary. + + The numbers section is similar to the boolean flags section. Each + capability takes up two bytes, and is stored as a little-endian short + integer. + + The strings section is also similar. Each capability is stored as a + short integer. The capability value is an index into the string table. + + The string table is the last section. It contains all of the values of + string capabilities referenced in the strings section. Each string is + null-terminated. Special characters in ^X or \c notation are stored in + their interpreted form, not the printing representation. Padding + information $<nn> and parameter information %x are stored intact in + uninterpreted form.EXTENDED STORAGE FORMAT
The previous section describes the conventional terminfo binary format. - With some minor variations of the offsets (see PORTABILITY), the same - binary format is used in all modern UNIX systems. Each system uses a + With some minor variations of the offsets (see PORTABILITY), the same + binary format is used in all modern UNIX systems. Each system uses a predefined set of boolean, number or string capabilities. The ncurses libraries and applications support extended terminfo binary - format, allowing users to define capabilities which are loaded at run- - time. This extension is made possible by using the fact that the other - implementations stop reading the terminfo data when they have reached - the end of the size given in the header. ncurses checks the size, and - if it exceeds that due to the predefined data, continues to parse - according to its own scheme. + format, allowing users to define capabilities which are loaded at + runtime. This extension is made possible by using the fact that the + other implementations stop reading the terminfo data when they have + reached the end of the size given in the header. ncurses checks the + size, and if it exceeds that due to the predefined data, continues to + parse according to its own scheme. First, it reads the extended header (5 short integers): @@ -180,103 +211,103 @@ (5) size of the extended string table in bytes - The count- and size-values for the extended string table include the + The count- and size-values for the extended string table include the extended capability names as well as extended capability values. Using the counts and sizes, ncurses allocates arrays and reads data for the extended capabilities in the same order as the header information. - The extended string table contains values for string capabilities. - After the end of these values, it contains the names for each of the - extended capabilities in order, e.g., booleans, then numbers and + The extended string table contains values for string capabilities. + After the end of these values, it contains the names for each of the + extended capabilities in order, e.g., booleans, then numbers and finally strings. - Applications which manipulate terminal data can use the definitions - described in term_variables(3x) which associate the long capability + Applications which manipulate terminal data can use the definitions + described in term_variables(3x) which associate the long capability names with members of a TERMTYPE structure.EXTENDED NUMBER FORMAT
On occasion, 16-bit signed integers are not large enough. With ncurses - 6.1, a new format was introduced by making a few changes to the legacy + 6.1, a new format was introduced by making a few changes to the legacy format: o a different magic number (octal 01036) - o changing the type for the number array from signed 16-bit integers + o changing the type for the number array from signed 16-bit integers to signed 32-bit integers. - To maintain compatibility, the library presents the same data struc- - tures to direct users of the TERMTYPE structure as in previous formats. - However, that cannot provide callers with the extended numbers. The - library uses a similar but hidden data structure TERMTYPE2 to provide - data for the terminfo functions. + To maintain compatibility, the library presents the same data + structures to direct users of the TERMTYPE structure as in previous + formats. However, that cannot provide callers with the extended + numbers. The library uses a similar but hidden data structure + TERMTYPE2 to provide data for the terminfo functions.PORTABILITY
setupterm
- Note that it is possible for setupterm to expect a different set of - capabilities than are actually present in the file. Either the data- - base may have been updated since setupterm has been recompiled (result- - ing in extra unrecognized entries in the file) or the program may have - been recompiled more recently than the database was updated (resulting - in missing entries). The routine setupterm must be prepared for both - possibilities - this is why the numbers and sizes are included. Also, - new capabilities must always be added at the end of the lists of bool- - ean, number, and string capabilities. + Note that it is possible for setupterm to expect a different set of + capabilities than are actually present in the file. Either the + database may have been updated since setupterm was recompiled + (resulting in extra unrecognized entries in the file) or the program + may have been recompiled more recently than the database was updated + (resulting in missing entries). The routine setupterm must be prepared + for both possibilities - this is why the numbers and sizes are + included. Also, new capabilities must always be added at the end of + the lists of boolean, number, and string capabilities.Binary format
- X/Open Curses does not specify a format for the terminfo database. - UNIX System V curses used a directory-tree of binary files, one per + X/Open Curses does not specify a format for the terminfo database. + UNIX System V curses used a directory-tree of binary files, one per terminal description. - Despite the consistent use of little-endian for numbers and the other- - wise self-describing format, it is not wise to count on portability of - binary terminfo entries between commercial UNIX versions. The problem - is that there are at least three versions of terminfo (under HP-UX, - AIX, and OSF/1) which diverged from System V terminfo after SVr1, and - have added extension capabilities to the string table that (in the - binary format) collide with System V and XSI Curses extensions. See - terminfo(5) for detailed discussion of terminfo source compatibility - issues. - - This implementation is by default compatible with the binary terminfo - format used by Solaris curses, except in a few less-used details where - it was found that the latter did not match X/Open Curses. The format + Despite the consistent use of little-endian for numbers and the + otherwise self-describing format, it is not wise to count on + portability of binary terminfo entries between commercial UNIX + versions. The problem is that there are at least three versions of + terminfo (under HP-UX, AIX, and OSF/1) which diverged from System V + terminfo after SVr1, and have added extension capabilities to the + string table that (in the binary format) collide with System V and XSI + Curses extensions. See terminfo(5) for detailed discussion of terminfo + source compatibility issues. + + This implementation is by default compatible with the binary terminfo + format used by Solaris curses, except in a few less-used details where + it was found that the latter did not match X/Open Curses. The format used by the other Unix versions can be matched by building ncurses with different configuration options.Magic codes
- The magic number in a binary terminfo file is the first 16-bits (two - bytes). Besides making it more reliable for the library to check that - a file is terminfo, utilities such as file also use that to tell what - the file-format is. System V defined more than one magic number, with + The magic number in a binary terminfo file is the first 16-bits (two + bytes). Besides making it more reliable for the library to check that + a file is terminfo, utilities such as file also use that to tell what + the file-format is. System V defined more than one magic number, with 0433, 0435 as screen-dumps (see scr_dump(5)). This implementation uses - 01036 as a continuation of that sequence, but with a different high- + 01036 as a continuation of that sequence, but with a different high- order byte to avoid confusion.The TERMTYPE structure
- Direct access to the TERMTYPE structure is provided for legacy applica- - tions. Portable applications should use the tigetflag and related - functions described in curs_terminfo(3x) for reading terminal capabili- - ties. + Direct access to the TERMTYPE structure is provided for legacy + applications. Portable applications should use the tigetflag and + related functions described in curs_terminfo(3x) for reading terminal + capabilities.Mixed-case terminal names
- A small number of terminal descriptions use uppercase characters in - their names. If the underlying filesystem ignores the difference - between uppercase and lowercase, ncurses represents the "first charac- - ter" of the terminal name used as the intermediate level of a directory - tree in (two-character) hexadecimal form. + A small number of terminal descriptions use uppercase characters in + their names. If the underlying filesystem ignores the difference + between uppercase and lowercase, ncurses represents the "first + character" of the terminal name used as the intermediate level of a + directory tree in (two-character) hexadecimal form.EXAMPLE
- As an example, here is a description for the Lear-Siegler ADM-3, a pop- - ular though rather stupid early terminal: + As an example, here is a description for the Lear-Siegler ADM-3, a + popular though rather stupid early terminal: adm3a|lsi adm3a, am, @@ -316,17 +347,22 @@LIMITS
Some limitations: - o total compiled entries cannot exceed 4096 bytes in the legacy for- - mat. + o total compiled entries cannot exceed 4096 bytes in the legacy + format. - o total compiled entries cannot exceed 32768 bytes in the extended + o total compiled entries cannot exceed 32768 bytes in the extended format. o the name field cannot exceed 128 bytes. + Compiled entries are limited to 32768 bytes because offsets into the + strings table use two-byte integers. The legacy format could have + supported 32768-byte entries, but was limited a virtual memory page's + 4096 bytes. +FILES
- /usr/share/terminfo/*/* compiled terminal capability data base + /usr/share/terminfo/*/* compiled terminal capability databaseSEE ALSO
diff --git a/doc/html/man/term.7.html b/doc/html/man/term.7.html index a967141..e9d3512 100644 --- a/doc/html/man/term.7.html +++ b/doc/html/man/term.7.html @@ -1,6 +1,6 @@ - @@ -58,8 +58,8 @@ A default TERM value will be set on a per-line basis by either /etc/inittab (e.g., System-V-like UNIXes) or /etc/ttys (BSD UNIXes). - This will nearly always suffice for workstation and microcomputer con- - soles. + This will nearly always suffice for workstation and microcomputer + consoles. If you use a dialup line, the type of device attached to it may vary. Older UNIX systems pre-set a very dumb terminal type like "dumb" or @@ -69,10 +69,10 @@ Modern telnets pass your TERM environment variable from the local side to the remote one. There can be problems if the remote terminfo or - termcap entry for your type is not compatible with yours, but this sit- - uation is rare and can almost always be avoided by explicitly exporting - "vt100" (assuming you are in fact using a VT100-superset console, ter- - minal, or terminal emulator.) + termcap entry for your type is not compatible with yours, but this + situation is rare and can almost always be avoided by explicitly + exporting "vt100" (assuming you are in fact using a VT100-superset + console, terminal, or terminal emulator). In any case, you are free to override the system TERM setting to your taste in your shell profile. The tset(1) utility may be of assistance; @@ -90,10 +90,10 @@ toe | more - from your shell. These capability files are in a binary format opti- - mized for retrieval speed (unlike the old text-based termcap format - they replace); to examine an entry, you must use the infocmp(1m) com- - mand. Invoke it as follows: + from your shell. These capability files are in a binary format + optimized for retrieval speed (unlike the old text-based termcap format + they replace); to examine an entry, you must use the infocmp(1m) + command. Invoke it as follows: infocmp entry_name @@ -109,21 +109,21 @@ name field (if distinct from the first) is actually a description of the terminal type (it may contain blanks; the others must be single words). Name fields between the first and last (if present) are - aliases for the terminal, usually historical names retained for compat- - ibility. + aliases for the terminal, usually historical names retained for + compatibility. There are some conventions for how to choose terminal primary names that help keep them informative and unique. Here is a step-by-step guide to naming terminals that also explains how to parse them: - First, choose a root name. The root will consist of a lower-case let- - ter followed by up to seven lower-case letters or digits. You need to - avoid using punctuation characters in root names, because they are used - and interpreted as filenames and shell meta-characters (such as !, $, - *, ?, etc.) embedded in them may cause odd and unhelpful behavior. The - slash (/), or any other character that may be interpreted by anyone's - file system (\, $, [, ]), is especially dangerous (terminfo is plat- - form-independent, and choosing names with special characters could + First, choose a root name. The root will consist of a lower-case + letter followed by up to seven lower-case letters or digits. You need + to avoid using punctuation characters in root names, because they are + used and interpreted as filenames and shell meta-characters (such as !, + $, *, ?, etc.) embedded in them may cause odd and unhelpful behavior. + The slash (/), or any other character that may be interpreted by + anyone's file system (\, $, [, ]), is especially dangerous (terminfo is + platform-independent, and choosing names with special characters could someday make life difficult for users of a future port). The dot (.) character is relatively safe as long as there is at most one per root name; some historical terminfo names use it. @@ -144,18 +144,18 @@ or the console driver release level. The root name for a terminal emulator (assuming it does not fit one of - the standard ANSI or vt100 types) should be the program name or a read- - ily recognizable abbreviation of it (i.e., versaterm, ctrm). + the standard ANSI or vt100 types) should be the program name or a + readily recognizable abbreviation of it (i.e., versaterm, ctrm). Following the root name, you may add any reasonable number of hyphen- separated feature suffixes. 2p Has two pages of memory. Likewise 4p, 8p, etc. - mc Magic-cookie. Some terminals (notably older Wyses) can only sup- - port one attribute without magic-cookie lossage. Their base entry - is usually paired with another that has this suffix and uses magic - cookies to support multiple attributes. + mc Magic-cookie. Some terminals (notably older Wyses) can only + support one attribute without magic-cookie lossage. Their base + entry is usually paired with another that has this suffix and uses + magic cookies to support multiple attributes. -am Enable auto-margin (right-margin wraparound). @@ -191,8 +191,8 @@ Commands which use a terminal type to control display often accept a -T option that accepts a terminal name argument. Such programs should - fall back on the TERM environment variable when no -T option is speci- - fied. + fall back on the TERM environment variable when no -T option is + specified.PORTABILITY
@@ -202,7 +202,7 @@FILES
/usr/share/terminfo/?/* - compiled terminal capability data base + compiled terminal capability database /etc/inittab tty line initialization (AT&T-like UNIXes) diff --git a/doc/html/man/term_variables.3x.html b/doc/html/man/term_variables.3x.html index 8db8399..a61911b 100644 --- a/doc/html/man/term_variables.3x.html +++ b/doc/html/man/term_variables.3x.html @@ -1,4 +1,4 @@ - @@ -56,8 +56,8 @@DESCRIPTION
- The tic command translates a terminfo file from source format into com- - piled format. The compiled format is necessary for use with the + The tic command translates a terminfo file from source format into + compiled format. The compiled format is necessary for use with the library routines in ncurses(3x). As described in term(5), the database may be either a directory tree @@ -65,8 +65,8 @@ entry). The tic command writes only one type of entry, depending on how it was built: - o For directory trees, the top-level directory, e.g., /usr/share/ter- - minfo, specifies the location of the database. + o For directory trees, the top-level directory, e.g., + /usr/share/terminfo, specifies the location of the database. o For hashed databases, a filename is needed. If the given file is not found by that name, but can be found by adding the suffix @@ -75,25 +75,25 @@ The default name for the hashed database is the same as the default directory name (only adding a ".db" suffix). - In either case (directory or hashed database), tic will create the con- - tainer if it does not exist. For a directory, this would be the "ter- - minfo" leaf, versus a "terminfo.db" file. + In either case (directory or hashed database), tic will create the + container if it does not exist. For a directory, this would be the + "terminfo" leaf, versus a "terminfo.db" file. The results are normally placed in the system terminfo database /usr/share/terminfo. The compiled terminal description can be placed in a different terminfo database. There are two ways to achieve this: o First, you may override the system default either by using the -o - option, or by setting the variable TERMINFO in your shell environ- - ment to a valid database location. + option, or by setting the variable TERMINFO in your shell + environment to a valid database location. - o Secondly, if tic cannot write in /usr/share/terminfo or the loca- - tion specified using your TERMINFO variable, it looks for the + o Secondly, if tic cannot write in /usr/share/terminfo or the + location specified using your TERMINFO variable, it looks for the directory $HOME/.terminfo (or hashed database $HOME/.terminfo.db); if that location exists, the entry is placed there. - Libraries that read terminfo entries are expected to check in succes- - sion + Libraries that read terminfo entries are expected to check in + succession o a location specified with the TERMINFO environment variable, @@ -101,14 +101,13 @@ o directories listed in the TERMINFO_DIRS environment variable, - o a compiled-in list of directories (/usr/local/ncurses/share/ter- - minfo:/usr/share/terminfo), and + o a compiled-in list of directories (no default value), and o the system terminfo database (/usr/share/terminfo).ALIASES
- This is the same program as infotocap and captoinfo; usually those are + This is the same program as infotocap and captoinfo; usually those are linked to, or copied from this program: o When invoked as infotocap, tic sets the -I option. @@ -121,71 +120,71 @@ -1 restricts the output to a single column - -a tells tic to retain commented-out capabilities rather than dis- - carding them. Capabilities are commented by prefixing them with - a period. This sets the -x option, because it treats the com- - mented-out entries as user-defined names. If the source is - termcap, accept the 2-character names required by version 6. + -a tells tic to retain commented-out capabilities rather than + discarding them. Capabilities are commented by prefixing them + with a period. This sets the -x option, because it treats the + commented-out entries as user-defined names. If the source is + termcap, accept the 2-character names required by version 6. Otherwise these are ignored. - -C Force source translation to termcap format. Note: this differs - from the -C option of infocmp(1m) in that it does not merely + -C Force source translation to termcap format. Note: this differs + from the -C option of infocmp(1m) in that it does not merely translate capability names, but also translates terminfo strings - to termcap format. Capabilities that are not translatable are - left in the entry under their terminfo names but commented out - with two preceding dots. The actual format used incorporates - some improvements for escaped characters from terminfo format. + to termcap format. Capabilities that are not translatable are + left in the entry under their terminfo names but commented out + with two preceding dots. The actual format used incorporates + some improvements for escaped characters from terminfo format. For a stricter BSD-compatible translation, add the -K option. - If this is combined with -c, tic makes additional checks to - report cases where the terminfo values do not have an exact + If this is combined with -c, tic makes additional checks to + report cases where the terminfo values do not have an exact equivalent in termcap form. For example: - o sgr usually will not convert, because termcap lacks the - ability to work with more than two parameters, and because - termcap lacks many of the arithmetic/logical operators used + o sgr usually will not convert, because termcap lacks the + ability to work with more than two parameters, and because + termcap lacks many of the arithmetic/logical operators used in terminfo. - o capabilities with more than one delay or with delays before + o capabilities with more than one delay or with delays before the end of the string will not convert completely. - -c tells tic to only check file for errors, including syntax prob- - lems and bad use-links. If you specify -C (-I) with this - option, the code will print warnings about entries which, after - use resolution, are more than 1023 (4096) bytes long. Due to a + -c tells tic to only check file for errors, including syntax + problems and bad use-links. If you specify -C (-I) with this + option, the code will print warnings about entries which, after + use resolution, are more than 1023 (4096) bytes long. Due to a fixed buffer length in older termcap libraries, as well as buggy - checking for the buffer length (and a documented limit in ter- - minfo), these entries may cause core dumps with other implemen- - tations. + checking for the buffer length (and a documented limit in + terminfo), these entries may cause core dumps with other + implementations. - tic checks string capabilities to ensure that those with parame- - ters will be valid expressions. It does this check only for the - predefined string capabilities; those which are defined with the - -x option are ignored. + tic checks string capabilities to ensure that those with + parameters will be valid expressions. It does this check only + for the predefined string capabilities; those which are defined + with the -x option are ignored. - -D tells tic to print the database locations that it knows about, + -D tells tic to print the database locations that it knows about, and exit. The first location shown is the one to which it would - write compiled terminal descriptions. If tic is not able to - find a writable database location according to the rules summa- - rized above, it will print a diagnostic and exit with an error - rather than printing a list of database locations. + write compiled terminal descriptions. If tic is not able to + find a writable database location according to the rules + summarized above, it will print a diagnostic and exit with an + error rather than printing a list of database locations. -e names - Limit writes and translations to the following comma-separated - list of terminals. If any name or alias of a terminal matches - one of the names in the list, the entry will be written or + Limit writes and translations to the following comma-separated + list of terminals. If any name or alias of a terminal matches + one of the names in the list, the entry will be written or translated as normal. Otherwise no output will be generated for - it. The option value is interpreted as a file containing the - list if it contains a '/'. (Note: depending on how tic was com- - piled, this option may require -I or -C.) + it. The option value is interpreted as a file containing the + list if it contains a '/'. (Note: depending on how tic was + compiled, this option may require -I or -C.) - -f Display complex terminfo strings which contain + -f Display complex terminfo strings which contain if/then/else/endif expressions indented for readability. - -G Display constant literals in decimal form rather than their + -G Display constant literals in decimal form rather than their character equivalents. - -g Display constant character literals in quoted form rather than + -g Display constant character literals in quoted form rather than their decimal equivalents. -I Force source translation to terminfo format. @@ -193,25 +192,25 @@ -K Suppress some longstanding ncurses extensions to termcap format, e.g., "\s" for space. - -L Force source translation to terminfo format using the long C + -L Force source translation to terminfo format using the long C variable names listed in <term.h> -N Disable smart defaults. Normally, when translating from termcap - to terminfo, the compiler makes a number of assumptions about - the defaults of string capabilities reset1_string, car- - riage_return, cursor_left, cursor_down, scroll_forward, tab, + to terminfo, the compiler makes a number of assumptions about + the defaults of string capabilities reset1_string, + carriage_return, cursor_left, cursor_down, scroll_forward, tab, newline, key_backspace, key_left, and key_down, then attempts to - use obsolete termcap capabilities to deduce correct values. It + use obsolete termcap capabilities to deduce correct values. It also normally suppresses output of obsolete termcap capabilities - such as bs. This option forces a more literal translation that + such as bs. This option forces a more literal translation that also preserves the obsolete capabilities. - -odir Write compiled entries to given database location. Overrides + -odir Write compiled entries to given database location. Overrides the TERMINFO environment variable. - -Qn Rather than show source in terminfo (text) format, print the - compiled (binary) format in hexadecimal or base64 form, depend- - ing on the option's value: + -Qn Rather than show source in terminfo (text) format, print the + compiled (binary) format in hexadecimal or base64 form, + depending on the option's value: 1 hexadecimal @@ -223,35 +222,35 @@ source. -Rsubset - Restrict output to a given subset. This option is for use with - archaic versions of terminfo like those on SVr1, Ultrix, or - HP/UX that do not support the full set of SVR4/XSI Curses ter- - minfo; and outright broken ports like AIX 3.x that have their - own extensions incompatible with SVr4/XSI. Available subsets - are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see terminfo(5) for + Restrict output to a given subset. This option is for use with + archaic versions of terminfo like those on SVr1, Ultrix, or HP- + UX that do not support the full set of SVR4/XSI Curses terminfo; + and outright broken ports like AIX 3.x that have their own + extensions incompatible with SVr4/XSI. Available subsets are + "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see terminfo(5) for details. - -r Force entry resolution (so there are no remaining tc capabili- - ties) even when doing translation to termcap format. This may - be needed if you are preparing a termcap file for a termcap - library (such as GNU termcap through version 1.3 or BSD termcap - through 4.3BSD) that does not handle multiple tc capabilities - per entry. + -r Force entry resolution (so there are no remaining tc + capabilities) even when doing translation to termcap format. + This may be needed if you are preparing a termcap file for a + termcap library (such as GNU termcap through version 1.3 or BSD + termcap through 4.3BSD) that does not handle multiple tc + capabilities per entry. - -s Summarize the compile by showing the database location into - which entries are written, and the number of entries which are + -s Summarize the compile by showing the database location into + which entries are written, and the number of entries which are compiled. - -T eliminates size-restrictions on the generated text. This is - mainly useful for testing and analysis, since the compiled - descriptions are limited (e.g., 1023 for termcap, 4096 for ter- - minfo). + -T eliminates size-restrictions on the generated text. This is + mainly useful for testing and analysis, since the compiled + descriptions are limited (e.g., 1023 for termcap, 4096 for + terminfo). - -t tells tic to discard commented-out capabilities. Normally when - translating from terminfo to termcap, untranslatable capabili- - ties are commented-out. + -t tells tic to discard commented-out capabilities. Normally when + translating from terminfo to termcap, untranslatable + capabilities are commented-out. - -U tells tic to not post-process the data after parsing the source + -U tells tic to not post-process the data after parsing the source file. Normally, it infers data which is commonly missing in older terminfo data, or in termcaps. @@ -261,11 +260,11 @@ -vn specifies that (verbose) output be written to standard error trace information showing tic's progress. - The optional parameter n is a number from 1 to 10, inclusive, + The optional parameter n is a number from 1 to 10, inclusive, indicating the desired level of detail of information. If ncurses - is built without tracing support, the optional parameter is - ignored. If n is omitted, the default level is 1. If n is speci- - fied and greater than 1, the level of detail is increased. + is built without tracing support, the optional parameter is + ignored. If n is omitted, the default level is 1. If n is + specified and greater than 1, the level of detail is increased. The debug flag levels are as follows: @@ -285,68 +284,69 @@ If the debug level n is not given, it is taken to be one. - -W By itself, the -w option will not force long strings to be + -W By itself, the -w option will not force long strings to be wrapped. Use the -W option to do this. - If you specify both -f and -W options, the latter is ignored when + If you specify both -f and -W options, the latter is ignored when -f has already split the line. -wn specifies the width of the output. The parameter is optional. If it is omitted, it defaults to 60. - -x Treat unknown capabilities as user-defined (see user_caps(5)). - That is, if you supply a capability name which tic does not recog- - nize, it will infer its type (boolean, number or string) from the - syntax and make an extended table entry for that. User-defined - capability strings whose name begins with "k" are treated as func- - tion keys. + -x Treat unknown capabilities as user-defined (see user_caps(5)). + That is, if you supply a capability name which tic does not + recognize, it will infer its type (boolean, number or string) from + the syntax and make an extended table entry for that. User- + defined capability strings whose name begins with "k" are treated + as function keys.PARAMETERS
- file contains one or more terminfo terminal descriptions in source - format [see terminfo(5)]. Each description in the file + file contains one or more terminfo terminal descriptions in source + format [see terminfo(5)]. Each description in the file describes the capabilities of a particular terminal. - If file is "-", then the data is read from the standard input. + If file is "-", then the data is read from the standard input. The file parameter may also be the path of a character-device.PROCESSING
- All but one of the capabilities recognized by tic are documented in + All but one of the capabilities recognized by tic are documented in terminfo(5). The exception is the use capability. When a use=entry-name field is discovered in a terminal entry currently - being compiled, tic reads in the binary from /usr/share/terminfo to - complete the entry. (Entries created from file will be used first. - tic duplicates the capabilities in entry-name for the current entry, + being compiled, tic reads in the binary from /usr/share/terminfo to + complete the entry. (Entries created from file will be used first. + tic duplicates the capabilities in entry-name for the current entry, with the exception of those capabilities that explicitly are defined in the current entry. - When an entry, e.g., entry_name_1, contains a use=entry_name_2 field, - any canceled capabilities in entry_name_2 must also appear in - entry_name_1 before use= for these capabilities to be canceled in + When an entry, e.g., entry_name_1, contains a use=entry_name_2 field, + any canceled capabilities in entry_name_2 must also appear in + entry_name_1 before use= for these capabilities to be canceled in entry_name_1. Total compiled entries cannot exceed 4096 bytes. The name field cannot - exceed 512 bytes. Terminal names exceeding the maximum alias length + exceed 512 bytes. Terminal names exceeding the maximum alias length (32 characters on systems with long filenames, 14 characters otherwise) - will be truncated to the maximum alias length and a warning message + will be truncated to the maximum alias length and a warning message will be printed.HISTORY
- System V Release 2 provided a tic utility. It accepted a single - option: -v (optionally followed by a number). According to Ross + System V Release 2 provided a tic utility. It accepted a single + option: -v (optionally followed by a number). According to Ross Ridge's comment in mytinfo, this version of tic was unable to represent cancelled capabilities. - System V Release 3 provided a different tic utility, written by Pavel - Curtis, (originally named "compile" in pcurses). This added an option - -c to check the file for errors, with the caveat that errors in "use=" - links would not be reported. System V Release 3 documented a few warn- - ing messages which did not appear in pcurses. While the program itself - was changed little as development continued with System V Release 4, - the table of capabilities grew from 180 (pcurses) to 464 (Solaris). + System V Release 3 provided a different tic utility, written by Pavel + Curtis, (originally named "compile" in pcurses). This added an option + -c to check the file for errors, with the caveat that errors in "use=" + links would not be reported. System V Release 3 documented a few + warning messages which did not appear in pcurses. While the program + itself was changed little as development continued with System V + Release 4, the table of capabilities grew from 180 (pcurses) to 464 + (Solaris). In early development of ncurses (1993), Zeyd Ben-Halim used the table from mytinfo to extend the pcurses table to 469 capabilities (456 @@ -401,20 +401,20 @@ the -v option. The NetBSD tic program follows X/Open's documentation, omitting the -v option. - The X/Open rationale states that some implementations of tic read ter- - minal descriptions from the standard input if the file parameter is + The X/Open rationale states that some implementations of tic read + terminal descriptions from the standard input if the file parameter is omitted. None of these implementations do that. Further, it comments - that some may choose to read from "./terminfo.src" but that is obsoles- - cent behavior from SVr2, and is not (for example) a documented feature - of SVr3. + that some may choose to read from "./terminfo.src" but that is + obsolescent behavior from SVr2, and is not (for example) a documented + feature of SVr3.COMPATIBILITY
There is some evidence that historic tic implementations treated description fields with no whitespace in them as additional aliases or - short names. This tic does not do that, but it does warn when descrip- - tion fields may be treated that way and check them for dangerous char- - acters. + short names. This tic does not do that, but it does warn when + description fields may be treated that way and check them for dangerous + characters.EXTENSIONS
@@ -424,11 +424,11 @@ termcap names taken to be equivalent to terminfo names. The SVr4 manual pages are not clear on the resolution rules for use - capabilities. This implementation of tic will find use targets any- - where in the source file, or anywhere in the file tree rooted at TER- - MINFO (if TERMINFO is defined), or in the user's $HOME/.terminfo data- - base (if it exists), or (finally) anywhere in the system's file tree of - compiled entries. + capabilities. This implementation of tic will find use targets + anywhere in the source file, or anywhere in the file tree rooted at + TERMINFO (if TERMINFO is defined), or in the user's $HOME/.terminfo + database (if it exists), or (finally) anywhere in the system's file + tree of compiled entries. The error messages from this tic have the same format as GNU C error messages, and can be parsed by GNU Emacs's compile facility. @@ -458,10 +458,10 @@SEE ALSO
- infocmp(1m), captoinfo(1m), infotocap(1m), toe(1m), curses(3x), + captoinfo(1m), infocmp(1m), infotocap(1m), toe(1m), curses(3x), term(5). terminfo(5). user_caps(5). - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021).AUTHOR
diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html index 25d5ddf..e95dcd2 100644 --- a/doc/html/man/toe.1m.html +++ b/doc/html/man/toe.1m.html @@ -1,6 +1,6 @@ - @@ -57,17 +57,17 @@DESCRIPTION
With no options, toe lists all available terminal types by primary name with descriptions. File arguments specify the directories to be - scanned; if no such arguments are given, your default terminfo direc- - tory is scanned. If you also specify the -h option, a directory header - will be issued as each directory is entered. + scanned; if no such arguments are given, your default terminfo + directory is scanned. If you also specify the -h option, a directory + header will be issued as each directory is entered. There are other options intended for use by terminfo file maintainers: -a report on all of the terminal databases which ncurses would search, rather than only the first one that it finds. - If the -s is also given, toe adds a column to the report, show- - ing (like conflict(1)) which entries which belong to a given + If the -s is also given, toe adds a column to the report, + showing (like conflict(1)) which entries which belong to a given terminal database. An "*" marks entries which differ, and "+" marks equivalent entries. @@ -77,22 +77,22 @@ -s sort the output by the entry names. -u file - says to write a report to the standard output, listing dependen- - cies in the given terminfo/termcap source file. The report con- - denses the "use" relation: each line consists of the primary - name of a terminal that has use capabilities, followed by a - colon, followed by the whitespace-separated primary names of all - terminals which occur in those use capabilities, followed by a - newline + says to write a report to the standard output, listing + dependencies in the given terminfo/termcap source file. The + report condenses the "use" relation: each line consists of the + primary name of a terminal that has use capabilities, followed + by a colon, followed by the whitespace-separated primary names + of all terminals which occur in those use capabilities, followed + by a newline -U file says to write a report to the standard output, listing reverse dependencies in the given terminfo/termcap source file. The report reverses the "use" relation: each line consists of the - primary name of a terminal that occurs in use capabilities, fol- - lowed by a colon, followed by the whitespace-separated primary - names of all terminals which depend on it, followed by a new- - line. + primary name of a terminal that occurs in use capabilities, + followed by a colon, followed by the whitespace-separated + primary names of all terminals which depend on it, followed by a + newline. -vn specifies that (verbose) output be written to standard error, showing toe's progress. @@ -107,8 +107,8 @@EXAMPLES
Without sorting, the -a option reports all of the names found in all of - the terminal databases found by the TERMINFO and TERMINFO_DIRS environ- - ment variables: + the terminal databases found by the TERMINFO and TERMINFO_DIRS + environment variables: MtxOrb162 16x2 Matrix Orbital LCD display MtxOrb204 20x4 Matrix Orbital LCD display @@ -124,8 +124,8 @@ qansi-t QNX ansi without console writes . . . - Use the -a and -s options together to show where each terminal descrip- - tion was found: + Use the -a and -s options together to show where each terminal + description was found: --> /usr/local/ncurses/share/terminfo ----> /usr/share/terminfo @@ -168,10 +168,10 @@SEE ALSO
- tic(1m), infocmp(1m), captoinfo(1m), infotocap(1m), curses(3x), ter- - minfo(5). + captoinfo(1m), infocmp(1m), infotocap(1m), tic(1m), curses(3x), + terminfo(5). - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html index b6fe503..961edcb 100644 --- a/doc/html/man/tput.1.html +++ b/doc/html/man/tput.1.html @@ -1,7 +1,7 @@ - @@ -62,11 +62,11 @@DESCRIPTION
- The tput utility uses the terminfo database to make the values of ter- - minal-dependent capabilities and information available to the shell + The tput utility uses the terminfo database to make the values of + terminal-dependent capabilities and information available to the shell (see sh(1)), to initialize or reset the terminal, or return the long - name of the requested terminal type. The result depends upon the capa- - bility's type: + name of the requested terminal type. The result depends upon the + capability's type: string tput writes the string to the standard output. No trailing @@ -90,9 +90,9 @@Options
-S allows more than one capability per invocation of tput. The capabilities must be passed to tput from the standard input - instead of from the command line (see example). Only one cap- - name is allowed per line. The -S option changes the meaning of - the 0 and 1 boolean and string exit codes (see the EXIT CODES + instead of from the command line (see example). Only one + capname is allowed per line. The -S option changes the meaning + of the 0 and 1 boolean and string exit codes (see the EXIT CODES section). Because some capabilities may use string parameters rather than @@ -100,10 +100,10 @@ input to decide whether to use tparm(3x), and how to interpret the parameters. - -Ttype indicates the type of terminal. Normally this option is unnec- - essary, because the default is taken from the environment vari- - able TERM. If -T is specified, then the shell variables LINES - and COLUMNS will also be ignored. + -Ttype indicates the type of terminal. Normally this option is + unnecessary, because the default is taken from the environment + variable TERM. If -T is specified, then the shell variables + LINES and COLUMNS will also be ignored. -V reports the version of ncurses which was used in this program, and exits. @@ -116,15 +116,15 @@ A few commands (init, reset and longname) are special; they are defined by the tput program. The others are the names of capabilities from the terminal database (see terminfo(5) for a list). Although init and - reset resemble capability names, tput uses several capabilities to per- - form these special functions. + reset resemble capability names, tput uses several capabilities to + perform these special functions. capname indicates the capability from the terminal database. - If the capability is a string that takes parameters, the argu- - ments following the capability will be used as parameters for - the string. + If the capability is a string that takes parameters, the + arguments following the capability will be used as parameters + for the string. Most parameters are numbers. Only a few terminal capabilities require string parameters; tput uses a table to decide which to @@ -146,14 +146,14 @@ o ultimately "/dev/tty" - to obtain terminal settings. Having retrieved these set- - tings, tput remembers which file descriptor to use when + to obtain terminal settings. Having retrieved these + settings, tput remembers which file descriptor to use when updating settings. (2) if the window size cannot be obtained from the operating system, but the terminal description (or environment, e.g., - LINES and COLUMNS variables specify this), update the oper- - ating system's notion of the window size. + LINES and COLUMNS variables specify this), update the + operating system's notion of the window size. (3) the terminal modes will be updated: @@ -189,11 +189,11 @@ o reset any unset special characters to their default values - (2) Instead of putting out initialization strings, the termi- - nal's reset strings will be output if present (rs1, rs2, - rs3, rf). If the reset strings are not present, but ini- - tialization strings are, the initialization strings will be - output. + (2) Instead of putting out initialization strings, the + terminal's reset strings will be output if present (rs1, + rs2, rs3, rf). If the reset strings are not present, but + initialization strings are, the initialization strings will + be output. Otherwise, reset acts identically to init. @@ -201,8 +201,8 @@ If the terminal database is present and an entry for the user's terminal exists (see -Ttype above), then the long name of the terminal will be put out. The long name is the last name in the - first line of the terminal's description in the terminfo data- - base [see term(5)]. + first line of the terminal's description in the terminfo + database [see term(5)].Aliases
@@ -210,8 +210,8 @@ for the possibility that it is invoked by a link with those names. If tput is invoked by a link named reset, this has the same effect as - tput reset. The tset(1) utility also treats a link named reset spe- - cially. + tput reset. The tset(1) utility also treats a link named reset + specially. Before ncurses 6.1, the two utilities were different from each other: @@ -220,8 +220,8 @@ o On the other hand, tset's repertoire of terminal capabilities for resetting the terminal was more limited, i.e., only reset_1string, - reset_2string and reset_file in contrast to the tab-stops and mar- - gins which are set by this utility. + reset_2string and reset_file in contrast to the tab-stops and + margins which are set by this utility. o The reset program is usually an alias for tset, because of this difference with resetting terminal modes and special characters. @@ -229,17 +229,17 @@ With the changes made for ncurses 6.1, the reset feature of the two programs is (mostly) the same. A few differences remain: - o The tset program waits one second when resetting, in case it hap- - pens to be a hardware terminal. + o The tset program waits one second when resetting, in case it + happens to be a hardware terminal. - o The two programs write the terminal initialization strings to dif- - ferent streams (i.e., the standard error for tset and the standard - output for tput). + o The two programs write the terminal initialization strings to + different streams (i.e., the standard error for tset and the + standard output for tput). - Note: although these programs write to different streams, redirect- - ing their output to a file will capture only part of their actions. - The changes to the terminal modes are not affected by redirecting - the output. + Note: although these programs write to different streams, + redirecting their output to a file will capture only part of their + actions. The changes to the terminal modes are not affected by + redirecting the output. If tput is invoked by a link named init, this has the same effect as tput init. Again, you are less likely to use that link because another @@ -247,8 +247,8 @@Terminal Size
- Besides the special commands (e.g., clear), tput treats certain ter- - minfo capabilities specially: lines and columns. tput calls + Besides the special commands (e.g., clear), tput treats certain + terminfo capabilities specially: lines and cols. tput calls setupterm(3x) to obtain the terminal size: o first, it gets the size from the terminal database (which generally @@ -294,9 +294,9 @@ bold=`tput smso` offbold=`tput rmso` Set the shell variables bold, to begin stand-out mode sequence, - and offbold, to end standout mode sequence, for the current termi- - nal. This might be followed by a prompt: echo "${bold}Please type - in your name: ${offbold}\c" + and offbold, to end standout mode sequence, for the current + terminal. This might be followed by a prompt: echo "${bold}Please + type in your name: ${offbold}\c" tput hc Set exit code to indicate if the current terminal is a hard copy @@ -321,8 +321,8 @@ This example shows tput processing several capabilities in one invocation. It clears the screen, moves the cursor to position - 10, 10 and turns on bold (extra bright) mode. The list is termi- - nated by an exclamation mark (!) on a line by itself. + 10, 10 and turns on bold (extra bright) mode. The list is + terminated by an exclamation mark (!) on a line by itself.FILES
@@ -342,16 +342,16 @@ lines with errors. If no errors are found, the exit code is 0. No indication of which line failed can be given so exit code 1 will never appear. Exit codes 2, 3, and 4 retain their usual interpretation. If - the -S option is not used, the exit code depends on the type of cap- - name: + the -S option is not used, the exit code depends on the type of + capname: boolean a value of 0 is set for TRUE and 1 for FALSE. - string a value of 0 is set if the capname is defined for this termi- - nal type (the value of capname is returned on standard out- - put); a value of 1 is set if capname is not defined for this - terminal type (nothing is written to standard output). + string a value of 0 is set if the capname is defined for this + terminal type (the value of capname is returned on standard + output); a value of 1 is set if capname is not defined for + this terminal type (nothing is written to standard output). integer a value of 0 is always set, whether or not capname is defined @@ -374,7 +374,7 @@ --------------------------------------------------------------------- 0 (capname is a numeric variable that is not specified in the terminfo(5) database for this terminal type, e.g. - tput -T450 lines and tput -T2621 xmc) + tput -T450 lines and tput -Thp2621 xmc) 1 no error message is printed, see the EXIT CODES section. 2 usage error 3 unknown terminal type or no terminfo database @@ -387,51 +387,62 @@ The tput command was begun by Bill Joy in 1980. The initial version only cleared the screen. - AT&T System V provided a different tput command, whose init and reset - subcommands (more than half the program) were incorporated from the - reset feature of BSD tset written by Eric Allman. + AT&T System V provided a different tput command: - Keith Bostic replaced the BSD tput command in 1989 with a new implemen- - tation based on the AT&T System V program tput. Like the AT&T program, - Bostic's version accepted some parameters named for terminfo capabili- - ties (clear, init, longname and reset). However (because he had only - termcap available), it accepted termcap names for other capabilities. - Also, Bostic's BSD tput did not modify the terminal I/O modes as the - earlier BSD tset had done. + o SVr2 provided a rudimentary tput which checked the parameter + against each predefined capability and returned the corresponding + value. This version of tput did not use tparm(3x) for the + capabilities which are parameterized. + + o SVr3 replaced that, a year later, by a more extensive program whose + init and reset subcommands (more than half the program) were + incorporated from the reset feature of BSD tset written by Eric + Allman. + + o SVr4 added color initialization using the orig_colors and + orig_pairs capabilities in the init subcommand. + + Keith Bostic replaced the BSD tput command in 1989 with a new + implementation based on the AT&T System V program tput. Like the AT&T + program, Bostic's version accepted some parameters named for terminfo + capabilities (clear, init, longname and reset). However (because he + had only termcap available), it accepted termcap names for other + capabilities. Also, Bostic's BSD tput did not modify the terminal I/O + modes as the earlier BSD tset had done. At the same time, Bostic added a shell script named "clear", which used tput to clear the screen. - Both of these appeared in 4.4BSD, becoming the "modern" BSD implementa- - tion of tput. + Both of these appeared in 4.4BSD, becoming the "modern" BSD + implementation of tput. - This implementation of tput began from a different source than AT&T or - BSD: Ross Ridge's mytinfo package, published on comp.sources.unix in - December 1992. Ridge's program made more sophisticated use of the ter- - minal capabilities than the BSD program. Eric Raymond used that tput - program (and other parts of mytinfo) in ncurses in June 1995. Using - the portions dealing with terminal capabilities almost without change, - Raymond made improvements to the way the command-line parameters were - handled. + This implementation of tput began from a different source than AT&T or + BSD: Ross Ridge's mytinfo package, published on comp.sources.unix in + December 1992. Ridge's program made more sophisticated use of the + terminal capabilities than the BSD program. Eric Raymond used that + tput program (and other parts of mytinfo) in ncurses in June 1995. + Using the portions dealing with terminal capabilities almost without + change, Raymond made improvements to the way the command-line + parameters were handled.PORTABILITY
- This implementation of tput differs from AT&T tput in two important + This implementation of tput differs from AT&T tput in two important areas: - o tput capname writes to the standard output. That need not be a - regular terminal. However, the subcommands which manipulate termi- - nal modes may not use the standard output. + o tput capname writes to the standard output. That need not be a + regular terminal. However, the subcommands which manipulate + terminal modes may not use the standard output. - The AT&T implementation's init and reset commands use the BSD - (4.1c) tset source, which manipulates terminal modes. It succes- - sively tries standard output, standard error, standard input before - falling back to "/dev/tty" and finally just assumes a 1200Bd termi- - nal. When updating terminal modes, it ignores errors. + The AT&T implementation's init and reset commands use the BSD + (4.1c) tset source, which manipulates terminal modes. It + successively tries standard output, standard error, standard input + before falling back to "/dev/tty" and finally just assumes a 1200Bd + terminal. When updating terminal modes, it ignores errors. - Until changes made after ncurses 6.0, tput did not modify terminal + Until changes made after ncurses 6.0, tput did not modify terminal modes. tput now uses a similar scheme, using functions shared with - tset (and ultimately based on the 4.4BSD tset). If it is not able + tset (and ultimately based on the 4.4BSD tset). If it is not able to open a terminal, e.g., when running in cron, tput will return an error. @@ -439,50 +450,61 @@ of the characters are numeric, or not. Most implementations which provide support for capname operands use - the tparm function to expand parameters in it. That function - expects a mixture of numeric and string parameters, requiring tput + the tparm function to expand parameters in it. That function + expects a mixture of numeric and string parameters, requiring tput to know which type to use. - This implementation uses a table to determine the parameter types + This implementation uses a table to determine the parameter types for the standard capname operands, and an internal library function to analyze nonstandard capname operands. - This implementation (unlike others) can accept both termcap and ter- - minfo names for the capname feature, if termcap support is compiled in. - However, the predefined termcap and terminfo names have two ambiguities - in this case (and the terminfo name is assumed): + Besides providing more reliable operation than AT&T's utility, a + portability problem is introduced by this analysis: An OpenBSD + developer adapted the internal library function from ncurses to + port NetBSD's termcap-based tput to terminfo. That had been + modified to interpret multiple commands on a line. Portable + applications should not rely upon this feature; ncurses provides it + to support applications written specifically for OpenBSD. - o The termcap name dl corresponds to the terminfo name dl1 (delete + This implementation (unlike others) can accept both termcap and + terminfo names for the capname feature, if termcap support is compiled + in. However, the predefined termcap and terminfo names have two + ambiguities in this case (and the terminfo name is assumed): + + o The termcap name dl corresponds to the terminfo name dl1 (delete one line). - The terminfo name dl corresponds to the termcap name DL (delete a + The terminfo name dl corresponds to the termcap name DL (delete a given number of lines). - o The termcap name ed corresponds to the terminfo name rmdc (end + o The termcap name ed corresponds to the terminfo name rmdc (end delete mode). - The terminfo name ed corresponds to the termcap name cd (clear to + The terminfo name ed corresponds to the termcap name cd (clear to end of screen). - The longname and -S options, and the parameter-substitution features - used in the cup example, were not supported in BSD curses before + The longname and -S options, and the parameter-substitution features + used in the cup example, were not supported in BSD curses before 4.3reno (1989) or in AT&T/USL curses before SVr4 (1988). - IEEE Std 1003.1/The Open Group Base Specifications Issue 7 - (POSIX.1-2008) documents only the operands for clear, init and reset. + IEEE Std 1003.1/The Open Group Base Specifications Issue 7 + (POSIX.1-2008) documents only the operands for clear, init and reset. There are a few interesting observations to make regarding that: - o In this implementation, clear is part of the capname support. The - others (init and longname) do not correspond to terminal capabili- - ties. + o In this implementation, clear is part of the capname support. The + others (init and longname) do not correspond to terminal + capabilities. o Other implementations of tput on SVr4-based systems such as - Solaris, IRIX64 and HPUX as well as others such as AIX and Tru64 + Solaris, IRIX64 and HPUX as well as others such as AIX and Tru64 provide support for capname operands. o A few platforms such as FreeBSD recognize termcap names rather than terminfo capability names in their respective tput commands. Since - 2010, NetBSD's tput uses terminfo names. Before that, it (like + 2010, NetBSD's tput uses terminfo names. Before that, it (like FreeBSD) recognized termcap names. + Beginning in 2021, FreeBSD uses the ncurses tput, configured for + both terminfo (tested first) and termcap (as a fallback). + Because (apparently) all of the certified Unix systems support the full set of capability names, the reasoning for documenting only a few may not be apparent. @@ -492,24 +514,24 @@ o That is, there are two standards for tput: POSIX (a subset) and X/Open Curses (the full implementation). POSIX documents a subset - to avoid the complication of including X/Open Curses and the termi- - nal capabilities database. + to avoid the complication of including X/Open Curses and the + terminal capabilities database. o While it is certainly possible to write a tput program without - using curses, none of the systems which have a curses implementa- - tion provide a tput utility which does not provide the capname fea- - ture. + using curses, none of the systems which have a curses + implementation provide a tput utility which does not provide the + capname feature. - X/Open Curses Issue 7 (2009) is the first version to document utili- - ties. However that part of X/Open Curses does not follow existing + X/Open Curses Issue 7 (2009) is the first version to document + utilities. However that part of X/Open Curses does not follow existing practice (i.e., Unix features documented in SVID 3): o It assigns exit code 4 to "invalid operand", which may be the same as unknown capability. For instance, the source code for Solaris' xcurses uses the term "invalid" in this case. - o It assigns exit code 255 to a numeric variable that is not speci- - fied in the terminfo database. That likely is a documentation + o It assigns exit code 255 to a numeric variable that is not + specified in the terminfo database. That likely is a documentation error, confusing the -1 written to the standard output for an absent or cancelled numeric value versus an (unsigned) exit code. @@ -521,9 +543,9 @@SEE ALSO
- clear(1), stty(1), tabs(1), tset(1), terminfo(5), curs_termcap(3x). + clear(1), stty(1), tabs(1), tset(1), curs_termcap(3x), terminfo(5). - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html index 2b77410..920ff01 100644 --- a/doc/html/man/tset.1.html +++ b/doc/html/man/tset.1.html @@ -1,6 +1,6 @@ - @@ -60,8 +60,8 @@tset - initialization
This program initializes terminals. - First, tset retrieves the current terminal mode settings for your ter- - minal. It does this by successively testing + First, tset retrieves the current terminal mode settings for your + terminal. It does this by successively testing o the standard error, @@ -90,30 +90,30 @@ If the terminal type was not specified on the command-line, the -m option mappings are then applied (see the section TERMINAL TYPE MAPPING - for more information). Then, if the terminal type begins with a ques- - tion mark ("?"), the user is prompted for confirmation of the terminal - type. An empty response confirms the type, or, another type can be - entered to specify a new type. Once the terminal type has been deter- - mined, the terminal description for the terminal is retrieved. If no - terminal description is found for the type, the user is prompted for + for more information). Then, if the terminal type begins with a + question mark ("?"), the user is prompted for confirmation of the + terminal type. An empty response confirms the type, or, another type + can be entered to specify a new type. Once the terminal type has been + determined, the terminal description for the terminal is retrieved. If + no terminal description is found for the type, the user is prompted for another terminal type. Once the terminal description is retrieved, - o if the "-w" option is enabled, tset may update the terminal's win- - dow size. + o if the "-w" option is enabled, tset may update the terminal's + window size. If the window size cannot be obtained from the operating system, - but the terminal description (or environment, e.g., LINES and COL- - UMNS variables specify this), use this to set the operating sys- - tem's notion of the window size. + but the terminal description (or environment, e.g., LINES and + COLUMNS variables specify this), use this to set the operating + system's notion of the window size. o if the "-c" option is enabled, the backspace, interrupt and line kill characters (among many other things) are set - o unless the "-I" option is enabled, the terminal and tab initializa- - tion strings are sent to the standard error output, and tset waits - one second (in case a hardware reset was issued). + o unless the "-I" option is enabled, the terminal and tab + initialization strings are sent to the standard error output, and + tset waits one second (in case a hardware reset was issued). o Finally, if the erase, interrupt and line kill characters have changed, or are not set to their default values, their values are @@ -154,21 +154,25 @@ -c Set control characters and modes. - -e Set the erase character to ch. + -e ch + Set the erase character to ch. - -I Do not send the terminal or tab initialization strings to the ter- - minal. + -I Do not send the terminal or tab initialization strings to the + terminal. - -i Set the interrupt character to ch. + -i ch + Set the interrupt character to ch. - -k Set the line kill character to ch. + -k ch + Set the line kill character to ch. - -m Specify a mapping from a port type to a terminal. See the section + -m mapping + Specify a mapping from a port type to a terminal. See the section TERMINAL TYPE MAPPING for more information. -Q Do not display any values for the erase, interrupt and line kill - characters. Normally tset displays the values for control charac- - ters which differ from the system's default values. + characters. Normally tset displays the values for control + characters which differ from the system's default values. -q The terminal type is displayed to the standard output, and the terminal is not initialized in any way. The option "-" by itself @@ -210,8 +214,8 @@TERMINAL TYPE MAPPING
- When the terminal is not hardwired into the system (or the current sys- - tem information is incorrect) the terminal type derived from the + When the terminal is not hardwired into the system (or the current + system information is incorrect) the terminal type derived from the /etc/ttys file or the TERM environmental variable is often something generic like network, dialup, or unknown. When tset is used in a startup script it is often desirable to provide information about the @@ -224,18 +228,18 @@ The argument to the -m option consists of an optional port type, an optional operator, an optional baud rate specification, an optional colon (":") character and a terminal type. The port type is a string - (delimited by either the operator or the colon character). The opera- - tor may be any combination of ">", "<", "@", and "!"; ">" means greater - than, "<" means less than, "@" means equal to and "!" inverts the sense - of the test. The baud rate is specified as a number and is compared - with the speed of the standard error output (which should be the con- - trol terminal). The terminal type is a string. - - If the terminal type is not specified on the command line, the -m map- - pings are applied to the terminal type. If the port type and baud rate - match the mapping, the terminal type specified in the mapping replaces - the current type. If more than one mapping is specified, the first - applicable mapping is used. + (delimited by either the operator or the colon character). The + operator may be any combination of ">", "<", "@", and "!"; ">" means + greater than, "<" means less than, "@" means equal to and "!" inverts + the sense of the test. The baud rate is specified as a number and is + compared with the speed of the standard error output (which should be + the control terminal). The terminal type is a string. + + If the terminal type is not specified on the command line, the -m + mappings are applied to the terminal type. If the port type and baud + rate match the mapping, the terminal type specified in the mapping + replaces the current type. If more than one mapping is specified, the + first applicable mapping is used. For example, consider the following mapping: dialup>9600:vt100. The port type is dialup , the operator is >, the baud rate specification is @@ -254,32 +258,26 @@ No whitespace characters are permitted in the -m option argument. Also, to avoid problems with meta-characters, it is suggested that the entire -m option argument be placed within single quote characters, and - that csh users insert a backslash character ("\") before any exclama- - tion marks ("!"). + that csh users insert a backslash character ("\") before any + exclamation marks ("!").HISTORY
- A reset command appeared in 2BSD (April 1979), written by Kurt Shoens. + A reset command appeared in 1BSD (March 1978), written by Kurt Shoens. This program set the erase and kill characters to ^H (backspace) and @ respectively. Mark Horton improved that in 3BSD (October 1979), adding - intr, quit, start/stop and eof characters as well as changing the pro- - gram to avoid modifying any user settings. + intr, quit, start/stop and eof characters as well as changing the + program to avoid modifying any user settings. That version of reset + did not use the termcap database. - Later in 4.1BSD (December 1980), Mark Horton added a call to the tset - program using the -I and -Q options, i.e., using that to improve the - terminal modes. With those options, that version of reset did not use - the termcap database. + A separate tset command was provided in 1BSD by Eric Allman, using the + termcap database. Allman's comments in the source code indicate that + he began work in October 1977, continuing development over the next few + years. - A separate tset command was provided in 2BSD by Eric Allman. While the - oldest published source (from 1979) provides both tset and reset, All- - man's comments in the 2BSD source code indicate that he began work in - October 1977, continuing development over the next few years. - - In September 1980, Eric Allman modified tset, adding the code from the - existing "reset" feature when tset was invoked as reset. Rather than - simply copying the existing program, in this merged version, tset used - the termcap database to do additional (re)initialization of the termi- - nal. This version appeared in 4.1cBSD, late in 1982. + According to comments in the source code, the tset program was modified + in September 1980, to use logic copied from the 3BSD "reset" when it + was invoked as reset. This version appeared in 4.1cBSD, late in 1982. Other developers (e.g., Keith Bostic and Jim Bloom) continued to modify tset until 4.4BSD was released in 1993. @@ -294,71 +292,72 @@ The AT&T tput utility (AIX, HPUX, Solaris) incorporated the terminal- mode manipulation as well as termcap-based features such as resetting - tabstops from tset in BSD (4.1c), presumably with the intention of mak- - ing tset obsolete. However, each of those systems still provides tset. - In fact, the commonly-used reset utility is always an alias for tset. - - The tset utility provides for backward-compatibility with BSD environ- - ments (under most modern UNIXes, /etc/inittab and getty(1) can set TERM - appropriately for each dial-up line; this obviates what was tset's most - important use). This implementation behaves like 4.4BSD tset, with a - few exceptions specified here. - - A few options are different because the TERMCAP variable is no longer + tabstops from tset in BSD (4.1c), presumably with the intention of + making tset obsolete. However, each of those systems still provides + tset. In fact, the commonly-used reset utility is always an alias for + tset. + + The tset utility provides for backward-compatibility with BSD + environments (under most modern UNIXes, /etc/inittab and getty(1) can + set TERM appropriately for each dial-up line; this obviates what was + tset's most important use). This implementation behaves like 4.4BSD + tset, with a few exceptions specified here. + + A few options are different because the TERMCAP variable is no longer supported under terminfo-based ncurses: - o The -S option of BSD tset no longer works; it prints an error mes- - sage to the standard error and dies. + o The -S option of BSD tset no longer works; it prints an error + message to the standard error and dies. o The -s option only sets TERM, not TERMCAP. - There was an undocumented 4.4BSD feature that invoking tset via a link - named "TSET" (or via any other name beginning with an upper-case let- - ter) set the terminal to use upper-case only. This feature has been + There was an undocumented 4.4BSD feature that invoking tset via a link + named "TSET" (or via any other name beginning with an upper-case + letter) set the terminal to use upper-case only. This feature has been omitted. The -A, -E, -h, -u and -v options were deleted from the tset utility in - 4.4BSD. None of them were documented in 4.3BSD and all are of limited - utility at best. The -a, -d, and -p options are similarly not docu- - mented or useful, but were retained as they appear to be in widespread - use. It is strongly recommended that any usage of these three options - be changed to use the -m option instead. The -a, -d, and -p options - are therefore omitted from the usage summary above. - - Very old systems, e.g., 3BSD, used a different terminal driver which - was replaced in 4BSD in the early 1980s. To accommodate these older - systems, the 4BSD tset provided a -n option to specify that the new - terminal driver should be used. This implementation does not provide + 4.4BSD. None of them were documented in 4.3BSD and all are of limited + utility at best. The -a, -d, and -p options are similarly not + documented or useful, but were retained as they appear to be in + widespread use. It is strongly recommended that any usage of these + three options be changed to use the -m option instead. The -a, -d, and + -p options are therefore omitted from the usage summary above. + + Very old systems, e.g., 3BSD, used a different terminal driver which + was replaced in 4BSD in the early 1980s. To accommodate these older + systems, the 4BSD tset provided a -n option to specify that the new + terminal driver should be used. This implementation does not provide that choice. - It is still permissible to specify the -e, -i, and -k options without + It is still permissible to specify the -e, -i, and -k options without arguments, although it is strongly recommended that such usage be fixed to explicitly specify the character. - As of 4.4BSD, executing tset as reset no longer implies the -Q option. + As of 4.4BSD, executing tset as reset no longer implies the -Q option. Also, the interaction between the - option and the terminal argument in some historic implementations of tset has been removed. - The -c and -w options are not found in earlier implementations. How- - ever, a different window size-change feature was provided in 4.4BSD. + The -c and -w options are not found in earlier implementations. + However, a different window size-change feature was provided in 4.4BSD. - o In 4.4BSD, tset uses the window size from the termcap description - to set the window size if tset is not able to obtain the window + o In 4.4BSD, tset uses the window size from the termcap description + to set the window size if tset is not able to obtain the window size from the operating system. o In ncurses, tset obtains the window size using setupterm, which may - be from the operating system, the LINES and COLUMNS environment + be from the operating system, the LINES and COLUMNS environment variables or the terminal description. - Obtaining the window size from the terminal description is common to - both implementations, but considered obsolescent. Its only practical + Obtaining the window size from the terminal description is common to + both implementations, but considered obsolescent. Its only practical use is for hardware terminals. Generally speaking, a window size would - be unset only if there were some problem obtaining the value from the - operating system (and setupterm would still fail). For that reason, - the LINES and COLUMNS environment variables may be useful for working - around window-size problems. Those have the drawback that if the win- - dow is resized, those variables must be recomputed and reassigned. To - do this more easily, use the resize(1) program. + be unset only if there were some problem obtaining the value from the + operating system (and setupterm would still fail). For that reason, + the LINES and COLUMNS environment variables may be useful for working + around window-size problems. Those have the drawback that if the + window is resized, those variables must be recomputed and reassigned. + To do this more easily, use the resize(1) program.ENVIRONMENT
@@ -367,19 +366,19 @@ SHELL tells tset whether to initialize TERM using sh or csh syntax. - TERM Denotes your terminal type. Each terminal type is distinct, + TERM Denotes your terminal type. Each terminal type is distinct, though many are similar. TERMCAP - may denote the location of a termcap database. If it is not an - absolute pathname, e.g., begins with a "/", tset removes the vari- - able from the environment before looking for the terminal descrip- - tion. + may denote the location of a termcap database. If it is not an + absolute pathname, e.g., begins with a "/", tset removes the + variable from the environment before looking for the terminal + description.FILES
/etc/ttys - system port name to terminal type mapping database (BSD versions + system port name to terminal type mapping database (BSD versions only). /usr/share/terminfo @@ -387,10 +386,10 @@SEE ALSO
- csh(1), sh(1), stty(1), curs_terminfo(3x), tty(4), terminfo(5), + csh(1), sh(1), stty(1), curs_terminfo(3x), tty(4), terminfo(5), ttys(5), environ(7) - This describes ncurses version 6.2 (patch 20200212). + This describes ncurses version 6.3 (patch 20211021). diff --git a/doc/html/man/user_caps.5.html b/doc/html/man/user_caps.5.html index 95bb74d..0fd1f15 100644 --- a/doc/html/man/user_caps.5.html +++ b/doc/html/man/user_caps.5.html @@ -1,6 +1,6 @@ - @@ -57,20 +57,20 @@DESCRIPTION
Background
- Before ncurses 5.0, terminfo databases used a fixed repertoire of ter- - minal capabilities designed for the SVr2 terminal database in 1984, and - extended in stages through SVr4 (1989), and standardized in the Single - Unix Specification beginning in 1995. + Before ncurses 5.0, terminfo databases used a fixed repertoire of + terminal capabilities designed for the SVr2 terminal database in 1984, + and extended in stages through SVr4 (1989), and standardized in the + Single Unix Specification beginning in 1995. Most of the extensions in this fixed repertoire were additions to the tables of boolean, numeric and string capabilities. Rather than change - the meaning of an existing capability, a new name was added. The ter- - minfo database uses a binary format; binary compatibility was ensured - by using a header which gave the number of items in the tables for each - type of capability. The standardization was incomplete: + the meaning of an existing capability, a new name was added. The + terminfo database uses a binary format; binary compatibility was + ensured by using a header which gave the number of items in the tables + for each type of capability. The standardization was incomplete: - o The binary format itself is not described in the X/Open Curses doc- - umentation. Only the source format is described. + o The binary format itself is not described in the X/Open Curses + documentation. Only the source format is described. Library developers rely upon the SVr4 documentation, and reverse- engineering the compiled terminfo files to match the binary format. @@ -91,9 +91,9 @@ While ncurses' repertoire of predefined capabilities is closest to Solaris, Solaris's terminfo database has a few differences from the - list published by X/Open Curses. For example, ncurses can be con- - figured with tables which match the terminal databases for AIX, HP- - UX or OSF/1, rather than the default Solaris-like configuration. + list published by X/Open Curses. For example, ncurses can be + configured with tables which match the terminal databases for AIX, + HP-UX or OSF/1, rather than the default Solaris-like configuration. o In SVr4 curses and ncurses, the terminal database is defined at compile-time using a text file which lists the different terminal @@ -101,9 +101,9 @@ In principle, the text-file can be extended, but doing this requires recompiling and reinstalling the library. The text-file - used in ncurses for terminal capabilities includes details for var- - ious systems past the documented X/Open Curses features. For exam- - ple, ncurses supports these capabilities in each configuration: + used in ncurses for terminal capabilities includes details for + various systems past the documented X/Open Curses features. For + example, ncurses supports these capabilities in each configuration: memory_lock (meml) lock memory above cursor @@ -115,16 +115,16 @@ (box1) box characters primary set The memory lock/unlock capabilities were included because they were - used in the X11R6 terminal description for xterm. The box1 capa- - bility is used in tic to help with terminal descriptions written - for AIX. + used in the X11R6 terminal description for xterm. The box1 + capability is used in tic to help with terminal descriptions + written for AIX. During the 1990s, some users were reluctant to use terminfo in spite of its performance advantages over termcap: - o The fixed repertoire prevented users from adding features for unan- - ticipated terminal improvements (or required them to reuse existing - capabilities as a workaround). + o The fixed repertoire prevented users from adding features for + unanticipated terminal improvements (or required them to reuse + existing capabilities as a workaround). o The limitation to 16-bit signed integers was also mentioned. Because termcap stores everything as a string, it could represent @@ -132,10 +132,10 @@ Although termcap's extensibility was rarely used (it was never the speaker who had actually used the feature), the criticism had a point. - ncurses 5.0 provided a way to detect nonstandard capabilities, deter- - mine their type and optionally store and retrieve them in a way which - did not interfere with other applications. These are referred to as - user-defined capabilities because no modifications to the toolset's + ncurses 5.0 provided a way to detect nonstandard capabilities, + determine their type and optionally store and retrieve them in a way + which did not interfere with other applications. These are referred to + as user-defined capabilities because no modifications to the toolset's predefined capability names are needed. The ncurses utilities tic and infocmp have a command-line option "-x" @@ -144,8 +144,8 @@ same purpose. When compiling a terminal database, if "-x" is set, tic will store a - user-defined capability if the capability name is not one of the prede- - fined names. + user-defined capability if the capability name is not one of the + predefined names. Because ncurses provides a termcap library interface, these user- defined capabilities may be visible to termcap applications: @@ -153,8 +153,8 @@ o The termcap interface (like all implementations of termcap) requires that the capability names are 2-characters. - When the capability is simple enough for use in a termcap applica- - tion, it is provided as a 2-character name. + When the capability is simple enough for use in a termcap + application, it is provided as a 2-character name. o There are other user-defined capabilities which refer to features not usable in termcap, e.g., parameterized strings that use more @@ -163,17 +163,17 @@ only capability names with 3 or more characters. o Some terminals can send distinct strings for special keys (cursor-, - keypad- or function-keys) depending on modifier keys (shift, con- - trol, etc.). While terminfo and termcap have a set of 60 prede- - fined function-key names, to which a series of keys can be - assigned, that is insufficient for more than a dozen keys multi- - plied by more than a couple of modifier combinations. The ncurses - database uses a convention based on xterm to provide extended spe- - cial-key names. + keypad- or function-keys) depending on modifier keys (shift, + control, etc.). While terminfo and termcap have a set of 60 + predefined function-key names, to which a series of keys can be + assigned, that is insufficient for more than a dozen keys + multiplied by more than a couple of modifier combinations. The + ncurses database uses a convention based on xterm to provide + extended special-key names. Fitting that into termcap's limitation of 2-character names would - be pointless. These extended keys are available only with ter- - minfo. + be pointless. These extended keys are available only with + terminfo.Recognized capabilities
@@ -228,10 +228,10 @@ i.e., one bit per color. U8 number, asserts that ncurses must use Unicode values for line- - drawing characters, and that it should ignore the alternate char- - acter set capabilities when the locale uses UTF-8 encoding. For - more information, see the discussion of NCURSES_NO_UTF8_ACS in - ncurses(3x). + drawing characters, and that it should ignore the alternate + character set capabilities when the locale uses UTF-8 encoding. + For more information, see the discussion of NCURSES_NO_UTF8_ACS + in ncurses(3x). Set this capability to a nonzero value to enable it. @@ -243,13 +243,13 @@ certain modes) moves the mouse, handles the characters sent back by the terminal to tell it what was done with the mouse. - The mouse protocol is enabled when the mask passed in the mouse- - mask function is nonzero. By default, ncurses handles the + The mouse protocol is enabled when the mask passed in the + mousemask function is nonzero. By default, ncurses handles the responses for the X11 xterm mouse protocol. It also knows about the SGR 1006 xterm mouse protocol, but must to be told to look for this specifically. It will not be able to guess which mode - is used, because the responses are enough alike that only confu- - sion would result. + is used, because the responses are enough alike that only + confusion would result. The XM capability has a single parameter. If nonzero, the mouse protocol should be enabled. If zero, the mouse protocol should @@ -259,14 +259,14 @@ The xterm mouse protocol is used by other terminal emulators. The terminal database uses building-blocks for the various xterm - mouse protocols which can be used in customized terminal descrip- - tions. + mouse protocols which can be used in customized terminal + descriptions. The terminal database building blocks for this mouse feature also have an experimental capability xm. The "xm" capability describes the mouse response. Currently there is no interpreter - which would use this information to make the mouse support com- - pletely data-driven. + which would use this information to make the mouse support + completely data-driven. xm shows the format of the mouse responses. In this experimental capability, the parameters are @@ -287,8 +287,8 @@ p8 x-ordinate ending region - Here are examples from the terminal database for the most com- - monly used xterm mouse protocols: + Here are examples from the terminal database for the most + commonly used xterm mouse protocols: xterm+x11mouse|X11 xterm mouse protocol, kmous=\E[M, XM=\E[?1000%?%p1%{1}%=%th%el%;, @@ -306,15 +306,15 @@Extended key-definitions
- Several terminals provide the ability to send distinct strings for com- - binations of modified special keys. There is no standard for what + Several terminals provide the ability to send distinct strings for + combinations of modified special keys. There is no standard for what those keys can send. Since 1999, xterm has supported shift, control, alt, and meta modifiers which produce distinct special-key strings. In a terminal description, ncurses has no special knowledge of the modifiers used. Applications - can use the naming convention established for xterm to find these spe- - cial keys in the terminal description. + can use the naming convention established for xterm to find these + special keys in the terminal description. Starting with the curses convention that key names begin with "k" and that shifted special keys are an uppercase name, ncurses' terminal @@ -356,21 +356,29 @@ which ncurses will allocate at runtime to key-codes. To use these keys in an ncurses program, an application could do this: - o using a list of extended key names, ask tigetstr(3x) for their val- - ues, and + o using a list of extended key names, ask tigetstr(3x) for their + values, and o given the list of values, ask key_defined(3x) for the key-code which would be returned for those keys by wgetch(3x).PORTABILITY
- The "-x" extension feature of tic and infocmp has been adopted in Net- - BSD curses. That implementation stores user-defined capabilities, but - makes no use of these capabilities itself. + The "-x" extension feature of tic and infocmp has been adopted in + NetBSD curses. That implementation stores user-defined capabilities, + but makes no use of these capabilities itself.SEE ALSO
- tic(1m), infocmp(1m). + infocmp(1m), tic(1m). + + The terminal database section NCURSES USER-DEFINABLE CAPABILITIES + summarizes commonly-used user-defined capabilities which are used in + the terminal descriptions. Some of those features are mentioned in + screen(1) or tmux(1). + + XTerm Control Sequences provides further information on the xterm + features which are used in these extended capabilities.AUTHORS
diff --git a/doc/html/man/wresize.3x.html b/doc/html/man/wresize.3x.html index 01b9d77..d02a0a4 100644 --- a/doc/html/man/wresize.3x.html +++ b/doc/html/man/wresize.3x.html @@ -1,4 +1,4 @@ - @@ -54,7 +54,7 @@SYNOPSIS
#include <curses.h> - int wresize(WINDOW *win, int lines, int columns); + int wresize(WINDOW *win, int lines, int columns);DESCRIPTION
-- cgit v1.2.1